CMP to SUR Conversion Tests
-
Forget milkshape as its deceptive where sizes are concerned. Use FLmodelTool and check the radius of the model. If its smaller than 15, it’s a small model. You can happily use the 0.1 setting in the sur builder for anything, all it does is create a slightly more complicated sur
-
LS -
Just a note to recap what we’re - OK, just me, so “I’m” - expecting, in case there is a misunderstanding and one or more of us is disappointed…
When you can detect out the separate groups in the cmp and make shrink-wrapped sur parts for each, we will get…
1. Automatically convex surs for each MilkShape part.
2. Where there are gaps between ship parts such as booms etc there will be no sur in empty space if each boom is a separate MilkShape part.
3. an optional shield bubble for our small ships?
4. A second sur for each wing as per original FL surs?
5. Compound surs for wings+weapon points?
6. Double surs for each HpEngine, HpCM, HpMine, HpMount etc as per original FL surs?
I am even happy to have a selection pane where I can check the parts that I want double surs for (e.g. left wing, right wing, left wing +HpWeapon02, right wing+HpWeaon03, etc, if it would help the process.
In this way there is no need to work out Flavian or Neroic Maths because the modeller has to split his .cmp model into enough groups to ensure there are gaps where there should be.
Even I can do that, so let the others do it too!
The good side-effect of this is that those parts fly off individually when the ship is exploded - Nice!
The other still-undetermined statement is that only the Root sur has to be convex - if this is the case then your tradelane ring and other surs can be easily made, the solid part can be convex, and the rest can be odd-shaped and be concave or even bent - but I still don’t know if this statement is correct and true.
Can anyone make some good controlled tests for this and report back? Or has anyone already done it and can really confirm that the standard tradelane ring sur can be one solid middle part and four tubular “horns” bent round the ring shapes and meeting at the top middle and bottom middle?
Thanks all.
I really want surs that meet 1-6 above, because I see that as the way to make fully working, reliable surs that follow the ship’s contours closely.
By splitting my models carefully and allowing LS’s generator to make close-fitting sur parts, I think we can more easily achieve this. Making auto surs to fit a lazy person’s single-part holed model is probably going to delay this project indefinitely, and is not a requirement as far as I am concerned.
And as always, very many thanks for the strong efforts you are putting into this, Lancer.
-
I too think that development time may be better spent in allowing the modeler to create custom surs on their own (like, not automated), having a sur tool to actually build an FL-like surfile rather than doing it the old “barely working” way.
For example, what about those sur LODs? Are they just a myth or do they exist? If so, how to use them or can you write a tool that could allow modelers to insert their hitboxes into the different LOD stages?
-
**@ W0dk4 - Im still out on the sur lods, the layout of the linkage in the bits section seems to suggest something along those lines but it may just be connections between the parts of the sub-surs.
As far as the manual building of surs, probably the best way would be for someone to fix the ms exporter (the latest one) and implement the stuff that has been found. I have looked over the code for it and it isnt that far from being repaired.
@ ST
1 - yes
2 - yes if its exported as a separate group
3 - possible but isnt it just as simple to attach a shield bubble in the shiparch entry?
4 - every part of the ship exported as a separate group will have a second sur attached, hardpoints on them will be automatically added to them, the root sur requires all of the sur parts to be part of it to work properly
5 - see #4
6 - what is the double sur used for? If it’s not on the root node of the mesh it will happen automatically…Selection panes - probably not, I would have to implement alot of handler code to add that into the program which could delay the project up to another month
The root being convex - have not tested that with the current code, been very tempted, if it isnt a requirement I could simply do a form-fitting sur on all of the parts and be done with it simply using Delaney triangulation.
Ok, here is the plans for the program that I want to have completely working…
Multi-part surs - in process, part of the code has already been written
Mesh decomposition - this may or may not happen, what this will do is split the mesh up into constituent parts until a convex hull can be built around each part. This will take care of any holes in a mesh simply by breaking it into small enough pieces that don’t have holes. I will be using Delaney triangulation to act as a mesh reduction feature and also another mesh reducer such as threshold angle face combining. The downside is that it takes alot of time to do that.decomposition example pic
From - http://www.codesuppository.blogspot.com/
Anyways feel free to continue posting your ideas, Im always open to new ones.**
-
1st TY 4 that great tool m8.
2nd 1 or 2 suggestions:An option to get a more ‘dense’
and possibly ‘closer wrapped’ SUR.Example #1:
If i have a very simple shape - say a ‘Borg Cube’ -,
it gets me ‘only’ a very ‘simple’ SUR
with a very few lines shown in the animation screen.
My impression is, we get collision detection only,
if the SUR has enough edges or ‘lines’ as shown in the animation.
Now if that model is big enough, it seems, a small ship
can sometimes slide through between those few ‘lines’.Example #2:
If i have a more complex, big structure with interior- say something like ‘Deep Space 9’ -,
it gets me a more or less ‘only’ a sphere from the outer part.
Would be cool to have the collision detection
with things like the arms on one hand and also
the inner structure on the other.
- say something like ‘Deep Space 9’ -,
-
thx Gibbon
a little feedback
i done 262 ships for the freeworlds french mod and … all works
so -___- it’s really really impressivebut i have a question
i place the ships as a base to test the hits and hull collision
all is working, but the hits are no longer visible at all, at maybe … 10/15 meters
so for a capship you don’t see the hits anymore.
it works because i added hit_pts to the cmp on the solararch.ini and i can see the life who come downso normal ? it’s due to the new hitbox ? or it’s something else ?
-
Hi LS, thanks for the explanation…
My replies to your queries…
3. Yes the shield_link is always needed in the shiparch.ini file, but as you know standard FL fighters always have that darned double shield-bubble (the HpMount 0xF00FB9DE and its twin with an offset value instead of mesh name crc) in the sur as well. I don’t know why, but it is compensated by FL if it does not exist in the sur, and the hits are shown flashing on the shield-link shield bubble until the shields are down just like if the shield bubble did exist in the sur.
6. Again I don’t know, although Bejaymac has tried to explain so many times that one is for collision detection and one is for weapon hits damage. One uses the mesh name crc and its twin uses an offset value like 0000270. These ones with an offset value instead of a mesh name crc are placed at the origin by the MilkShape sur importer instead of over the cmp part as they should be - HardCMP does, maybe it’s because the sur importer is not interpreting the offset values correctly if at all for these? So maybe by looking deeper into the HardCMP code you or adoxa would be able to understand the offfsets that are used and we (well… not me!) can then fix the sur importer too?
On duplicate surs for every non-root part… Well - not all cmp parts (other than the root) have the double surs. Only the wings, engine hardpoints, equipment hardpoints and weapon hardpoints do have them, and in case of weapons they only have them if they are mounted on the wings, and this becomes that convex sur covering both the wing and the weapon sur. You can see this complex sur even in HardCMP but it’s hard to distinguish, the best way is to import a sur into Milkshape and then you will see the double surs are all at the origin, just move them out one by one to see the shape they cover. The weapon surs are all extended tapered cubes, and the wing+weapon surs cover this extended tapered cube plus the wing it is sitting on.
Non-root hull parts and pylons (e.g. as in the stiletto and sabre) do not have double surs. So making double surs for everything except the root may cause problems.
And on only the root sur part needing to be convex… Well if we can determine that indeed only the root sur needs to be convex then it would be a terrific relief, as all non-root surs can be concave and be bent, and follow hull and body contours, as in my suggestion of a standard-shape-tradelane sur that can be then made of only 5 parts - a convex root sur part for the middle and four long, bent, tapered horn sur parts meeting at the top and bottom of the rings - easily and quickly made from copying each of the ring cmp quarters. However in standard FL ship surs, these sur parts are all indeed convex.
So it is worth spending a couple of hours proving this out, as it may save you lots of time.
Thanks as always pal.
-
Ok, so it works but does not show the hit flame?
Well in some cases I can live with that, e.g. on very large ships.
So in this case we can make close-fitting non-convex (i.e. concave!!) sur parts as long as the root sur part is convex?
Super - if this is really confirmed then LS needs only to ensure the root part is convex, or even just make a sphere that fits inside the ship centre and call it root, and all other parts can follow the shape of each of the ship part groups?
Then…
If this is so…
then…
wow!!
… get cracking, LS!
Don’t worry about creating the gaps between booms and stuff in ships, mine will always be separated into groups that will prevent gaps being filled with sur parts, I just need a sur part for each ship group. And the double sur parts for hardpoints and wings as in my checklist above.
As long as others do the same there should be no problem with multi-part models.
-
**Well, I am going to try and avoid any use of concave shapes. BTW, has anyone even tried adding your concave sur parts to ‘concave.ini’ and see if it fixes the hit problem?
If there is sufficient interest I may try and do the mesh decomposition, for now the multi-mesh surs is nearing completion, here is an example of what you can get by properly defining your model into pieces (NX01 Star Trek model)…
**
-
That’s amazing, but what do you mean by “properly defining your ship into pieces”?
-
**Using the pic above…
Each pylon is a separate mesh. The saucer section is another mesh. The warp engines are another. These can be set up in Milkshape as groups and exported by group. The only limit is the exporters 18 group limit which can be a problem on complex models.**
-
Holy shit, that’s amazing. As for the 18 part groups, couldn’t that be beaten using the method that FW:ToW developed?
http://zomgbayz2.googlecode.com/files/Infinite hitbox parts tutorial.wmv
-
**@ Sushi - thats what I thought, I surprise myself sometimes, I just build it, what comes out the other end is anyone’s guess
The program can handle up to 1024 parts, so if u can get around the 18 part limit then u should be able to build some pretty amazing surs…**
-
And the program can handle multiple VMeshes?
I don’t think what Sushi’s asking will be possible with this though, as that’s creating new dummy mesh objects (which have no real geometric relation to the functional model), but linking them to previously generated Sur parts, which are positionally correct and offset to match the original model’s geometry.
But… if you broke the model up to match the Surs, into multiple vmeshes: base_left_wing01, base_right_wing01, base_cabin, base_power, etc… and the program supports this, then there’s no need for dummy meshes anyways (which will be better anyhow if the model ever needs to be animated) .
So that means making a complex model from say 5 Milkshape scenes, each exported to their own CMP, then merged by hand. That should support auto-generating a Sur, as long as the program handles multi VMeshes.
-
Actually it handles multiple vmeshes and the every mesh stored within them. The NX01 shown above is a single VMeshData but contains multiple meshes within that node. In Milkshape you would just simply split the mesh and regroup it. The NX01 contains about 60 groups (meshes), all stored in the root node.