Results 1 to 7 of 7

Thread: Wilbur: I mess up my rivers, what can I do?

  1. #1

    Question Wilbur: I mess up my rivers, what can I do?

    Hi all. I started creating a new continent for my world using VP Planet Generator (link) to generate a heightmap so I can tweak it on Wilbur. Said heightmap has the basic information. The end result before Wilbur is something like this:

    Click image for larger version. 

Name:	1323434.png 
Views:	233 
Size:	1.84 MB 
ID:	116030

    (I am aware that there are some straight lines and stuff, that's because I edited it a little bit on Photoshop. It is not important at the moment)

    My workflow is more or less: import the heightmap, specify a span, select low altitude terrain, do precipitation erosion-> incise flow -> precipitation erosion as many times as needed (fill basins in every step), and then move on to the higher altitudes and do the same, tweaking some settings. This way, I can control how I want the different terrain areas to be. Then I play with settings and, lastly, I resample to a higher resolution.

    The thing is, I have noticed that this method messes up my rivers: because of the multiple iterations of the erosion algorithms and the selections, I can see in the river flow map that the rivers keep getting shorter and shorter, with no relation between them. I would want them to be plausible, as I haven't encountered this problem before with other terrain projects where I did more or less the same workflow.

    Besides, I'm sure my method has its issues. Do you know any other workflows that I can try? Any help in using the software in general? What can I do?

    Thanks in advance.

  2. #2
    Guild Expert johnvanvliet's Avatar
    Join Date
    Jul 2012
    Location
    N 42.39 W 83.44
    Posts
    1,091
    Blog Entries
    4

    Default

    i start with a small version ( 1000 px wide ) run an "erosion cycle" on it in wilbur
    upscale it to 5000 px , blend that 50%/50% with the original

    then in wilbur run an "erosion cycle" on that image , then 3 erosion with a little bit of noise( 0.3 overall) and incise flow it and run one erosion with NO noise and one more incise flow

    i get this image

    Click image for larger version. 

Name:	1323434.c.png 
Views:	244 
Size:	2.19 MB 
ID:	116077

    the rivers and valleys are clearly seen
    --- 90 seconds to Midnight ---
    --------

    --- Penguin power!!! ---


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

    Default

    Rivers are a global phenomenon. To get plausible rivers in Wilbur using its rather primitive tools, you need to ensure that you're using global tools.

    The simplest global tool in Wilbur to ensure river connectivity is Filter>>Fill>>Fill Basins. It fills all of the little pits that would stop a river as part of one big process. Internally, the algorithm uses an 8-way neighborhood for finding connectivity, which results in artifacts along the 8 cardinal directions.

    A more complex (but only somewhat global) tool is Filter>>Erosion>>Precipiton-Based (not precipitation). This tool drops agents at random on the surface and each agent moves altitude downhill along the steepest descent gradient. After a while, global connectivity will be established, but the use of 4-way and 8-way connectivity will result in artifacts along the cardinal directions.

    Using Filter>>Erosion>>Incise Flow will amplify whatever flow channels are present in your surface. If your flow channels are short, Incise Flow will push those into the surface. It works by finding the flow amount across the surface and then applying an exponent to that flow amount and subtracting the result from the surface (there are some bonus operations built in that allow blurring and clipping of the exponentiated flow to mimic certain real-world effects). It finds flow by counting the number of pixels that are upstream of every pixel. This process is non-linear in time and is much slower for larger surfaces and slower still for surfaces with high connectivity.

    If you select part of the surface and process that part of the surface using the global tools, you're not going to get a global result because the select makes the operation non-global! There are times when you deliberately don't want to do global operations, such as using precipiton erosion through a coastline mask to avoid destroying specific coastlines or if you'd like to just enhance a certain watershed. If you select an altitude range and use global erosion tools in just that range, you're going to get rivers that are clipped out of part of the global network. Removing them from the global network will chop them into little short pieces and break the overall global connectivity. Using fill basins after damaging the global network will reestablish that network, but it may not do exactly what you'd like to see.

    The Wilbur download page at http://www.fracterra.com/software.html has a list of tutorials. https://www.cartographersguild.com/s...ad.php?t=29412 has many of the same tutorials as well as some others. There are many "how-to" snippets for Wilbur scattered around this site (a search for "fun with wilbur" will turn up a lot of them).

    My preference for making a world in a particular shape uses a coastline mask (and possibly more altitude masks to represent hills and mountains). Start small (512 or less) and follow the general process described in https://www.cartographersguild.com/a...chmentid=80066 to get generally good results:

    before you start: prepare a simple height field with your areas of interest (lowland, highlands, etc.) that's not much more than 500 pixels across its larger dimension.

    a) Select>>Load to load the coastline selection (loading at every resolution lets the system rescale the coast mask to best adapt to the current resolution)
    b) Select>>Invert Selection to select the ocean regions
    b1) Filter>>Fill>>Set Value, set to -1 (this step enforces oceans; setting to more negative values will affect how the coastline enters the sea)
    c) Select>>Invert Selection again to get back to just land selected.
    d) Filter>>Noise>>Wilbur Add Noise with amplitude decreasing at every step: start at around 10% of the total altitude and decrease by half at each step (e.g. 1000 altitude would get 100 at the first step, 50 at the second, and so on).
    e) Filter>>Height Clip from 0 to 1000000 to get ride of any pits that might have formed from random noise
    f) Filter>>Fill>>Fill Basins to reestablish global conenctivity.
    g) Filter>>Erosion>>Incise Flow to chop rivers down into the terrain. Start out aggressive (smaller flow exponent), but ease out with each step (slightly larger exponent, toward 0.6 at the end).
    h) Filter>>Erosion>>Precipiton-Based to smooth out edges from the incise flow.
    i) Surface>>Resample>>Simple with about twice the X Size and Y size (e.g. go from 500 to 1000 at the first step).
    j) Repeat steps a through i until you get to your desired resolution.

    Repeat steps a through h one last time to get your near-final image.
    Use Filter>>Mathematical>>Exponent with a land exponent of around 2 to make lower altitudes smoother compared to higher altitude. This step makes the peaks peakier and the plains plainier.
    Use Filter>>Morphological>>Erode with a value of 1 to get rid of a family of single-pixel artifacts that likely came into being during the process.

    What does all of this do? It implements a scale-and-add sequence to perform noise addition and erosion at multiple scales. Doing things at multiple scales is a good approximation to fractal (or wavelet, if that's more your thing) processing. Your brain likes things that have features at multiple scales and this processing loop does that. However, it's extremely easy to get non-plausible results as well. If you don't use enough noise at the lowest-resolution levels, your rivers will run at the angles dictated by the 8-way neighborhoods used in the global processes, manifesting as vertical, horizontal, and diagonal straight lines. Too much incise flow late in the process causes unnaturally steep and tiny canyons. Not using the final morphological operation will result in unnatural detail that looks like a bad lidar image. Not using the exponential gets something that looks like a young volcanic landscape (which may be what you want). There are many, many ways to tweak the basic process above to change the results.

    After you get the basic erosion, consider using Texture>>Other Maps>>River Flow to generate a river mask rather than trying to get "rivers" by chopping steep canyons into the surface.
    Last edited by waldronate; 06-15-2019 at 12:45 PM.

  4. #4

    Default

    Hi Waldronate, thank you very much for your insightful response. I've been trying your workflow this morning and I've encountered some problems that I'll explain to you now. I think that this approach is very useful for what I want to do, because overall the terrain resolution and details are very good. I plan on doing this global method for the basic erosion so I can have well-formed rivers and then I'll edit some pieces of land.

    I have made a coastline mask, and then some more altitude masks for lowlands, midlands, highlands and mountain peaks. However, I haven't used them yet, only the coastline. I'll leave the files here, in case you want them:

    Click image for larger version. 

Name:	heightfield.png 
Views:	74 
Size:	143.3 KB 
ID:	116081Click image for larger version. 

Name:	coastline.png 
Views:	64 
Size:	143.3 KB 
ID:	116085

    These are the steps I did by interpreting your method, I'm sure I commited errors in the process.

    1. Rescale the original heightmap (the one I attached in the thread) to a resolution of 550x266. Then get the coastline mask from there, and all the others.
    2. Open it on Wilbur, and then:

    Quote Originally Posted by waldronate View Post
    a) Select>>Load to load the coastline selection (loading at every resolution lets the system rescale the coast mask to best adapt to the current resolution)
    b) Select>>Invert Selection, set to -1 (this step enforces oceans; setting to more negative values will affect how the coastline enters the sea)
    c) Select>>Invert Selection again to get back to just land selected.
    I loaded the coastine selection, but I don't understand the step b, because there is only Select >> Inverse with no parameter input. What do I need to set to -1? I skipped a, b and c. I'm sure this has caused problems.

    Quote Originally Posted by waldronate View Post
    d) Filter>>Noise>>Wilbur Add Noise with amplitude decreasing at every step: start at around 10% of the total altitude and decrease by half at each step (e.g. 1000 altitude would get 100 at the first step, 50 at the second, and so on).
    When I applied Wilbur Add Noise, I didn't see any meaningful changes in the terrain; as if it did no effect at all. I changed the mean and variance parameters to no avail. Do I need to specify the terrain span at any point? I plan this terrain to have a span of 0-6000. To replace the noise, I used Percentage Noise instead.

    Quote Originally Posted by waldronate View Post
    e) Filter>>Height Clip from 0 to 1000000 to get ride of any pits that might have formed from random noise
    When I do this with the selection, this happens:

    Click image for larger version. 

Name:	2.png 
Views:	32 
Size:	107.5 KB 
ID:	116082

    I guess I need to do it without the selection for it to work. This is likely solved.

    Quote Originally Posted by waldronate View Post
    f) Filter>>Fill>>Fill Basins to reestablish global conenctivity.
    g) Filter>>Erosion>>Incise Flow to chop rivers down into the terrain. Start out aggressive (smaller flow exponent), but ease out with each step (slightly larger exponent, toward 0.6 at the end).
    h) Filter>>Erosion>>Precipiton-Based to smooth out edges from the incise flow.
    i) Surface>>Resample>>Simple with about twice the X Size and Y size (e.g. go from 500 to 1000 at the first step).
    j) Repeat steps a through i until you get to your desired resolution.
    The rest of the steps were easy to follow, and I think I did them well. I did this a total of 6 times, every one resampling the image twice, and the last one resampling by 1'5. I skipped the Filter >> Mathematical >> Exponent because, as you said, I wanted a young landscape. Then I did the Erode step.

    The result is this heightmap:

    Click image for larger version. 

Name:	try 1.png 
Views:	84 
Size:	2.10 MB 
ID:	116086

    Another problem I have encountered is that, when I was editing it, the heightmap looked like this in Wilbur:

    Click image for larger version. 

Name:	Sin título.png 
Views:	134 
Size:	1.14 MB 
ID:	116083

    but when I close Wilbur and open it again, even if I specify the correct span, it looks like this:

    Click image for larger version. 

Name:	3.png 
Views:	72 
Size:	853.3 KB 
ID:	116084


    The problems I can see are:

    -The issues with the selection and noise steps that I explained earlier
    - The jagged coastline and the artifacts inside the terrain. Is this a consequence of using the same low-resolution selection for every step? What should I do? When I try doing the same steps without the selection, the erosion filters do nothing.
    - Some canyons are very steep. It is likely because the last Incise Flow operation was too powerful.

    That's all! Forgive me for the long, image-heavy response, and because I didn't understand many things. How can I improve this?

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

    Default

    I had a typing error in the original post. I edited the post above to add step b1, which should fix the confusing part.
    The weird coastal outline looks to be caused by having the ocean areas selected rather than the land areas. Using step b1 should help fix this problem.

    To see much in the way of noise, you'll need to determine the maximum altitude on your world. This information can be found by using Surface>>Map Info or by using Window>>Histogram. The percentage noise filter adds an amount of noise proportional to the altitude of each individual point (e.g. 10% noise at altitude 10=1, at altitude 100=10, at altitude 1000=100), which make mountains noisier without affecting low-lying areas much. I recommend using Absolute Magnitude Noise (or Wilbur Add Noise) to add a constant amount to each pixel.

    The blocky square coastlines are likely due to not having a high-enough resolution land/sea mask. Your coastline mask should at your intended final resolution to preserve as much data as possible (if you want a map that's 5000 pixels across, your mask should be 5000 pixels across). It might possibly be from using JPEG as an intermediate format somewhere along the line because JPEG is a block-based format and will give those kinds of square artifacts. Use a lossless format like BMP, PNG, or GIF for your masks and make sure that the masks are two colors: black and white. Don't use a smoothed grayscale for coastline masks because they will give a peculiar ridge along the edges of the coastline where the processing isn't fully applied to the terrain.

    If you're using Wilbur and want to exit the program and return to that world later, I recommend using the Wilbur MDR surface file type rather than an image type. Wilbur uses a floating-point format internally for its data, and MDR saves an exact representation of the data as stored internally in Wilbur. Other programs will want other formats (e.g. BMP or PNG), but if you want to reload the file in Wilbur, please use MDR as a working format to simplify your life.

  6. #6

    Default

    I'm back after spending the last afternoon on this! This time, I followed your steps and then did some things by myself to achieve what I wanted. I wanted to upload the MDR file but, apparently, it's too heavy. So I'll upload this instead:

    Click image for larger version. 

Name:	1.jpg 
Views:	284 
Size:	2.63 MB 
ID:	116120

    For everyone who wants to see the results (more or less, because I did my things). Thank you!

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

    Default

    Looks good!

Posting Permissions

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