How show only Metallic Channel in Code


i have a PBRMaterial which have one Texture with (Metallic Roughness).
So Channel “B” has the texture for Metallic and Channel “G” for Roughness.
How can i show only the Metallic Texture in 3D Render with API?

If i use Screne Explorer i can Click on Metallic Channel and it show Correct Texture. But how can i do this in code?

The simplest is to place the texture in the albedoTexture set the material as unlit = true and use albedoColor = new BABYLON.Color3(0,0,1) to display B only and accordingly for G :slight_smile:

1 Like

Ok look good, but now Metallic is in blue color. How i can change it to white?

You would need a custom shader so you could try the Node Material Editor @PirateJC is amazing with it :slight_smile:

Hey @rbrose

First and foremost, welcome to the Babylon family!

Can you provide a playground that has this mesh and the associated PBR texture?

I’d be more than happy to use that to show you how you can leverage the Node Material editor to change the look of your mesh very easily.