CMP Import/export dll
-
The radius set in the CMP files are responsible for the drawing of a CMP(-part). If the radius of a part is to small, it will disappear from the view to early.
If you got ANY shape, you need to be sure that the sphere with your radius covers the whole shape.
All edges and corner points of a 80x80 box will be outside of a sphere with the radius 40, This sphere/radius just hits the outer surface of the box in just 1 point, nothing else. It will disappear to early.
You need to calculate the radius by doing the following:
The distance from the Center and the farthest corner point of the bounding box.And be sure to do this for every cmp part
-
Sorry, but Schmacki already wrote his example equationfor the vector you need.
You always need the longest vector from the center of the bounding box and set this value for the radius. -
To formulate it more in the mathematical sense:
center(min,max)=min + ((max - min) : 2);distance(min,max)=max-center(min,max)
radius(minx,miny,minz,maxx,maxy,maxz)=
sqrt(distance(minx,maxx)²,distance(miny,maxy)²,distance(minz,maxz)²)
This is just what I wrote but this time in strict mathematical notation. “distance” is of course the distance from the center, I shortened the name to keep it readable. -
I’m sorry but I am unable to get either to work. Using 1.7.1 and 1.7.2, not wanting to mess with the cmp export 0.2 (which works just fine) in my 1.8.4. What am I doing wrong that your CMP import/export isn’t doing right for me?
Fus
-
Besides the radius problem of the CMP and it’s parts I found another problem a lot of people will maybe get:
If you want to create LOD models, your LOD meshes need to have the same center point like the original ones.
The problem: Because of the poly reduction, the geometry and so the bounding box can change. Your exporter now generates another center point for the same shippart. In fact this means: LOD models can get big gaps between its parts because the original “high” poly mesh and the LOD mesh have different center points.Another problem is animating the CMP meshes: For rotating animations you need to center the CMP part directly in Milshape where you want to have its rotation axis. Your program in fact always overrides this center point (the root in this case) with its own, bounding box based center point.
Both problems need the same solution:
You have to include a possible manual override for the center points of each CMP group your exporter wants to create.
By this you can, for example with the LODs, always give the LOD parts the same center like the FIX has, so they will be always at the same position with their center.Oh and, why didnt you reacted to all our requests (some of them are really important for a perfect CMP exporter) in the last weeks? You are some kind of personated hope for a working CMP plugin So please please keep working for the whole communiy and its future.
-
I will be implementing these changes somethim this week. Will the using the bounding for the radius and setting LOD’s to use bounding boxes from LOD0. Just haven’t had time to sit in front of the computer.
@Fusion,
What exactly are the plugins doing or not doing?
-
P1p3r wrote:
@Fusion,What exactly are the plugins doing or not doing?
That’s easy. I don’t see them in either my import or export menus. All I see is my 2.7 importer and my 0.2 exporter. There is no other FL references at all in those menus for your dlls.
Fus
-
I know that from another person. He has the same problem: The plugin seems to be invisible in Milkshape.
Just for completeness:
I had a very similar problem with the 3db exporter plugin for milkshape. With using Win7 it just disappeared. Until today I didn’t get it working again (anyway unnecessary now).
It may be a problem of Milkshape.@Piper:
It’s really nice to hear how you want to solve our problems
-
@Fusion,
These dll’s were built with the 1.8.4 sdk, They were meant to work with the newer versions of MIlkshape, So they may or may not work with the older versions of Milkshape. Unfortunately, I couldn’t find an older version of the sdk. It seems that chumbalum may have dropped support for them. For yoy however, You could just rename the files if they conflict with the plugins, and copy them to the Milkshape directory. They should coexist with the other plugins.
-
P1p3r wrote:
@Fusion,These dll’s were built with the 1.8.4 sdk, They were meant to work with the newer versions of MIlkshape, So they may or may not work with the older versions of Milkshape. Unfortunately, I couldn’t find an older version of the sdk. It seems that chumbalum may have dropped support for them. For yoy however, You could just rename the files if they conflict with the plugins, and copy them to the Milkshape directory. They should coexist with the other plugins.
To answer your question, although I have your files, they are not visible in either the File/Import or the File/Export options. I see my CMP import V 2.7 and my CMP 0.2 exporter, but not yours, and that is in the 1.8.4 version. These were downloaded from your posts in page 3, # 40. What am I doing wrong where it can’t be seen in those two menus?
Fus
-
Are there any news if, at least the radius bug, is fixed?
We are waiting for you, P1p3r Especially me. Your plugin is the best so far in every way. -
Seconded, P1p3r.
By the way you may remember that a couple of earlier releases didn’t show in MilkShape, and you recompiled them but I don’t know how or what you had to do?
-
The 1.8.4 version is referring to Milkshape’s version (and SDK used to compile the plugin). Which means it may not work with an older version of Milkshape. If, however, you are using MS 1.8.4 you might try renaming the old import/exporter dll with a “.bak” extension to see if the newer dll shows up then -ie: perhaps the two versions are conflicting and MS only loads the first one it encounters.
-
I would just like to add my thanks P1p3r, for the plugins, after testing models that failed with previous plugin versions.
I’m using MilkShape 1.8.5 and I have only had the minor problems that you already know about:-
1. Importer missing the 1st letter of node names on first use.
2. Importer putting all HP’s after the meshes on 1st use even though “HP Last” is not checked.I exported models that fit absolutely perfectly with the surs generated with Schmackbolzen’s obj-sur converter.
Fabulous tools, very many thanks for them P1p3r, and thanks to Schmackbolzen for the converter and to Skotty for testing too.
Just to keep things together I have presumed to add the latest importer and exporter in one new zip file below for everyone’s ease…
-
Hi P1p3r,
I had a problem with the exporter with the model attached below. After importing the model and working on it (broke it into more groups), MilkShape consistently crashed when trying to export the model.
I have isolated the cause to these hardpoints below, any one of them alone will cause the crash:
HpRunningLight05
HpDockLight01
HpRunningLight03
HpDockLight02
HpRunningLight04They are just simple ordinary triangles, so I can’t understand the cause.
After I replaced all of them with new hardpoint triangles, the model exported fine.
I hope you might discover why these hardpoints cause the problem?
Thanks.
(EDIT: Having fixed the model by making new hardpoints and exporting it, I imported it again to make a couple of changes - and it has the same problem again with the same hardpoints. I used the importer plugin both times.
Has anyone else seen this problem?)
By the way, I discovered that the exporter also crashes MilkShape when there is no material defined, and also when I try to export only hardpoints and no meshes.
If you are going to release another exporter, would you please add a trap and message? It will save hunting for these problems.
-
Can anyone help?
I imported the bw_freighter and immediately tried to re-export it using the P1p3r plugins and MilkShape crashed like it did on my own model above.
But this import + immediate export works ok on the bw_fighter and bw_elite ships.
I installed MilkShape 1.8.5 on my other PC to double-check, but the plugins don’t show on that machine. It too has XP SP3.
Anyone know what is causing the plugins to not show?
-
Thanks Davis.
They were all missing.
I used the Microsoft update utility and updated DirectX, but the plugins still don’t show.
Here’s the link to the DirectX webupdater:
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=35&p=2154P1p3r resolved this sort of thing before but now one of my PCs is OK but the other isn’t so it’s not the plugins, has to be my setup.
Any more help is appreciated?
And can anyone else verify the failure by importing and then exporting the vanilla bw_freighter CMP without changes please?