TransWikia.com

Bring the blender .blend file into unity : replacing materials

Game Development Asked on March 10, 2021

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 ?

One Answer

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.

Answered by Pikachuxxx on March 10, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP