How to Correct a .SUR file with FLModelTool
-
My custom ships tend to become invisible at certain poinst: when docking and launching, while cruising, and when I thrust. I guess this the same old problem of the custom NPC ships that become invisible when their center is off-screen. The cure for this is, to correct the ship’s .sur file with FLModelTool - this is one the reasons this tool was celebrated by the community when it was released.
But this is easier said than done. Just loading the .cmp and the .sur, and then auto-resizing the .sur doesn’t solve the issue.
So, what should I do then, to correct a .sur with FLModelTool?
-
Goulash wrote:
Load the model, and simply save it without doing anything, solves the issueThe .cmp you mean???
Lol, I have always been under the impression that the issue was with the .sur and that it needed some small yet important corection.
Thanx man!
EDIT: Meeeh it didn’t work properly (I saved both the .cmp and the .sur to be sure). It did improve the issue ab bit though: instead of being 100% invisible during cruise or trust, the ships were now visible at some points. But not for most of the time, and also not during dock or launch.
So, what should I do to correct the issue?
EDIT: isn’t there some kind of ‘auto-center’ option or something like that??
-
Sure it’s not a simple LOD issue?
The stuff you’re mentioning does seem to indicate it. -
With regards to getting your ship on centre, you can help yourself greatly by doing this in milkshape before you export the model.
Do an edit/select all, then in the right side panel select the “move” option, below you will see an option for the type of move you wish to make, i.e reference or absolute. Select absolute, make sure all three co-ordinate boxes are set to 0.0 then make the move according to centre of mass.
Open the cmp in flmodeltool, if the radius value is different in the bottom set of co-ordinates when compared to the top, then simply save the cmp and exit.
Be sure when you setup you shiparch entry that you get your Lod ranges correct. Just use 0, 5000 if you’ve exported only the highest Lod from milkshape, which you likely have.
Be careful with trying to butcher an sur file as that can cause hell, just use a resized vanilla sur or make one with one of the two sur tools available for testing.
-
Bobthemanofsteel wrote:
Sure it’s not a simple LOD issue?
The stuff you’re mentioning does seem to indicate it.Might be, but not in ShipArch.ini as I cloned the entries from their vanilla progenitors, and didn’t alter any lines concerning LODs. So if it is, it is something I should correct in MilkShape, or with some modding tool.
So, please explain how to overcome it, if it is what you say.
EDIT plz wait until I try what Timmt51m wrote; he also refers to the LOD.
-
Timmy51m wrote:
With regards to getting your ship on centre, you can help yourself greatly by doing this in milkshape before you export the model.Do an edit/select all, then in the right side panel select the “move” option, below you will see an option for the type of move you wish to make, i.e reference or absolute. Select absolute, make sure all three co-ordinate boxes are set to 0.0 then make the move according to centre of mass.
Open the cmp in flmodeltool, if the radius value is different in the bottom set of co-ordinates when compared to the top, then simply save the cmp and exit.
Be sure when you setup you shiparch entry that you get your Lod ranges correct. Just use 0, 5000 if you’ve exported only the highest Lod from milkshape, which you likely have.
Be careful with trying to butcher an sur file as that can cause hell, just use a resized vanilla sur or make one with one of the two sur tools available for testing.
Thanks Timmy51m, this sounds like an excellent first-thing-to-do on a Sunday morning!! Even if it won’t solve the issue, it ‘feels’ like this is the proper way to do it, so I’ll be glad to try it out.
About the LOD - which Bob also mentions - I left everyhting as it was in the exporter, unless it was pointed out by my mentor (which might very well be you) I neede to change it. And the LOD section is on “0”, iirc. (“0” didn’t seem a weird value, as it is not always taken literally to mean ‘nothing’; think of P2P proggys where setting the bandwidth parameter to “0” actually means you set it to max) EDIT: now I look at it, I think “0” is indeed the largest (closest distance), just as in the material files.
Anyway, enough feedback to get me thru the morning
-
IT WORKS!!!Thanks folks!!! Especially Timmy51m for the detailed walk-thru :upup:
There’s only a minor issue now: at the ship dealer all ships display as the same one (the smallest of the trinity). However, when I buy them, I get the ship I selected. Not anything I can’t solve but it hugely surprises me as I can’t edit remember editing the market or package files - but apparently I must have, because this thing worked right when the other major issue didn’t, lol.
EDIT: the fault in this issue was in the group names, in Milkshape! As all the ships, except for the extra stuff like the tail fin, are derrived of one prototype, all basic groups were named ba_fighter; I’ve changed it into ba_elite, ba_vheavy_fighter and ba_freighter respectively and the issue seems solved now. A bit pity this needs to be done one-by-one instead off all-at-once.
-
Happy days!