I’m attempting to generate a terrain, but I’m facing difficulties in doing so.
The procedural generated height map passed to code-based node material is not incorporating plane elevation in the code. Am I missing something?
(Node material code starts at line 107 and ends at line 554. At line number 591, nodeMaterial is set to the current material of the ground.
ground.material = nodeMaterial;)
The elevation functions properly in the Node Material Editor (Babylon.js Node Material Editor), but inexplicably, it fails to work in the code.
It’s a bit difficult to follow what the code does 700LoC is a bit long. Did you try to load the shader .json or a snippet and get the block from there instead of using the generated code?
I greatly appreciate your response. However, I managed to resolve the issue by decreasing the width and height of the plane (ground mesh) while increasing the subdivision.
I fixed it by setting the width and height to 10 units each and the subdivisions to 200.