[SOLVED] jit.gl.material ignores texture alpha channel after some attribute change or opening the material window

    Jun 05 2019 | 3:13 pm
    Hi, I'm struggling since a few days to create a mesh with a material based on a texture with an alpha channel. And... I actually managed to do it ! (see below patch to reproduce) The thing is that as soon as you change some attributes of the jit.gl.material or open its interface, the texture alpha channel appears as black instead of transparent. It's not a problem related to the mesh, as a gridshape shows the same behavior. I also try to export_material while I get a working transparency, then tweak an attribute to loose it, then import the previously exported material that now also have no transparency.
    So my question is : how to keep a working material (ability to tweak its attributes) while keeping the texture's alpha channel as transparent ? Is it a known issue (found similar discussions here and there but both outdated) I would like to avoid the solution of (learning how to and) writing a custom shader, as the gl.material object does anything I want... except maybe working with alpha channels ?. About the patch : it's primarily made for this topic by @AUDIOMATT. I just added a mesh (basically a plane with the texture's alpha channel as vertex's height. I used this png as the texture. I'm on Max 7.3.5 64bit on Windows 10 with a mobile GTX1060 GPU
    You can also reproduce with this other simpler patch (no need of an external file) based on a previously linked post:
    Thanks !

    • Jun 07 2019 | 4:40 pm
      just set those material attributes on the jit.gl.material object rather than the gridshape:
    • Jun 07 2019 | 7:18 pm
      Wow, I didn't expect such a dumb response. Thanks ! Actually I used these material attributes on the gridshape as it was spotted in a previous post as a possible fix but it was maybe for a previous Max version or for another purpose that I misunderstood. Thanks again !