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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Importing Materials from Blender

Discussion in 'Asset Importing & Exporting' started by Garkon53, Aug 31, 2015.

  1. Garkon53

    Garkon53

    Joined:
    Aug 31, 2015
    Posts:
    5
    Hi!
    I'm currently working on a game, for which I have designed models in blender. In blender, I used the cycles renderer to create materials for objects, with up to 3 materials on a model. When importing to unity, as an fbx file....I've noticed that I lose everything about my materials except it's name. Does anyone know a workaround to this? most of the materials use mixed-shaders, diffuse, and glossy.

    I know that this question has been answered before, but i'm new to unity... and would appreciate a step by step answer :)
     
  2. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    910
    Well, the workaround is to not try to use Blender's Materials or render systems at all. Blender will let you make the models, UV them, animate them, and even paint textures, which all can be exported. But Blender's material settings all stay in Blender. The most you can do with Blender's rendering(cycles or BI) is to bake textures, for example normal maps, ambient occlusion, etc... And you can use Blender's texture painting in order to create your textures, but that is it. Many things are like this, and it applies to other modelling software as well. For example, though you can animate your rigs using IK bones, the fact that they are IK won't get sent to Unity at all. But it can make things easier to control what the FK rotations are. There are other similar things as well.

    So, your workaround is to create the materials in Unity. If you are using Unity 5, I recommend the new Standard Shader, which is PBR. You can get glossy, matte, metals, plastic, pretty much anything with it. But you will need to learn how to create textures for it. Marmoset's website has good information to learn about PBR, how it works, etc...

    As for creating the textures, my highest recommendation falls on Substance Designer, and more so Substance Painter. Painter lets you paint directly on your models similar to Blender's texture paint, but much better. You can paint all the needed textures for PBR, all at the same time as desired. And of course you can work with the maps individually as well. You can totally skip the whole normal map baking from high-poly sculpt as well, as you can directly paint the height map in Painter(which gets converted to normal map upon export). Then the layer system is similar to photoshop, including masking, blend modes, and other things too. The brush system has things in common with photoshop(and other painting programs as well), but it works in 3d on the model directly. If you choose this workflow, you won't need as much direct knowledge about how PBR works, as you can just directly drag and drop the exported textures into Unity's standard shader. The easiest way for me to purchase the whole suite is with the LIVE subscription, which you pay out at about $20 a month. But the good thing is that it allows for conversion to a full license once you pay off the total price, unlike most "subscription" deals, including Unity Pro itself.
     
  3. Garkon53

    Garkon53

    Joined:
    Aug 31, 2015
    Posts:
    5
    Thanks! that helped a lot....hope they'll implement cross-functionality between the materials someday
     
  4. Purpleshine84

    Purpleshine84

    Joined:
    Apr 8, 2013
    Posts:
    194
    Hi, there is one way of importing materials into Unity, only not exactly the materials but the rendered images via camera mapping, I am not sure what you are making but for particular games (like adventure games) it can be used and it will look very close to the rendered results you have in Blender. Good luck!