Page MenuHome

Collada import: make transparent textures work (2/4)
AbandonedPublic

Authored by Scurest (scurest) on May 14 2021, 4:10 PM.

Details

Reviewers
Gaia Clary (gaiaclary)
Group Reviewers
Collada
Summary

Collada import: use getOpacity() instead of getTransparent()

OpenCollada (for whatever reason) will not report a <transparent>
texture through getTransparent(), it will only report it through
getOpacity(), so this is neccessary to make transparent textures
work. Before this, the code to make a texture node never ran.

For constants getOpacity() has already multiplied the <transparent>
and <transparency> for us.


Here is a file that tests combinations of <transparent>/<transparency> constants.

You can check it's the same as master.

Diff Detail

Event Timeline

Scurest (scurest) requested review of this revision.May 14 2021, 4:10 PM
Scurest (scurest) created this revision.

Also if you are wondering about the cot.isValid() case, getOpacity() is always valid (either a texture or a color). Here's the code that calculates it so you can check.

Scurest (scurest) abandoned this revision.Jun 23 2021, 6:22 AM