Re: [eigen] Rigid Transformations in eigen: discussion thread

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


2009/9/17 Rohit Garg <rpg.314@xxxxxxxxx>:
>> Then I would much rather have a specialized method nlerp() for that.
>
> With a specialized nlerp() you can't go general blending, which is
> needed while performing character skinning.
>
> IE, operations like (w1*Q1+w2*Q2.....+wN*QN).normalize(), what about them?

Good point, I need to think about that. Didn't know that that was used
in practice.

The operator+ and * as you proposed, again, will give poor performance
in non-vectorized mode (because 8 scalars is too much). Ideally, we'd
find a solution that's efficient also in non vectorized mode.

>> Also note the API problem with having a normalize() method here. This
>> class RigidTransform was meant to be, well, a _rigid_ transform. If
>> you call x.normalize() that means that x wasn't normalized, so it
>> wasn't rigid...
>
> Multiplying many orthogonal matrices can lead to loss of orthogonality
> anyway, and normalize() is there to prevent it.

Good point, I didn't think about that.

>
> Well, repeated quaternion multiplication can also lead to loss of unit
> norm, and that's perhaps why there is a normalize method in quaternion
> class.
>
> If you have a non-orthogonal rotation, matrix, you are screwed.

No, you can get away with a gram-schmidt, but I agree that it is much
more costly than normalizing a quaternion.

> But
> you can just normalize a quaternion and live with a slight amount of
> error.

I see the point, now.

>> I'd be very surprised if it did, because it would take the compiler
>> quite some algebra knowledge to understand that 1,0,0,0 is he unit
>> quaternion and that multplying by it is a NOP.
>
> So you think an (*this) * RigidTransform(delta) would be faster? If
> so, I'll do it.

No, that's not what I was suggesting. I was suggesting that you work
out the simplified formulas on pen and paper, and then implement that.

Perhaps that can wait until you have extensive unit tests, so as to
avoid introducing a bug here.

Benoit



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/