Author Topic: Level of detail  (Read 991 times)

Offline Minigame

  • int
  • **
  • Posts: 55
    • View Profile
Level of detail
« 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
« Last Edit: November 14, 2012, 06:17:25 pm by corey »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Level of detail
« Reply #1 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.

Offline Minigame

  • int
  • **
  • Posts: 55
    • View Profile
Re: Level of detail
« Reply #2 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Level of detail
« Reply #3 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.

Offline KittenKoder

  • int
  • **
  • Posts: 66
  • I Am No One Else
    • View Profile
    • Kitt Games Wiki
Re: Level of detail
« Reply #4 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.
When life throws you lemons, make lemon juice, then drop life into a pile of razors and pour the lemon juice over it.