Game Development Community

Render While Bounds Not On Screen

by Griffin Milsap · in Torque Game Engine · 02/07/2006 (7:53 pm) · 1 replies

Hey, I have an fxRenderObject which is dynamically manipulated by a path in the game world. The path renders correctly while the little dot called "fxRenderObject" is on screen, but as soon as that little dot leaves the screen, the entire mesh disappears.

The mesh extends out much further than the bounds of the fxRenderObject. How do I disable this culling?

I would still like parts of the mesh to cull when not on screen if at all possible. (Maybe OpenGL does this automatically?)

-Griff

#1
02/07/2006 (8:49 pm)
Make the bounds so they contain the entire object. Otherwise it will be culled when the bounds disappear and not when the object does. If it's a very large object, like a terrain or building, you might want to look at how the terrain and interior objects in Torque cull against the visibility frustrum. The bounds will still need to be as big as the object but you can control what sub-parts get drawn.

Drawing geometry off the screen is cheaper than drawing it on the screen but it still has a cost. If you're concerned about half your player being off-screen, don't worry about it. It would be more effort to cull it yourself than let the hardware do it. If you're worried about half of a million polygon landscape being offscreen, you might be onto something... :)