Intersect on a Skinmesh

Started by
5 comments, last by Toyemann 22 years ago
Anyone else noticed the bug in the Intersect function where animated Skinmesh has no affect? Unless I''m doing something wrong, animated skinmesh uses the original mesh when the Intersect function is applied. Thus, the result is always the same no matter how much you animate the skinmesh.
Advertisement
If you are using software skinned meshes, then you need to generate the mesh and intersect test that.

Jim Adams


Jim Adams
home.att.net/~rpgbook
Author, Programming Role-Playing Games with DirectX
Yes, I''m using the 3D Studio Max to create the Physique-Bone animated mesh. But, how do you generate a mesh out of skinmesh after a certain settime(or frame)?
I''ve found three functions. Are these it?

ConvertToBlendedMesh
ConvertToIndexedBlendedMesh
GernateSkinnedMesh

Which one do I use? Why so many parameters, and what values do I put if the skinmesh object is all I have to work with?
(bump)


  hr = pmcMesh->m_pSkinMesh->UpdateSkinnedMesh(m_pBoneMatrices, NULL, pmcMesh->pMesh);  


I experienced this problem too. There are about 4 ways, how to skin:D3D indexed, D3D non-indexed, vertex shader and software skinning. When you don''t want to do intersection test, you can use any of them(the fastest is D3D non-indexed for me). But when you skin in the hardware, you will not know the position of particular vertices after skinning(D3D skinning is hardware) and thus your intersection test will be always against the "initial" pose. There are 2 ways how to solve this:software skinning and ProcessVertices. You must simply "transform" the vertices of the skinmesh, which is not done in HW. I recommend software skinning(which I use) even though it''s perhaps a bit slower than the second. I consider the variant with ProcessVertices not flexible. Ask if you have some other questions about it...
Hope it helped

This topic is closed to new replies.

Advertisement