Re: [Algorithms] Representing Animation Key Frame with Quaternion + Translation Vector
Brought to you by:
vexxed72
From: Jon W. <jw...@gm...> - 2008-06-27 17:32:23
|
Cedric Pinson wrote: > Hi, > I was just curious if it's used mostly or not, and why. > I vote for "not," because the CPU work to generate the matrices takes more time than the GPU shading work to combine the matrices per vertex. And I have better use for the CPU :-) I don't write code for the more limited or esoteric platforms, though. Also, NVIDIA apparently recommends using stream-out with scatter to do skinning on G80 hardware and up. This means that you store each vertex in bones space per bone, and then loop over the bones, and multiply-add-accumulate into an output array. Once all bones are processed, you take that stream-out and use as a transformed vertex array. I believe this is also how Doom III did it, although on the CPU instead. The benefit is that you can have certain vertices influenced by 30 bones if you want, and other vertices influenced by only 1, and you get no redundant calculation. The draw-back of this method are that you store vertices multiple times (so the size grows by your average bone influence count), and you require scatter-write, which means it doesn't work on most installed hardware (most current PCs, 360 or Wii). Sincerely, jw |