5 ms·
Just a small note, not to sound snooty, just to educate people on what realistic terrain looks like... This is what midpoint displacement looks like as a heigh
by gavanwoolery 12y ago
Just a small note, not to sound snooty, just to educate people on what realistic terrain looks like...
This is what midpoint displacement looks like as a heightmap:
http://imgur.com/ksETpO0,7gykFEV#0 http://imgur.com/ksETpO0,7gykFEV#0
This is what realistic terrain looks like (this is based on real-world heightmap data):
http://imgur.com/ksETpO0,7gykFEV#1 http://imgur.com/ksETpO0,7gykFEV#1
That said, midpoint displacement, perlin/simplex noise, etc are good for modeling terrain at a less macroscopic scale and are plenty sufficient for the use of most games.
- gavanwoolery 12y agoTo add another note, as complex as real world terrain is, you can generate those fractal mountain patterns and drainage basins algorithmically with a bit of work. There are many ways to go about it, one would be recursive spacial partitioning, another would be to explicitly grow out a tree pattern while minding collision and proximity to other branches. Also, it is possible to use diffusion limited aggregation or erosion simulation but I have been down both those routes and they are not as easy to get good results with.
- mjn 12y agoFurther reading: 1. A semi-standard textbook on the subject, but now a bit dated (don't be fooled by the 2002 date on the 3rd ed., most of the text is from the 1st ed): http://www.amazon.com/Texturing-Modeling-Third-Edition-Procedural/dp/1558608486 http://www.amazon.com/Texturing-Modeling-Third-Edition-Proce... 2. A more recent but much shorter survey paper: http://graphics.tudelft.nl/Publications-new/2009/SDGTB09a/SDGTB09a.pdf http://graphics.tudelft.nl/Publications-new/2009/SDGTB09a/SD...
- hunterloftis 12y agoThanks for this! I've been looking for resources on building out lifelike macro-terrain-structures.
- userbinator 12y agoReminds me of this - pretty good looking terrain + animation + sound in a 4 kilobyte executable: http://www.youtube.com/watch?v=_YWMGuh15nE http://www.youtube.com/watch?v=_YWMGuh15nE How it was done: http://iquilezles.org/www/material/function2009/function2009.pdf http://iquilezles.org/www/material/function2009/function2009...
- ohwp 12y agoI like this one even more because it is procedural. No height map needed.
- pertsix 12y agoIs this the same algorithm for the cloud filter from Adobe Photoshop?
- gavanwoolery 12y agoI believe photoshop uses Perlin noise (could be wrong)
- signa11 12y agothis looks more like perlin noise to me...
- jayrobin 12y agoI agree it looks more like Perlin noise due to the finer detail not seen in diamond square [1] and the lack of directional artifacts in midpoint displacement [2]. [1] http://www.gameprogrammer.com/fractal/heightmap.jpg http://www.gameprogrammer.com/fractal/heightmap.jpg [2] http://upload.wikimedia.org/wikipedia/en/9/96/Plasmafractal.gif http://upload.wikimedia.org/wikipedia/en/9/96/Plasmafractal....
- tripzilch 12y agoInteresting. Those branchy ridge shapes look a lot like Diffusion-Limited Aggregate patterns. But then, I guess they didn't call it "universality" for nothing :) They also reminded me a bit of GIMP's "Solid Noise" rendering with the "Turbulence" setting switched on. I rendered one, and turns out it doesn't quite look as good (cough), but now I wonder whether this would give a bit more realistic height map: http://imgur.com/oRlZ191 http://imgur.com/oRlZ191 On the other hand, like you say, for terrains for videogames are always best generated by taking any of these algorithms, and mercilessly tweaking the parameters, post-processing, etc until it just looks sufficiently good. Actual physical realism comes into second place (and it should, like most game physics).
- IceCreamYou 12y agoI've been working on a WebGL terrain engine recently -- you can try it out and switch on the "Turbulent" flag to see the results :) https://icecreamyou.github.io/THREE.Terrain/ https://icecreamyou.github.io/THREE.Terrain/
- gavanwoolery 12y agoUsing a noise function I produced similar turbulence once. Here was my result (it does, IMHO, look a bit better than vanilla noise): http://www.gavanw.com/uploads/9/5/4/0/9540564/4868178_orig.png http://www.gavanw.com/uploads/9/5/4/0/9540564/4868178_orig.p...
- Arelius 12y agoThank you... What people don't realize is that "Random Noise" doesn't actually occur that often in real terrain. The bump tool in game engines is the bain of realistic terrain everywhere. This: http://i.imgur.com/DFXMmY8.jpg http://i.imgur.com/DFXMmY8.jpg doesn't generally happen in nature.