How to export animation from blender to unity

How to export animation from blender to unity

Секреты экспорта из Blender в Unity

— Теория о системе координат (правосторонней и левосторонней)
— Теория правильного создания 3d моделей в blender
— Быстрый экспорт файлов из Blender в Unity3d.
— Как правильно сопоставить масштабы модели в Blender и Unity.
— Экспорт с правильной ориентацией модели
— Почему количество вершин по-разному отображается в Unity и Blender?

Видео к статье

Теория о системе координат (правосторонней и левосторонней)

На самом деле это самая важная часть, я столкнулся с рядом проблем в работе физики 3d модели из-за неправильного экспорта. И так давайте сначала познакомимся с системой координат правосторонней и левосторонней.

Blender использует правостороннюю систему координат с осью Z, направленной вверх. Такую систему координат используют почти все САПР. Смотрите рисунок:

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

Unity3d как почти любой другой игровой движок использует левостороннюю систему координат. Когда Y направлен вверх, X — вбок, Z- вперед. Смотрим рисунок:

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

Теория правильного создания 3d моделей в blender

Для начала надо изучить структуру папок и файлов нашей 3д модели в Blender.
Refence — папка в которой могут хранится вспомогательные чертежи, рисунки, которые помогают построить 3д модель
Textures — папка в которой должны хранится текстуры.
Flags_snow.blend — наша 3d модель в формате blender

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

Теперь для правильного экспорта 3d модели, мы должны для себя уяснить, что Z+ это будет направление в игре когда объект движется вперед, (Z-) — направление когда объект движется назад. (X+-) это направления поворота вбок — но это в Unity, которая использует левостороннюю систему координат. А в правосторонней системе координат (Blender, 3ds max) Y+ это будет направление когда объект смотрит вперед и (X+-) это направления вбок. Это значит что объект должен стоять в сцене так, как на рисунке, в противном случае ждите проблем с физикой:

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

Все параметры вращения должны стоять на 0 для дальнейшей работы и для правильной генерации Меша (Mesh), надо Scale установить по умолчанию. Для этого мы сделаем следующие действия в Blender.

1)Выделим все объекты в сцене (клавиша A)
2)Object>Apply>Rotate & Scale.

Теперь все параметры вращения приняты и установлены на 0. А параметры масштабирования (Scale) установлены на по умолчанию (1). Смотрим рисунок:

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

Благодаря пользователю Leopotam, выяснилось что назначать текстуру, лучше в самом Unity3d, а не в Blender, в противном случае, при каждом экспорте FBX файла у вас будет создаваться папка object.fbm (пустая папка которая не на что не влияет, кроме как создает лишний объект в окне Project.

Экспорт с правильной ориентацией модели

Теперь можем делать «Правильный экспорт» из правосторонней системы координат в левостороннюю систему координат.

1)Выделим все объекты (клавиша A)
2)Жмем последовательность R>X>-90.
3)Object>Apply>Rotate.
4)Жмем последовательность R>X>90.

Обязательно делайте в данной последовательности. Далее экспортируем модель в Unity. File>Export>FBX со следующими настройками:

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

Быстрый экспорт файлов из Blender в Unity3d.

После экспорта модели:
1) Идем в папку с этой моделью и копируем папку Textures (папку с текстурами) и наш FBX файл.

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

2) Вставляем в папку Assets нашего проект. Это позволит Unity импортировать модель прямо с текстурами, которые были настроены в Blender.

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

Почему количество вершин по-разному отображается в Unity и Blender?

Как мы видем на рисунке количество вершин (verts) на объекте в Unity3d показывает 28.
Смотрим рисунок:
How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

А количество вершин в Blender = 8

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

Связано это с тем, что в Unity3d подсчитывается количество вершин самой фигуры и количество вершин в UV развертке:

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

При создании швов, одна грань разделяется на 2 грани, а следуя математике 1 грань состоит из 2 вершин, следовательно из 2ух граней будет 4 вершины. Для примера воспользуемся Smart UV Project разверткой и установим максимальный Angle Limit.

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

Смотрим в Blender и количество вершин сократилось с 28 до 24 вершин. Если у кого есть более оптимизированный способ. Пишите в комментариях, обсудим. Некоторые скажут что что сократилось всего на 4 вершины, а представьте если таких объектов 100 или 200, или количество вершин в более детализированных объектах сократиться на 100-300. Помойму не плохой способ оптимизации.

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

Как правильно сопоставить масштабы модели в Blender и Unity.

Смотрим на рисунок:

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

Видем параметр Dimension (Измерения или размер). на рисунке мы видем Dimension по X,Y,Z = 1,1,1; следовательно эта фигура куб с размерами 1х1х1 метр. Экспортируем в Unity и переходим на вкладку Inspector

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

смотрим на параметр Scale Factor, если у вас Unity версии меньше 5, то поумолчанию Scale Factor будет 0.01, исправим этот параметр на 1, если у вас Unity5 то Scale Factor поумолчанию будет 1.

Заключение

Вот и вся статья, как видем экспорт 3d модели из Blender в Unity, это не такуж то и сложно. Для более детального рассмотрения данного материала предлагаю посмотреть видеоуроки в начале статьи >> ссылка

Дополнение от Leopotam

Ничего не было сказано, что нельзя вешать в материал текстуры (только то, что в UV-окне), иначе юнити начнет создавать папки типа object.fbm и пытаться импортировать текстуры в них независимо от того, что лежит в соседней папке Textures. Тут кроется проблема — их бесполезно удалять, при следующем переимпорте (например, при заборе репозитория в новую папку или смене целевой платформы) ассета папка появится снова. Единственное решение — правильно готовить это дело в блендере. Ну или отключать импорт материалов и настраивать префабы руками.

Да действительно в Unity 5 начали создаваться данные папки (при первичном импорте) раньше их не замечал, но они пустые и их можно удалить (они создаются только при первичном импорте) и текстуры ищет в папке Textures и применяется Шейдер в зависимости от настроек материала, если материал стандартный и то примениться Diffuse с уже настроенной текстурой, если Transperty применен в материалах, то примениться соответствующий шейдер Transperty в Unity3d и текстура тоже примениться. Сменил целевую платформу, с Web Player на Desktop — ничего не поменялось, папки не создались. Сменил на Ios — ничего не поменялось. Unity 5.0.1f1

Ничего не было сказано, что если экспортируется арматура с анимациями, то нельзя использовать FBX 7.4 BINARY формат, только старый FBX 6.1 ASCII, иначе все в юнити поедет в стиле «кровькишкирас. ».

Спасибо за дополнительную информацию, с анимацией в Blender не работал и собственно в разрабатываемом проекте не требуется костная анимация, поэтому мало знал о данном материале.

Is it possible to export a simulation (animation) from Blender to Unity?

I created an explosion animation within Blender, something as shown in this video. To achieve this I used a particle-system, together with the «Explode» modifier.

This kind of animation (simulation) doesn’t get exported to other file-formats though and I’d like to export the animation as FBX, so that I can use it in Unity. So I basically need some way to «bake» the animation to keyframes. I wonder if there’s a way to achieve this?

After some testing I found out, that the only way the simulation gets exported is by writing a sequence of obj files. So an answer on how to integrate/animate such a sequence of obj files in Unity would also be welcome.

Side note: I also tried to get an answer to this over at the blender community.

2 Answers 2

After countless tests (and some coding) I was able to find two valid approaches to the problem. Both aren’t optimal solutions, but apparently there is none (exporting a simulation from Blender to Unity simply doesn’t work).

Approach 1: Export as obj sequence and swap meshes in Unity

Pretty straight-forward. Exporting a simulation using the obj exporter generates a separate file for every frame of the animation (if the «Animation» option has been toggled in the export options). Drag all these files into your Unity project (eg. into Assets/Models/MyAnimation ). Then write a simple script to swap the mesh of the GameObject at runtime.

Pros:

Cons:

Approach 2: Create the explosion procedurally within Unity

This approach is a mixture of the approach proposed by Jonathan Dickinson and the way the explode-modifier works in Blender. In Blender, the explode-modifier uses a particle-system to determine the movement of shards/shrapnels caused by the explosion.

I wrote a script that splits the mesh into triangles and uses a ParticleSystem to animate the triangles.

Pros:

Cons:

Comparison

Here’s a video that shows both types of animation in effect. The used scripts (both written in C#) can be found here:

Update: MetaMorph

Thanks to the Blender Community (especially the users chipmasque and enzyme69) I was pointed towards a third possible solution, which is MetaMorph. It’s a Unity script and a Blender export addon which allows you to export shape-keys from Blender and play them in Unity. While there seems to be some issues with getting a shape-key animation from an explosion, it should work fine for other types of simulations and other shape-key driven animations (eg. facial animations/morphs etc.).

I’m going to go ahead and answer this with the procedural approach. I’ll assume you have a workable knowledge of linear algebra. I am going to hash over this quite quickly so feel free to ask me to expand on any point of the answer.

Consider this overhead:

This isn’t too different from this:

I would strongly recommend at least experimenting with a procedural approach to this.

Now when you need to fill the buffer all you need to do is go over each triangle (in order) and append it to your vertex buffer. You don’t need to worry about the indicies as those are constant. This is very similar to how sprite particle system works (except the indicies are not constant).

ZuluOneZero

Exporting Multiple Animations from Blender to Unity

This is one of those workflows that is always a bit fiddly to get right so I’ve documented how to do it here in case I forget! One of the downsides to being a solo developer is that your skillset is always being stretched by the available time so you can end up getting proficient in once aspect of game building and then by the time you get back to that phase you forget everything you’ve learned and all the tricks of efficiency and process. Also, in case someone else needs it.

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unityThis is what we are aiming for in Unity. An imported mesh with multiple animations being called independently.

Blender Workflow for Saving the Animations

Start with a new project. Select everything (the default cube and lamp) x –> delete.

In this case I’ve imported an existing fbx of a hand with supporting armature ready for animation. I won’t go over the modelling or rigging procedure there is plenty of help with that out there – but if you need it I would recommend the Riven Phoenix courses because they are so dense (these tutorials are no quick start or tricks videos but deep deep dives into the process and reasons behind it and how stuff works in Blender at a very technical level).

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unityThis is how I layout Blender for Animation with a dual screen front and right view with the Timeline below

Get your animation window set up and make sure the timeline is available at the bottom.

Making a Pose Library

In the Outliner select the Armature and make a Pose Library.
We can use this to set a few basic poses to make the animation process run a little easier.
The poses will be major key frames that we can interpolate between.

It’s not the best workflow but in the tech preview for upcoming Blender versions is an enhanced workflow for the animation process which looks really exciting – google it.

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unityMake a Pose Library

Add the default pose as the first item.
Go to Pose Mode. Get the model into your default position and save this pose. (Important – this will be the pose that the model is exported as by default so try and make it your idle or standing pose).

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

Save several other poses (make sure you save all the bones you want the pose to effect – usually this is all the bones).
You can overwrite poses if you get it wrong.

Also, when a pose is added and a pose marker is created the whole keying set is used to determine which bones to key. But if any bones are selected, only keyframes for those bones are added, otherwise all bones in the keying set are keyed (this is why I usually have all the bones selected).

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unityI’ve made several poses and saved them

It’s a good idea to set and select the poses a few times for each one to make sure you got it right. I’ve found that sometimes it’s a bit glitchy or I do something a little bit wrong and it doesn’t save properly (actually it’s probably not glitchy it’s probably just me).

That Book icon with the Question Mark is useful when you have all your poses completed. Pose libraries are saved to Actions. They are not generally used as actions, but can be converted to and from them. If you use this icon to “sanitize” the pose library it drops all the poses down to an Action with one pose per frame. So you can go into the NLA Editor window and select this track and sweep/scrub through them. Maybe this is useful as a clip in Unity if you want to split it up using the timing editor and make custom animations in Unity (never tried it).

Making the Animations

Go to Dope Sheet – and switch to the Action Editor View.

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unityAction Editor

Make the animation (ie. start on the first frame – Assign the pose from the library – Shift + I save rotation and location. Go to last frame – assign the next pose – Shift + I and save again).

In the Timeline make sure you are on the beginning frame. Set the pose you want to move from (first keyframe) and save the required parameters.

Shift – I
Insert Location and Rotation
(make sure the Armature is Selected)

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unityStart with the first pose How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unityThe Dope Sheet

Move to the next frame at a suitable scale and change the pose to your ending pose in the editor. Save the Location and Rotation parameters (if that’s all that’s changed).

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unityAdd the second pose How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unitySaved Pose in the Dope Sheet

Pushing the Animation down the Action Stack

Once you are done hit the “Push Down” button. This is the magic button.

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unityMagic Push Down Button

Next move over the the Nonlinear Animation Window.

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unityThe NLA Window How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

Your animations get made as Actions in the Non-Linear Action Editor Window: NlaTrack, NlaTrack.001, etc.

In the NLA Editor you can click the Star next to the NLA Track (rename them to make it friendlier) to scrub through the track. Make sure you got the right animation under the right name etc.

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unityAfter hit Push Down after each animation is finished it appears as an NLA Track in the NLA Editor

I make a few more animations and hey presto. Each one of those NlaTracks is an animation that we can use in Unity. Also the PoseLib track is marked there with orange lines – one for each pose on a frame which is a good reference track if you need it.

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unityThe Animations Stacked up in the NLA ready for Export with the *.fbx

Export from Blender

These are the settings I use to export. It’s safer to manually select only the Armature and the Mesh here.

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unityBlender Export Settings

Import Into Unity

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unityThe Animation Tab of the Asset (on import)

The animations come out as duplicates but you only need one set. Work out which one’s you want and delete the others using the minus button when you import. This bit can be a bit fiddly and sometimes I’ve had to do the process of exporting and importing a couple of times to get it to work. Sometimes what works is to drag and drop all your animations NLA Tracks into one track in the NLA Editor and select it with the star before exporting. Sometimes it works – sometimes not. Not sure why.

After that I drag the model into the scene and add an animation controller. Then you can just drag the animations from the imported model into the Animator window like below and set up transitions as you see fit. Below I’ve made them all come from an Any State and added some Triggers so I can play with them in the Window for Testing.

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unityThe Animator Controller

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unityBYE

Export from Blender to Unity

Introduction

In this article we are going to see how to export 3D models, with materials, UV maps and animations, from Blender to the Unity engine, in which format and a some useful tips to prepare models before exporting.

BLENDER TO UNITY VIDEOS

EXPORT 3D MODEL AND
PACK TEXTURES IN THE FBX FILE
IMPORT THE MODEL IN UNITY
EXPORT 3D MODEL AND IMPORT IT
IN UNITY, IMPORT TEXTURES AND
CONFIGURE MATERIALS

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

REMEMBER TO SUBSCRIBE

A SHORT BREAK WITH THE LATEST NEWS

CHECK THIS MECHANISM I MADE WITH UNITY, BLENDER AND SUBSTANCE PAINTER
👉

LET’S CONTINUE WITH THE ARTICLE

How to export a 3D model?

The process is simple, being in object mode, we select the 3D model or models that we want to export. Then click on File > Export and choose the format to which you want to export it.

In my case I always check the “Selected Only” box to export only the selected 3D models to Unity.

Format to use

Things I take into account before exporting

Before exporting from Blender to Unity I try to improve certain aspects of the 3D model in order to have everything as organized and simple as possible.

About the names of the 3D models

In Blender’s Outliner we can modify the names of objects and since those names are going to be exported directly from Blender to Unity, I like them to be as descriptive as possible.

In the long run, when we have many 3D models in our project, organization is fundamental.

About the origins of 3D models

The origin of an object is the point in the space that represents it. The transformations of translation, rotation and scale of the object will be applied with respect to that point. So, in general, we are interested in its being in a coherent place in the 3D model.

The Blender 3D Cursor is used to change the position of the origin.

We enter the geometry editing mode and select a vertex, edge or face where we want to place the origin. Then press “CTRL + SHIFT + S” and choose the option “Cursor to Selected”, to move the 3D cursor to the selected element.

Go back to Object mode, right click on the 3D model, go to the “Set Origin” option and choose “Origin to 3D Cursor”. This will place the coordinate origin of the 3D model in the position where the cursor is.

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

Have you ever been frustrated when exporting FBX files from Blender and importing them into Unity? Problems with rotation and scaling along the way? In this post I will provide you with some tips and tricks to get the Blender to Unity process working smoother.

First of all, if you are impatient like me, here’s a quick summary of the easiest way to get rotation and scaling right:

For a simple object

(Simple object = no hierarchy and no armature (bones) or animations)

Watch this video (at 1:01) to see it in action

For multiple simple objects

If you want to accelerate this process, especially if you are making many objects, have a look at this post where I have made a Unity Batch FBX Export addon for Blender!

For rigged characters with armature and bones

Watch this video (at 2:24) to see the export process for a rigged character with an armature.

This video highlights the problem and demonstrates the methods to solve the issue:

That’s It.

If you follow the above steps for simple objects and rigged characters, you should end up with correctly rotated and scaled objects when they are imported into Unity with a lot less headache. You’ll even gain some better sleep now!

You can also watch timelapses of the modeling and animation process of the simple lowpoly objects as well as the animated rigged character.

Need More Help?

If you couldn’t quite follow, or if you a more detailed story, not to worry, I’ll fill in the blanks.

Axis vs. Alignment

Unity works with the Y axis being up/down and Blender works with the Z axis as up/down. This creates a problem.

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unityProblem if exporting from Blender using default settings

Problems

Number 1 (and consequently also number 2) causes a problem because if you try to move the object in it’s forward vector, e.g.:

Don’t work around the problem

Fix the problem instead

Assumptions:

Fixing the rotation problem «The Easy Way»

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

Note: The feature is named !EXPERIMENTAL! for a good reason. It does not work for nested objects, objects with animations, and objects with armatures. Maybe there are also other problems that could arise when using this which is why I am also including an alternative method here to manually fixing the rotation problem.

Again, watch this video (at 1:01) to see it in action.

Fixing the rotation problem «The Manual Way»

If the experimental Apply Transform method does not work for you, for whatever reason, you can do this manually:

So what is happening and why does this work when you export the FBX file?

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

The object should now import fine into Unity with correct rotation and scale.

Watch this video (at 1:30) to see «The Manual Way» in action.

But. I have a character with animated armature?

But what about nested objects, such as an armature with a child character mesh? The same principle applies as «The Manual Way» described above, but with these slight modifications:

Again, watch this video (at 2:24) to see the export process for a rigged character with an armature.

Is your character scale incorrect to begin with?

Let’s Automate

I have created a Blender Addon that you can download and install. This automates the process of exporting simple objects as individual FBX files ready for import to Unity. The objects that are exported will all be in the correct rotation, scale, and they will be positioned at 0,0,0 regardless of where they are in your Blender scene at the time of export.

You can export hundreds of objects to individual FBX files in a matter of seconds.

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unityBlender Batch FBX Export

You can allow the addon to use different methods to export your objects as FBX files:

Finally, you can choose to export all (mesh) objects in the scene or your current selection.

To Round Things Off

Thanks for taking your time to read this post. The Blender to Unity rotation and scaling problem has plagued me for years and I never took the time to document the exact settings and behaviors, until now.

If you found this post useful, please share it with the social media icons at the top. Also feel free to link to this post from your web site as it would help it to gain more exposure.

How to export animation from blender to unity. Смотреть фото How to export animation from blender to unity. Смотреть картинку How to export animation from blender to unity. Картинка про How to export animation from blender to unity. Фото How to export animation from blender to unity

Subscribe to Imphenzia

Get the latest posts delivered right to your inbox

Источники информации:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *