.obj -> .sur converter
-
Well I guess then we know now what the HP geometry in the .sur files is for: To further speed up collision detection. I have an idea how to include it, I will try to implement it in the next version.
-
Schmackbolzen wrote:
Well I guess then we know now what the HP geometry in the .sur files is for: To further speed up collision detection. I have an idea how to include it, I will try to implement it in the next version.Awesome, Schmack. Thanks for everything thus far. Get to it when you can, no rush
-
Pretending for a moment that i know nothing about sur files (which i donāt) and cooing like a pigeon when LSās sur builder and now Schmackās utility came out for making surs, can someone explain to me in laymans terms why the turret hitbox is needed.
From my perspective, if a custom turret model has itās own sur, like in vanilla and many custom models, (i make a point of having custom turret models where possible), surely the fact that these models have custom surs and are therefore independent of say a base or capship sur, means that they should work as they are seperate from each other?
-
Yes, thatās that what we assumed initially. But now we can assume that the geometry for the weapons etc. hardpoints in the ship .sur file is used for further calculation speedup, since just adding them without geometry results in them not being hit after all. For a full understanding you would have to look up of what data the .sur format consists of. But I guess thatās not what you want
Please understand that the converter is not final, which means for now it is written for people who understand what they do, since I was not sure how well it would work in the first place. There are still some bugs and there is still the possibility that you have to redo all your .sur files you converted.
Once the version is stable enough I will try to make it more usable for the common modder.
-
Your utility has already allowed me to make surs for some very peculiar shapes, including asteroid bases you can fly into and odd shaped ships and all the surs work fine, (have to check this turret thing as iām curious now). So take your time, between your utility and Lancers, can make just about any sur i like, (well almost )
-
Hmm, I created a hitbox for this base using the converter.
http://i352.photobucket.com/albums/r330/SilentAssassin82/Untitled-5.png
I actually had to splice the parts together because the doors where animated. In doing this I deleted the HPIDs section of the sur and all the turrets do register hits. I dunno why but the turrets on that model are fine ingame.
-
On stations (stationary objects) the surs of the weapons itself will be used.
On ships the surs of the hardpoints will be used.
(I think) -
SilentAssassin82 wrote:
Hmm, I created a hitbox for this base using the converter.http://i352.photobucket.com/albums/r330/SilentAssassin82/Untitled-5.png
I actually had to splice the parts together because the doors where animated. In doing this I deleted the HPIDs section of the sur and all the turrets do register hits. I dunno why but the turrets on that model are fine ingame.
Interesting. So, in all my ship models, like the ISD in the video, I added HPID section for the hardpoints. I wonder if thatās the issue? Because when we made custom hitboxes, we never had to add that section beforeā¦
Interesting. How would I go about deleting this from the .sur, Schmack, to test?
And Skotty, no, I donāt believe it does work like that. The big ship in the video I made is a āstationā.
-
OK, that did it. You remove the HPID section from your .sur, and the turret hitboxes magically appear.
So, with that said, what are the hardpoints that must be in the HPID to prevent crashing?
I remember HpCM01ā¦what else was there?
-
Actually I added the option just because of crash reports. See it as a quick fix until I can include real geometry. My hope was to avoid this step, but it seems to be unavoidable
-
Damn. Just so you know, these were the hpid hardpoint sections I was adding, in general, to the hitboxes. Might have been a bit excessive.
Capital Ships
HpMount HpCockpit HpShield01 HpShield02 HpShield03 HpShield04 HpShield05 HpShield06 HpCM01 HpTractor_Source HpTractor01 HpThruster01 HpTorpedo01 HpTorpedo02 HpWeapon01 HpWeapon02 HpEngine01 HpEngine02 HpEngine03 HpEngine04 HpEngine05 HpEngine06 HpEngine07 HpEngine08 HpEngine09 HpPower01 HpPower02 HpPower03 HpTurret01 HpTurret02 HpTurret03 HpTurret04 HpTurret05 HpTurret06 HpTurret07 HpTurret08 HpTurret09 HpTurret10 HpTurret11 HpTurret12 HpTurret13 HpTurret14 HpTurret15 HpTurret16 HpTurret17 HpTurret18 HpTurret19 HpTurret20 HpTurret21 HpTurret22 HpTurret23 HpTurret24 HpTurret25 HpTurret26 HpTurret27 HpTurret28 HpTurret29 HpTurret30 HpTurret31 HpTurret32
Starfighters
HpMount HpCockpit HpShield01 HpCM01 HpTractor_Source HpThruster01 HpTorpedo01 HpTorpedo02 HpWeapon01 HpWeapon02 HpWeapon03 HpWeapon04 HpEngine01 HpEngine02 HpEngine03 HpEngine04
-
Canāt remember which hardpoint was causing crashes for Startrader but iāve only been adding in HpThruster01, HpCM01, HpMine01 to my ships.
On bases, maybe why iāve been able to hit my turrets, i donāt add any hardpoints at all in the sur, no problems so far.
-
Iām guessing that Schmack is right and that this really is just used to speed up calculations, whereas if you just donāt specify them the game reverts to the actual, more complex turret SURs.
Does make me wonder whether those turret SURs are used at all if you list them in the hardpoints list. Maybe they get used for calculations if and only if the simple turret is hit?
-
FriendlyFire wrote:
Iām guessing that Schmack is right and that this really is just used to speed up calculations, whereas if you just donāt specify them the game reverts to the actual, more complex turret SURs.Does make me wonder whether those turret SURs are used at all if you list them in the hardpoints list. Maybe they get used for calculations if and only if the simple turret is hit?
I think it works this way: If a beam is inside the general sur radius, the overall sur gets checked. Now, every hardpoint āroughā geometry is checked. If the beam intersects one, the actual sur of the equipment mounted at that hardpoint is checked.
So, if all your equipment is simply a sphere or a very simple geometry, I think there is basically no speed-up. But as soon as you have a lot of equipment that is rather complex, I think there can be quite a speedup.
-
Actually the speedup would be there in any case, because of the BSP tree. Thatās why I think it made perfectly sense for the developers to also include simple geometry for the hardpoints. You just navigate through the tree until you hit one and after that look what is actually mounted there.
-
Adding hardpoints is a mistake, for me, I didnāt use this featur yet, but if itās done the same thing that vanilla models, the doms you can see on station, Iām sure you canāt hit turrets on your ship. Iām probably wrong, if Iām, can you tell e where? Please, cause Iām not an expert of modding.
-
SilentAssassin82 wrote:
Hmm, I created a hitbox for this base using the converter.http://i352.photobucket.com/albums/r330/SilentAssassin82/Untitled-5.png
I actually had to splice the parts together because the doors where animated. In doing this I deleted the HPIDs section of the sur and all the turrets do register hits. I dunno why but the turrets on that model are fine ingame.
How did you āsplice the parts togetherā? What tools / method did you use?
-
http://i352.photobucket.com/albums/r330/SilentAssassin82/Untitled-5.png
What version of HardCMP is that? I want it.
-
Looks like 1.0.0.23 to me
-
You can use this for parts with only 1 mesh in them.
http://www.gamefront.com/files/20193523/SURSpliceForOBJCon.rar
But if itās a complex mesh like the rings in that model there, then you will have to do it by hand. That model I posted, every part except the 2 donut shaped rings where just a single mesh. So all I done was make 2 simpler SURs to start with only a single mesh and then replaced them myself with the more complex ones.