Hi,
I’m trying to do skinning animation with Assimp and D3D11 in VS2012. I have managed to get things looking ok but I have a problem as seen in this image:
No, that is not his long luscious hair. It appears some triangles are completely wrong. I have checked the bones and the vertex information that is retrieved from the file and everything seems right. I also tried recreating the vertex shader on the CPU to see if I could replicate the problem, but there was no problem there either. So I tried debugging a pixel (on his "hair") and I got these values:
This shows that the bone weights are completely wrong (because they should add up to 1.0). So this must mean that the vertex I sent to the GPU is wrong, right? Going back to the CPU side, these are the exact values I sent (for vertex 301):
The highlighted stuff shows that the bone weights do indeed add up to 1.0. So when I check on the GPU side, I see this:
The red part shows that the bone weights are there on the GPU. The interesting thing is that the highlighted green stuff are the actual values that the bone weights are given. It is sort of like the vertex buffer has gone out of synch or something (but I am sure this is a user error). I have made sure that I have sent the correct vertex buffer size and vertex struct size.
Sorry, I know this is a complicated question, but I'm not sure what else to try. I'm not sure what code to give you, so just ask and ye shall receive. I'm also not sure if this is a D3D problem or an animation problem or whatnot. So does anyone have any idea what the problem could be or things that I could try?
Thanks.