Results 1 to 7 of 7

Thread: Changing heightmap from rough contour lines to smooth

  1. #1

    Question Changing heightmap from rough contour lines to smooth

    Hello guys,
    I've been making a hand made map in photoshop for a long while, and I'd like to know which is the best method and software to "interpolate" a tiled heightmap. If it exists.
    For me, the ideal outcome would be if the program could made smooth transitions between such contour lines, where the slope varies depending on the distance and height between contours, and also respecting those contours avoiding modifying them. In such a way that the map is ready to add the final details in wilbur.
    Like this...



    I am mainly interested in it being an automated method because the map is huge.
    This is a piece of said map.



    Best regards.

  2. #2
    Administrator waldronate's Avatar
    Join Date
    Mar 2007
    Location
    The High Desert
    Posts
    3,553

    Default

    Have you tried doing this in Wilbur with the source material that you have?

    Using the image posted above, the histogram looks like this: nice flat spikes at each filled contour:

    Click image for larger version. 

Name:	esqof_h1.gif 
Views:	8 
Size:	7.0 KB 
ID:	136282

    Select the land, add noise (about 10% of your maximum altitude), fill basins, incise flow (2, 0.3, 0.7, 0, 0.5, 0) will get you this image:
    Click image for larger version. 

Name:	esqof.jpg 
Views:	27 
Size:	161.5 KB 
ID:	136281

    And its histogram looks like this:
    Click image for larger version. 

Name:	esqof_h2.gif 
Views:	7 
Size:	7.8 KB 
ID:	136283
    Notice that the spikes have broadened considerably and to the left of each original spike (that is, the land has been removed and generally not added much). The broadening is partly due to the noise (the histogram for the noise step will look like slightly widened spikes), and the leftward tail on the original plateaus is due to the incise flow operation being a remove-only operation.

    This operation does change your original contours somewhat. Anything other than a simple interpolation will do so, including your stated goal to "add the final details in wilbur".

    This kind of processing in Wilbur does have another significant issue: Wilbur can only process what it has in memory. On the above processed image, you'll note that river systems along the bottom edge of the map are running completely the wrong way (straight at the edge of the map). For best results in Wilbur, the coastlines need to be visible all around in order to prevent the weird edge effects. Or you can make the terrain a little larger and draw a tall wall on the waste space to keep everyone heading in the same general direction, but then you won't get rivers heading into the map from off-image.

  3. #3

    Default

    Thanks for your answer.

    Quote Originally Posted by waldronate View Post
    This operation does change your original contours somewhat. Anything other than a simple interpolation will do so, including your stated goal to "add the final details in wilbur".
    Sculpting the rivers and having them slightly modify the geography would interest me as the last steps to detail the map, however I cannot overlook the fact that the contours remain so marked... For the sake of making it realistic. I need to solve this problem first.

    This is also justified when some rivers cross mountain ranges, since they understand that the space between mountains is at the same height, pic below.


    Quote Originally Posted by waldronate View Post
    For best results in Wilbur, the coastlines need to be visible all around in order to prevent the weird edge effects. Or you can make the terrain a little larger and draw a tall wall on the waste space to keep everyone heading in the same general direction, but then you won't get rivers heading into the map from off-image.
    Dont worry regarding the coastlines, this pic is only a section of the map for testing.


    How does the deterrace tool work and what is it for?

  4. #4
    Administrator waldronate's Avatar
    Join Date
    Mar 2007
    Location
    The High Desert
    Posts
    3,553

    Default

    That particular example of a river crossing over a highland was because I used too much noise, more than half of a terrace step. More noise = more wiggles on rivers. Less noise = straight lines.

    Wilbur's deterrace tool uses a raycasting algorithm that casts rays in a circle to find the distance and angle from the current point to the next point that's not on the same level. Those distances and angles are used to calculate the theoretical altitude at the point. There are two parameters, the altitude difference test value (in the registry under "Deterrace", "Epsilon", default=0.00001) and the number of rays around the circle (in the registry under "Deterrace", "Rays", default=64). It has some unpleasant behaviors such as always wrapping in X but not Y (it was intended for whole-world operations). For your particular image, you would need to increase the epsilon value substantially because the base parameter assumes effectively flat areas and your "flat" areas are decidedly not flat.

  5. #5

    Default

    Quote Originally Posted by waldronate View Post
    For your particular image, you would need to increase the epsilon value substantially because the base parameter assumes effectively flat areas and your "flat" areas are decidedly not flat.
    I'd like to try modifying epsilon. However, I don't know how... I have checked the guide, deterrace does not have its own submenu and I don't know how to access the registry.
    Regards.

  6. #6
    Administrator waldronate's Avatar
    Join Date
    Mar 2007
    Location
    The High Desert
    Posts
    3,553

    Default

    The simplest way is to download the 1.92 version of Wilbur that uses a dialog to ask for those two parameters when you pick the Deterrace operation.

    The more complex route involves using regedit, finding the Wilbur software entry, and adding the two items.

    I recommend downloading the new software...

  7. #7

    Default

    After testing for a while and using a combination of wilbur and photoshop I got this. It's closer to what I'm looking for.
    I think the key may be using blur and deterrace to "flatten" the steps and alternating erosion tools, aka incise flow, to maintain the orogeny.
    I still have to find the perfect combination, but for now I am happy with what this result can provide. Thank you.




Posting Permissions

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