2

I'm working on a code to do a software skinner (bone/skin animation), and I'm at the "optimization" phase (the skinner works pretty well and skin a 4900 triangles mesh with 22 bones in 1.09 ms on a Core Duo 2 Ghz (notebook)). What I need to know is :

1) Can someone show me the way (maybe with pseudocode) to transform a float3 (array of 3 float) (representing a coordinate) against a float4x3 matrix?

2) Can someone show me the way (maybe with pseudocode) to transform a float3 (array of 3 float) (representing a normal) against a float3x3 matrix?

I ask this as i know that in the skinning process you can avoid to use part of the matrix without getting any change in the animation process. (So to recover some elaboration time)

Thanks!

feal87
  • 927
  • 3
  • 11
  • 29
  • Just found this question. I posted a similar one here that has some more detailed answers of the mechanics involved with some C-like code too: http://stackoverflow.com/questions/2944670/ – Drew Noakes Jun 01 '10 at 12:32

1 Answers1

1

Optimizing vector/matrix operations via mathematical reduction is possible, but tricky. You can find some information on the topic here, here, and here.

Now, this may not be quite what you're looking for, but...

You can use the machine GPU (graphics card processor) to vastly increase the computation performance of vector/matrix operations. Many operations can be increased by several orders of magnitude by taking advantage of SIMD processing available on the GPU.

There are two reasonably good libraries available for C# developers for GPGPU programming:

LBushkin
  • 129,300
  • 32
  • 216
  • 265
  • Using the GPU is out of question. Or well, I do already have an Hardware skinner, it works fine too, but I have to provide a software fallback for older card (where the GPU is MUCH slower than the CPU (like the Intel X3100 card)) / collision calculation on DX9 devices that does not support Stream Out functionality (to calculate the bounding structures). I'll take anyway a look at the links waiting for some other answer, maybe with some pseudocode. Thanks anyway – feal87 Jan 20 '10 at 20:49
  • Note that MS Accelerator is not for commercial use yet. – Samik R Apr 13 '11 at 15:51