Hi!
As long as we usually create Roughness, Metallic and some other channels as grayscale images with float/Linear profiles then I have the next question: is it possible to read different color channels separately from a file and use them as texture maps?
For exmaple, in Unreal Engine they do it like this: Red (1) channel is used for the Ambient Occlusion map, Green (2) — for the Roughness and Blue (3) — for the Metallic:
Hi!
You can see in the docs of MeshStandardMaterial that aoMap reads red channel, roughnessMap reads green channel, metalnessMap reads blue channel of a texture. So you can write them in one texture.
Thanks, @prisoner849 this helped with understanding.
Unfortunatelly, all this is not so obvious when I read those short descriptions in the docs. Even for me who is familiar both with 3D graphics and JS.
Couldn’t find any examples of extracting data from the channels. I thought that if aoMap, roughnessMap and metalnessMap read color channels automatically, then something like this will work:
…but it doesn’t work — the mesh is black.
In the example above in the car_AO-RG-ML.png file I have R, G & B channels containing information about AO, roughness & metalness respectively (exported from Substance Painter).
Could you please, show a code example of how you do this properly?