Modding NHeat - LOD modeling

In NHeat graphics option screen you can adjust the visible car detail depth to your needs. You can set the detail level with a slider and you can enable the usage of high detail cars. The detail level slider's priority is higher than the checkbutton's. However, by chosing detail settings you make NHeat check for some files where detail definitions are set

There's 2 files within every CAR file that define detail settings and thereby define what car and tire MOD file will when be used by NHeat. Those files are lod.val and lod_hi.val, and they both look pretty much the same. At least they have identical structures

There's 2 sorts of tables in lod.val and lod_hi val. First type is like this:

table detail5 = Detail settings when detail slider on graphics option screen is set to level 5
min 1
mirror 3 = Level of detail to be displayed in rear view mirror
scale 1.0
use low = Use low LOD models at this detail level

The detail slider on graphics options screen has 5 different settings, each one refers to one table like the one above. The use low/high attribute is most important: in

  • in lod_hi.val it should be set to high for detail tables 3-5
  • in lod.val it should be set to low for all tables.
If only use low is set for all tables in both lod_hi.val and lod.val, NHeat will never use high detail LODs for the cars. Now there's an option "use high detail cars" on graphics options screen as well... that one sets whether lod.val or lod_hi.val will be used to set LOD options.

Additionally to the kind of table above there's tables in lod/lod_hi like this

table low = this table will be used when in options low detail has been selected
lod0 0 x = low0.mod will be used at zero distance to viewpoint, no tires (= x)
lod1 10 2 = low1.mod will be used at < 10 distance to viewpoint, with tire2/f.mod
lod2 15 3 = low2.mod will be used at < 15 distance to viewpoint, with tire3/f.mod
lod3 20 4 = low3.mod will be used at < 20 distance to viewpoint, with tire4/f.mod
lod4 40 5 = low4.mod will be used at < 40 distance to viewpoint, with tire5/f.mod
lod5 80 x = low5.mod will be used at < 80 distance to viewpoint, no tires (= x)
lod6 120 x = low6.mod will be used at < 120 distance to viewpoint, no tires (= x)
model low = above LOD defiitions use low detail MOD files low0-low6

This table tells us even that there'll be no visible tires when you look at the car from cockpit view or when being more than 80 m (? inch ?) away. And indeed, when running for example ISCH2 or and any other mod that uses alike settings (such as Honda mod), cars sometimes look like hovering when you look at them from some distance. No visible tires

Why use multiple LODs at all ?

If there'd only be one LOD model for the car and the tires, it would have to be a high detail model, else it would look shitty from close distance. The visible detail depth however will decrease with increasing distance, no different than it does in real life. You simply cannot see the same many details on a car from 50m distance than you'd be able to make out from being only 1m away. If you'd only have one LOD model in a game, the game engine would have to compute the same many poligons at 200m as at 1m distance, even if most detail won't be visible anymore at 200m. If you'd tell the game engine to use a much less detailed (and less poligon) car model at 200m, there'll be no visible difference in the game - but the CPU load will dramatically decrease

By default NHeat uses 9 LOD high detail models on it's original and 6 low detail LODs, while a lot of mods only use 5 LODs at all, and quite the same for both high and low detail. Even more mods use the original lod.val files, but use the same detail depth on any LOD file, by simply copying high1.mod to every other LOD file. These are all valid ways to make a mod - but not all of these ways are valid to achieve optimum performance for a mod.

It's on you to decide what's best for your mod: performance vs detail/additional work... If you had thought about adding damage modeling to your mod, perhaps this would be the point when you may want to reconsider and do some estimations about the resulting total amount of work of LOD modeling + damage modeling :-)

On Sportscar GTS mod for example, the Saleen's poligon count is

(= low1)
(= low2)
(= low3)
(= low4)
(= low5)

(= low6)
= 4354
= 3940
= 3663
= 2904
= 2374
= 1879
= 1089
= 737
= 585

The trick now is to find out what detail IS visible at what distance. Once you know, you can optimize the mod's performance without having to decrease it's visible detail depth. The more different LOD models will be used to make Heat always use the optimum detail depth at each distance, the better the mod's performance will be... and the more work you'll have making all those LOD models.... . well, there's always some disadvantage ;-)

Some reasonable guideline for LOD modeling would be to take the total number of poligons on your car/tire models into consideration: the more poligons you use on high1.mod, the more different LOD models you should use with your mod. Some suggestion would be

  • On a car with 4000 poligons it may be a good idea to use as many LODs as the original uses.
  • On a car with approx. 3000 poligons, the ISCH2 lod definitions should be sufficient
  • On a car with < 2000 poligons, using the same detail/number of poligons for any LOD would be ok.
  • The use of different tire LODs is even more important than the use of different car LODs.

Some suggestion on how to find out what will be visible and what won't be visible (at what distance) would be to use unmapped car LODs while trying to find out. If for example you're using high1.mod (mapped), high2.mod (mapped) and high3-high9.mod (unmapped), you'll immediatly see at what distance Heat uses high3 LOD, as the car will turn red then.

That doesn't work on the car your view points to though, so you'll have to run in race or practice mode to have a look at other cars. On the car your view points to NHeat always will use maximum detail LOD (according to your graphic settings and what's defined in lod/lod_hi

On the example on the left, high4.mod of the BMW in front of the Porsches is unmapped: the car had just switched to show up red, giving an idea how much detail is needed at this distance to make dwindling detail being unnoticed

Getting LOD modeling right is mostly a part of experience, trial and error. I'd suggest to carefully check out other mod's LOD modeling. Sportscar GTS mod for example has a quite detailed LOD modeling, just like the orginal has

If you don't want to use any lod.val files from other mods or original NHeat cars, you can try customizing the files. No guarantee this will work afterwards the way you intend though, you'll simply have to try what serves you best. The text file that has the LOD definition tables needs to be compiled to lod.val and lod_hi val by using WinresToolsWizard's MKVAL function

I'd strongly suggest to take up LOD modeling always as the final task of mod making, as else every bugfix on the car model or mappings would have to be made on each LOD as well.
Only start LOD modeling when everything else is done, tested and ready for being released !

Here's some lod.val/lod_hi.val examples for download

[ LOD Modeling ]