Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: Procedural vector map elements -- some experiments

  1. #1
      gilgamec is offline
    Guild Journeyer gilgamec's Avatar
    Join Date
    Mar 2009
    Location
    The Barbarian West
    Posts
    113

    Wip 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:
    1. I'm far too lazy to do a map manually, and
    2. 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.
    Procedural vector map elements -- some experiments-sketchy-1a.png
    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.
    Procedural vector map elements -- some experiments-sketchy-1b.png
    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.)
    Procedural vector map elements -- some experiments-sketchy-1c.png
    Replacing the circles in the forest with these shapes already greatly improves the forest.
    Procedural vector map elements -- some experiments-sketchy-1d.png

  2. #2
      gilgamec is offline
    Guild Journeyer gilgamec's Avatar
    Join Date
    Mar 2009
    Location
    The Barbarian West
    Posts
    113

    Wip 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.
    Procedural vector map elements -- some experiments-sketchy-1e.png
    We can shade the trees in the forest scene and see that it's much improved.
    Procedural vector map elements -- some experiments-sketchy-1f.png

    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.
    Procedural vector map elements -- some experiments-sketchy-1g.png

    Of course, one of the nice things about procedural generation is that I can generate this pattern at any scale and size.
    Procedural vector map elements -- some experiments-sketchy-1h.png

  3. #3
      ravells is offline
    Community Leader Gracious Donor ravells's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    10,901

    Default

    Great stuff!

    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.

  4. #4
      töff is offline
    Guild Artisan töff's Avatar
    Join Date
    Nov 2007
    Location
    Fresno, California USA
    Posts
    864

    Default

    Ya, they want trunks ... and that would make it a home run!

  5. #5
      gilgamec is offline
    Guild Journeyer gilgamec's Avatar
    Join Date
    Mar 2009
    Location
    The Barbarian West
    Posts
    113

    Wip By popular demand: trunks!

    Thanks for your comments! Trunks should be pretty easy; I don't think they need any kind of wiggliness (though it wouldn't be too hard to add):
    Procedural vector map elements -- some experiments-sketchy-1i.png
    And you're right; it improves the look considerably. Great!
    Procedural vector map elements -- some experiments-sketchy-1j.png
    Procedural vector map elements -- some experiments-sketchy-1k.png

    On a related note: does anyone have any suggestions for software for converting from vector (in this case, PDF) to raster images? I'm using ImageMagick here (which farms it out to Ghostscript, I think), and while it looks fine on coarser images, it does terribly on the finer detail (like the hatching); those images I've had to convert manually in Illustrator.

  6. #6
      töff is offline
    Guild Artisan töff's Avatar
    Join Date
    Nov 2007
    Location
    Fresno, California USA
    Posts
    864

    Default

    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?

  7. #7
      töff is offline
    Guild Artisan töff's Avatar
    Join Date
    Nov 2007
    Location
    Fresno, California USA
    Posts
    864

    Default

    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.

  8. #8

  9. #9
      töff is offline
    Guild Artisan töff's Avatar
    Join Date
    Nov 2007
    Location
    Fresno, California USA
    Posts
    864

    Post

    Quote Originally Posted by gilgamec View Post
    any suggestions for software for converting from vector (in this case, PDF) to raster images
    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.)

  10. #10
      Koor is offline
    Guild Member Koor's Avatar
    Join Date
    Oct 2006
    Posts
    75

    Default

    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.

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •