Motion Blur Working Incorrectly With Translation AND Rotation (SDK)
Hi gang;
I'm developing a relatively simply particle system (for learning purposes) and I am having difficulty once again with getting motion blur to work correctly with Transform_World.
The issue I'm having is that my motion blur is correct when translating ONLY, or rotating ONLY, but not both.
To explain, I've rendered a few images. In this first image below, the yellow squares are my particle system and the red square is a square shape I drew in After Effects, and aligned to the same rotation as my particle system. I wanted to compare the motion blur of my particle system to the motion blur of an After Effects shape as reference. You can see both my particles and the After Effects shape have keyframed rotation and the motion blur works correctly for both:

Here is an enlarged image so you can see the working rotational motion blur. You can see the rotation axis is corretly aligned to the center of each square particle and the motion blur is correct. The motion blur of my yellow square particles matches the motion blur of the red After Effects square shape:

In this frame below, I've removed rotational keyframes from my yellow particles and only animated translation. You can see my yellow square particles have correct translational motion blur. The red After Effects shape I drew, still has both rotational and translational motion blur, which you can see (not only can we can it translating, we can also see it rotating):

Finally, this is a frame that shows my yellow particles with both translational and rotational motion blur. here is where the problem lies. You can see that the motion blur path is arced, whereas the red After Effects shape is correct - it still has a straight vertical motion blur path, with rotational motion blur within it:

If my rotation is clockwise, the path arcs like above. If counter-clockwise, it arcs the other way. The greater the degree of rotation, the greater the arc. Clearly, it is incorrect, especially when compared to the red After Effects shape featuring the same rotation and translation.
My first assumption was that my rotational axis is off but that's clearly not the issue because you can see in the first and second image that rotation without translation is correct. Therefore the rotational axis is also correct.
I though perhaps it's a matter of calling the transform matrices (the before and after) in a different order but I am following the CCU example as show below and I believe this is the correct order:
SetIdentityMatrix(&mat1);
RotateMatrix(&mat1, in_data, p1rot[p], aboutXF, aboutYF);
ScaleMatrix(&mat1, scale, scale);
TranslateMatrix(&mat1, xpos - aboutXF * scale, ypos - aboutYF * scale);
Could this have to do with requiring more than just 2 (before and after) rotational matrices? Do I need more?
I realize this is a shot in the dark as there is a good chance this might come down to a vague error elsewhere in my code but I am posting it because I'm stumped and I'm hoping perhaps someone else has come across a similar issue before, and might be able to point me in the right direction. Or can perhaps suggest what else to try or look for.
To summarize: my motion blur works correctly when ONLY translating, or ONLY rotating, but not with both.
Thanks,
-Richard
