Search Unity

Blender to Unity workflow since 2017.2 (embedded material woes)

Discussion in 'General Graphics' started by BlackDragonBE, Feb 22, 2018.

  1. BlackDragonBE

    BlackDragonBE

    Joined:
    Jul 23, 2012
    Posts:
    12
    Hey guys,

    I was wondering what the best worflow is to get .blend files to correctly import from Blender into Unity since 2017.2?
    Before, I just edited the materials that were auto-generated by Unity and give them the correct properties and textures.
    Now that Unity tries to use the embedded materials, the properties can't be edited, the textures are wrongly assigned most of the time and it's generally just a mess.

    Here's a concrete example:

    This is what the meshes look like in Blender:



    Notice the checkerboard on the ground and the red line at the bottom.
    Here are the materials for the ground:



    Now when I save this .blend file in the assets folder and let Unity import it, here's what it looks like in a scene:



    The checkerboard is now applied to the red material at the bottom instead of the correct one.
    Here's the material that Unity made for it:



    Why is this happening and what can I do about it?

    I know I can just use the legacy method, but why was the decision made to make the new embedded way the default when it doesn't work correctly? Am I just doing something wrong?

    Thanks!
     
  2. UniversalGesture

    UniversalGesture

    Joined:
    May 29, 2017
    Posts:
    125
    I have this exact problem, and well the only solution I found is to create more materials in unity and assign them to the blender model in unity.
     
  3. Cjbraithwaite

    Cjbraithwaite

    Joined:
    Mar 18, 2016
    Posts:
    1
    are you using cycles and nodes? I unticked the "use nodes" and it used the default diffuse colour for the material. i figured that unity wouldnt replicate blender's node system and was correct.
     
  4. BlackDragonBE

    BlackDragonBE

    Joined:
    Jul 23, 2012
    Posts:
    12
    I'm not using Cycles, just the regular Blender render engine.
    The material names and their Diffuse color are correctly imported, but that's it. If I assign a texture to a material it gets mapped incorrectly as you can see above.

    I'm still not sure if there's anything I can do to make it import textures correctly with the new embedded method & Blender.
    For now, I'm just going to use the legacy system and recommend this to other Blender users as well.
     
  5. Steve-Tou

    Steve-Tou

    Joined:
    Aug 4, 2018
    Posts:
    10
    I was having same issue and discovered that if you have a material with the same name already in Unity, when you import the new model, Unity doesn't create 'material name (1)'. So your model doesn't actually import your material of the most recent version of your model, it uses the material Unity already had imported from a previous version of your model (and/or possibly other models). I'm doing simple modeling and adding a material- Blender names these Material.001, Material.002, etc. I made a blue cube and imported into Unity. I deleted that blue cube model from Unity, but the material that came with it (Material_001), stays in the Material folder. I then edit my blue cube to be yellow, save the file (same name), reimport the model and the cube still shows up blue. In Blender, I deleted Material.001, added new Material.002, made it yellow, saved it, reimported to Unity and, voila, yellow cube. Haven't checked, but I'll presume the same type of thing is going on with Textures?? Hope this helps.