Jump to content
  • Advertisement
Sign in to follow this  
Udi Raz

mesh transparency and mirroring.

This topic is 4614 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!