I recently discovered that animations Armature objects still have a 100x scale. To fix this, you need to change another option in the FBX export settings. In the Transform --> Apply Scalings ---> Change "All Local" to "FBX Units Scale". Now your armature objects should have the scale of 1. This should hopefully work. I'll update here if I find another problem.
I couldn't find an easy solution for this problem. It is not pretty, but this works: -------- As far as I know the only way to get the armature correctly is to: 1. Select armature+mesh -> Alt+P (Clear and Keep Transformation) 2. Rotate both in the X by -90 3. Control+A(Apply rotation to both) 4. Rotate back X by 90 (can skip this step, but then it'll be rotated wrong inside blender) 5. Select mesh+armature -> Control+P (Armature Deform) 6. Select mesh+armature and export -Export FBX but: 1. Selected only still the same. 2. !!! DISABLE "Apply Transform" !!! 3. Apply scale to "Scale the FBX units" 4. Use Space Transform: Enabled (default value) 5. Make sure Forward: -Z Forward, and Up: Y up -Also If you STILL don't get the correct rotation. You might need to tweak the PrimaryBoneAxis and SecondaryBoneAxis inside the armature tab in the export settings.
All those options used to confused me a lot at first too :) But the basic gist of it is... Just export in FBX format and turn on Apply Transform and it should generally be fine for starting out.
That would be nice but exporting isn't always "one size fits all". 😄 For example, it's easier to export with textures built in if the materials are simple. But if you're doing more complex stuff with the shadergraph, then you'd want to export the textures separately and manually make the materials. Another example is you want to apply modifiers if it's truly the final mesh. But if the original mesh is the low poly game model and modifiers were used only for baking maps, then you don't want to apply modifiers when exporting. I find for each game project, I have to pick different options when exporting.
The warning about the normal texture happens when unity detects an image that has normal values but its not set as a normal type. You'll only have the normal map texture inside the project if you embed the images inside the fbx AND click to extract the textures. Or you could also manually move the normal texture inside the project (which is the most common way of using fbx). If they are inside the same relative path as the blender file, unity will auto-detect and asign the material texture to it. If they are not, you need to manually set the textures into your materials.
This is an amazing video. It would be great if you had a version specific to VRChat and VRChat avatars import and export into Unity! Thank you so much for this video.
You probably exported a light by mistake. You should enabled the 'selected only' option and make sure only the mesh and armature objects are selected when exported.
You forgot to mention the "bake axis conversion" option in import settings. Setting -z forward and y up in blender fbx export settings will get your transform rotation to be 0 0 0 in import settings but the model will still be mirrored along one axis ( x, i think?) . When you select the bake axis conversion option the model will appear in unity exactly as you see it in blender I'm making a procedural city generator that has road blocks which go along a curve, and you can see the difference there, it's not apparent with the shield
Thanks for that info. I haven't needed to use it and I honestly didn't understand what this did completely at the time of the video so I gloss over it. Great to know.
If you're struggling to fix the rigged character's rotation after being imported to Unity, and the solution provided in the pinned comment didn't work, try this: In Blender, select both the Armature and the mesh (right-click the Armature, then "Select Hierarchy"), then rotate it -90 degrees on the X axis (to match the value on Unity's inspector upon importing) and press Ctrl + A for the Apply tab. Then, either Apply All Transforms, or Apply Rotation & Scale. You do NOT need to clear parents or rig your character all over again. After rotating it to match the value in Unity's inspector and applying those transforms, export to FBX and import it in Unity, it should be fixed. That's how *I* managed to fix this issue, hopefully it should work for everyone. If you find other solutions, comment them down so other people with the same problem can fix it themselves, too.
Countless tutorials, long trial and error with experimental fbx transform feature... And I learn that negative Y is the direction to use for a correct forward export only here? Many thanks! Though, please tell, how come your animation clips are visible? I had to save them in NLA strips one by one, otherwise only one of them was available - the one that would show up in a hierarchy
There is an option inside the fbx setting Animation tab named 'All action'. As long as that is checked you should have all the animation clips exported.
It seems the armature objects still has the scale of 100, I didn't notice that at first. I recently discovered that you can fix that by changing a the option while exporting the fbx. Under Transform -> Change Apply Scaling --> From "All Local" to "FBX Units Scale" This should fix the armature scaling and now it should be 1.
when i try to export my whole scene from blender into unity, My scene is not looks same as blender scene. Some materials are not setted, and some textures are not looks same and they tearing or strecthing somehow. How can i fix this issue ?
That's a great idea! I was planning on doing a tutorial about game-rigs and how to fix rigify-rigs for games. (rigify rigs are NOT for games, for a variety of reasons) But I could also do a simple tutorial on how to make rigs and bones manually. I just made a rig for a bat model with IK's and driver's so I think I could use that for the video. But it might be a few weeks till I'm able to do that, I'm planning on making the next video a devlog for my game before a do another tutorial.
Unity support imports from .blend files. But I seriously discourage it. A lot of things could go wrong, its slower, and it can only import the whole .blend scene. You can use them for prototyping if you feel that's a faster workflow for you, but try to avoid using .blend files for the final game.
No video sorry(maybe a can make a 2m video showing that later just to have it here). But Unity has an official "FBX Exporter" package that can do that. Have you tried that? Its very simple to use. Right-click the object in your scene hierarchy and select 'Export to FBX'.
If you set to only export deform bones, and those bones are parented to non-deform bones, the whole hierarchy will get skipped. Thus making a lot of parts missing. If you select to export 'selected objects only', you need to make sure to select all the objects you want exported before selecting to export the fbx.
Yes, you still need to UV unwrap the models if you want to use or fix textures. It should keep the same look as it appears in your blender in Material Preview as long as you only use default shaders(so anything using procedural textures can't be converted to fbx and into unity, in this case you need to first bake it into a texture). Basically, if it looks wrong in the blender, it will still look wrong in unity.
When I import my model it says "The mesh Cube has invalid normals. Try cleaning and triangulating Cube in your 3D modeller before importing it in Unity."
This can happen for a variety of reasons, for example, when you model have invalid topology, invalid faces, or overlapping uv islands. You need to clean up your mesh and export it again. A quick cheat technique I've seen some people use is to import the exported fbx model back into blender, and export it again. Somewhere along the import/export script, it seems there is a code that tries to fixes these kind of errors. But it is still recommended that you try to find what exactly was wrong with the original model.
Incredibly complicated damn. How do i export animations that arent done with armature? I have a very simple "move" animation and a painted mesh, yet when i export like you did but also include animation, they dont preview and the mesh has no textures visible
Thanks for the tip. I really like feedbacks like this. I think I improved that part on more recent videos. I still have a bad accent here and there, but I think I'm speaking somewhat slower on videos now.
@@octodemy i think you have a good accent, just try to slow the speed you use to explain, you offer a very valuable information and remember, we can speed up or down manually on uyoutube videos, but if the speaker do it fron the beggini. We can undertand better. You helped me so much, thanks again
Make sure the armature rotation is applied in blender before exporting. Also, it seems that armature rotation in unity is very problematic to get right. Check the response of the pinned comment. That's the only way I found how to fix it. I don't know if it is worth it, and might be better just to leave that rotation as is if you don't need it to be correct for something specific.
what blender material shader can you use so that your metalness texture links to your metallic map slot in the URP Lit shader? the fbx with embedded textures imports materials and textures using the "use external materials" and applied the albedo and normal textures, but never the metallic. do you have solution bby chance?
Not on the top of my mind. I thought it did auto slot as long as the blender material was connected to metallic but I guess not. The only one that I know unity has problems with is to convert roughness because unity uses smoothness instead so it won't work automatically.
Your too quick, you don't talk through everything your doing, it gets confusing and lost, having to play back the last 5 seconds of a video again and again and again is just annoying. Great in depth video, too quick, too rushed. Slow down.
Thanks for the input. I always love to have those types of comments to help me improve. I think got better at it recently as I got more confident in recording to voice-overs. (I still can't record the video and talk at the same time)
I recently discovered that animations Armature objects still have a 100x scale.
To fix this, you need to change another option in the FBX export settings.
In the Transform --> Apply Scalings ---> Change "All Local" to "FBX Units Scale".
Now your armature objects should have the scale of 1.
This should hopefully work. I'll update here if I find another problem.
This addresses the scale, but not the -90 rotation in X on arrival for me.
I couldn't find an easy solution for this problem.
It is not pretty, but this works:
--------
As far as I know the only way to get the armature correctly is to:
1. Select armature+mesh -> Alt+P (Clear and Keep Transformation)
2. Rotate both in the X by -90
3. Control+A(Apply rotation to both)
4. Rotate back X by 90 (can skip this step, but then it'll be rotated wrong inside blender)
5. Select mesh+armature -> Control+P (Armature Deform)
6. Select mesh+armature and export
-Export FBX but:
1. Selected only still the same.
2. !!! DISABLE "Apply Transform" !!!
3. Apply scale to "Scale the FBX units"
4. Use Space Transform: Enabled (default value)
5. Make sure Forward: -Z Forward, and Up: Y up
-Also
If you STILL don't get the correct rotation.
You might need to tweak the PrimaryBoneAxis and SecondaryBoneAxis inside the armature tab in the export settings.
I enable Apply Transform and Apply Scaling to fix rotation
Thank you, out of all the unnecessary long videos on this subject, this one is the best, short, concise.
That was precisely one of my objectives with this video :)
@@octodemy great, subbed
No way this is the most useful video on blender - unity ive ever seen
Thanks! I'm glad it helped.
Finally, you explained what I needed, I was having trouble finding solution and you are the only one that helped me.
Really glad the hear that.
Thank you for this tutorial. It has been very helpful for my commercial projects.
perfect short summary thank you so much.
Thank you, I'm glad you liked it.
Awesome! Pratic and objective video (with strong value).
I'm glad you liked it :)
Thanks for this Blender to Unity tutorial. I liked and subscribed
I'm glad it helped :)
Great explanation, straight and clear as water! :)
Thanks!. Glad to hear that.
nice tutorial dude! you are brilliant! keep doing this! so clear!
Thanks. Glad that you liked it.
This is amazing to the point videos, you helped me bro, Thank you so much!
I'm glad you liked it :).
Thanks so much for sharing your progress and lessons
I'm glad your liked it :).
Will someone just make a one click exporter that works?
All those options used to confused me a lot at first too :)
But the basic gist of it is... Just export in FBX format and turn on Apply Transform and it should generally be fine for starting out.
That would be nice but exporting isn't always "one size fits all". 😄
For example, it's easier to export with textures built in if the materials are simple. But if you're doing more complex stuff with the shadergraph, then you'd want to export the textures separately and manually make the materials.
Another example is you want to apply modifiers if it's truly the final mesh. But if the original mesh is the low poly game model and modifiers were used only for baking maps, then you don't want to apply modifiers when exporting.
I find for each game project, I have to pick different options when exporting.
Super helpful video. Thanks man.
Thanks! I'm glad you liked it.
Best tutorial! Thank you!
Thanks, glad you liked it :).
I didn't get the warning about the normal texture warning and my normal textures didn't appear, How can I fix this?
The warning about the normal texture happens when unity detects an image that has normal values but its not set as a normal type.
You'll only have the normal map texture inside the project if you embed the images inside the fbx AND click to extract the textures.
Or you could also manually move the normal texture inside the project (which is the most common way of using fbx).
If they are inside the same relative path as the blender file, unity will auto-detect and asign the material texture to it.
If they are not, you need to manually set the textures into your materials.
@@octodemy When I manually put the normal in it still doesn't pick it up, is there a way to fix this?
This is an amazing video. It would be great if you had a version specific to VRChat and VRChat avatars import and export into Unity! Thank you so much for this video.
Thanks!
@@octodemywheni import a blender file a file comes in called light and it makes the object white
You probably exported a light by mistake.
You should enabled the 'selected only' option and make sure only the mesh and armature objects are selected when exported.
You forgot to mention the "bake axis conversion" option in import settings. Setting -z forward and y up in blender fbx export settings will get your transform rotation to be 0 0 0 in import settings but the model will still be mirrored along one axis ( x, i think?) . When you select the bake axis conversion option the model will appear in unity exactly as you see it in blender
I'm making a procedural city generator that has road blocks which go along a curve, and you can see the difference there, it's not apparent with the shield
Thanks for that info.
I haven't needed to use it and I honestly didn't understand what this did completely at the time of the video so I gloss over it.
Great to know.
thanks
If you're struggling to fix the rigged character's rotation after being imported to Unity, and the solution provided in the pinned comment didn't work, try this:
In Blender, select both the Armature and the mesh (right-click the Armature, then "Select Hierarchy"), then rotate it -90 degrees on the X axis (to match the value on Unity's inspector upon importing) and press Ctrl + A for the Apply tab. Then, either Apply All Transforms, or Apply Rotation & Scale. You do NOT need to clear parents or rig your character all over again. After rotating it to match the value in Unity's inspector and applying those transforms, export to FBX and import it in Unity, it should be fixed.
That's how *I* managed to fix this issue, hopefully it should work for everyone. If you find other solutions, comment them down so other people with the same problem can fix it themselves, too.
Countless tutorials, long trial and error with experimental fbx transform feature... And I learn that negative Y is the direction to use for a correct forward export only here? Many thanks!
Though, please tell, how come your animation clips are visible? I had to save them in NLA strips one by one, otherwise only one of them was available - the one that would show up in a hierarchy
There is an option inside the fbx setting Animation tab named 'All action'. As long as that is checked you should have all the animation clips exported.
The beetle from bugs life is my favorite
All worked correctly but how do i bring all the animations to a folder in unity?
thanks for you tutorial, one question I don't sporting glass effects in unity with my Mac ...
I'm glad you liked it. I'm not sure I understand what you are asking though.
When i use the animations in Unity, it Sets my Object Position, Rotation and scaling to another values…
It seems the armature objects still has the scale of 100, I didn't notice that at first.
I recently discovered that you can fix that by changing a the option while exporting the fbx.
Under Transform -> Change Apply Scaling --> From "All Local" to "FBX Units Scale"
This should fix the armature scaling and now it should be 1.
when i try to export my whole scene from blender into unity, My scene is not looks same as blender scene. Some materials are not setted, and some textures are not looks same and they tearing or strecthing somehow. How can i fix this issue ?
Could you please make a tutorial for rigs and bones!! ❤❤❤
That's a great idea!
I was planning on doing a tutorial about game-rigs and how to fix rigify-rigs for games. (rigify rigs are NOT for games, for a variety of reasons)
But I could also do a simple tutorial on how to make rigs and bones manually.
I just made a rig for a bat model with IK's and driver's so I think I could use that for the video.
But it might be a few weeks till I'm able to do that, I'm planning on making the next video a devlog for my game before a do another tutorial.
Wait? That one is blenders front camera? No wonder I can never export the rotations right. I have thought X was the front for years xD
what about blend files? is there a criteria so it can also work in that way?
Unity support imports from .blend files.
But I seriously discourage it. A lot of things could go wrong, its slower, and it can only import the whole .blend scene.
You can use them for prototyping if you feel that's a faster workflow for you, but try to avoid using .blend files for the final game.
Do you have a video on the OPPOSITE - exporting fbx FROM Unity into blender? Everything I've tried doesn't work.
No video sorry(maybe a can make a 2m video showing that later just to have it here).
But Unity has an official "FBX Exporter" package that can do that. Have you tried that? Its very simple to use. Right-click the object in your scene hierarchy and select 'Export to FBX'.
When I export it as fbx in the 3d viewer and unity there are missing parts
If you set to only export deform bones, and those bones are parented to non-deform bones, the whole hierarchy will get skipped. Thus making a lot of parts missing.
If you select to export 'selected objects only', you need to make sure to select all the objects you want exported before selecting to export the fbx.
does this method need you to do uv unmapping first? Or can you just go directly to export?
Yes, you still need to UV unwrap the models if you want to use or fix textures.
It should keep the same look as it appears in your blender in Material Preview as long as you only use default shaders(so anything using procedural textures can't be converted to fbx and into unity, in this case you need to first bake it into a texture).
Basically, if it looks wrong in the blender, it will still look wrong in unity.
When I import my model it says "The mesh Cube has invalid normals. Try cleaning and triangulating Cube in your 3D modeller before importing it in Unity."
This can happen for a variety of reasons, for example, when you model have invalid topology, invalid faces, or overlapping uv islands.
You need to clean up your mesh and export it again.
A quick cheat technique I've seen some people use is to import the exported fbx model back into blender, and export it again.
Somewhere along the import/export script, it seems there is a code that tries to fixes these kind of errors.
But it is still recommended that you try to find what exactly was wrong with the original model.
Incredibly complicated damn.
How do i export animations that arent done with armature?
I have a very simple "move" animation and a painted mesh, yet when i export like you did but also include animation, they dont preview and the mesh has no textures visible
Thank you, nice video, try to speak slow next time, kind of difficult to understand, but i did my best and all good.
Thanks for the tip. I really like feedbacks like this.
I think I improved that part on more recent videos. I still have a bad accent here and there, but I think I'm speaking somewhat slower on videos now.
@@octodemy i think you have a good accent, just try to slow the speed you use to explain, you offer a very valuable information and remember, we can speed up or down manually on uyoutube videos, but if the speaker do it fron the beggini. We can undertand better. You helped me so much, thanks again
my armature is rotated X by -90 in Unity
Make sure the armature rotation is applied in blender before exporting.
Also, it seems that armature rotation in unity is very problematic to get right.
Check the response of the pinned comment. That's the only way I found how to fix it.
I don't know if it is worth it, and might be better just to leave that rotation as is if you don't need it to be correct for something specific.
How did you get the unity presets for blender fbx exporting?
I made them myself based on what I usually use. Then saved them, just like in the video.
what blender material shader can you use so that your metalness texture links to your metallic map slot in the URP Lit shader? the fbx with embedded textures imports materials and textures using the "use external materials" and applied the albedo and normal textures, but never the metallic. do you have solution bby chance?
Not on the top of my mind.
I thought it did auto slot as long as the blender material was connected to metallic but I guess not.
The only one that I know unity has problems with is to convert roughness because unity uses smoothness instead so it won't work automatically.
it didnt work 😔
Jesus loves you
Your too quick, you don't talk through everything your doing, it gets confusing and lost, having to play back the last 5 seconds of a video again and again and again is just annoying. Great in depth video, too quick, too rushed. Slow down.
Thanks for the input. I always love to have those types of comments to help me improve.
I think got better at it recently as I got more confident in recording to voice-overs.
(I still can't record the video and talk at the same time)
ابوس راسك
منقذ