Babylon 4.0 PBR Shader Updates

Anyone else super excited about the updates to PBR shader support coming with 4.0!!!

#babylonjs4

9 Likes

Can’t wait to try all these magic in my next project!
I suspect some slick-looking sports cars are coming.:sunglasses:

2 Likes

@sebavan, do not need the docs, only cliff notes to map from Blender.

Probably an hour for code & test, but also need to look into “single tile” baking, which is supposed to be a significant performance improvement. 2.80 is an absolute dog to bake.

FYI, while the exporter is big on just mapping, if say you put a Noise procedural shader on Sheen, then exporter would need to bake.

About clear coat:
material.clearCoat.isEnabled = true;
material.clearCoat.intensity = 0.5; // 0-1 defaults to 1
material.clearCoat.roughness = 0.5; // 0-1 defaults to 0
material.clearCoat.texture = texture; // R is storing intensity and G roughness

Values not available in blender are:
material.clearCoat.isTintEnabled = true;
material.clearCoat.tintColor = Color3.Teal();
material.clearCoat.bumpTexture = texture; // dedicated bump texture for the coat

About sheen:
material.sheen.isEnabled = true;
material.sheen.intensity = 0.5; // 0-1 defaults to 1
material.sheen.color = Color3.Teal();
material.sheen.texture= texture; // RGB is color A is intensity

About anisotropy:
material.anisotropy.isEnabled = true;
material.anisotropy.intensity = 0.5; // 0-1 defaults to 1
material.anisotropy.direction = new Vector2(1, 0); // defines the orientation in tangent space
material.anisotropy.texture= texture; // RG is direction (-1 to 1 mapped to 0-255 like bump) and B is intensity

You can see all of them in the inspector. Doc should be coming in a couple of weeks.

1 Like

Thanks. I do see down at the bottom a Clearcoat Normal texture input.

Not a perfect line up. Any ideas, @Vinc3r

1 Like