Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Why does Unity now embed materials in imported models?

Discussion in 'General Discussion' started by BIGTIMEMASTER, Feb 18, 2020.

  1. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    What is the purpose behind this? It seems like an extra step I have to perform to work on materials. Are people setting up materials outside of unity or something?
     
  2. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    That's strange - for as long as I can remember Unity has always do this for me. Unless I'm understanding you wrong at least.

    I use 3Ds Max (there is an option to disable this upon exporting out) - never used it though.
    But anyways, when I model something in Max and export it and then import into Unity.

    If I click the little arrow thing on the model import file that expands new icons open such as the LODs models, etc. It always has a material with it as well. (Is this what you're talking about)? How it includes a material with it if one is on it in modeling program?

    If so - I've always had this problem since I joined on Unity 4.
     
  3. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    I think it started in 2018 or 2019. What I am talking about is that the material is "embedded' in the fbx, making it non-editable within unity until you "extract materials" in the fbx inspector. It's just an extra thing you got to do but I don't know what the purpose of it is.
     
  4. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    I believe in version 5.0 materials were not embedded by default. When you import a model, it would create a "Materials" folders and then fill it with materials from model, IIRC using names from the model.

    @BIGTIMEMASTER It is possible to have material configured outside of unity. Basically, importer does extract some fbx parameters, and if your program supports them it makes sense to skip manual configuration. It was possible to export at least colors and textures using blender internal/blender 2.79 for example. However, IIRC having "Materials" folder could result in clashes, overwrites or failure to recognize changes in material outside of the model. So I guess this is why they switched to current scheme where you can set up "replacement" material in import settings.
     
  5. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    Ahhh yeap both of you are right... I forgot Mats used to be in a separate folder.. And yeah embedded materials are annoying. - I literally never use them, I always end up creating another material somewhere else to keep things organized in a way I like.
     
  6. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    This does not work well if the model has a lot of materials. An example of such model could be a low poly style. The entry I submitted to ludum dare long time ago pretty much used this - separate material for each piece of geometry.