How to modify LODs?
-
As the title says, how to modify LOD values?
-
in any archetype files (shiparch.ini, solararch.ini, *_equip.ini) you have a line with LOD parameters (e.g. in shiparch and solararch - LODranges = ). obviously depending on what you write there you see different LODs depending on distance to object.
-
Huh - nice clear and detailed and informed reply Gist! rofl
Example: (patriot)
In the shiparch.ini file you will find:
nickname = li_fighter
LODranges = 0, 40, 60, 140, 300, 1000In the li_fighter.cmp there is actually a set of 5 models (meshes) for the li_fighter, not just one. See the .cmp Importer shot attached below.
As you select each lod model in the importer you will see that fewer materials (textures) are used for each smaller model.
Each higher number lod has less detail.
Explanation:
In the game the ship is viewed from your ship.
When it is closest to you, the most detailed model (lod0) is displayed, with the materials specified.When it is further away, at some point the model mesh is replaced with the next smaller one from the .cmp file (lod1) if it exists.
And when further again, the next smaller model is displayed (lod2) if it exists.
And when further, the next (lod3) if it exists.
And when further, the next (lod4) if it exists.
And at some point the model is not displayed at all.
LODranges = 0, 40, 60, 140, 300, 1000
This means:
At 0-39, display lod0
At 40-59, display lod1
At 60-139, display lod2
At 140-299, display lod3
At 300-999, display lod4
At 1000+, no displayMost custom-made ships designed by modellers have only 1 model (mesh) in the cmp, so the only requirement for the LODranges values is:
LODranges = 0, 1000 for a small ship.
LODranges = 0, 20000 for a large ship.
LODranges = 0, 40000 for a giant ship.This means,
Display the ship mesh up to 999 metres and then don’t display it if 1,000 or more.
Or up to 19,999 metres and don’t display it if 20,000 or more for the large ship.
Or up to 39,999 metres and don’t display it if 40,000 or more for the giant ship.BUT:
There is also an overriding default distance from you at which the ship is no longer displayed, and that is set in one of the Freelancer exe files (see the hacks). The standard is 2500 (metres).So even if you specify 0, 40000 for a giant ship, it will still disappear at 2500 metres unless you change the default value in that file.
Hope this has explained?
-
Ahh… you learn something new every day… even after many years
Thanks ST… I was always under the assumption the LOD’s were just Mipmap references… not whole different models (as i’ve never really played with the stock ships)
Nice to know.
-
The UTF Editor lets you choose which LOD to view.
-
Yay! =D
-
Wasn’t me, I just replied first.
I had to find part of it out the hard way some years ago, when I got frustrated because my ships were disappearing at 2500m and modders were still putting in
LODRanges = 0, 999999, 999999, 999999, 999999, 999999 without knowing what they were doing.When I experimented with 0, 500 and 0, 1000 I clicked.
Then some time later I found someone else had done the full research, and explained the cmp contents link. Sorry I can’t remember who it was to give the proper esteem.