https://developer.playcanvas.com/en/tutorials/terrain-generation/
In this example,I have an array:
The numerical value represents the ups and downs at a certain location.
How to apply it to the example display
https://developer.playcanvas.com/en/tutorials/terrain-generation/
In this example,I have an array:
Hi @yang1117,
The example you link uses procedural generation, perlin noise, to calculate the cell heights. Check the createTerrainVertexData
method, the 1st loop is where the random heights get calculated.
You could potentially update that to read your 2D array instead.
this is project URL: PlayCanvas 3D HTML5 Game Engine
Yes, you will need to study the existing code and modify the size/loop of the terrain to match your data.