Your browser (Internet Explorer 6) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.
X

Animation – progress update

So I’ve been porting the skinning algorithm to OpenCL to avoid reskinning each and every character each frame. So instead I’m going to make it so that a single animated character is only skinned once, and then just moved for each instance. I’m going to use CL to GL interop in order to write the skinned characters calculated in CL to a texture in GL, and then per vertex just set each position. If this works out, I suggest the skinning won’t have a measure impact on the performance of the program.

I’ve had to make some basic mathematical functions for matrices and matrix-vector operations. Also, even though floatnxm is listed as a reserved OpenCL keyword, the compiler complains if one tries to use a float4x4. So I made my own matrix44 struct that contains an array of four float4 vectors. What I’m afraid of however, is that my code is as far from optimized as humanly possible. I’ve read some CL math implementations from Nvidia and AMD, and even downloaded the AMD APPML. To my disappointment, there are were no .cl files in the project, instead, there was just a .lib and a header file containing function calls to CL kernels. What I wanted is the math itself, so I’m going to stick to my own and get it working first, then think about optimizing it, if needed.

//Gustav Sterbrant

Be Sociable, Share!