Game Development Community

is it clipping or culling? how to fix?

by deepscratch · in Torque 3D Professional · 01/12/2011 (2:39 am) · 2 replies

hi all,
a small issue here,
I'm trying to get the PxFluid to render better, but I am getting culling/clipping, dunno what you would call it.
if looking almost directly at the fluid, the fluid dissapears.
also, at a slight looking down angle, it dissapears.
re adjust the cam a bit, it renders again, move the cam a bit, it dissapears.

what is this?
why is this?
how can I fix this?

thanks for any ideas.

#1
01/12/2011 (5:29 pm)
Sounds like your not updating the bounding box of the fluid SceneObject.

Ideally you need to quickly calculate a bounds each tick and update it on the SceneObject. This would allow fluids to not render when its offscreen.

The other option is to set the bounds to be global/infinite which means the fluid would always try to render even when offscreen. You do this via the SceneObject::setGlobalBounds() during the onAdd().
#2
01/12/2011 (7:40 pm)
awesome, thanks tom