Skip to main content

Setting up Animation in Maya and Exporting to UE4


The cogs and key animation was quite easy to set up.  As the cogs would not be seen in great detail I didn't need to do any maths calculations to work out the correct rotation rate for each cog.  I just set rotation values in the X-axis to zero on the first frame for all cogs and set another value of 360 on frame 25.  As I did not want to go to the trouble of setting up joints for all the cogs, I baked out the animation instead.

Originally, I left the key separate from the skeleton but I had issues getting it to animate correctly in UE4.  I fixed this by adding the key joint to the main skeleton and skinned it.  I used simple 0-360 looping animation the same way I set up the cogs but baking the animation was not necessary in this case. 

Baked Cog Animation

Bind Pose used as a base for all looping animations


During my research for flying birds I found a cool way to animate wings by using Expressions in Maya.  The following link to the Maya Hacks Youtube channel shows the process in full


This looked great in Maya but Expressions do not get imported into UE4.  The Expressions needed to be baked and then fixed in the Graph Editor so the animation would loop correctly.  As I wanted to have a 24 fps loop, frame 25 needed to match the first frame, but the Sine Wave expression resulted in animation that did not loop perfectly.  I found a section of animation where the first and 25th frames were not too far apart, changed the values on the 25th frame to match the first frame and used these keys for the animation cycle.  The looping animation can be viewed in the graph editor by setting pre and post infinity curves to "cycle with offset" and turning on Infinity under the View tab.

Baking the Wing Oscillation Expression


Exporting Bind Pose and Animation Clips with Game Exporter


There are many problems with Maya's FBX export to UE4 workflow.  Through trial and error I discovered that there is a bug related to Tangents & Binormals, so it is important to leave this option unchecked when exporting.  The bind pose mesh/meshes and root joint should be selected and exported without Animation.  All animations that rely on the skeleton can then be imported into UE4 using the bind pose mesh as the Skeletal Mesh.

Game Exporter Settings - Bind Pose

Game Exporter Settings for Animation Clips to apply to Skeletal Mesh in UE4


I also exported baked animation versions separately for more complex non-looping animations.  The export process for baked animations is a little different and does not require a skeleton for the animation to come in to UE4.






Comments

Popular posts from this blog

Reference and sketches

Haz Elf's Clockwork Birds on Deviant Art I found this wonderful image by Haz Elf while researching source material for a Clockwork Bird character I wanted to create for my course's group animation project.  I took the image into Photoshop and altered it slightly, adding cogs and a clock.  The idea was to sketch a concept from scratch but I was not happy with my attempts.   Birds flying in Slow Motion - Video Reference Link to Paul Dinning's Youtube channel

Modelling the Clockwork Bird in Maya

Modelling Timelapse - Start to Finish The above gif image shows the modelling process from start to finish.  The early version of the model had basic wings and no cog geometry which sufficed for the blocking out stage. The wings went through a few version changes.  I decided that they would need to be split into sections so that they would look correct when animated.  I modelled cylindrical hinges to divide the wings into base, middle and tip sections. I duplicated each wing to make three layers to fill in any gaps to give the wings a fuller appearance. Early version without cogs and basic wings Later version with updated wings (not split into sections) Finished model with wings split into sections