Procedural vector map elements -- some experiments
As those who have seen my Challenge entries will know, I'm interested in creating procedurally generated maps, because:
- I'm far too lazy to do a map manually, and
- I have no artistic talent anyway.
This thread is for showing my experiments with procedurally-generated map elements, like forests, mountains, cartouche decorations, etc. -- mostly in a hand-drawn- or engraved-style.
First off, I'm looking at forests. I'm going to take the forest style from this tutorial as a starting point, and see how far I can get completely procedurally.
The distribution of trees in the forest is pretty simple. I take a Poisson point distribution, drop a circle at each point, and take this as a first step.
The actual shape of trees is going to be more irregular than just circles, of course. First, the general shape shouldn't be a circle, but more of an egg shape. I can alter a parameter and get shapes of greater or lesser egginess.
Next, to create lobes, I'm going to make the tree silhouettes the overlap of a bunch of circles. First, I put a Poisson point distribution inside the general tree shape. Second, I put a circle around each point, then take their outside boundary as my tree boundary. (I'm not drawing all of the circles here, only the ones that actually contribute to the boundary.)
Replacing the circles in the forest with these shapes already greatly improves the forest.
Forests part 2 -- shading the trees
If you look back at the tutorial I'm cribbing from, you'll notice that the shading on the trees is an integral part of the overall effect. In this post, I'm talking about getting a similar effect.
First, I tried a sort of drop-shadow effect. (Actually, the outline is stroked with a rotated elliptical nib, but the result is pretty much the same.) I don't really like it -- it looks too uniform. In the second test, I tried a different tack.
I went back to the circles that create the outline. I want to locate the circles on the bottom left of the tree, so I shift the general tree shape (red) up and to the right; the circles whose centers are in the shifted shape (black) form the "lit" section, while the other circles (blue) are the "shaded" section.
We can shade the trees in the forest scene and see that it's much improved.
Another nice factor in the original tutorial is the "ground", which is hatch-shaded. I can create a similar effect with straight lines deformed a little bit by random control point rotations.
Of course, one of the nice things about procedural generation is that I can generate this pattern at any scale and size.
Will you be working on tree trunks in the next bit?
I'm amazed, with depth of your observation as to the shape and underlying form etc, you should be able to draw with ease.
Ya, they want trunks ... and that would make it a home run!
Home run! Maybe ...
Can you feed a shape into your procedure, and generate complete trees within that shape? I mean, so the trees on the edges don't get cropped.
What software are you using to generate trees with your procedure?
Oh, ImageMagic, sorry, didn't read your whole post. (I *rock* at that).
(edit) ... Oh no, wait, did you mean you were rasterizing with ImageMagick?
Last edited by töff; 08-09-2009 at 12:03 AM.
Of course, Photoshop will rasterize vectors and PDFs. (Remember that a PDF is just a containter for vectors and/or rasters of any resolution(s) and/or type.)
Originally Posted by gilgamec
Can you add a chance of a dead tree or stump being generated into the product? Also random generation of a glade or underbrush could add to the end product.