Search Unity

How to import materials from blender or zbrush instead of using unity material editor?

Discussion in 'Community Learning & Teaching' started by Ccbwtd, Oct 7, 2015.

  1. Ccbwtd

    Ccbwtd

    Joined:
    Oct 7, 2015
    Posts:
    2
    Unity material editor seems to only have the basic shaders, which of course is not good enough because models can have all kinds of materials, or multiple materials in the same model like from polypainting in zbrush etc. So how to import my materials made in blender into unity as they look in blender/zbrush or other 3d software.
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
  3. Ccbwtd

    Ccbwtd

    Joined:
    Oct 7, 2015
    Posts:
    2
    Those tutorials cover applying materials made by unity material editor using textures/normals etc. I am talking about bringing materials of the model directly from 3d application, and its hard to find answers from google for this. For an example, in zbrush you can use polypainting brushes to apply materials directly using paint brushes, so I can have multiple materials in the same mesh and the materials are blended together. As far as I understand, in order to use different materials in unity editor you need to have separate meshes which doesnt work for that. Also it would be generally easier to just import the model as it is, instead of tweaking it after importing in Unity.

    So I want to import the model from blender, and the model should look exactly as in blender when dragged for the first time to the scene.
     
  4. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Unity shaders/materials are just as robust as any 3D modeling materials, you just have to set them up.
    That's why I referenced the learn library.

    Unity don't read other 3D apps material files.
    Unity imports the "materials" as textures and then the shaders needs to be setup properly in the engine.
    You might be getting a little confused with the terminology. (Honest mistake) I did as well initially. Read up on materials, textures and shaders to understand better.
    Bottom line all 3D apps even ones owned by the same company (Max & Maya & Mudbox) all have different ways they create materials differently which Unity doesn't read.

    The standard shader setup is understandable after a couple hours of research.
    Separate materials can be applied to the same model. You need to set this up. Look into material IDs.

    May also look into Substance Designer and/or Marmoset if you want additional information.
     
  5. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    In general, all 3D modeling and rendering applications have their own shader pipeline. If some packages have a feature where they can "import" another packages shaders, this is a special plugin they've written that will try and translate one applications shaders into another format. Like most rendering applications, Unity does not (yet?) have this functionality. Your rendering pipeline should be set up in Unity. You will need to set up your UVs and things in your modelling application, and in many cases Unity can import a material's textures and the material's name when importing the model (please see the documentation on this as it depends which type of files you are importing, and how you do it), but the "look and feel" of the material will need to be constructed in Unity. (Just as this would be true if you moved a model from one 3D application to another, like say, moving a file from Blender to Modo, Max or Maya...)