Page 4 of 6

Re: New animation system is finally in

Posted: 20 Feb 2019, 14:57
by astorian
Jorzi wrote: 17 Feb 2019, 20:58 Hi
I tried animating the factory fan using a blender script, but since the fan is slightly tilted, animation will be around all three axes.
Unfortunately I can't get the Euler angles right, so the fan ends up being wobbly :P . Also, my version of WMIT flips the model on the x axis when exporting to pie, which certainly doesn't help. Overall, getting the coordinate system right is pure hell.
Please help :)
Hello Jorzi, i wanted to ask how did you animate the fan in blender. The script is exporting the object location/rotation/scale of the objects center/origin.
So it is possible to use armature, even with a single bone, to animate the object, as long as you animate the object and NOT the mesh.
regards, Astorian

EDIT: i have installed the game version 3.2.1 and replaced with your blfact0.pie but the game is not loading it - saying the blfact0.pie is missing.
Works fine with original file. Do i have the wrong version?

Re: New animation system is finally in

Posted: 21 Feb 2019, 10:20
by Jorzi
Hi Astorian, the new animation system is for the 3.3.0 beta, so the files won't work with 3.2.1 I think.
As for your question, you can use any armature , parenting and constraints, as long as you animate the object and not the mesh. My script takes the transforms from obj.matrix_world.decompose() which is the final result, after all the other stuff has been applied.

Re: New animation system is finally in

Posted: 21 Feb 2019, 18:41
by astorian
Jorzi wrote: 21 Feb 2019, 10:20 Hi Astorian, the new animation system is for the 3.3.0 beta, so the files won't work with 3.2.1 I think.
As for your question, you can use any armature , parenting and constraints, as long as you animate the object and not the mesh. My script takes the transforms from obj.matrix_world.decompose() which is the final result, after all the other stuff has been applied.
That would explain it :D i have to install 3.3.0 then. I remember the script, but i meant how did you animate it since you wrote: "Unfortunately I can't get the Euler angles right, so the fan ends up being wobbly"

Re: New animation system is finally in

Posted: 23 Feb 2019, 15:55
by astorian
Hi again, i was able to compile the 3.3.0beta1. I have been able to load your model. The texture was not right, but that was probably not the point of animation testing.
I can now also try to animate! YAY!

Re: New animation system is finally in

Posted: 25 Feb 2019, 00:53
by MaNGusT
Jorzi wrote: 17 Feb 2019, 20:58Also, my version of WMIT flips the model on the x axis when exporting to pie, which certainly doesn't help
latest build :)

Re: New animation system is finally in

Posted: 27 Feb 2019, 19:02
by astorian
Hello to all,
i have been playing with the animation concept in blender. I started by making simple factory model and snapped a circle on the top to align the object.
After resetting the circle object origin pivot to xyz 0 , I have used a single bone armature and parented the circle object to the bone without snapping to bone.
First key frame locrotscale on frame 0 , last key-frame on frame 40 with 360 degrees rotation on bone axis.
Aligned and and working. Blender file cannot be attached, here http://gofile.me/6vz7G/d7E1osPkV is the link. Download, open and hit Alt+A.
Right click between the circle and bone during animation shows you object origin rotation and bone axial data.

Re: New animation system is finally in

Posted: 03 Mar 2019, 23:06
by Jorzi
Guys, after endless banging my head against the wall, I present to you a script that successfully transfers the blender transformation matrix to warzone animation framer and gets the eulers right.
Some notes about the coordinate systems before things get forgotten:
In blender, y is forward and z is up (right handed), when I export to WMIT as obj, I choose -z forward and y up (right handed), since this is the warzone standard for pie vertices.
For the translations in the animation script, I had to invert x and y (-y forward, z up, right handed)
Then, after 4 hours of trial and error, and 1 hour of digging through the warzone code, I discovered that the order of euler evaluation is y, z, x (because apparently x, y, z is boring) <- Not blaming Per here, as he had to retain compatibility with how it was originally done.

TL:DR?
mesh coordinates: -z forward, y up, right handed.
connectors: -y forward, z up, right handed.
animation: -y forward, z up, right handed, euler order is y,z,x

Edit: got the connectors wrong, corrected

Re: New animation system is finally in

Posted: 03 Mar 2019, 23:37
by Jorzi
MaNGusT wrote: 25 Feb 2019, 00:53
Jorzi wrote: 17 Feb 2019, 20:58Also, my version of WMIT flips the model on the x axis when exporting to pie, which certainly doesn't help
latest build :)
Hi
I tried this build, and the problem is still there. The model looks fine in WMIT, but it's flipped in warzone

Re: New animation system is finally in

Posted: 04 Mar 2019, 08:09
by MaNGusT
Confirm. Wmit flips model by x-axis on import but saves unflipped version. As a temporary solution we should flip a model again before export to wz(mirroring options). I think I-Nod could fix this in a near future. :-)

Re: New animation system is finally in

Posted: 14 Apr 2019, 18:18
by MaNGusT
Now WMIT works correctly. download :)

Re: New animation system is finally in

Posted: 27 Apr 2019, 07:55
by i-NoD
Latest WMIT is capable of previewing regular model animation (one that is defined with ANIMOBJECT).

I'm not sure what is the workflow to merge blender's script output into a PIE model... I suspect it involves a notepad :lol2:

Is there a need (or utility) to allow merging .ani file into PIE model? I assume that .ani file is ordered same way as corresponding OBJ or PIE model, so that should be doable.

Re: New animation system is finally in

Posted: 01 May 2019, 16:10
by Jorzi
Hi, interesting bug, the factory is turned the right way, but subsequent appended meshes are still flipped

Re: New animation system is finally in

Posted: 01 May 2019, 17:02
by MaNGusT
Ah, we forgot to scale by -1,1,1 appended models. Will be fixed in next version. if you'll open animated factory from AR repo, everything should work fine.

Re: New animation system is finally in

Posted: 01 May 2019, 19:57
by Jorzi
Yeah, everything else seems to work nicely, WMIT is really becoming a great tool :)
A suggestion: Add a menu for attaching animation data to pie levels (see the .ani files in my zip)

Re: New animation system is finally in

Posted: 06 May 2019, 08:10
by i-NoD
Jorzi wrote: 01 May 2019, 19:57 Yeah, everything else seems to work nicely, WMIT is really becoming a great tool :)
A suggestion: Add a menu for attaching animation data to pie levels (see the .ani files in my zip)
Available in latest version :)
It took a while to figure out that your .pie factory has fans at center of universe... Ones in .obj format are at real location, but animation goes wild for those :lol2: I think that "Center mesh" button will make life easier in a future, but for now keep that quirk in mind when importing animation.