mesh transparency and mirroring.
Hi,
I have a model of a right hand and I would like to:
1. Create a mirror view (to become a left hand). Which transform do I have to set?
2. I would like to display the model semi transparent. ID3DXMesh and its base Interface don't have a method to set transparency. What Should I do?
Thanks,
Udi Raz
thanks but i think I am doing that.
g_d3d_device->SetRenderState(D3DRS_ALPHABLENDENABLE,true);
but now I have to tell the mesh to be rendered at a certain transparency.
How do I do that ?
Thanks again,
Udi Raz
g_d3d_device->SetRenderState(D3DRS_ALPHABLENDENABLE,true);
but now I have to tell the mesh to be rendered at a certain transparency.
How do I do that ?
Thanks again,
Udi Raz
Quote:Original post by Udi Raz
I have a model of a right hand and I would like to:
1. Create a mirror view (to become a left hand). Which transform do I have to set?
mirroring about 1 axis means scaling with -1
E.g. in OpenGL (have no D3D example at hand) I do
::glMatrixMode(GL_MODELVIEW);::glLoadIdentity();::glScalef(1.0f,1.0f,-1.0f);::glMultMatrixf( inverseCamOrientation );::glTranslatef( inverseCamPosition );
to convert a LHS scene into the RHS required by OpenGL. As you could see, the _very last_ operation performed by GL will be mirroring over the z axis! (Don't be confused that glScale is the first operation invoked; it is nevertheless the last operation performed in the view transformation.)
You could, of course, also mirror the meshes itself at the time of import.
[Edited by - haegarr on March 29, 2006 7:37:43 AM]
Thanks haegarr,
I tried this and It does not good for me.
I have a model of a right hand. When I view the model I see the back of the hand.
scaling with (-1.0f, 0.0f, 0.0f) will display the forehand. scaling with (0.0f, -1.0f, 0.0f) do nothing and scale with (0.0f, 0.0f, -1.0f) will display the fingers down...
Any Ideas ?
Thannks, Udi Raz
I tried this and It does not good for me.
I have a model of a right hand. When I view the model I see the back of the hand.
scaling with (-1.0f, 0.0f, 0.0f) will display the forehand. scaling with (0.0f, -1.0f, 0.0f) do nothing and scale with (0.0f, 0.0f, -1.0f) will display the fingers down...
Any Ideas ?
Thannks, Udi Raz
Quote:Original post by Udi Raz
scaling with (-1.0f, 0.0f, 0.0f) will display the forehand
I think you mean scaling with (-1.0f, 1.0f, 1.0f)
Quote:Original post by Udi Raz
scaling with (0.0f, -1.0f, 0.0f) do nothing
I think you mean scaling with (1.0f, -1.0f, 1.0f)
Quote:Original post by Udi Raz
scale with (0.0f, 0.0f, -1.0f) will display the fingers down
I think you mean scaling with (1.0f, 1.0f, -1.0f)
Interestingly, just the one mirroring that would be the correct one does not work. Anyway, I don't see how it could have no effect at all. That would mean that the model is mirroring invariant in that axis, but a hand model should not be so. Are you sure that there is no problem elsewhere?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement