Create 2D Animation at runtime


I’m thinking of switching from Unity to Unreal Engine.
My question is, we are making “breeding” game, but we want for example a “horse” to get his body parts by random while hes “breeded”

I mean, 2 horses bread, so we got a new one and he will get an pattern on his body, tail, hair, etc randomly similar to the parents.

We dont want to draw each horse separately so we figured out we will draw body parts and they will randomly become together as one animation.

My question - if thats possible and what should i be looking for to achieve that?

Hope i made myself clear, please ask if something is not understandable for You :slight_smile:

Hey iEska,

What you are looking for is to create an array of objects and randomly generate these at runtime. The beauty of Unreal is this can be handled by the magic of blueprints!

Follow the links below to learn how to create blueprint arrays for all different variable types.

Blueprint Arrays

Array Nodes

Since you are fresh to Unreal Engine 4, let me welcome you to the community. If you need to familiarize yourself more with transitioning from Unity to Unreal we have a helpful guide. You can also use our Documentation, Youtube, and the community Forums as learning resources.


That answers a LOT! Thanks for the warm greetings and the knowledge!
btw, how do i build animation the easiest way to achieve it?
Till now my graphic was doing full images of horses, i can’t really wrap my mind how to split and later have no issue to merge these images wisely.
Since this day she was giving me full horse images made for each horse style.
Any ideas?

One word. Photoshop. :slight_smile:

If you have a bunch of images of fully drawn horses, you are going to want to ‘cut’ them out and create an image based on the single parts i.e. legs, head, body, etc…

For an even sneakier and more robust approach, you could make a texture atlas of each body part so you can pull from a single texture sample instead of a whole bunch of single samples.

Good luck!

great advice! My worry is when i have for example a horse tail, that in 2d animation kinda hangs between horse legs (so hes somehow a bit hidden under one leg for some part of animation), how do i kinda work with that?

Im asking about it cuz usually my graphic was giving me just frames in one png and i was doing anim from that. Dunno if it will still work this way.

If ill figure it out fluently, im all set and good to go))

You might find this interesting.

Paper 2D Flipbooks