Using Normals for backface-culling...

Blitz3D Forums/Blitz3D Programming/Using Normals for backface-culling...

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hi Col.
Sorry for the delay.
Yes, I have to make a decision about what kind of normal I need.
I need the normals to be the polygon face normal.
As it is right now, "the vertex normal is now the vertex position" works fine for me.
And is a very good solution for my engine, trust me.
It is just fine, the way it is... except for the 12.5 degress offset.
(I have to compare against -0.21875 instead of 0.0)
If that can be fixed, then it will be perfect.
It would be great if you could help me with the 3d maths of it.
Trust me, the 3d engine for the PS2 is real good and I got a **good** use for it, already.
One more thing: it is a voxel based character engine.
So, you will find out why the "vertex normal is now the vertex position" is just fine.
(All that I need is a "normal ID" to assign to each vertex" and the normal is the vertex position itself, could be different, but works fine for me).

If you don´t get it, imagine a voxel ( A REAL VOXEL, that is... a real cube), imagine that the sphere is inside of it and touches each face of the voxel cube at the face´s exact center point.
If I rotate the cube (voxel), around its center, each face will still touch one single (different) point of the sphere.

I am planning on using a very limmited set of pre-computed normals... 144.
If you check the source-code again, you will see that I have set the sphere to exectly 144 polygons.

So, based on this, I guess you can help me find the best way to do it, right?
But, as far as my common-sense tells me, the vertex position is the normal itself, in this very specific voxel based engine.

Thanks again for your help, Col.

Hope to hear from you soon.

Rui Barbosa Jr.