Hi everyone,
I am working on terrain created with topographic points but I noticed that it doesn’t change color along with normals.
I should obtain something like this: https://playground.babylonjs.com/#IFYDRS#0
But I have this instead:
Thank Evgeni. I’ll try to lower the light.
The project is a little bit complex.
I have a webpage passing a url string with NSEW coordinates of the portion of terrain to a server I built with nodejs.
The server does the actual request to Open Topography API getting back a Geotiff.
Then, the server executes the analysis of the Geotiff extracting elevation data and serves it back to the webpage.
At the moment the project is local and I don’t see an easy way to put it in a PG.
Maybe I can try to save data of a relative small portion of terrain and try to put it in a PG.
Hi everybody,
I finally managed to put the terrain on PG. https://playground.babylonjs.com/#L8PI1V
Adding the shadow I found other strange behaviors, especially with BlurExponentialShadowMap on.
I didn’t find yet a way to light up the terrain in a proper way.
You copy the vertex positions of the ground to another object (plane), but you don’t regenerate the normals of this object afterward, so they are all something like (0,1,0). Call createNormals to recreate the normals.
Regarding the shadows, it’s always tough to setup them for a terrain that can cast shadows on itself: you need to tweak the bias / normal bias values. Also, a Cascaded Shadow Generator can help, because it’s a big terrain you have.
Thank you, Evgeni.
The regeneration of the normals works amazingly in the PG and now it works also locally.
This was the main goal I wanted to achieve.