dicarlolab / ThreeDWorld

Generator of interactive Unity-based 3D environments with physics
Other
21 stars 4 forks source link

Setting the transparency value in MaterialProcessor.cs when reading in .mtl files #62

Open damro opened 7 years ago

damro commented 7 years ago

The transparency when reading in .mtl files is not set.

See: https://github.com/dicarlolab/ThreeDWorld/blob/master/Assets/Scripts/Editor/MaterialProcessor.cs#L86-L93

The "d" value corresponds to the transparency in the .mtl file. The "alpha" channel of the Albedo corresponds to the transparency in Unity.

Thus, the Albedo alpha channel in Unity should be set to the d value of the .mtl file to reflect transparency correctly.

This should happen in line 128. Just check if it works.