i mean, i want my terrain far clipping at say 10000.0f
enemy meshes farclip at say 4000.0f
grass farclip at 2000.0f
have any one done this?
i think this will need to recompile irrlicht
custom viewing frustum
-
- Posts: 131
- Joined: Fri Jun 03, 2005 7:26 pm
you can set the visibility clipping i beleive also you can use fog values depending on your game if its dark like f.e.a.r. you can have everything fade to black after a certain length it saves performance too
"Held in Your arms but too far from my heart." "These thoughts will carry me through the darkest nights...while your eyes rest in mine."
"How quickly I forget that this is meaningless."
"How quickly I forget that this is meaningless."
Do a length squared comparison from the camera to the scene node and setVisible(false) to clip it. You could come up with a nicer system that sets the material vertex alpha so that the node fades out, not just snaps out.
You use length squared, because its inexpensive to calculate x^2 + y^2 + z^2 of your vector, but do do a square root to get the true length is bad bad bad. Square roots should always be avoided if possible.
You use length squared, because its inexpensive to calculate x^2 + y^2 + z^2 of your vector, but do do a square root to get the true length is bad bad bad. Square roots should always be avoided if possible.
Intellectuals solve problems - geniuses prevent them. -- Einstein
#irrlicht on irc.freenode.net
#irrlicht on irc.freenode.net