Original Post
Well,I was just working with Skinned Mesh to wrote my first game,and I found a big rendering problem when I was using SkinnedMesh Class(I wrote it following MSDN documents),
I used this class to load house.x and character.x two files,everything were all CORRECT in MeshView,but when the program rendered two objects,I found that the character's body seems to be TRANPARENT,as the left hand should be covered by the body,but I saw it just like IN the body.However,this problem was just a BIT, the biggest problem was the house.If you see the picture you will find that the FRONT of the house WAS COVERED BY the BACK of the house,and there's a very stange triangle on the eaves,also the chimney is very very NASTY,I had a try,I moved the character(moved the camera),the chimney just went fly!Seems that it wasn't a part of the house!I thought this was a problem of renderstate, of the Z BUFFER ,so I wrote:
device->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
device->SetRenderState(D3DRS_ZENABLE,D3DZB_TRUE);
device->SetRenderState(D3DRS_ZWRITEENABLE, FALSE);
and there's no effect! I have already spent a day to solve this problem, please give me any advice,thank you so much!
Picture:
house
http://www.zshare.net/image/80981960a76f028a/
character
http://www.zshare.net/image/809821145cebbdf6/
thank you for your waiting to view the picture!:)
I used this class to load house.x and character.x two files,everything were all CORRECT in MeshView,but when the program rendered two objects,I found that the character's body seems to be TRANPARENT,as the left hand should be covered by the body,but I saw it just like IN the body.However,this problem was just a BIT, the biggest problem was the house.If you see the picture you will find that the FRONT of the house WAS COVERED BY the BACK of the house,and there's a very stange triangle on the eaves,also the chimney is very very NASTY,I had a try,I moved the character(moved the camera),the chimney just went fly!Seems that it wasn't a part of the house!I thought this was a problem of renderstate, of the Z BUFFER ,so I wrote:
device->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
device->SetRenderState(D3DRS_ZENABLE,D3DZB_TRUE);
device->SetRenderState(D3DRS_ZWRITEENABLE, FALSE);
and there's no effect! I have already spent a day to solve this problem, please give me any advice,thank you so much!
Picture:
house
http://www.zshare.net/image/80981960a76f028a/
character
http://www.zshare.net/image/809821145cebbdf6/
thank you for your waiting to view the picture!:)