StjerneIdioten / I3D-Blender-Addon

Rewriting the I3D blender addon from scratch and adding long-sought community features
GNU General Public License v3.0
66 stars 18 forks source link

fix(material): Fix problem with emissive tex & diffuseColor #174

Closed NMC-TBone closed 11 months ago

NMC-TBone commented 1 year ago

Should solve issue #173

Decided to go with this to solve the problem: If RGB = 0 0 0 it won't write the diffuseColor

There is nothing that use diffuse color 0 0 0 except for mirrors. So I added write diffuse function inside the mirrorShader if statement in _emissive_from_nodes function with hardcoded 0 0 0 1 diffuseColor (which is what the mirror material always should have)

StjerneIdioten commented 1 year ago

As far as I understand it from the issue. If there is an emissive texture, the diffuse color should not be exported. So why not just check if there is an emissive map before exporting the diffuse color, rather than doing this workaround thing?