PDA

View Full Version : Layout HPB to XYZ?



SilentScream
12-25-2010, 04:05 AM
Hello everyone,
can anyone, please, help me out converting Lightwave HPB rotation to usual xyz? I've seen, that usually, HPB is just switched axes. But it looks like it's not so simple with Lightwave rotation(or, maybe, i've mistaken somewhere? but it looks like lws rotation needs more complex operations to deal with negative values and switched axes). Maybe someone who's fammiliar with writing plugins for LW can post some example?

crashnburn
12-25-2010, 06:23 AM
Yeah, they are switched. H would be around the y axis, P would be the x axis and B would be the z axis, so yxz.

SilentScream
12-25-2010, 06:59 AM
And that's all? I mean no special processing? In my opengl application it looks like axes are switched relatively(for some bones - yxz, for some - zxy, for some - (-z)xy). I think it has something to do with rest direction, but i really dont't know there to apply it to get correct output(for now, i only subtract rest direction from rotation values to compensate unrealtive values in lws file). all values in my application are correct(at least, they are expected) but practically, translation/rotation axes are switched/inversed(not statically, as i already said).