Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Resolved Meshes that are linked instances in Blender loose material when importet to Unity

Discussion in 'Editor & General Support' started by JDoe1, Jul 26, 2023.

  1. JDoe1

    JDoe1

    Joined:
    Mar 21, 2018
    Posts:
    9
    Hi, i have a interesting problem that i cant imagine noone stumbled upon until now.. so i think i might do sth wrong.
    I have a big Scene in Blender which houses a lot of Instanced Meshes. After i import it to Unity all instances exept the original Object lose there Material and have it replaced with the URP Lit Shader. The Mesh Instances work fine... just the material unlinkes.
    Dupilcates work fine... but I dont want to make the instances to individual Meshes as this seems like a bad fix.
    Also i kind of dont want to reassign all the materials.. since there are a looot of those.

    Any tips? and am i realy the first one who stumbles upon this? o_O
    Is this just a qirk in the FBX import export?

    Unity_07_26_23_17_35_44.png
    (example fine attatched)
    Best
     

    Attached Files:

    • Test.zip
      File size:
      101.5 KB
      Views:
      20
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,756
    I find it better to make lots of small Blender files, then combine them into prefabs within Unity.

    You will not be able to do 100% of any workflow in Blender in any case.

    "Something" will ALWAYS need to be done in Unity.

    Since anything done on the Blender side has to "survive" the import process, see near the bottom below for my usual approach, which seems to result in the lowest friction.

    This might help you reason about what you are seeing:

    Unity imports Blender3D objects as FBX via a little Python script:

    https://forum.unity.com/threads/from-blender-to-unity-problem.1073381/#post-6925811

    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:

    https://forum.unity.com/threads/all-my-mesh-folder-content-is-gone.1102144/#post-7094962

    Blender3D objects used as trees / detail in Unity3D terrain (See the second half of this response)

    https://forum.unity.com/threads/ter...trees-made-with-blender.1112119/#post-7155631

    https://forum.unity.com/threads/all...nging-parent-in-blender.1159283/#post-7442123

    Probuilder and Probuilderize and Blender:

    https://forum.unity.com/threads/probuilder-vs-blender.462719/#post-8060462

    Some more potentially-useful info:

    https://forum.unity.com/threads/orientation-problem.1265834/#post-8037734

    Updating Blender files without breaking your prefabs:

    https://forum.unity.com/threads/is-it-possible-to-edit-a-prefab-in-blender.1426326/#post-8954421

    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

    - put as few objects in a given .blend file as possible, combining them in Unity into a prefab

    - set good names for your Blender3D objects and NEVER RENAME them after Unity sees them

    - don't even think about Materials or Textures in Blender, just do it in Unity
     
  3. JDoe1

    JDoe1

    Joined:
    Mar 21, 2018
    Posts:
    9
    Its a problem with the new FBX exporter of Blender 3.6 it works fine with 3.3
    and this post sais in 3.5 (havent testet this though)
    https://blenderartists.org/t/fbx-exporting-problem-in-3-6/1471047

    Im using a older Unity 21.3.24 .. so this might just be an incompatibility.

    Import Export its a bit of a tricky one indeed.. Thanks for the super helpfull collection of information sources!!
    Best
     
  4. Mysteryem

    Mysteryem

    Joined:
    Dec 26, 2017
    Posts:
    1
  5. JDoe1

    JDoe1

    Joined:
    Mar 21, 2018
    Posts:
    9
    awesome! thy for summing this up