Game Development Community

TGEA 1.7.0 Beta 2 Bug - General - Object distance culling

by Stefan Lundmark · in Torque Game Engine Advanced · 04/01/2008 (3:01 pm) · 4 replies

Our TSStatic objects are being culled from rendering when far away (~1000 units in our case).

Some info:
1. Visible distance/fog range is set at 8000 units.
2. The object is not out of scope and exists on the client.
3. Bounding box culling has no effect, enabled or disabled. (SceneTraversal @ ~96, SceneState @ ~293)
4. The object has no LOD.
5. renderObject () function is not getting called.
6. If I move the object or the client control object closer, it gets rendered.

I'm not sure this is specific to TGEA Beta 2 or TGEA at all. Am I missing something obvious? It doesn't seem to be added to the ElementList in the RenderManagers either.

#1
04/01/2008 (3:41 pm)
...
#2
04/01/2008 (4:29 pm)
Thanks, that's news to me! Will check the detail selecting code to see if that's where it stops.

Size is 1, but the object is occupying half of the screen when it vanishes, so it's definatly not down to 1 pixel in size yet. It's not scaled, either.

Yup Joseph, here it is:

// check to see if not visible first...
   if (pixelSize<=mShape->mSmallestVisibleSize)
   {
      // don't render...
      mCurrentDetailLevel=-1;
      mCurrentIntraDetailLevel = 0.0f;
      return -1;
   }

Which kinda points at what you said. Gash, I still have no clue on how to work this out. Pixel size 1 doesn't make sense since the object is like 400-500 pixels large. And why does it stop to render completely? Seems dumb.
#3
04/01/2008 (4:48 pm)
...
#4
04/01/2008 (4:54 pm)
Doh, the bounding box is indeed smaller than the actual shape in the .max file.

That's why it disappears. Thanks a ton for your help.
Still, totally skipping a render seems akward to me. Why not just keep rendering the last detail?

(If someone from GG can rename this thread to not cause confusion, please do since it's not a bug.)