I’m getting strange reflection artefacts when trying to add a NodeMaterial to the render list of a WaterMaterial. The playground below shows something of what I mean. Although in my application the artefacts are far more pronounced. In any case, it’s clear the result is not equal. If I remove the material from the mesh, or change to a StandardMaterial, or use TerrainMaterial for the target mesh. it looks much better. It seems to be just a problem with NodeMaterial. Thanks.
You need to use the Lights block in your node material:
Note that you are seing a second reflection (which is in fact the refraction) because clip planes are not supported in node materials and the water material is using them to generate the reflection/refraction textures.
Thanks @Evgeni_Popov. I believe the problem I’m referring to here is due to the refraction issue, because I still get the artefacts when I’m using a PBRMetallicRoughnessBlock. I was just using a basic node material as an example here. Is there any way I can fix this using NodeMaterial? I do have other approaches I can try for this such as extending one of the existing material classes, but I would really like to use NodeMaterial in this case.
@Evgeni_Popov, thanks a lot, very responsive. I guess that will be available next release? I’m trying to integrate it now, but running into some roadblocks with modules etc.
It should be available in the Playground within one or two days, but NPM packages are rebuilt less often. I will let someone from the team answer about the delay.
@Evgeni_Popov, I updated to latest beta release and this works beautifully. Relating to other threads about the usability of Babylon for learners. I am stunned every time by the level of responsiveness to questions and problems on this forum, and this has made all the difference in the struggle to learn a difficult but very rewarding library. Sincere thanks!
@Polymorrah this is the kind of answers that makes us always want to improve the framework !!! Thanks fos sharing this and yes @Evgeni_Popov is awesome