Sign in to follow this  
DickieChen

BIG PROBLEM .. SkinnedMesh Rendering

Recommended Posts

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!:)

Share this post


Link to post
Share on other sites
You should find another image hosting site, with that one you have to wait 50 seconds before the image appears, and many people won't bother.

Anyway, sounds like a depth buffer issue. In your code you are disabling depth writes, they should be enabled. Also, make sure to clear the depth buffer every frame, that is make sure you also use the D3DCLEAR_ZBUFFER flag when calling device->Clear().

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this