Chapter 1: Epiphany
It all starts with an idea: “Hey, it would be cool if ”
So in a very similar fashion, I decided to animate a piston and add into UEFN so I can test Blender animations and educate myself on the workflow, but oh boy did I know where I was getting (or rather falling) into. It will easy they said. It will be fun they said.
So, I started by building the mesh. That part was relatively easy. Model with 7 different parts, a base that allows space for the rotation to take place, a couple of little notches to give depth to the piston head, and the interior part of the piston which I didn’t know was shaped like that (had to look up a couple pistons out there)
So far, so good. Now, on to the fun part! Animating!
I 've never animated in Blender before, so I had no idea what to do or where to start.
So I googled Piston animation and found a cool guy that had a similar piston to me, and showed how you can create “object constraints” to animate something based on “rules” you can set the object to follow. Some examples are setting the piston base as the parent
of the base bolts, or limiting the left or right the piston head can move, so it can only move up and down. Pretty fun stuff, the possibilities with these are endless when making mechanical parts.
At the end, object constraints allowed me to end up with a fully working piston, that only required the “rotator” to turn and activate the full thing:
Perfect! Now I had the model, the animation, and set the material slots that I will use in our UEFN game. Alright, time for export!
What is this? I will just ignore all these settings, UEFN knows better than me, I guess they ll get it right. Right?
Alright, it imported! I even see my materials (that doesn’t always happen mind you).
Alright, cool. How do we see animations? Where is the animation?
As I was wondering that, the ground beneath me started to vibrate and crumble. A low rumble earthly sound could be heard. Dust started rising. The rabbit hole was opening.
Chapter 2: Cacophony
The animation was nowhere to be found. I searched all over the place in UEFN, but nothing. Step 2 was to look it up, see what others on the internets are fiddling with. Strange, no mention of mechanical animations; everything is about humanoid models or limbs. Hmm, let’s start with the basics then:
My goal is to make an animation from Blender and send it to UEFN. Cool, let’s start with the animation then.
Turned out it was pretty easy. I set the rotator in 4 different parts clockwise and that made the rest follow perfectly:
Cool, now let’s save that and send to UEFN. Export again, make sure you get the right animation options enabled, good to go!
This time I am more prepared! I know I have to enable “Skeletal mesh” so “import animations” show, yay. Let’s do that.
Blip.
Bunch of cool stuff imported. Only I have no clue what to do with those (+ still no animation, huh?). Why are they broken down now, hmm.
Don’t mind me, I ll just enable “Combine meshes”. Right? RIGHT?
That setting doesn’t exist if I enable skeleton import. But if I don’t, I don’t get an animation import (?). But hey, at least I got a can opener out of it.
Alright, cool. There has to be a way. How does all this cool machinery out there get made? I am probably really close.
Back to Blender. Let me google how to import from Blender to Unreal an animation. More human hands. Why is always human hands? Oh wait, this guy said “…object constraints from Blender are not supported in Unreal Engine…”
Well, that sucks. How am I going to do this then?
While my body was still falling at the endless newly found pit that emerged below my feet, I thought to myself “What if the animation didn’t contain any object constraints, but instead had the motion keyframes?”
That’s gotta be it! And with a swift turn I turned into the falling computer again and start clicking things. Google is my friend in this falling times “How to make an animation into keyframes Blender plz halp”. Alright, this girl said something about baking the animation, sounds like what I need! Let’s do that.
(probably wrong use of this meme, but hey)
Oh what is this? An endless sea of keyframes I see
Leeeet’s import to UEFN again and se…
At this point, I am being trolled. Where do I even begin? The fact that this is 347437242370 files long, or the fact that each animation… wait, is that an animation? Hey I imported animations in UEFN from Blender! I DID IT!!!
They look… uhmm
OK then.
Goodbye devil spawn.
Chapter 3: Epiphany
I then decided to make rotating cogs using the sequencer.
Moral of the Story (Press me)
Moral of the story: Animating pistons will allow you to make cool rotating cogs.
Great stuff.