Product Chat (Early Access) / LOD - Let's Talk About LOD

Author
Message
OldFlak
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 27th Jan 2015
Location: Tasmania Australia
Posted: 1st Nov 2022 22:34
While the forums are pretty much dead lately - it is still a better place than Discord to discuss and retain topics of interest.

Hoping for a useful and informative discussion here

So what about LOD.

Given that LOD adds a lot of tri's to each model, and you should design your game so that things are not seen unless necessary, what really are the benefits of LOD?

Inside Buildings:
Buildings that you are inside of, surely don't need LOD, as you can only see the room your currently in. So the other parts you cannot see should be occluded by the engine - so what is the advantage of LOD in that case?

Outside Environments:
When things are far away - for the most part, would it not be better if you designed the level so they are not seen at any great distance, and can be occluded by the engine?

Would it not be better to just rely on Mip-Maps for things in distance to reduce gpu usage, and just occlude what cannot be seen, rather than add a gazillion of tris to a level that for the most part don't get used, and perhaps, don't need to be there in the first place?

OldFlak....
System Specs
i7-9700K 3.60GHz. ASUS NVidia GeForce GTX 1060 6GB. 32GB Themaltake ToughRam Z-ONE 3600.
Main Screen: HP 27" @1920x1080 - Screens 2\3: Acer 24" @ 1920 x 1080

Windows 11 Pro 64-bit Insider
aka Reliquia
PM
Monkey Frog
4
Years of Service
User Offline
Joined: 5th Feb 2020
Location:
Posted: 2nd Nov 2022 11:45 Edited at: 2nd Nov 2022 11:48
I think you're not understanding LODs. LODs don't add any triangles to your model ... or they shouldn't.

Firstly, all models in game engines end up triangulated. So, even if you create a cube with six quad faces, you'll end up with a cube with 12 triangles once it's in the game engine. Game engines work with triangular faces.

Secondly, LODs are used to REDUCE the number of tri-faces a model has based on it's distance from the camera. So, if you have an NPC, for example, that is made up of 10,000+ triangular polygonal faces, that NPC doesn't need all 10,000 faces when further away since you won't be able to see all those details. Therefore, a series of LODs (LOD1, LOD2, etc.) can be created for various distances, each one having fewer and fewer triangular faces.

One of the reasons you may want LODs is because off in the distance, further from the camera, more objects can be seen, more objects can be fit on the screen. If an NPC is right in front of you, they will block a good bit of the background, so it's okay for them to have a large number of triangular faces. But if they are off in the distance, but still visible, they block little to nothing. As a result, you may see many similar NPCs. If they all kept 10,000+ faces each, then this could potentially be problematic on some PCs. So, with LODs, they might have 5000 each ... or 1000 ... or even less, depending on the distance. As an NPC were to approach you (or you the NPCs), you would hit different LOD stages as they got nearer the camera. This would not be ADDING triangular faces but, in effect, returning the model to it's original detail.

So, LODs are NOT about adding more triangular faces to a model, but about REMOVING triangular faces in order to decrease details that won't be seen in the distance in order to help your PC keep frame rates up, etc.

EDIT:

Many times you would create these LOD levels yourself, creating the additional models that would be used for LOD1, LOD2, etc. The engine would swap out the model based on the distance from the camera, using whatever LOD level is determined. However, there are engines that use AUTO-LOD. This automatically reduces a models triangular face count based on distance so you don't have to create these models yourself. You would still have the option of creating the LOD models yourself and using them instead, but just wanted to point out that some engines support this feature.
Intel i9-10900K 5.10GHz, 64 GB RAM, Nvidia GTX 1080 ti 11GB, Windows 10 64-bit, dual monitor display
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 2nd Nov 2022 20:03
My understanding of LODs is that you effectively have multiple meshes for the same model with the highest definition mesh for close to the camera and the lowest level mesh for off in the distance. Then the meshes are all mapped to the same texture set and the engine simply chooses the mesh to render based on distance.

Is that a correct understanding?

If so then for a building the LDO meshes would only apply to the external view of it I would think, the internal parts would be a single mesh or a set of single meshes without any LOD levels. Not sure how that works in a modelling app though.
Been there, done that, got all the T-Shirts!
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 2nd Nov 2022 21:24
At least in GG it works like Amen pointed out.
You model your mesh plus let's say 2 meshes, each one being less poly than the other, they should be on 0,0,0 (center of the mass), then the engine shows the proper mesh distance-based; you should set the LODs in the fpe file.
TBH ignore how LOD works in GGMax, a first glance it looks like automatic LOD, but don't quote me on that.
Some internal decimate features might help to generate LOD automatically, in GGMax.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
wizard of id
3D Media Maker
18
Years of Service
User Offline
Joined: 16th Jan 2006
Playing: CSGO
Posted: 2nd Nov 2022 21:31
Quote: "At least in GG it works like Amen pointed out.
You model your mesh plus let's say 2 meshes, each one being less poly than the other, they should be on 0,0,0 (center of the mass), then the engine shows the proper mesh distance-based; you should set the LODs in the fpe file.
TBH ignore how LOD works in GGMax, a first glance it looks like automatic LOD, but don't quote me on that.
Some internal decimate features might help to generate LOD automatically, in GGMax."


The meshes should also be named.

LOD0, LOD1, LOD2 if I remember correctly so that gameguru knows which mesh is which. But generally speaking I hardly use it, overall the performance is pretty good as is. Definitely has specific use cases, but over use of it isn't good either, you don't need it for every model.
Win10 Pro 64bit----Intel i7 4770k @ 3.5GHZ----GTX 1660 6gig----16gig ram
Monkey Frog
4
Years of Service
User Offline
Joined: 5th Feb 2020
Location:
Posted: 2nd Nov 2022 21:39
@AmenMoses - You have it right. It's multiple meshes. The highest polygon version is used for when the camera is close and is normally LOD0. Then, each progressive mesh has fewer and fewer polygons for distances further and further from the camera. These are named LOD1, LOD2, etc. How many LOD meshes and what the distance is for each is normally set by the person creating the game via the engine or programming.

While I used the example of NPCs above, LODs can be created and used for any model in your game, static or dynamic - rocks, trees, plants, buildings, a cup on a table, etc.
Intel i9-10900K 5.10GHz, 64 GB RAM, Nvidia GTX 1080 ti 11GB, Windows 10 64-bit, dual monitor display
wizard of id
3D Media Maker
18
Years of Service
User Offline
Joined: 16th Jan 2006
Playing: CSGO
Posted: 2nd Nov 2022 22:00
Quote: "
While I used the example of NPCs above, LODs can be created and used for any model in your game, static or dynamic - rocks, trees, plants, buildings, a cup on a table, etc. "

Do you really need LOD for a 1000 polygon object. It is a waste of time and effort, there will be almost zero performance increase. It is a diminishing return once you go below a certain point.
Win10 Pro 64bit----Intel i7 4770k @ 3.5GHZ----GTX 1660 6gig----16gig ram
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 2nd Nov 2022 22:56
You have a LOD checkbox in Entity settings, so, if you ticked it, then some internal decimate process reduces the mesh poly count (distance based) getting the same effect without having to model the LOD meshes. Just an idea
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 3rd Nov 2022 07:21
Yes Amen is bang on , i used it for my heightmap to GG tool, although i used fixed settings for he LOD so wasn't flexible to the user in hat way much.
Pro Programmer / Data Scientist: Languages- SAS (Statistical Analysis Software) , C++ VS2022, SQL, PL-SQL, JS, HTML, Three.js, others
Hardware: PC SPECIALIST intel i7 16GB 2TB HDD & Win 10 (x64), Geforce RTX3060ti. Dell Mixed Reality VR headset, Aerodrums 3D
Monkey Frog
4
Years of Service
User Offline
Joined: 5th Feb 2020
Location:
Posted: 3rd Nov 2022 12:04
Quote: "Do you really need LOD for a 1000 polygon object. It is a waste of time and effort, there will be almost zero performance increase. It is a diminishing return once you go below a certain point."


For a single object, yes. But if you have dozens, hundreds, etc.?

In any case, my comment using "rocks" and "cups" was an example where I pointed out that LODs can be made for anything. It's true, they can be used for any mesh in your game. Whether you should or not? Well, that's up to the developer of their game.
Intel i9-10900K 5.10GHz, 64 GB RAM, Nvidia GTX 1080 ti 11GB, Windows 10 64-bit, dual monitor display
OldFlak
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 27th Jan 2015
Location: Tasmania Australia
Posted: 4th Nov 2022 13:52 Edited at: 4th Nov 2022 14:00
One thing that got me thinking on this was that I am under the impression that the store expects high quality assets with LOD.
Could be wrong there. But personally I don't see the need for the extra work LOD creates for the majority of models.

I think proper level design and occlusion would be a better way to keep performance up.

3COM's idea of the engine applying it when needed would be cool.

OldFlak....
System Specs
i7-9700K 3.60GHz. ASUS NVidia GeForce GTX 1060 6GB. 32GB Themaltake ToughRam Z-ONE 3600.
Main Screen: HP 27" @1920x1080 - Screens 2\3: Acer 24" @ 1920 x 1080

Windows 11 Pro 64-bit Insider
aka Reliquia
PM
Monkey Frog
4
Years of Service
User Offline
Joined: 5th Feb 2020
Location:
Posted: 4th Nov 2022 14:43
There are engines that use auto-LOD, but these technologies either have to be licensed (quite expensive, from what I've been told) or coded into MAX by the developers (very time consuming). So, if MAX is to get auto-LODs, then they would have to take time away from bug fixing and adding the features they promised for MAX. This is not speculation as I've actually talked to them about adding auto-LOD to MAX and this is (part) of what I was told.

Creating LODs for your model is not that time consuming overall. After you've created your highest polygon version, you then can decimate the model a bit to get a somewhat lower polygon version, etc. For many modeling apps, there are plugins/addons to help with this sort of thing. But even if you have to create the LOD stages by hand, once you have the main model completed (your high-poly version or LOD0), editing them down for lower polygon versions doesn't take very long at all.

Proper level design and occlusion do go a long way toward keeping performance up. But LODs are actually part of "proper level design". It's not an "either/or" thing ... or doesn't have to be. LODs are one more tool in the shed of the game developer that they can use to help eke out another few frames here and there and keep things chugging along smoothly. There's a reason modern games still use LODs despite having all these other tricks to use in their arsenal. There's a reason other game engines support LODs (Unreal, Unity, Flax, S2 Engine, etc.). And that's because they are both useful and effective.
Intel i9-10900K 5.10GHz, 64 GB RAM, Nvidia GTX 1080 ti 11GB, Windows 10 64-bit, dual monitor display

Login to post a reply

Server time is: 2024-12-21 18:07:17
Your offset time is: 2024-12-21 18:07:17