Deciding which LOD-level to draw

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
User avatar
Marc
Gremlin
Posts: 182
Joined: Tue Jan 25, 2005 7:56 am
Location: Germany
Contact:

Deciding which LOD-level to draw

Post by Marc » Tue Mar 01, 2005 12:55 am

Hi !

It looks as if Ogre uses just the distance to an object to decide which LOD-level of it gets drawn. Is there a way to change this to e.g. something proportional to the size of the bb of the object on the screen? E.g. if you zoom by changing the fov of the camera, the distance keeps the same but it would be better to use the LOD-level of a shorter distance. Otherwise you see the low-LOD-level quite large on the screen.
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 2
Contact:

Post by sinbad » Tue Mar 01, 2005 2:52 pm

You should just tweak the LOD distances based on the size of your object. Screen-space size would be possible, but it's derivable ahead of time so it's not worth the expense.
0 x

User avatar
Marc
Gremlin
Posts: 182
Joined: Tue Jan 25, 2005 7:56 am
Location: Germany
Contact:

Post by Marc » Tue Mar 01, 2005 10:42 pm

sinbad wrote:You should just tweak the LOD distances based on the size of your object. Screen-space size would be possible, but it's derivable ahead of time so it's not worth the expense.
I meant you don't actually need to calculate the size of the object on the screen to do this. E.g. if I zoom by a factor of 10, the distance to the object could just get divided by 10 before the decision which LOD-detail to render is made. It's just an overhead of one multiplication per object.
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 2
Contact:

Post by sinbad » Wed Mar 02, 2005 1:15 am

Use Camera::setLodBias() to compensate if you like.
0 x

User avatar
Marc
Gremlin
Posts: 182
Joined: Tue Jan 25, 2005 7:56 am
Location: Germany
Contact:

Post by Marc » Wed Mar 02, 2005 3:30 am

sinbad wrote:Use Camera::setLodBias() to compensate if you like.
That's it! Thanks!
0 x

Post Reply