Can I generate a terrain like this one?

Started by metronome, April 12, 2009, 11:10:42 AM

Previous topic - Next topic

metronome

If it is possible in terragen 2 how would  I actually go about it?
Also the trenches are very point is there a way to produce them in a specific pattern?




Thanks in advance.

zionner

If your talking about carving Trenches into a terrain, I have 2 words for you:

Painted...Shader

kevnar

Apparently this guy is new. You should explain how the painter shader works, or at least reference a tutorial on it.

metronome

Quote from: kevnar on April 12, 2009, 01:20:06 PM
Apparently this guy is new. You should explain how the painter shader works, or at least reference a tutorial on it.

If you are able to point in the right direction of a tutorial I would really appriciate that :)


metronome

So I drew a white line to be my trench, but what do you do with the painted shader to make it actually make a trench in the rock?

Sorry if this is really obvious I only started using terragen yesterday :p

Tangled-Universe

Quote from: metronome on April 12, 2009, 05:48:41 PM
So I drew a white line to be my trench, but what do you do with the painted shader to make it actually make a trench in the rock?

Sorry if this is really obvious I only started using terragen yesterday :p

The painted shader is black and what you draw becomes white. This way you create a mask where black = 0 and white = 1. Anything gray in between is 0-1.
You can paint in two ways: positive masking (where do I want this or that) and negative masking (where do I NOT want this or that).

Although you have painted where you wanted your trenches (=white) it is a bit easier to invert that mask. Why?

You connect the painted shader as a blendshader (blendshader is a shader which acts as a mask, in this case the painted shader) to a powerfractal for example, or any other shader capable of performing displacement. If you apply displacement the white parts of your painted mask, so the trenches, will be displaced upwards.
So the trenches are not trenches but hills/mountains or whatever you name them. You want to have the opposite! So go back to the powerfractal and select "invert blendshader".
This way everything becomes white in the mask, except for your trenches. Et voila!

To exactly reproduce your image you can better use a heightfield as displacement. Then the height of the features is exactly the same everywhere and you can give the terrain the desired size as well. Unfortunately I'm rendering right now so I can't make an example tgd for you, soI hope some of this helps at least. If you have questions feel free to ask.

Martin

Mohawk20

#7
Create a 'displacement shader' node, and plug the output of the 'painted shader' into the 'blending shader' input of the 'displacement shader'. Then open the settings of the displacement node by doubleclicking it and set the displacement value to -500 and see what happens. If nothing happens I probably forgot to mention that the displacmeent shader should be plugged in between the last surface shader and the planet.  ;)

Depending on the size of the terrain and what you painted, the trench might be very deep in which case you should try a smaller value like -100. If the trench is not deep enough, you guessed it, go larger, like -1000.

I hope that helped.


[Edit] Well, TU beat me to it, but I like to think my explanation is simpler.  ;)  You do want to use a displacement shader, and not a powerfractal or heightfield. A powerfractal gives irregular depth, and a heightfield requires extra nodes, which you don't want to have to do when you just started...[/Edit]
Howgh!

Tangled-Universe

I see Mohawk came up with more or less the same explanation.
Except he's working with negative displacements which would be the most easy and straight-forward approach.
Negative displacements should work fine now compared to previous versions.
I suggested to use positive displacement just because I know that it works, but perhaps it was easier to explain it like Mohawk.

Anyhow, with these posts together you should really get going I hope :)

Martin

metronome

Thanks for all the info, just giving it a go now, but it's starting to make alot more sense now :D

Tangled-Universe

Quote from: metronome on April 12, 2009, 06:46:22 PM
Thanks for all the info, just giving it a go now, but it's starting to make alot more sense now :D

Ah great, I thought the two of us were only making it more confusing because of two different approaches.
If you understand the difference between them then you'll probably be fine/comfortable with many of the principles being used in TG2 :)

Mohawk20

Good to know you're not confused by us (yet).
There always more than one way to do something, but as long as you know what the difference is between methods, you should be fine. I tried to explain the difference a bit in the edit of my post...
Howgh!

metronome

#12
Well this is as far as I have got lol, only took the ol' quad core 1 and a half to render.
Me thinks I'm a bit off the picutre above and I could have photoshopped a black line in a bit quicker :p

How do I make it not black, I want some  mud instead :S or something similar to mud (I dunno what a mud like thing could be :P)

Oshyan

I think the displacement is just too deep. If you're using negative displacement (which I assume you are), just make it a smaller value, so perhaps -100 instead of -500. You should also use the Crop Render feature to render a smaller section once you make those changes so you don't have to wait for the whole render to see if the new value is better.

- Oshyan

metronome

I've hooked up the painted shader to a power fractal shader, the colour on the painter is set to 0.5 the displacement on the the power fractal is now set to 43.

OOps I just cleared the painted shader, you need to put a confirm dialog on that and get it to register in the undo list :(

It's kind of getting there, I guess it looks like a groove, is there some trick I can use to get them to look like the pic above or am over simplifying the problem? :)