3dsmax exporter trouble with smoothness map in alpha of metallic map

Sorry if this already exists but I couldn’t find anything about it.
We are currently in the process of converting our assets from Unity to TreeJs and unfortunately, the texture structure of Unity seems incompatible with the Babylon exporter.

Namely, in Unity, the smoothness map is included in the alpha channel of the metallic but when I plug it in a physical material and tell it to only use the alpha as a the regular output, the exporter still creates a trasparent png with 3 identical channels in R,G and B instead of copying the alpha in the green channel and collapsing the rgb in th Blue one.

(I hope my description is clear, I wanted to include the resulting png but I’m only allowed one media)

Am I missing a secret checkbox somewhere ?
here are my current options for the bitmap in the material editor

Welcome aboard!

I think you need to clarify a bit:

So, is it a conversion from 3dsmax (as the title says) or from Unity and is it intended for Threejs or Babylon?

It is indeed an issue with an export from 3dsmax.
At the moment we are using both Unity and ThreeJs so when we have new assets to make, we would like to just use one set of maps and export an fbx for the Unity part and a gltf for ThreeJS.

I have a hard time understanding what you want to do…

Are you saying that you are exporting a .gltf from a ThreeJS scene and that you want to use this .gltf in a Babylonjs scene?

Ok, let me start again from scratch.

I’m making assets in 3dsmax and I export them using the babylon.js exporter to view them in a viewer made in threeJS. Since we also use those assets in unity, we create our textures for the Unity standard material (so the smoothness map is contained in the alpha channel of the metallic map).
But in 3dsmax, when I plug in my smoothness map in the physical material as per the documentation (but using the alpha of the metallic using the options shown in the screenshot of the original post), the export doesn’t work as expected and creates a transparent png instead of using the G and B channels.

So my question is, what option should I set in the max material for the exporter to use the alpha channel of the metallic texture as a regular map and not for some kind of transparency.

Ok, I did not understand you were exporting a .babylon file to be viewed in ThreeJS as that seems kinda weird to me :wink: (I think they dropped support for loading .babylon files some time ago).

I guess it’s a question for @Drigax.

Ah dammit, that’s of course an important part I forgot to mention…

I use the exporter to get the gltf files (.bin, .gltf and textures as png), not for its babylon format as it seems to currently be the only gltf exporter available for 3dsmax.

XD

Hi. I think you need add some custom attributes in exporter 3DSMax to glTF - Babylon.js Documentation and read and work in your program with this custom properties because i don’t known about exporter property use transparency as some other types of maps… 3DSMax to glTF - Babylon.js Documentation and i think you need process your textures manually… or use transparency as transparency))

Is…is this supposed to work this way in 3dsMax?

You can try setting alphaSource = Opaque to get the exporter to disregard your alpha channel.

My understanding of your roughness metallic map is that you’re using white/RGB to represent the metallic, and alpha to represent your roughness?

I’m not sure that 3dsMax or our texture packer supports such a usecase…

it renders fine in the max viewport and that’s how it’s supposed to work in Unity.
It also works fine in Blender and its integrated gltf exporter compresses the texture properly (collapsing the rgb to the blue channel and the alpha to the green one). Unfortunately, Blender works with roughness instead of smoothness and doesn’t want to invert the channel, so I have to do it manually afterward :frowning: )