Page 1 of 2
Rotation Order
Posted: Mon May 17, 2010 2:37 pm
by Kjell
The internal rotation order of ZGameEditor is ZYX*, while the default in Max / Maya / Softimage is XYZ. If nobody objects, I'd like to see this changed.
In the meantime ( in case you're somehow exporting animations to ZGE ) .. make sure to put your Local Kinematics on ZYX before animating, or stay away from the Transform components and DIY using the OpenGL32 library.
*ZYX means that the glRotatef order is XYZ, while XYZ is the opposite.
K
Posted: Mon May 17, 2010 2:58 pm
by VilleK
This means changing the order of glRotate-calls, mainly in the "ApplyRotation"-routine in Renderer.pas. Right?
This sounds reasonable to me. I'm not sure what kind of effects this may have though. Can you foresee any compatibility problems?
Posted: Mon May 17, 2010 3:12 pm
by Kjell
Hmm,
Model and Transform Components that use more then 1 rotation axis* will not give the same results as before ( i wonder how many people used this though ). Apart from the camera .. since both the camera-rotation-order and the internal-rotation-order are reversed, that has always been right
*Within the same component, sequential or parented components will behave the same.
K
Posted: Mon May 17, 2010 4:20 pm
by VilleK
Kjell wrote: Apart from the camera .. since both the camera-rotation-order and the internal-rotation-order are reversed, that has always been right
Currently both camera and model rotations use the same ApplyRotation-routine. Do you mean they would need to be split up for it to be correct? So that model use the XYZ-order and camera use ZYX-order?
Posted: Mon May 17, 2010 4:34 pm
by Kjell
Hej Ville,
Why not simply use a temporary TZVector3f where you cross-assign the values of CameraRotation to ( X->Z, Y->Y, Z->X ), and then call ApplyRotation using that variable?
K
Posted: Tue May 18, 2010 1:04 pm
by jph_wacheski
I assume this will break some of my unfinished projects,.

But no biggy, I can always finnish them with the current version, or rework them to fit the changes.
Since I don't own any of those expensive applications,. (perhaps I should just find a nice torrent?) I would need to build an exporter for Milkshape or Blender and would probably find the same issue.
I would still like to see a basic curve editor in ZGE for doing simple animations (and other control uses) with basic shapes and procedural models

I was hoping Sculptris would get a painting release soon as it is free and a super fun modeler,. I see myself doing some stuff using that.
http://www.youtube.com/watch?v=rBI17bswg2M&NR=1
Posted: Tue May 18, 2010 2:58 pm
by y offs et
SoftImage is free.
Posted: Tue May 18, 2010 3:07 pm
by Kjell
Softimage is free
Not exactly .. Softimage Mod Tool is free ( so is Maya PLE and GMax ), but the commercial version is around $3000.
@jph - I still think a COLLADA importer is a better time investment then a Curve Editor. Sure it would be nice to have a internal audio / image / animation editor, but Audacity / GIMP / Blender are perfectly fine for those purposes
K
Posted: Mon May 24, 2010 7:21 pm
by VilleK
I just tried to implement this and quickly found a couple of incompatibilities in the sample projects. Both the ShooterModel in ZBlast and the EyeModel in TripleE depends on the current rotation order. Sure it is easy to fix those projects but it still makes me consider if the change is required. You know I don't like to introduce incompatibility and I take pride in making ZGE fully compatible between versions

. Do you consider the current ZGE-rotation order "wrong" or is it just "reversed"? If the solution to make it work with another tool is as easy as changing the rotation setting in the other tool like you describe then maybe this is enough and no change in ZGE is necessary?
Posted: Mon May 24, 2010 8:11 pm
by Kjell
Hmm,
There's no right or wrong with these kinds of things, only default / conventional. And you cannot simply switch the rotation order of a animation, changing the order changes the animation.
K
Posted: Mon May 24, 2010 9:09 pm
by VilleK
Aha, I can see that being a problem when you want to export existing animations. Ok I'll include it in next beta update and we'll see if there are any problems.
Posted: Mon May 24, 2010 9:24 pm
by VilleK
Here is a test. Kjell, can you please try it out so that I know I've implemented it correctly? The latest code is committed to google code.
http://www.zgameeditor.org/files/ZGameE ... n_test.zip
Posted: Tue May 25, 2010 10:19 am
by Kjell
Huh ..
That's strange. The Model & Transform rotation order is correct now, but the camera order seems to be reversed ( while it does look like you've solved this correctly in the repository ). Are you sure the zip contains a build that has the camera "fix" applied?
K
Posted: Tue May 25, 2010 3:20 pm
by VilleK
I thought it was, but just to be sure I've rebuilt and uploaded it again. Please try it now.
http://www.zgameeditor.org/files/ZGameE ... n_test.zip
Posted: Tue May 25, 2010 3:31 pm
by Kjell
There's definitely something strange going on. The Camera rotation order is actually correct when simply previewing App, but as soon as you press Play the order is reversed. Try starting and stopping the attached example ..
K