Page 1 of 1

a problem with custom scene node

Posted: Tue Apr 21, 2009 11:46 am
by tomibrom
Hello. I've written a custom scene node with 4 vertices and 4 triangles (2 for face and 2 for backside). sadly, when i render the scene nodes which should be behind the others are in advance of them. What may be wrong?

Posted: Tue Apr 21, 2009 12:10 pm
by vipergc
Without seeing your code its hard to tell what might be wrong... however you might consider this...

make sure that you have the triangles vertices arranged in a counter clockwise fashion when viewed from the outside of the face

make sure you have calculated the normals for these faces correctly

Posted: Tue Apr 21, 2009 4:21 pm
by tomibrom
I've discovered that the problem only occur when the material's MaterialType = irr::video::EMT_TRANSPARENT_ALPHA_CHANNEL