CodeSmile:
Best to start there
Blender3D is awesome… and I love this guy’s “how to get stuff going FAST” tutorials:
VIDEO
Here’s a full dump of my notes as far as Blender3D with Unity3D:
Costs of using Blender files directly vs exporting to FBX:
I can answer your question precisely. I freakin’ HATE fiddling and clicking with FBX export, etc.
Keeping files ONLY as Blender files is awesome, one of the most endearing simplifying things about Unity with Blender.
But as you intuit above, there are potential hidden costs. Here are the two major costs.
Cost #1: every place you wish to build this will REQUIRE Blender be installed. Your computer? Fine! Install it! Your friend’s computer? Eh, maybe you can entice him into installing it. Now… U…
Unity imports Blender3D objects as FBX via a little Python script:
Often distortions can come as a result of modifiers and/or scales existing through your transform hierarchy. In Object mode in Blender, always have your rotations set as (0,0,0) and your scales set as (1,1,1) otherwise you will have issues. You can apply those transforms in Blender.
Unity runs this script to import your Blender files via transient FBX export:
./Hub/Editor/2020.1.5f1/Unity.app/Contents/Tools/Unity-BlenderToFBX.py
./Hub/Editor/2020.2.1f1/Unity.app/Contents/Tools/Unity-BlenderToF…
The Python script that Unity uses (substitute your Unity version number or search) to import:
./Hub/Editor/2020.2.1f1/Unity.app/Contents/Tools/Unity-BlenderToFBX.py
More on fixing it:
Check your recycled bin and see if anything is retrievable.
I’m sorry you’ve had this issue. Please consider using source control in order to guard and protect your hard-earned work.
Personally I use git because it is free and there are tons of tutorials out there to help you set it up.
Here’s how I use git in one of my games, Jetpack Kurt:
Using fine-grained source control as you work to refine your engineering:
Share/Sharing source code between projects:
Setting up the right .gitig…
Blender3D objects used as trees / detail in Unity3D terrain (See the second half of this response)
This might be because your scene includes the default camera and lights. Unity started importing those with its default Blender import script starting sometime in Unity2019 and it will break a lot of prefabs.
You can either a) remove the Camera and Light and everything except the LOD group objects (properly named), or you can modify the Blender import script embedded in Unity. This means you would need to re-modify it every time you switched to a new version of Unity, but I was lazy and I do t…
NEVER rename items in Blender after you have imported into Unity, because then Unity imports them as though they were new GameObjects. That’s how the mapping works if you look in the .meta file associated with your Blender file. It is done by name.
I would also NEVER reparent them because of the root (-90,0,0) rotation issue when going from Blender’s right-hand system to Unity’s left-hand system. Reparenting potentially moves an object in or out of the guard area for this rotation.
The best w…
Probuilder and Probuilderize and Blender:
This is what you need, but it’s not a free-back-and-forth-all-day-long process.
You want to be very intentional and parsimonious about how many times you go back and forth because there’s a LOT of room for error.
When you drop a Blender file in, Unity has Blender run a Python export script, then imports the resulting temporary FBX file, which you don’t ever see in the filesystem.
When you drop that (or any model file) into your scene, it makes a GameObject, gives it a MeshFilter and MeshRend…
Some more potentially-useful info:
what are you using for your fbx, export settings in blender, and what are you using for import in unity?
This is what i use in blender, you want to set your Up axis and Forward not to what Unity uses for those, but to how your axis are being used in blender. Also make sure Apply Transform is enabled.
[8037734--1036694--upload_2022-4-11_9-51-35.png]
in Unity i have this.
[8037734--1036700--upload_2022-4-11_9-54-11.png]
Updating Blender files without breaking your prefabs:
Yes ^ ^ ^ the above… but there are limitations. Generally you cannot ADD new items, only change existing items. Here’s why:
Any arbitrary FBX model (including Blender files automatically imported as FBX files in Unity) is a collection of things:
each object becomes a GameObject
each might have a mesh
each might generate / use materials
there are parent/child relations between objects
The collective bunch of things is imported and given Unity-side names (called GUIDs) based on their Blender …
When I work in Blender3D for Unity3D use, I follow these organizational rules:
use Empty Blender Objects as folders: they come out as an extra GameObject
ALWAYS parent everything to a single Empty, even a single object
ALWAYS apply all Scales and Rotations on every Transform throughout your hierarchy.
put as few objects in a given .blend file as possible, combining them in Unity into a prefab
REMOVE unnecessary items (Light, Camera, etc.)
use good names for your Blender3D objects and NEVER RENAME them after Unity sees them
don’t even think about final Materials or Textures in Blender. Set the mesh to use N different materials, but always set up the materials within Unity and disregard what gets imported.