LOD
-
You would have to keep the individual model count pretty low, otherwise the lag caused by such an explosion would become unbearable. You’d have to use fuses to make that work.
As for the LODs, I’m not very competent into modelling, but I do know there should be a way to create multiple LODs on a model using the tools we all have. This way, you could limit the polycount hit when further away from it. Best would be to have all interior parts be separate from the actual model, so they could have independent (and much much smaller) LODs.
I’m sure a FL modelling expert can give you more info on how to make LODs in models
-
all base interiors are seperate already. i just have to limit the poly count on the current model by deleting otherwise non-visible components. that would make things a bit easier as well.
and i will go ahead and make some lower LOD models to accompany the big one. of course that would mean using different textures on the lower LOD models, but thats fine because im sure i can get some decnt ones simply from using the baked ones and opening the lower LOD mips from the dds file. that is once i get them assembled properly. but that always reduced the fps lag because the processor doesnt have to calculate the coordinates as much, since there are fewer of them. it always helps to have less maps assigned to any game model instead of just using the same ones used to create the original max texturing.
i will definitely be on the lookout for a good tutorial about LOD’s for freelancer, but until then anyone is welcome to post their knowledge on the subject.
-
As for adding the LOD meshes; within Milkshape, when exporting, choose “update cmp” instead of new cmp and it will be added under VMeshLibrary\meshname.lod1-112.vms as well as creating meshname.3db\MultiLevel\Level1* entries.
The exporter supports up to 4 lod’s (0-3)
As for exactly how and when it switches between MIP levels, that I can’t say. OPR8R seems to think that it coincides with the lod levels, though if you look in Freelancer’s TGA based implementations of mip mapping, there are 9 levels there, not 5 as in lod’s. I’m not a programmer though, so…<extraneous junk=“” removed=“”>edit: MS3D does have that D3D mesh reduction plugin if you get tired of screwing with it and decide to go quick n dirty</extraneous>
-
The LOD ranges (in-game “metres”) in the ini files determine when each MIP map (LOD image) is selected for displaying, the last image found will be used for distances up to the last LOD range value, and then the object will not be drawn when this last LOD range number (max distance from the player) is reached or exceeded.
The last number is the visibility limit for the object. It may not need to be 9999 or 99999, 4999 or 7999 should also work but I haven’t the time to try it out. But let’s stick with 9999 and 99999 anyway…
I seem to remember that if the first LOD range number is not 0 then the object will not be displayed until the object is further away from the player than the first number. - ??
So if there really are 9 MIP maps in a cmp file and 10 LOD range values, then the last MIP map will be displayed from the 9th distance number onwards, and it will remain visible until the 10th LOD range number.
If there are 3 MIP maps and 9 LOD levels, each time a higher LOD distance is reached the engine will look for a matching MIP map. If there is not one, it will still display the last MIP map it has already found, so in this case it will still display the 3rd MIP map for LOD levels 4-8, and will cease drawing the object when the 9th LOD range is reached or exceeded.
But this is beyond reality for our own creations, the exporter can only export 4 LOD images (lod0 - lod3) as someone already pointed out.
And I am not sure how many LOD ranges the FL engine will use, does anyone know for certain? I think I’ve seen 6 in the standard game ini files?
When declaring LOD ranges most modders use silly numbers and too many too, because they don’t know what they mean. If there is only 1 MIP map in the cmp, LOD levels for any ordinary sized ship should be 0, 9999 - this means display the first MIP map for any distance from 0 up to 9999 ( the game will not display anything useful beyond 9,999 metres anyway, even if you hacked your exe, unless the object is huge).
For single MIP map large objects such as stations, tradelanes and large ships etc, LOD ranges should be 0, 99999 - the single MIP map will be used from 0 metres up to 99,999 metres. But remember that it will cease to be drawn when the exe visibility limit is reached in any case.
If you know your cmp has more than one MIP map then decide at what distance (in-game “metres”) you want to switch MIP maps and use those distances in the LOD ranges, e.g. for LOD_ranges = 0, 1000, 2000, 5000, 99999 the game will expect to find 4 MIP maps. The first is displayed from distance 0 to 999, the 2nd from 1000 to 1999, the 3rd from 2000 to 4999, the 4th from 5000 to 99998. From 99999 and higher it will not look for a MIP map - if you hacked your exe to allow visibility at beyond 99999 then the object will be visible at up to 99999 metres. If you did not hack your exe, then it will disappear (not be drawn) at less than 3000 metres (unless it’s a station or planet) and your extra MIP maps and LOD ranges will not be used in any case.
Hope this helps to shed some light.
-
sure does! that was really informative and it makes it easier to point to the correct mips since its only 4. lemme tell ya im messing with the character modding too and those nine levels of mips are monotonous.
but anyway, im not really needing the thing to appear out so far, simply because its in a cloud of fog too, and it only needs to be visible closer to the ranges you described anyway. but its probably going to be one of the bigger stations. but if the mod leader decides to cut out the fog, that wont even really matter either, because most stations disappear anyway the further out you do go.
ok im a sponge dump some water on me, im soaking it all up.
-
Thank you Trader for your information, It makes sense. I am having a LOD issue myself, however it is a closeup, not further away that is my problem.
Just for clarificatation sake, do I presume correctly that a MIP map = 1 texture in a .mat file? If yes, I have a station that has one dds’ed texture in it. If I am at 0 (zero) m from it, go into turret mode, (this is being done ina Rhino) and free flight the turret mode, it disapears completely after a certain angle until I return to the min visable angle. How can I correct this issue?
Fus
-
I don’t have a sur file for it yet. I have done the resize of the cmp, tho. (Resize option all=1) Will it always be that way until a sur is cooked up?
Fus
-
The bounding box info in the CMP file can cause these issues, even without a SUR file. It does not always happen, and I can’t say the circumstances leading up to it. But if your model has one LOD (lod = 0, 9999) and pieces are disappearing outside a certain angle / distance, it’s a pretty safe bet this is the issue. Resizing with a value of 1 in FLModelTool should fix it, but it would really be nice to narrow down the underlying problem and get the model correct right at export.
-
so… Are you making a custom SUR, Fusion?
MK
not sure… I have a copy of a sur template file, but it basicly would create a box around the perim of it. Custom sur might be the answer, but w/out certain details in a SS and/or ms3d file, I can’t fully understand the concepts that are being described in the read me that comes w/the sur splicer zip. I also have other questions about it, but perhaps that would be better in a seperate string?
Fus