Jump to content
  • Advertisement
Sign in to follow this  

Skinned mesh and shadow volume

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

Hi, I'm tying to generate a shadow volume of a skinned animated mesh. I have no problems generating the shadow volume from a LPD3DXMESH and no problems to generate and render a skinned mesh with animations. BUT..how do it put these parts together? I thought of catching the LPD3DXMESH of my skinned mesh after drawing the subsets like shown here:
void D3DSkinnedMesh::SkinnedMeshContainerClass::DrawMeshContainer(LPD3DXMESHCONTAINER pMeshContainerBase, LPD3DXFRAME pFrameBase)
	UINT iMaterial;
	UINT NumBlend;
	UINT iAttrib;
	DWORD AttribIdPrev;

	UINT iMatrixIndex;
	UINT iPaletteEntry;
	D3DXMATRIXA16 matTemp;

	shadowMesh = pMeshContainer->MeshData.pMesh;
	D3DXComputeNormals(shadowMesh, NULL);

	m_pd3dDevice->SetTransform(D3DTS_WORLD, &pFrame->CombinedTransformationMatrix);


	for (iMaterial = 0; iMaterial < pMeshContainer->NumMaterials; iMaterial++)
		m_pd3dDevice->SetMaterial( &pMeshContainer->pMaterials[iMaterial].MatD3D );
		m_pd3dDevice->SetTexture( 0, pMeshContainer->ppTextures[iMaterial] );

After doing this there is something in my shadowMesh..but far away from the mesh I need. What can I do? Where do I have to fetch the needed LPD3DXMESH? Thanks for any help. AXel

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!