Jump to content
  • Advertisement
Sign in to follow this  
MoonCrash

mesh texture partially transparent

This topic is 5411 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

I have imported a x file and load a texture to it. when i scale the mesh down the texture seems to look fine but when the mesh is regular size the texture looks partially transparent. I set alphablend to false. I also set the fillmode to be solid. Is there something else I may need to do to get the texture to be solid?

Share this post


Link to post
Share on other sites
Advertisement
Hmmm....are your normals okay? Are you scaling them as well? I have seen something similar a few times before, and it had something to do with texture mapping, normals, or vertex winding direction. Sorry I can't be of more help. Do you think you could put up a screen shot?

Good luck,
Chris

Share this post


Link to post
Share on other sites
This is a longshot without knowing more about your project, but could some of the verts have a similar colour to your background? This would give the impression that parts of the mesh were transparent.

Share this post


Link to post
Share on other sites
I think it is having an issue with it's normals. I had read another post on flipcode and someone was seeming to have the similar issue and they were told to try computing the normals for the mesh. I have tried doing that and it seems to has no effect. The sdk says you have to have D3DFVF_NORMAL to use the ComputeNormal of a mesh i just found that you can use GetFVF to get the the FVF's of the Mesh but is there an easy way to set a FVF if it doesn't have it? and how do i check to see what FVF's are in the dword?

thanks
MoonCrash

Share this post


Link to post
Share on other sites
nevermind I found out what the FVF values the normals are set and the normals are set. the next question after reading your post about scaling the normals how would scale the normals or rotate the normals with the object.

right now i am using the following code to show and rotate object.

ZeroMemory(&RotateMatrix, sizeof(RotateMatrix));
D3DXMatrixRotationY(&RotateMatrix, timeGetTime()/1800.0f);
D3DXMatrixMultiply(&WorldMatrix, &RotateMatrix, &Car2Struct.MoveMatrix);
DxManage->d3dDevice->SetTransform(D3DTS_WORLD, &WorldMatrix);


thanks
MoonCrash

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!