Light intesity for node material

Hello guys,

I need help your with node materials, I want to create a node material for grass and then apply a wind effect to it. I have some standard materials with albedo texture and bump, directional light, and some meshes with node materials. The thing is that there are different materials in the scene and they all have to react the same way to the light. In general, I want to create a node material with two maps (albedo and bump), I found an awesome example where the result of the standard material is equal to the result of the node material.

But this example uses a lot of maps, and I only have 2 of them. I changed the node material, and placed colors instead of maps, but there is something wrong with the light, when I set the light intensity to 10000, the grid with the standard material becomes white, the node material from an example only reacts to light intensity changes to 1,

And I’ve created a more simple alternative node material (color texture * light ), but this material is more light sensitive than standard.

What should I change in the node material editor to make any of node materials to react to light as standard material? A small reproduction is here

ezgif-2-e266da7cb2

Hope for your help

And a tiny question when you don’t define transparency mode, is it work as alpha blend? So is it better for performance to set transparency mode = alpha test for node materials?

The thing is that your model comes from a .glb file, so it is using a PBR material: you won’t be able to match a PBR material with a node material that is using the Lights block (which corresponds to the standard material). You will have to use the PBRMetallicRoughness block instead.

If you don’t define a transparency mode, you don’t have alpha blending. As a general rule, don’t use transparency/alpha blending if you don’t need it, as there are a number of problems when dealing with transparency (see Transparent Rendering | Babylon.js Documentation) and rendering transparent objects is generally slower than rendering opaque objects because of the blending operation.

1 Like

Thank you Evgeni,
that was very valuable advice. With the help of this tutorial PBR Nodes in Node Materials Part 1 - YouTube (base color from texture should be converted to linear space), I’ve got node material which has the same sensitivity to light as materials from glb file.

A working example is here, in case someone has the same issue