http://www.ece.ualberta.ca/~nrossol/stu ... tree1.mesh
and a texture for it too that contains a lot of alpha:
And I used this material file to bind the texture to the mesh:
Code: Select all
material tree1Material
{
technique
{
pass
{
lighting off
ambient 1 1 1 1
diffuse 1 1 1 1
specular 0 0 0 0
emissive 0 0 0
alpha_rejection greater 128 //increase number 128 we will get more transparent into object
depth_write on
texture_unit
{
texture tree1.png
tex_coord_set 0
colour_op modulate
}
}
}
}
(All other Ogre demos run perfectly fine, and this result is exactly the same whether I'm in OpenGL or Direct3D). Did I make a really obvious classic blunder or something? Is it possibly a property of the mesh that I did incorrectly? If I use alpha_blending instead then the alpha regions are pretty much rendered correctly (except, of course, for the fact that the the depth-testing is all wrong and leaves in the back are being rendered ontop of leaves that are closer.). Sorry if the answer is really obvius, I'm kinda a n00b when it comes to Ogre materials.