0
\$\begingroup\$

I bring my .blend file (from Blender) into the assets/prefab folders in Unity. The model is a house with a lot of windows. In Unity, my glass material become solid/opaque.

My questions:

  1. Since the material is locked, I can't change it in Unity, so is there any way to do it in Blender? Is there some setting in Blender I can modify so that glass material will be imported as a transparent type material in Unity?

  2. If I replace it with a new glass material in Unity, is there any way I can do it to replace all the glass (same glass material) without doing it manually one by one?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

When you import a .blend file into Unity, what really happens behind the scenes is that Unity will call Blender’s export scripts to generate a .fbx file, and then import this file into Unity. At first that sounds like both paths should be 100% equivalent. However, that is not the case! Unity won't use Blender materials, or any other materials from other 3d software. Materials in Blender are generally meant for offline rendering, and Unity uses a much more optimized real-time renderer, which, like any real-time renderer, fakes a lot of things instead of doing the calculations.

To get a slight transparency (similar to glass) change your material Shader from Diffuse to FX>Flare this will lighten the material and give it slight transparency.

enter image description here

  • Click the Extract Materials button to extract Materials that are embedded in your imported Asset. This is greyed out if there are no materials to extract. And edit them like any other material, You can extract all the glass like materials and change their transparency.
  • If you're working with prefabs you can right click on the prefab and select extract material and edit them.

There are ways to get things from Blender into Unity however. If you are using Blender's internal textures, you are going to have to bake them. Unity(and other 3d engines) need materials in the form of textures, and the models need to be properly UV mapped unless you use a specialty shader that does automatic UV mapping, as long as your model contains UV map information you can simply drop your textures on to the Unity model.

Textures and diffuse color are not assigned automatically. You can manually assign them by dragging the texture onto the mesh in the Scene View in Unity.

Importing materials from blender can be tedious at times. I recommend you to just make a greyed out model or just add the base colours(Diffuse) and add the other fx materials from inside of unity as both use different rendering and effects the scene.

Alternatively, if you're familiar with Blender materials and nodes maybe you should try Substance Designer to recreate Blender material setup and this can be easily imported to Unity with all switches and sliders.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .