Results 1 to 10 of 17

Thread: Reverse Quantizing, AKA - how to get a heightfield from contour lines

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

  2. #2
    Guild Artisan su_liam's Avatar
    Join Date
    Aug 2007
    Location
    Port Alberta, Regina(IRL: Eugene, OR)
    Posts
    798

    Default

    Funny coincidence. I've just been working on a similar problem. I was playing around with a heightfield I found on the net(I've been looking into the possibility of stitching together real-world heightmaps and subtly altering them to produce interesting and "realistic" extraterrestrial landscapes). The heightmap had serious stairsteps so, in Bryce, I used several iterations of the smoothing, noise, erode and eroded tools to obliterate the steps(mostly), and then applied a fractal at very low opacity on top of that. Thus far my methods aren't at all systematic(just to taste) and won't necessarily maintain the original landform with great fidelity.

    Attached, I have an image generated from the original hf at upper left. From lower right clockwise: a heavily modified version(this was my second try, I lost the first one, which was my favorite ), a less modified version, and on the upper right a minimally modified version(this is about as much of the original structure as I could maintain without obvious stepping.

    I'll try to add individual closeups and heightfields later. I'll also try to work out my methodology. This really isn't interpolation(since it doesn't maintain the existing contours), it's more like draping a canvas over a frame. Only the frame can get a little whacked out of shape.
    Attached Images Attached Images

  3. #3

    Default

    su_liam-

    Can you post that original heightfield (as b/w or contour lines)?

    It would be nice to have a standard example to play at with different techniques and compare the result.

    -Rob A>

  4. #4
    Guild Artisan su_liam's Avatar
    Join Date
    Aug 2007
    Location
    Port Alberta, Regina(IRL: Eugene, OR)
    Posts
    798

    Default

    Quote Originally Posted by RobA View Post
    su_liam-

    Can you post that original heightfield (as b/w or contour lines)?

    It would be nice to have a standard example to play at with different techniques and compare the result.

    -Rob A>
    They're jpeg and not my original 16-bit tiffs, but here you go...

    interpOrig.jpg is the original. Mmm, duh?
    interpHeavy.jpg is the one at lower right.
    interpModerate.jpg is the one at lower left.
    interpLight.jpg is the one at upper right.

    edit: just noticed how bryce pooped all over the original aspect ratio. Sorry 'bout that.
    Attached Images Attached Images
    Last edited by su_liam; 11-29-2007 at 03:37 PM.

  5. #5

    Default

    Quote Originally Posted by RobA View Post
    Bricka-

    How slow is it to process a large image?
    It certainly wouldn't win any awards for speed; a file of a million pixels takes a few minutes.

  6. #6
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,307
    Blog Entries
    9

    Post

    In terms of stitching arbitrary height maps may I point you at some work done by Howard Zhou who has been working on this sort of thing for a while...

    http://terrain.cg-arts.org/forum/ind....msg821#msg821
    http://www.howardzzh.com/research/terrain/

    To keep it simple, I believe he is finding the closest path between two maps and cutting along them - a bit like photo stitching I think. I reckon there is a lot more to it tho. Its unbelievably awesome actually. Anyways there is a world machine plug in to do it.

  7. #7
    Professional Artist
    Join Date
    May 2007
    Location
    Wisconsin
    Posts
    186

    Post

    Quote Originally Posted by Redrobes View Post
    That looks amazing. Being a professional cartographer I have a very large supply of real-world DEMs to use as source files, and it looks like this is just the application to create the mountain ranges, valleys, canyons, etc. for my world. But I could not find the download.

    I WANT.

  8. #8
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,307
    Blog Entries
    9

    Post

    The public interface to this utility is a plugin for WorldMachine.

    http://www.terrainsynthesis.org/worl...rger/index.htm

  9. #9
    Guild Artisan su_liam's Avatar
    Join Date
    Aug 2007
    Location
    Port Alberta, Regina(IRL: Eugene, OR)
    Posts
    798

    Post SDA: a first test.

    Okay, here's my experiment.

    First, I took the quantized image and applied a 2.5-pixel Gaussian Blur to start. Next, I applied the Spatter filter at a radius of 8 and a smoothing of 1.

    Next, I tried a smaller 1.3-pixel blur, and a spatter at the same settings as before. I repeated this a couple times.

    I finally did a blur at 2.8 pixels to reduce the spots a bit.

    This is what I was thinking of calling my Stochastic Deterrace Algorithm. I'm not sure how satisfactory this is. What do you think?
    Attached Images Attached Images

  10. #10
    Guild Artisan su_liam's Avatar
    Join Date
    Aug 2007
    Location
    Port Alberta, Regina(IRL: Eugene, OR)
    Posts
    798

    Post

    Next, I tried a morphological close operation: an erode followed by a dilate. I was hoping to denoise it a bit. Basically, I copied the image, pasted it as a channel. Used the channel as a selection then expanded the selection by one pixel, followed by a 1-pixel contraction of the selection. Then I saved the selection as a channel, copied the new channel and pasted it into a new layer. Didn't really help.

    Finally, I tried Filter>Noise>Median... with a radius of 7 pixels. Here is the result.

    See what you think?
    Attached Images Attached Images

Posting Permissions

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