www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: Minigame on November 14, 2012, 06:15:44 pm

Title: Level of detail
Post by: Minigame on November 14, 2012, 06:15:44 pm
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
Title: Re: Level of detail
Post by: 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.
Title: Re: Level of detail
Post by: Minigame on November 14, 2012, 09:24:29 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.
Title: Re: Level of detail
Post by: EgonOlsen on November 14, 2012, 10:22:11 pm
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.
Title: Re: Level of detail
Post by: KittenKoder on November 15, 2012, 04:07:19 am
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.