# How to Animate a 3D Animal Model in Unreal Engine Using Predicted Actions and Durations from ML Model?

**URL:** <https://forums.unrealengine.com/t/how-to-animate-a-3d-animal-model-in-unreal-engine-using-predicted-actions-and-durations-from-ml-model/2106078>\
**Category:** Programming & Scripting\
**Tags:** Python, unreal-engine, Machine-Learning, Blueprint, CPP\
**Created:** [November 5, 2024, 2:51pm UTC](https://forums.unrealengine.com/t/how-to-animate-a-3d-animal-model-in-unreal-engine-using-predicted-actions-and-durations-from-ml-model/2106078 "2024-11-05T14:51:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SachinDilhara](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SachinDilhara](https://forums.unrealengine.com/u/SachinDilhara)\
**Post date:** [November 5, 2024, 2:51pm UTC](https://forums.unrealengine.com/t/how-to-animate-a-3d-animal-model-in-unreal-engine-using-predicted-actions-and-durations-from-ml-model/2106078/1 "2024-11-05T14:51:52Z")

</div>

I’m working on a project where I developed an ML model that predicts an animal’s next action (e.g., walking, running, idle) and the duration for that action. I’d like to use these predictions to animate my 3D animal model in Unreal Engine based on the action and duration outputs from the model.

I’m familiar with getting model predictions in Python, but I’m looking for guidance on:

1. How to bring the output (action + duration) from my model into Unreal Engine.
2. How to animate the animal model in Blueprints to perform the specified action for the given duration.

Any advice on the best approach or any tutorials for similar cases would be a huge help! Thanks in advance! 😊

---

<div class="post-metadata">

**Author:** ![Deathcalibur](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/deathcalibur/32/1037610_2.png) [@Deathcalibur](https://forums.unrealengine.com/u/Deathcalibur)\
**Post date:** [November 12, 2024, 2:58pm UTC](https://forums.unrealengine.com/t/how-to-animate-a-3d-animal-model-in-unreal-engine-using-predicted-actions-and-durations-from-ml-model/2106078/2 "2024-11-12T14:58:43Z")

</div>

If you have UE 5.4, then use the 5.4 tutorial to learn about learning agents first:

> **[Learning Agents (5.4) | Course](https://dev.epicgames.com/community/learning/courses/kRm/unreal-engine-learning-agents-5-4/4JPj/unreal-engine-learning-agents-intro-5-4)**
>
> Get familiar with Learning Agents: a machine learning plugin for AI bots. Learning Agents allows you to train your NPCs via reinforcement & imitatio...

(I’m working on the 5.5 version of the tutorial which has some small breaking - UE 5.5 came out today!)
