How can I export a simple glass material form Maya?

Hi all again. This community has been helping me tremendously with my workflow. Here’s one more question. I’d like to export a simple glass aistandard material form Maya. Been doing some tests and didn’t get anything else but a dark shiny sphere so far. Anyone has any pointers on how I can achieve it?
Here’s what I’ve exported so far.
Thanks again! (23.6 KB)

Adding @Drigax and @Guillaume_Pelletier our exporters guru :slight_smile:

1 Like

Yes, those are indeed smooth black spheres. :wink:

@anna22 can you share your original scene? I’m not sure what your material parameters are to create these spheres.

Hi @Drigax and @Guillaume_Pelletier. Sorry for the late reply. I very much still need help with this. Please find a scene attached with 2 glass shaders. One is with substance painter maps pluged in and the other one is a regular glass preset from Maya. Thanks again and looking forward to your reply!

test scene (23.6 KB)

1 Like

circling back on this. Any suggestions?

Hi. I don’t know about maya shaders but i think you need read this Export Maya scene as glTF | Babylon.js Documentation and export material with standard shader as PBR material with transparency (Stingray PBS, AiStandardSurface) with very low roughness and 0.01 or 0 opacity and for advanced glass surface programmatically use clearCoat Mastering PBR Materials | Babylon.js Documentation or look at this playground

@kvasss Thank you for your input. My workflow is specifically exporting from Maya straight to glb. I did follow all the steps in the documentation. I couldn’t get it to work. I provided @Drigax and @Guillaume_Pelletier with a Maya sample scene file for reference. Feel free to download it and take a look.

Hi @anna22
One of your materials has a dark alpha-less albedoTexture, transparency mode is set as opaque and alpha as 1.
The other has black albedoColor, transparency mode is set as opaque and alpha as 1.

why or where this happens i don’t know, maybe the exporter doesn’t support the material type :slight_smile:

You can produce decent glass with just a regular PBR material.

set albedoColor to white (or any tint you want),
transparency mode should be null or alpha blend
alpha should be low, depending on your preference, style, etc.
I like 0.2 for clear glass and around 0.5 for tinted

I hope it helps!


@aWeirdo Thank you for your help. I was actually able to create the glass shader using a texture with alpha.
I however tried to make a glass object using only a PBR aiStandard in Maya without a texture and that didn’t work for me. The workflow you suggested above is for Maya? I wasn’t able to recreated.

Adding @Drigax and @Guillaume_Pelletier who masters the exporters.

1 Like

I was able to create just now an aiStandard with no texture. The only way I could get transparency to work was by playing with the opacity of the geometry even though the transmission was at 0 . BUT the opacity will affect the entire shader It works but it’s not an ideal solution, so I’d like to hear from others and their solutions for PBR glass in Maya .
Pink Spheres-no texture
Purple cube- w texture

Hi. If you read both docs for maya transmission and babylon clear coat you can understand transmission in maya analog clear coat in babylon and threejs. And i think there no way export clear coat from maya because i don’t see this option in exporter docs Export Maya scene as glTF | Babylon.js Documentation
You need setup this programmatically after load your model. I think Your problem - opacity affect reflections. and clear coat can helps you because opacity dont affect clear coat.

1 Like