Backface removal ?

Blitz3D Forums/Blitz3D Programming/Backface removal ?

Codemonger(Posted 2003) [#1]
has anyone done any speed tests on backface removal using surface comands ?

ie. if you are rendering a sphere, half of its polygons are backfacing at any given time. You can use triangle normals and the direction your camera is facing to figure out if you can see the triangles. I noticed in the docs it suggested to use the surface commands for dynamic LOD, so wouldn't it work good to do backface removal at the same time ... ? haven't tried it yet , just a thought.


Steve Hill(Posted 2003) [#2]
Blitz (or more accurately Direct3D) does backface removal anyway. It is unlikely that you could better the built-in mechanism.

At least as far as I understand it.

Steve.


Codemonger(Posted 2003) [#3]
As far as I know Direct X doesn't do bacface removal, I believe Direct X can do view frustrum clipping using the six planes, but I don't think it does back-face removal.

I think everybody gets mixed up with backface culling , counter clockwise or clockwise culling ... in Blitz you can have the backface of a triangle drawn, so both sides of the triangle are textured and drawn. By default Blitz uses CCW culling ( counter clockwise), so triangles rendered in CW (clockwise) order will only be shown.


Codemonger(Posted 2003) [#4]
Hey wait, maybe I'm wrong, if you fliped the triangle the the order would be reversed and DirectX wouldn't draw it. Ok I think I'm wrong ...


Shambler(Posted 2003) [#5]
DirectX does backface removal in hardware on your graphics card, thats the reason for CW/CCW.

In DirectX you can also select 'NONE' so that it draws backfacing triangles, but because the normal is pointing away from you the triangle is rendered in black ( no lighting ).

I have done tests in C++ for this before and its slower to cull backfacing triangles in software unless there is something wrong with your AGP drivers.

I have had an instance in the past where it was faster in software but this was because the AGP drivers were screwy and sending less data over the bus was what sped things up =)