Terrain control...can it be more?

Started by archonforest, September 14, 2013, 01:14:28 AM

Previous topic - Next topic

archonforest

Is there any trick in TG2 how to get the terrain look more under control? Like how about I want that mountain be higher but not touch the rest of the scene? Right now I generate a heightfield and it is a lottery what comes up. In TG0.9 I could make specific places higher or lower as far as I remember.
Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram, GTX 1080
Amiga 1200 8Mb ram, 8Gb ssd

choronr

You can add 'heightfield adjust vertical' to your liking. Have you tried it?

archonforest

Not yet....there are so many options in TG2 and I am just exploring...
But I will try for sure. Thx for the hint ;)
Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram, GTX 1080
Amiga 1200 8Mb ram, 8Gb ssd

Oshyan

The Painted Shader can basically do exactly what the (actually rather limited) tools in Terragen Classic (0.9) could do, and a lot more. To get started I suggest this simple workflow:

1: In the default scene, on the Terrain layout, at the top of the node list on the left, click Add Terrain -> Displacement Shader -> Displacement shader.
2: Open settings of Displacement shader, easiest by clicking the node in the list on the left and the settings come up underneath
3: Click the button with the green + and a small > arrow to the right of the "Function" field
4: Create New Shader -> Color Shader -> Painted Shader
5: Click the paint brush icon in the toolbar at top of the 3D Preview, select Start Painting Shader and then choose the shader you just created, probably "Painted Shader 01"
6: Now you're in painting mode.

I suggest opening the Painted Shader settings so you can have more control. From the default view it might be best to use a view-relative brush; this way it will have a small size close to the camera and a larger size further away. The reason I suggest this is you're close to the ground in the default scene so the large default brush size of 1000 (meters) will quickly cover the entire area close to the camera. It's often useful to have a fixed brush size, but for this quick demo do try view-relative I'd say.

7: Anyway, do a little painting now, click in the 3D preview and drag around (on the terrain; avoid painting on the sky :D). You'll see white show up where you're painting.

If you stop painting for a moment and let the 3D preview refine, you might even notice there's a little height to it. That's because this Painted Shader is feeding into a Displacement Shader, causing displacement on the terrain in the shape of your paint strokes.

8: To get a more pronounced effect, go into the Displacement Shader settings and change Displacement Multiplier to something higher, like 10. Now look what you've got!

If it has gone as well as it has for me, you've got a terrain sculpted a bit in the foreground, and maybe even on the background mountains too.

9: Now let's say you aren't happy with some of what you did. Erase strokes! Click the Paint Brush icon again and choose Eraser Mode, then paint over some of the areas you covered before. Note how you're now removing "paint" instead of adding it.

10: For finer control, be sure to go back to the Painted Shader settings and look at Flow, Brush Falloff, and again the brush size parameters.

You can zoom out the camera, switch to an Absolute brush size, and then paint more controlled features. In the default scene I still find the default of 1000 meter brush size to be too big. Maybe 100 m is better. Or perhaps 200.

You also may find the 3D preview doesn't update quite as fast as you want for interactivity. This is something we're working on. In the meantime once you get a good sense of how the displacement will work, you can let the preview update to max detail (it will say "Finished Rendering" at the top of the 3D preview) and then Pause it, do some painting without having to wait for it to update, and then unpause it. It won't update while it's paused of course, but it lets you paint at max detail and does show your paint strokes in color (default to white, you can change the color though!), and then when you unpause you can see the displacement effect. It works better when you're painting for other purposes...

11: Be sure to click the Paint Brush icon one last time when you're done and select Stop Painting.

Now your preview will return to normal and you can see what you've accomplished. If all went well, you've got displacement painted on your terrain! You can do this with a flat planet, or paint detail or shapes onto any terrain. Use larger brushes to rough out large patches, then smaller ones for detail. And the best part is at the end you can apply additional displacement and effects to get rid of the "hand painted"/lumpy look. Also a good trick is to use lower Flow values with large brush sizes and Brush Falloff values to slowly build up terrain shapes and avoid the lumps by blending them together better.

Last but not least, as I mentioned you can use this for other things. You can paint masks for populations or surface maps, you can even paint color straight onto the terrain. Follow the same steps as above, except do it in the Shader layout, Add Layer -> Colour Shader -> Painted Shader, then change the color to Red or something. Be sure to select the right Painted Shader when you enter painting mode (if you followed the steps above linearly, you'll have two; the one in Surfaces is Painted Shader 02). Then paint the terrain red. Woo! Hehe.

I hope that's helpful. :)

- Oshyan

archonforest

Holly Moses...what a cool write up man!!! 8)
Thx a lot in the name for all newcomers!

Also big thx for choronr! I tried the 'heightfield adjust vertical' what u suggested and a new world opened up for me!

Man I love this forum! Best ever I ever been :D
Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram, GTX 1080
Amiga 1200 8Mb ram, 8Gb ssd

Dune

If you have a drawing software, you can also draw your height map there. Like this sickle dunes map I made a while ago for testing (saved as png for post sake). Start with a black square of at least 1x1k px (16-bit grayscale works best), and use soft gray/white brushes. Import the image in an image map shader, set size and location you want and either use internal displacement, or feed through a displacement shader, or plug into surface shader as mask and use offset, or feed into the displacement shader of a surface shader.....

archonforest

Now we talking about FULL control man! Thx Dune :D
What you wrote is a bit above my understanding but I can see the freedom in there. I definitely saved the hint u wrote coz I can see it is great and will figure out meaning of the last sentence :D
Thx again dude ;)
Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram, GTX 1080
Amiga 1200 8Mb ram, 8Gb ssd

lat 64

#7
Yes, great tut!
I knew a bit of this about the painted shader for other stuff, but I never used it for terrain. This opens a whole new world for me (bad joke, I know)

Just be careful. You might crack open some netherworld.
See what happened to me when I tried it.:o
I'm a half century plus ten yrs old. Yikes!

archonforest

U cracked open the pits of hell...
this is how the Doom started :D
Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram, GTX 1080
Amiga 1200 8Mb ram, 8Gb ssd

choronr

It would be nice if you could cut a trench using Oshyan's method above.

Oshyan

Quote from: choronr on September 16, 2013, 01:58:18 AM
It would be nice if you could cut a trench using Oshyan's method above.

You can. Just set the displacement multiplier to a negative value in the Displacement Shader.

- Oshyan

jo

Hi,

There is an example project using the Painted shader to create displacement on terrain in the Painted shader guide:

http://www.planetside.co.uk/wiki/index.php?title=Painted_Shader_Guide

Regards,

Jo

choronr

Thanks Oshyan. Had some thoughts of trying the methods you've described on a project I'm working on.

lat 64

Sorry I did not explain my methods. I was too excited with the results ;D

The big hole (a short trench really) in my picture posted above is made with a negative multiplier in a new displacement shader as per Oshyan's tut. I set it to -20.
I blended a color shader as well to the same painted shader and made the orange glow with it. I put a light source down in the hole to add to the glow a bit.

I did this just because I got a new tool to practice with. I bet with a couple of these one could make his own crater preset.

So much is finally clicking in my feeble head now. Must... focus...need .. more...... beer

Russ
I'm a half century plus ten yrs old. Yikes!

choronr

Beer is a good thing! Helps me keep my weight down.