A Few New Things About Wilbur

This post is just a quick aside about a few things I noticed about Wilbur while working on my last post.

The conventional rendering style on Wilbur.

• Typically, when I want to show hillshade on land, but not on the water, I go through a somewhat involved procedure. First, I save a seamask for the surface I’m working on. Then I load a copy of the fully unshaded surface image(Texture>Shader Setup… General tab and in Display Type pulldown select “Height Code”), and load that into Photoshop. Finally, I create a fully shaded surface image by selecting “Lighted”. I load the shaded image as a layer above the unshaded layer and use seamask as a layer mask for that. Not horribly complicated, but I’ve learned an even quicker, simpler method.

Open the Shader Setup… window under the Altitude tab. In both the the Land and Sea areas, there is a text field labeled Opacity. By default, this is 0, But if you set it to 1, the shading for that part of the map will be altogether hidden. You can also select values between 0 and 1 to tone down the hillshading without eliminating it altogether.

The Photoshop methodology may still be somewhat more flexible. Best of all, if you save a copy of the Lighted map with a straight white background and composite it in separately in Photoshop. Still, this provides a quick method with good results. It also makes the Wilbur feature set just marginally more in line with Fractal Terrains.

Altitude shading is completely obscured over water when the opacity in the Sea section is set to 1. No Photoshoppery involved.

• For temperature, I used a very loose approximation of insolation. I should have taken the fourth root of that, e.g. sqrt(sqrt(cos(asin(y)))) rather than cos(asin(y)). Unfortunately, this causes a very narrow band of maximum values on the southernmost edge of the map. These should all be minimal values(-1 on a -1,1 scaling). This is frustrating. Am I doing something wrong in my setup or is it a bug in the program? I dinnae.

• As a second, and ultimately better and more flexible method for generating temperature(and hopefully precipitation and other) models, I tried using Mathematica and Matlab/Octave. Unfortunately, most of the high-bit export formats available to these are not importable by Wilbur. Even .mat, which Wilbur has, is not portable with the versions of .mat exportable by my version of either of those apps. Unfortunate. I might have to convert with gdal.We’ll see if I can make this work…

• While fBm, Ridged Multifractal, and to a lesser degree Heteroterrain all work perfectly well with the default settings of H=1.0, Lacunarity=1.9, Offset=1.0 and fgain=2.0, the other fractal types in the Calculate Height Field filter are less successful. After a lot of experimentation, I found that H=0.5, Lacunarity and Offset=2.1, and fgain=1.5 worked quite well for Multifractal. This was a  particularly finnicky fractal by the way. I had a hard time finding settings that worked well.

This is the Multifractal type with H=0.5, Lacunarity=2.1, Offset=2.1 and fgain=1.5. The texture also has a reduced shading on the sea areas(Opacity=0.9).

Next, for the Hybrid Multifractal, I used parameters given by Doc Mojo himself. H=0.25, Offset=0.7.

This is the Hybrid Multifractal type as generated with Musgrave’s preferred settings. Not bad, but not great.

Because of the small value of H, there seems to be little spectral variability. It makes for a somewhat different effect than I’m used to, but it adds another tool to the kit.

It should be noted that not all of the height field generator types use all of the parameters. fBm uses only H, lacunarity, octaves, random seed, sphere center or position(which can be used to alter the specific appearance without changing the random seed), sphere radii or size(which determines the base spatial frequency of the fractal), scaling(which determines the range of heights produced by the fractal function), spherical evaluation(which determines whether the fractal is generated on the 3d surface of a sphere or a 2d planar surface), spherical area(which determines what slice of the spherical surface is covered by the 3d generator) and sphere axis(which… seems to do… nothing…). These parameters are all used by all of the generator types except recursive subdivision(plasma) and math function(neither of which are covered here).

Heteroterrain, which is described on page 500 of Texturing and Modeling-A Procedural Approach, 3rd edition(I can’t seem to find an available version on the internet…) as Statistics by Altitude. To quote Musgrave,”The observation that motivated my first multifractal model is that, in real terrains, low-lying areas sometimes tend to fill up with silt and become topographically smoother, while erosive processes may tend to keep higher areas more jagged. … We accomplish our end by multiplying each successive octave by the current value of the function. Thus in areas near zero elevation, or “sea level,” higher fre- quencies will be heavily damped, and the terrain will remain smooth. Higher eleva- tions will not be so damped and will grow jagged as the iteration progresses. Note that we may need to clamp the highest value of the weighting variable to 1.0, to pre- vent the sum from diverging as we add in more values.” This one adds an Offset parameter.

Hybrid multifractal is described in the above book(also starting on page 500, as,”My next observation was that valleys should have smooth bottoms at all altitudes, not just at sea level. It occurred to me that this could be accomplished by scaling higher frequencies in the summation by the local value of the previous frequency… Note the offset applied to the noise function to move its range from [−1, 1] to something closer to [0, 2]. … You should experiment with the values of these parameters and observe their effects.” Again, this one has an Offset parameter. It displays heterogeneous terrains(surprise): flat plains, foothills and jagged mountains.

Ridged multifractal is described as similar to the previous hybrid multifractal. It uses the offset parameter, but also an additional gain parameter(fgain in Wilbur). The parameters given by Musgrave are the same as the default parameters(H:1, offset:1, gain:2), not surprising as Ridged Multifractal is the default type for the Height Field Calculator.

Multifractal is described as a “multiplicative multifractal”. At the time Texturing and Modeling, 3rd edition was published, it was not well understood. It uses all of the fBm parameters, of course, and also offset. Although, I can’t find gain in Musgrave’s description or the code he presents, fgain does appear to have an effect in the Wilbur version of Multifractal. I can’t pretend to know why…

All of the fractal functions can produce good results, but many are very sensitive to exact settings, and for some the default settings are simply awful. They’re all definitely worth a bit of playing with.

I have in the past suggested that when trying to paint fractal effects into specific locations(generally using selections), it’s best to use homogeneous fractals(notably fBm). I’m not entirely convinced of this anymore. If the base frequency and scaling is chosen, heterogeneous fractals can add quite a bit of interest and “pizzazz” to your mountain regions and other terrains.

Hopefully, these notes will prove useful.

Thank you,
The Astrographer

This entry was posted in Mapping, World Building and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s