Skinmesh faster bone influences per vertex > 4

Started by
1 comment, last by pixelstar 20 years, 11 months ago
Hi. I imported a complex skinmesh where in many cases more than four or five weight_bone''s will effect a single vertex(of which can be a problem cuz DX9 blending supports <=4 world_coords). Roughly/approximately how would I go about exporting from; or translating formats such that there would only be say 3 weighted bone influences per vertex? And could I do this in realtime if I had to? Should I combine the effects with concatenated matrices at runtime or is that a waste of cycles? Hmmm... Maybe I should just hold off on the bone influences. I dunno? *shrug*
(>-<)
Advertisement
You can usually just "remove" all bones except for the top n (usually 2 or 4) influences. The ID3DXSkinMesh/ID3DXSkinInfo interface is provided by D3DX to provide this functionality. When using ConvertToIndexedBlended or ConvertToBlended, the mesh will be reworked to both fit in the required numbers of bones and to work with the provided palette size (Indexed call only).
NOTE: you have to be careful when removing influences to keep things normalized, otherwise it will quickly look wrong. You can take a look at the DX9 or the DX8.1 SkinnedMesh sample to get an idea of how to work with arbitrary meshes loaded from .X files. The .X file stores meshes with arbitrary numbers of influences and the SkinInfo/SkinMesh interface pares that down to the current hardware requirements.

Craig Peeper
Microsoft, Direct3D

This posting is provided "AS IS" with no warranties, and confers no rights.
Craig PeeperMicrosoft, Direct3DThis posting is provided "AS IS" with no warranties, and confers no rights.
Aha! Great! You''ve been an excellent help - Thanks!
(>-<)

This topic is closed to new replies.

Advertisement