I want to create a terrain with a path. Something like this https://vimeo.com/14417062
For now, I’m evaluating this possibilities:
- take a highmap with a river, generate the terrain out of it an put the path, or the road, instead of the river. The problem is that i want to create a loop, and there is no river-loop.
- generate a terrain from an highmap, and then intersect a plane on the horizontal plane. Take the upper part of that intersection. I should obtain mountains on a plane. On that plane, i could move the camera on a loop track where there is no mountain. It would be not so nice as the video linked, but maybe is fine.
3)generate the terrain using noise, as in the @hahakid repo https://github.com/andreasmuller/NoiseWorkshop/tree/master/NoiseGrid. But I do not now how to put a path in a noise created terrain.
I would like to go for the third option, does anyone has suggestions about how to proceed?
Hi, I use thresholded noise to create rivers in something I’m working on, but I don’t have to know where these rivers are going to be as long as it looks right.
One way to go about adding a path of your choosing to a noise generated terrain would be have a spline with your desired path then for each pixel when you are reading your noise values also check what the closest distance to this spline is (kinda slow as the only thing I can think of is checking individual line segments, but can be precomputed), then you can put that through some clamping and a shaping function to decide how wide or whatever you want your road.
As my understanding, from the video, this seems like:
- Smooth random heights for the mountains (brown)
- Smooth horizontal spline for the path (blue)
- Vertical cutout of the terrain using the spline + width to create the “river” (black region in video)
- Camera moves along spline + terrainHeight (green)