0
\$\begingroup\$

i bring my .blend file (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 in unity so is there anyway to do it in Blender ? Maybe some setting in blender to modify so that glass material will be imported as transparent type material in unity?

  2. if i replace with new glass material in unity , is there anyway i can do it to replace all the glass (same glass material) without doing it manually one by one ?

\$\endgroup\$
0
\$\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\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.