Hello guys,
I try to adapt this nme for a scene: https://nme.babylonjs.com/#84ALWQ#14. Since I am really bad at shaders two questions came up:
-
I added a uv & texture node and plugged the r channel to ambient occlusion. Does it have exactly the same effect like defining an ambientTexture at PBRMaterial?
-
I wonder how to set the environmentIntensity. PBRMaterial offers this out of the box but I have no clue how it’s done with nodes.
Do you have any idea how to solve this?
I appreciate your help.
Best
Adding the magic @Evgeni_Popov about nme
1 Like
Yes for 1.
For 2, you can change the intensity directly on the PBRMetallicRoughness block:
1 Like
Thanks!
I didn’t noticed the intensity input on the pbr node - that’s easy. But I have two problems here:
-
I want to set the value higher than 1.
-
I have to set the value from my scene. Can I access it by code anyhow?
You can access the value by doing:
nodeMat.getBlockByName("PBRMetallicRoughness").environmentIntensity = 2;
PBRMetallicRoughness
should be the name of your PBRMetallicRoughness
block.
2 Likes