Creating a certain shaped map

Started by Abyssinian02, February 22, 2014, 07:20:51 AM

Previous topic - Next topic

Abyssinian02

Hello everyone,

I just got myself Terragen 2 and I love it. I followed some of the tutorials out there on youtube, but I couldn't find what I really wanted to do so I figured I'd ask here. All these tutorials are randomly generated landscapes, but I want to create a certain shaped map. For instance, something like this:


How would I go about doing that? I've been working with 3ds max and photoshop for ages now, so if that helps I could do something in there. Are there any tutorials on this or does anyone have some advice on this?

Thanks in advance!!

kaedorg

Just to give you an idea

It took 5 minutes. Use 4 Surface layers with altitude constraints.
Camera at high altitude with X rotation at -90.
Sun elevation 90 and cast shadows off.

Of course you can add more detailed layers to make more details

David

Abyssinian02

I get what you did, but I meant getting a certain shape. How would I go about getting that? Say if I wanted to have an island shaped like a tree.

kaedorg

You can use painted shaders to shape as you wish.

On this quick example, I just use 4 surface layers  and only use altitude constraints.
Adding more can do it.

And you can use an image map shader too

I think there are many ways to get  the shape you want

David

PabloMack

#4
Quote from: Abyssinian02 on February 22, 2014, 09:24:54 AMI get what you did, but I meant getting a certain shape. How would I go about getting that? Say if I wanted to have an island shaped like a tree.

An island is just increased altitude above the ocean floor. Create a monochrome map where "high" is white and "low" is black. The intermediate altitudes are gray scale. Use this as a height field. Adjust the level of the ocean so that the high parts of the island are above sea level and low parts are below it. The fractal terrain shaders will add in smaller details to make it look realistic.

jaf

#5
You can use Photoshop or a similar program and switch the colors.  As Pablo mentioned above.  The render below was a "quick & dirty" attempt to replicate the terrain shape.  I screen copied your map and using the erase and wand tools in Photoshop to take out the text and get the water area black.  Then changed some of the elevation to white/gray scale values and saved as a bmp to use in a heightfield load in TG.   

I didn't spend much time at all -- maybe 10 minutes, but I think it shows you can get a good starting point.  You can see where the red dotted lines are.  I just used a couple colors but you can take out the dotted lines, paint in details, and use a power fractal.

(04Dec20) Ryzen 1800x, 970 EVO 1TB M.2 SSD, Corsair Vengeance 64GB DDR4 3200 Mem,  EVGA GeForce GTX 1080 Ti FTW3 Graphics 457.51 (04Dec20), Win 10 Pro x64, Terragen Pro 4.5.43 Frontier, BenchMark 0:10:02

Hetzen

You could consider creating a blurred bitmap of each feature to use as blending masks on separate PF chains. Each chain describing each feature.

To save ram, try putting each mask into an rgb channel.

Abyssinian02

I made a .jpg height map by changing the map into a black and white (I'll add the grey and details so I get mountains in later) like you guys said, which is easy. But then I tried applying it and it didn't seem to work. Could you guys please elaborate on that a little more?  I attached as to what I tried but then the land stayed flat.

PabloMack

The way I have done it is to input a "Heightfield Load" node (which references the image map) into a "Heightfield Shader" node. This all has to be inline to the Compute Terrain node. A limitation of this method is that one pixel in your image is scaled (hard-coded) to one meter in your heightfield horizontal distance. There is also a displacement map method which I have never done myself. jaf's results are stunning.

Dune

#9
Attach the image map shader output into compute terrain, but don't forget to set its displacement, plane (Y) and size (same ratio as original file)! You can also attach image map shaders to surface shaders (child, or mask input). In the latter the white will be your mask, in the former you can use the displacement tab.
JPG is not the best option, as you may get compression artifacts showing up. I mostly use tif.

Oshyan

The short answer as to why your version isn't working is it's using Through Camera Projection but with no camera specified (switch to Plan Y), and the size is only 1x1 meter (the default for the Image Map Shader in the current public release; the next version will have a more intuitive default), and because Displacement is probably not enabled. Change the projection to Plan Y and the size to something like 1000x1000 (this is in meters) and you should see your image. As I mentioned, the next version will have better defaults.

You can use Pablo's method, it's a more direct route to getting height from it, but you may also or instead want to use your image as a mask instead of direct height, for which an Image Map Shader is useful. IF you use Pablo's method with a Heightfield Load node, then you can resize the heightfield easily if desired using a Heightfield Operator (added using the button below the Node List on the left in the Terrain layout, when your Heightfield node is selected).

Using an Image Map Shader would be more versatile as you could indeed enable Displacement, as Dune suggests (on the Displacement tab), and then get height out of it (the Displacement Multiplier is basically going to be your height in meters), and you can easily change size directly using the Size settings in the node itself without adding any additional resize node (again the size is measured in meters).

You could also use the same shader as a mask for other displacement shaders such as an Alpine Shader for craggy mountains, or a Power Fractal. The reason I say you may not want to use the image file directly as displacement is because your shape is going to be extremely simple and not realistic, it will turn out looking smooth and lumpy if used directly. If you instead use it to mask a noise function that is creating displacement, you'll get more natural variation. Unfortunately it's quite difficult to get the noise function to directly follow your input image, it is simply being masked by it, so it will have the same basic shape, but high (white) areas will not necessarily be high (i.e. if the "high" area in part of your input mask image happens to correspond to a "low" area in the fractal terrain you're masking). But it's certainly worth trying.

- Oshyan

Abyssinian02

Alright, first off I'd like to thank everyone here a helluva lot for all the help. I managed to do what I wanted due to all the help you all gave me. So kudos to you all for being an awesome community!

There is still one small thing that I'd like some help on. In my heightmap I've used a gradient to make sure I have a smooth transition of height levels, however, in the final render it looks like this (see attachment). How do I smooth this out?

I tried messing around with the following settings but so far to no avail.
My settings:
Heightfield shader:
- Add fractal detail is on
- Fractal amount: 0.5
- Fractal scale adjust: 1.05
- Fractal variation: 1.5
- Fractal roughness: 0.125
- Fractal flow power: 0

Heightfield load:
Number of points: 50000 50000
Size in meters: 10000 10000
XY size: 4500 3000

Dune

Do you have smooth interpolation checked?
And what bit size is the image? 8-bit tends to be a lot more like this than 16-bit, which has more levels of gray.

Abyssinian02

#13
I don't where I can find smooth interpolation so I can't check. And it's an 8 bit image.

Edit: I have a Heightfield shader applied, not an Image map shader so I can't check that. I did try changing the Interpolation method from Catmull Rom to Over smooth. Helped a little, but not enough.

Oshyan

The problem is 100% due to the limitations of an 8bit source image, which will only have 256 possible levels of "height" value in it. I would strongly suggest using a 16 bit (or higher) source image if possible.

- Oshyan