Level of detail

Started by Minigame, November 14, 2012, 06:15:44 PM

Previous topic - Next topic

Minigame

Is there a way to manipulate the level of detail in the world scene, based on distance from the camera?
Example: http://www.youtube.com/watch?v=kNVne97Ti7I

EgonOlsen

No, not build in. Mainly because for almost every game related application, this isn't used anymore. It was popular back in 2000 when hardware wasn't able to push much polygons. Today, hardware can easily process millions of polygons per frame and it actually suffers from constantly updating a mesh with the "loded" polygons more than it suffers from simply rendering a detailed but static mesh.

Minigame

Quote from: EgonOlsen on November 14, 2012, 08:21:51 PM
No, not build in. Mainly because for almost every game related application, this isn't used anymore. It was popular back in 2000 when hardware wasn't able to push much polygons. Today, hardware can easily process millions of polygons per frame and it actually suffers from constantly updating a mesh with the "loded" polygons more than it suffers from simply rendering a detailed but static mesh.

I see.. I'm an amateur with 3D development, and I've only used your library (no raw gl other than input/display) so how would I go about implementing a feature like this using jPCT?

Another question: Would fogging help keep frame count healthy? I've toyed with jPCT fogging, but I don't know the technical details behind it like how it truly effects performance.

EgonOlsen

Don't bother implementing dynamic LOD until you are 110% sure that you really need it. No modern game that i know of uses dynamic LOD for the terrain. It's pointless on current hardware unless you have to fly over whole countries or something similar.

Fogging itself doesn't help but doesn't hurt either. Fogging is good to make the terrain fade out softly in the distance, so that the far clipping plane isn't visible. That enables you to move the far clipping plane closer to the viewer without making the scene look wrong and that again helps with framerate.

KittenKoder

One thing you could do is have differing sizes of textures for the level of detail, load the ones based on the selected level of detail. That would save some resources. Best to have multiple levels of detail models instead, vertice and animation count in other words. The drawback is changing mid-game would be messy.
When life throws you lemons, make lemon juice, then drop life into a pile of razors and pour the lemon juice over it.