Exporters icon indicating copy to clipboard operation
Exporters copied to clipboard

Max2Babylon - Alpha Coverage could use Cutout in Physical Material

Open echadwick-artist opened this issue 5 years ago • 4 comments

I'd like to propose an alternative material setup for Alpha Coverage.

Max2Babylon currently uses the Transparency Weight in a Physical material to specify Alpha Coverage as a value or texture. This is incorrect for three reasons:

  1. Transparency Weight uses values (white is clear, black is opaque) that are the inverse of the glTF standard for Alpha Coverage (white is opaque, black is clear).
  2. Most pre-existing assets use the glTF standard. These assets must be manually inverted prior to use with Max2Babylon.
  3. Alpha Coverage makes a surface fully transparent, while Transparency Weight in 3ds Max is more like glass as it preserves reflections etc.

I propose to use the Cutout input, as this solves all three issues. To supply a value instead of a texture, the user could connect an Output node and use the Output Amount spinner.

Transparency Weight could still be supported for legacy content, but the Cutout would be preferred as the new method. If both Transparency Weight and Cutout were present in the same model, Cutout would take precedence.

An example model to test with: 2020-07-24 10_16_19-Slate Material Editor

PhysicalMaterial_Cutout.zip

Texture is from the example model https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/AlphaBlendModeTest

What do you think?

echadwick-artist avatar Jul 24 '20 14:07 echadwick-artist

Ah, cool proposal, I agree that we don't want to remove previous support for transparency map, but adding support for the cutout map as an input seems to be more intuitive.

Drigax avatar Aug 11 '20 17:08 Drigax

@echadwick-wayfair fancy doing a PR? :)

deltakosh avatar Aug 14 '20 19:08 deltakosh

Ha. I'm not a coder. I can muck around in text files here and there, but can't code my way out of a wet paper bag.

echadwick-artist avatar Aug 14 '20 20:08 echadwick-artist

Ok I keep it open with help wanted if the community wants to help :)

deltakosh avatar Aug 14 '20 20:08 deltakosh