Search Unity

From Blender to Unity...always a lot of issues

Discussion in 'Asset Importing & Exporting' started by LorenzoSampietro, May 19, 2021.

  1. LorenzoSampietro

    LorenzoSampietro

    Joined:
    Jun 28, 2017
    Posts:
    20
    Good afternoon,

    I have been using Unity for some time with satisfaction .... unfortunately I need to make the 3d models by myself
    .
    I am a bit familiar with Blender and I made some simple models: we are talking about cubes and spheres with something attached.

    So far everything ok until I started playing with animations, armatures & bones.

    now: you will wonder why I am here and not in a blender group asking questions.

    Simple: the problem arises when exporting from blender or maya and importing into unity.

    But is it possible that it is so complicated to import a mesh without having all these issues?

    I wonder how the professionals work on it.

    I also experienced Maya but poetry dropped when I realized that the problems are the same.

    Forgive the outburst but I don't know who / where to turn anymore: I've seen a lot of tutorials but I never find the right way.


    Below I post the videos of the problem.
    Have any of you experienced these issues? Do you have a valid solution?

    In attachment you can find my blender file.

    thank you
     

    Attached Files:

  2. Darmaalinc

    Darmaalinc

    Joined:
    Jan 12, 2021
    Posts:
    10
    Good day to you


    The frustration is well positioned. I remember undergoing several problems whenever exporting from Blender to Unity. I see no video detailing your issue? Can you please be more specific? Is the shading missing? Animation dysfunctional? Tools aren't shown in materials?

     
  3. LorenzoSampietro

    LorenzoSampietro

    Joined:
    Jun 28, 2017
    Posts:
    20
    Hi janaza,
    the issue is related to animation mechanic.
    Sorry, I forgot videos... Here you can find:

    1) Blender situation (works well):



    2) After exported in FBX


    In attachment (first post) you can find the blender model.

    thank you
     
  4. Darmaalinc

    Darmaalinc

    Joined:
    Jan 12, 2021
    Posts:
    10
    Tested it out. Everything's seems perfect




    My guess is you're having trouble with the Animator Controller placement. Double check it is attached to the head of your 3D model. If problem persists. Consider updating your unity version to the latest one.

     
  5. LorenzoSampietro

    LorenzoSampietro

    Joined:
    Jun 28, 2017
    Posts:
    20
    Oh. Awesome.
    Please: could you post you fbx export settings on blender and you import settings in unity?
     
  6. anthonov

    anthonov

    Joined:
    Sep 24, 2015
    Posts:
    160
    I ran into problem where my models imported from Blender to Unity were never aligned in same forward axis.
    I knew it was possible to do it correctly with just the right settings without rotating manually your model because I already had success with few models, then I forgot how to do. This made my blood boiling for few days.
    I finally managed to reproduce the rights settings :
    In blender, export to fbx with [forward = -y] and [up = z] (in fact let the blender system as it is)
    do not tick apply transform.
    then in Unity, at import settings, tick [bake axis conversion]
    I do not work yet with animated or bones models, so I only tested this for simple mesh.
    export fbx.PNG
    import fbx.PNG
     
    Lorrak likes this.
  7. Darmaalinc

    Darmaalinc

    Joined:
    Jan 12, 2021
    Posts:
    10
    everything's default.
     
    LorenzoSampietro likes this.
  8. LorenzoSampietro

    LorenzoSampietro

    Joined:
    Jun 28, 2017
    Posts:
    20
    Sorry Junaza, I tried a lot of times without success.
    In Unity the eyes won't move.
    I exported with default settings.

    please give me screenshots of blender export and unity import just to double check.

    I use Unity 2020.1 and Blender 2.92

    Thanks a lot
     
  9. LorenzoSampietro

    LorenzoSampietro

    Joined:
    Jun 28, 2017
    Posts:
    20
    Thank you but it seems not the right solution for my animation.
    Than mesh appear ok. All animations won't be applied
     
  10. anthonov

    anthonov

    Joined:
    Sep 24, 2015
    Posts:
    160
    yeah and I think I was wrong anyway...
    the correct settings for the mesh's orientation are forward = -Z, up = Y, apply transform.
    Then for the animations I don't know. I animate all my assets by scripts.
    I found this https://www.reddit.com/r/Unity3D/comments/adu35q/perfect_fbx_export_settings_from_blender_28_to
    it's a bit old.
     
  11. LorenzoSampietro

    LorenzoSampietro

    Joined:
    Jun 28, 2017
    Posts:
    20
    Up.
    I tried a lot of time without success.
     
  12. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,639
    How are you playing the animation in Unity? Did you create a mecanim animator controller?
     
  13. LorenzoSampietro

    LorenzoSampietro

    Joined:
    Jun 28, 2017
    Posts:
    20
    Hi, I create a macanim animator but I think the problem is related to blender exports... If i export a fax and I play with a free FBX tool I have the same result.

    I attached by .blend file, .fbx exported and export setting.

    Thank you for your help :)
     

    Attached Files:

  14. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,639
    I'm not actually seeing any animation happening in Unity at all. I've playing with the import settings and it's not making any difference. There are definitely some strange things about your file, though.

    THe thing to remember about Blender, Maya and all of these other 3D modelling packages are very open-ended with lot's of different ways to set-up objects and animate them. Unity (and other game engines) only import a specific type of set-up/animation so a majority of Blender's features are not going to be compatible. The FBX file format is limited also.

    The main thing is that I don't believe that animation using "tracking" constraints is supported at all, only bone animation. You normally want to implement your animated object as a skinned mesh (That is, your mesh must be attached to an armature via vertex weights.) I think you can also simply make the armature to be the parent of your eye (then select a specific bone to move the eye).
    Blender Manual on Mesh Skinning: https://docs.blender.org/manual/en/latest/animation/armatures/skinning/parenting.html

    Also, you want to have one, single armature for your model. I'm pretty sure multiple armatures are not supported, so you'll want to combine them all into a single armature.

    As an alternative to bone animation, Shape keys are also supported in Unity and often times used for face animation, but I've never used those so not sure how to set them up for Unity.
     
  15. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    Hello, I do not know if it may be useful, but I have just found this addon for blender that seems to help with exporting Blender to Unity 3D.

    https://github.com/EdyJ/blender-to-unity-fbx-exporter

    I have not tested it myself for animations, but it seems that may be interesting to try it

    HOW TO EXPORT BLENDER MATERIALS TO UNITY 2019.4

    The above fbx exporter addon DOES NOT export correctly the materials to unity, I mean that it will export ONLY the mesh itself and NOT the materials, because when you import it in Unity you get an grey mesh without any material

    For example, I bought this ring that shows a beautiful glowing material in blender, but if you export it to Unity 2019.4 all you get is a grey mesh

    https://www.cgtrader.com/3d-models/military/other/the-one-ring-71bf272f-015b-48d0-877f-a59e0bfdc0c7

    So the the main problem for me is exporting from blender to Unity are that the blender materials are NOT exported to Unity because when loaded the mesh into unity is without material

    Sorry that I have not tested any newer Unity version

    Thanks for any possible help
     
    Last edited: Oct 18, 2021
  16. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    In the previous above post here, I have put that I have problems with getting the textures or materials from blender, and I have tested what you have told in the video, but it DOES NOT work for me, because it extracts an empty material and is still gray with no materials or textures taken from the original model in blender

    thanks very much for any possible help
     
  17. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,639
    Blender materials are not compatible with Unity. Aside from UV unwrapping, don't even bother trying to set-up materials in Blender.

    You can use Blender to bake AO maps and normal maps, stuff like that. But you'll need to set-up the actual materials in Unity.
     
  18. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    Thanks for your answer, good to know, will try to bake the maps and see how it works.

    Sorry that I thought that there could be a way to attach the Material to an FBX and import it directly without manually creating the material yourself in Unity
     
  19. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    I have just found this product in the blender market that seems to be able to transfer a Blender scene and objects with all the materials to Unity 3D and keeping all the same, although I have not tested it myself

    B2u - Blender To Unity Prefab And Scene Exporter

    https://blendermarket.com/products/b2u

    although this product is from 4 years ago so do not know what may happen

    Have anyone used this ?

    Thanks for any possible help

    best wishes

     
    Last edited: Nov 11, 2021