Jump to content
  • Advertisement
Sign in to follow this  

how to implement a Vertex Blending in cpu?

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

in a book,it use vertex shader to do it. but many game do not use vertex shader to do skinned mesh animation.because my graphic card not support vertex shader and pixel shader, but can run game that have skinned mesh animation. so how to do skinned mesh animation game in cpu? I need setTransform for every vertex? it is not effective admittedly. so what solution is introduced?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by derek7
if I am right ,it use GPU to do .

I think you can switch between how it performs the skinning.

You could look into vertex weighting. Most devices these days support 2-3 weights per vertex; and a reasonably sized matrix "pool" (D3DTS_WORLD1...D3DRS_WORLD255 iirc). It's not quite software skinning, but it's reasonably close and should have some degree of support on older non-programmable hardware.

hth
Jack

Share this post


Link to post
Share on other sites
matrix pool??how to use it?

I do skinmesh in this way:

copy vertex to system memory,and then do matrix multiplication with D3DX function/it maybe operate on cpu
and then I rewirte/update vertex data into video memory I mean dynamic buffer.

Share this post


Link to post
Share on other sites
Quote:
Original post by derek7
in a book,it use vertex shader to do it.

but many game do not use vertex shader to do skinned mesh animation.because my graphic card not support vertex shader and pixel shader, but can run game that have skinned mesh animation.


Even if your graphics card doesn't support vertex shaders, you *can* still use vertex shaders if it makes life easier for you.

Software vertex processing will execute vertex shader code using the CPU. The Direct3D PSGP (Processor Specific Geometry Pipeline) is also very well optimized to take advantage of CPU extensions such as 3DNow! and SSE.

You can enable software vertex processing by passing the D3DCREATE_SOFTWARE_VERTEXPROCESSING and D3DUSAGE_SOFTWAREPROCESSING flags to the relevent D3D calls.

Share this post


Link to post
Share on other sites
I find a method to do the job.

ID3DXSkinInfo::UpdateSkinnedMesh

it take a hierarchy bone/frame and a meshcontainer to do this job.

but I want to know it used software vertex shader to do?

or just use matrix multiplication operation on cpu provided by D3DX lib to do the job?

Share this post


Link to post
Share on other sites
ID3DXSkinInfo::UpdateSkinnedMesh uses matrix multiplication provided by D3DX; it doesn't use software vertex shaders.

Share this post


Link to post
Share on other sites
there are a few skinned mesh method I just find
1.Fixed function skinning and Fixed non-indexed skinning
2.software skinning
3.asm shader skinning
4.hlsl shader skinning

what is different?

but I have a question .
my graphic card not support vertex shader ,but it support
D3DCREATE_HARDWARE_VERTEXPROCESSING,so I mean D3DCREATE_HARDWARE_VERTEXPROCESSING != vertex shader? Am I right? and so how to do software skinning? just pass D3DCREATE_SOFTWARE_VERTEXPROCESSING and D3DUSAGE_SOFTWAREPROCESSING , work?

Share this post


Link to post
Share on other sites
extra a question I find indexed skinning is slower than non-indexed skinning in my computer.
so is it in gear? I mean indexed data just save memory and no save cpu?

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!