Page 1 of 1
fractal landscape/terrain
Posted: 2011-09-01T07:15:24-07:00
by tom_a_sparks
I've been looking at the noise options in IM to create a fractal landscape/terrain that I can display in a google maps like interface
Are there any pointers or example/ideas yous can give me?
Re: fractal landscape/terrain
Posted: 2011-09-01T09:36:22-07:00
by fmw42
see
http://www.imagemagick.org/Usage/backgrounds/
or if on unix, you might see my perlin script (for perlin noise) at the link below
Re: fractal landscape/terrain
Posted: 2011-09-01T16:08:20-07:00
by anthony
This is manipulation of objects as a height field.
You may also like to have a look at
http://eclecticdjs.com/mike/tutorials/p ... dscape.php
It is rather simple though time consuming technique of generating a 3d look to an image.
The input images are known as 'height fields' and can be manipulated in many ways.
One variation on this is to instead of just shearing the image, distort it using
perspective distortion and then modulate the colors according to distance (y value of pixel), before applying the 3D height transform the above generates.
Actually the height field and the colors used could be separate entities (two images) In which case rather than generating bright 'peaks' you can give your mountains shadows, by cloning your height field and running it through
Shade to generate shadow effects before adding color height effects, for the color component.
Re: fractal landscape/terrain
Posted: 2011-09-01T17:14:26-07:00
by tom_a_sparks
I am looking at creating a heightmap in IM, not a 2.5D raycasted landscape image
UPDATE: I forgot to say I am limited to php or perl in a web server environment eg: lampp/xampp
Re: fractal landscape/terrain
Posted: 2011-09-02T03:42:41-07:00
by anthony
IM is very good at manipulating height maps. Actually it would probably be better if the True or 3-D 'Gray-scale Morphology' had been implemented, but even then it can still do a lot.
The direct PHP API's are a bit dated (no one is updating them), but running CLI commands from the PHP is quite popular.
There will be a new solution for using IM from PHP and shell (co-processing), which is being implemented as part of IMv7, but that won't be available generally until nest year.