I’m wondering if I can make NodeMaterial self-lighting?
Something like this…
Hi, if i understand correctly, the glow layer requires to set emissive texture. I don’t know how to set it for NodeMaterial
It needs a property called emissiveTexture or emissiveColor but the easiest is to supply through the custom callbacks as explained in the doc (on my phone can not remember the callback name).
The main limitation is that vertex displacements would not be supported.
Hey, thank you for replying. Could you be more specific? I can’t find relative documents
More specifically, I’m trying to make my NodeMaterial glowing like this… Is that possible?
Here is the related part of the doc Make Mesh Glow - Babylon.js Documentation
The main issue is you would need a custom shader shader to render the glow as well which is not supported so far.
I’ll try an alternative way. Thank you!
I ll take a look in the evening how hard it would be to replace the generation shader by a custom one .
Thank you so much
I am still looking into it I hope to have a solution by Friday but it is way more complex that I thought at first
Thank you so so much Take your time
The only change you ll need in your code is :
const gl = new BABYLON.GlowLayer(“gl”, scene);
to ensure the mesh uses its own material to generate the glow.
Wow! Fantastic! Thank you so much!