Blender export to Unity Notation

来源:互联网 发布:nba新秀赛季数据 编辑:程序博客网 时间:2024/05/17 00:55

Known Issues

  • If you put a model in your game world and then delete/add an object or component it will lose its prefab connection to the 3D file (blender or other) it came from and if that file is reimported with new objects in it it won't take effect. However edits to verts, uvs and removing objects inside the original objects will be recognized.
  • You have to re-add all the colliders to an object imported from Blender
  • You should probably bake the scale and rotation in Object Mode before importing into Unity. Select Object>Clear/Apply>Apply Size/Rotation. This "bakes" the transformations into the model.

Unity Scale Calibration

Unity world units and Blender world units are equal. A 1wu cube exported from Unity as a .obj and imported into Blender will match up with a 1bu cube in Blender (the default cube in a new Blender file is 2bu).

Meshes (Modelling)

When modeling in Blender, most people have a tendency to apply transformations in the Object mode. As of version 1.2, Unity's Blender importer ignores these transformations. To get around this, all objects in Blender must be at the origin with scale of 1, and zero rotation. You may do one of two things:

  • To scale and move around meshes relative to one another, apply your transformations in Edit mode.
  • You may bake the scale and rotation in Object Mode as well by selecting Object>Clear/Apply>Apply Size/Rotation. This "bakes" the transformations into the model.

Another thing to know is that mesh count in Unity (and real time 3D in general) matters a lot, performance wise. If it is feasible to join your meshes in Blender, you should do so. Select a group of meshes and press Control-J to join them.

Textures (UV's)

TBA

Bones

TBA

Animations

The current Collada exporter for Blender (which Unity uses when loading Blender scenes) does not support exporting armatures and animations. This is under development and Unity will automatically gain support for animations when the exporter is finished. Until then, one can export the Blender models into Dim3 Inspire and skin and animate them there before exporting into Unity.

The latest version of blender (2.45 as of this writing) has a working FBX exporter that handles 2 UV channels, and multiple animations.

Exporting to Unity

The default scene in Blender. The box has to be removed and the user defaults saved for it to play well with Unity.

Unity will import .blend files natively, however there are a few things to be done to get it to work properly. This page assumes you have some knowledge of Blender. There are lots of Blender tutorials online to bring you up to a novice level.

Scene Cleanup

Blender lets you specify an initial scene. The default for this is a box, a light, and a camera. If you have any mesh in the initial scene it will get imported into Unity along with whatever else you have, even if you delete it in Blender.

Start up Blender and delete the box in the scene. Now, press Control-U to save your changes to the user defaults.

Now your Blender files will be imported into Unity without the extra box.

Export

The latest version of Blender 3D now supports animations and armature export into Unity, move the .blend files into your projects assets folder and create animation clips in unity with the import settings dialog.However: in order to export a simple Blender animation without bones to Unity, first export it from Blender as a fbx-file.

原创粉丝点击