Not rendering polygons that point to the void
Hey all,
Hope the title explain it a bit but imagine we have a BSP render, but right now it renders the inside world( e.g. game space ) but also the samepolygons that have their normals inverted( pointing towards the void ) but should these really be renderen, the quake engine don''t render these( water is an exception where both sides need to be rendered ) and how can i dispose ''em?
cheers,
Gorgorath
Cosmic Keys to my Creations & Times
Assuming you've already excluded tris not in the view frustrum, and that you've rotated them all according to the camera's angles etc. etc.
let n = the normal of the tri to check
if( n.z > cos( gfFov / 2.0f ) )
dont_render();
else
render();
edit:
That method won't exclude all tris not visible, but it's definately faster than something like this:
let p = the center of the tri
n = the normal
if( n.Dot( p.Normalize() > some_number ) //somenumber ~= 0.1
dont_render();
else
render();
Which should get all non-visible tris away. Do keep in mind that very large tris might or might not be visible.. I just whipped this up really quick.
[edited by - Tjoppen on January 14, 2003 11:40:16 AM]
let n = the normal of the tri to check
if( n.z > cos( gfFov / 2.0f ) )
dont_render();
else
render();
edit:
That method won't exclude all tris not visible, but it's definately faster than something like this:
let p = the center of the tri
n = the normal
if( n.Dot( p.Normalize() > some_number ) //somenumber ~= 0.1
dont_render();
else
render();
Which should get all non-visible tris away. Do keep in mind that very large tris might or might not be visible.. I just whipped this up really quick.
[edited by - Tjoppen on January 14, 2003 11:40:16 AM]
delete this;
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement