Can i.. with painted shader

Started by Oona, October 03, 2011, 03:15:24 PM

Previous topic - Next topic

Oona

Hi all!

I have a question about the painted shader.

What I want to do is to paint some terrain with the painted shader. Not color, or any material, no!
I want to adjust the height and depth with it! (like the terrain editor from E-on's Vue)

I tried to connect several shaders, but I did not managed to do it.
I saw one(1) tutorial about painting a canyon on youtube, but it doesn't explain it good enough to understand
what the person exactly did..

Can anyone help me with this?

Thank you.

rcallicotte

Hopefully, I remember this correctly, since I don't see it in front of me. 

Once you paint with the Painted shader, you need to hook it into whatever shader will give you the displacement you want, though I've never tried this.

Is this even possible?  Yoho!  Anyone?  Seems like it should work.
So this is Disney World.  Can we live here?

dandelO

What you want to do here is make your paint shader the blending shader of a fractal terrain shader(make sure you also check the 'blend by' box as well as plugging the node into the fractal terrain node), now, that terrain will appear wherever you put a brush stroke.

It's not really a good idea to use only a painted shader to create the displacement as there is only one brush shape and hand painting detail would take forever, and ultimately will lead to an excessive memory consumption, a bug with the painted shader that multiplies the program slowdown with each brush stroke taken, even when using 'erase mode', as it is actually just painting with black, instead of truly erasing.

Oona

Ok thank you!

I wanted to create sort of valley's or canyons, and I hoped to paint them a little bit.
Any better direction for canyons or valleys?

Hetzen

Nothing stopping you painting a canyon, then painting on the walls.

dandelO

Yes, of course. If you're only interested in making the general shape of the canyon then a painted shader would work fine.
I thought you were looking for a way to paint features onto the ground with different brushes and options, like Vue's terrain editor does.

Tangled-Universe

Quote from: Oona on October 03, 2011, 03:15:24 PM

I saw one(1) tutorial about painting a canyon on youtube, but it doesn't explain it good enough to understand
what the person exactly did..

Can anyone help me with this?

Thank you.

I made that video on youtube and it is part of a NWDA package which offers a complete canyon.
The package contains the same Terragen file I used in that video, so without it the video is of no use to anyone. Deliberately.

However, the principle of how to paint a canyonshape is not too difficult and I'll try to explain briefly:

In your default scene go to the terrain tab, choose create terrain and then choose simple shape shader.
Inside the simple shape shader select square shape and give it whatever size you need, depending on the scale of the canyon.
Enable displacement and set the displacement factor to the value of your maximum canyon height. Say 200 for 200m maximum height.

Create a new camera and put it on the same position as your painted shader.
Set the camera altitude to something like 5-8km altitude and have it look down 90 degrees on the simple shape shader.
This is the camera you use for painting.
Make sure the preview uses this camera.

Create a paint shader and with white strokes paint where you want your canyon. For the first time, just try a simple S-shape.

Connect the paint shader to the blend shader port of the simple shape shader, as some others already pointed to.
Inside the simple shape shader make sure the blend shader is activated and that it is inverted. Very important!
Now the simple shape shader will displace the square shape 200m upwards, except where the white paint shader is, since you inverted it.
The advantage of creating a depression in a 200m tall structure is that the bottom of the canyon won't go below 0m.
You could also use a paint shader and displace that down on your default planet, but then you would need to use negative altitude things for everything which just doesn't work very nicely.

You now have an S-shaped depression which you can use as a base for your canyon.
You can play with the paint shader brush size and drop-off to control the steepness of the depression/canyon.

After you're satisfied with the shape you can compute the terrain and start adding more displacements, like redirect shaders and stretched fractals for instance to get interesting rock shapes.

"That's it" in a nutshell.
Good luck and let us know how it goes.

Cheers,
Martin

Oona

Hi, and thanks all for all the replies.

Martin, thanks for the small tutorial! I will seriously look into it and show the result!

At the moment i'm playing with some photoshop made road tracks, I managed to get the image on the right place,
now I need to figure out how to apply a heightfield on the terrain (not color, but like real tracks, 1cm pushed in to the ground).

I will open a new topic on that one!


rcallicotte

So this is Disney World.  Can we live here?

jo

Hi dandelO,

Quote from: dandelO on October 03, 2011, 04:22:19 PM
even when using 'erase mode', as it is actually just painting with black, instead of truly erasing.

Just to clarify, the painted shader doesn't paint "black" when it's erasing. It actually paints "nothing". You can paint black strokes and that's not the same as erasing.

You're correct that you're painting another stroke when you're erasing instead of truly erasing. An erase stroke basically stops any strokes that it covers from showing.

If you want to erase a whole lot of a painted shader it might be more efficient to clear the painted shader and start painting again.

Regards,

Jo

bobbystahr

Quote from: jo on October 05, 2011, 12:45:14 AM
Hi dandelO,

Quote from: dandelO on October 03, 2011, 04:22:19 PM
even when using 'erase mode', as it is actually just painting with black, instead of truly erasing.

Just to clarify, the painted shader doesn't paint "black" when it's erasing. It actually paints "nothing". You can paint black strokes and that's not the same as erasing.

You're correct that you're painting another stroke when you're erasing instead of truly erasing. An erase stroke basically stops any strokes that it covers from showing.

If you want to erase a whole lot of a painted shader it might be more efficient to clear the painted shader and start painting again.

Regards,

Jo

hee hee...0(nothing)=Black in Terragen...sorry Jo, couldn't help myself .  ..   ...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

jo

Hi Bobby,

Quote from: bobbystahr on November 04, 2011, 12:24:27 PM
hee hee...0(nothing)=Black in Terragen...sorry Jo, couldn't help myself .  ..   ...

Generally speaking you're right, but there is a difference :-). You can paint coloured strokes with the painted shader. A black stroke is really not the same as erasing. In some situations it might give the same the result but in others it could make a difference.

Regards,

Jo

bobbystahr

Quote from: jo on November 07, 2011, 01:42:52 AM
Hi Bobby,

Quote from: bobbystahr on November 04, 2011, 12:24:27 PM
hee hee...0(nothing)=Black in Terragen...sorry Jo, couldn't help myself .  ..   ...

Generally speaking you're right, but there is a difference :-). You can paint coloured strokes with the painted shader. A black stroke is really not the same as erasing. In some situations it might give the same the result but in others it could make a difference.

Regards,

Jo
actually jo, I've done some tests painting with a sort of gradient approach[white, 3 greys, and black] but the resource necessary to pull one off has so far choked ole slow poke 64...I will persevere though as it was starting to show promise .  ..   ...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

jimmahbee

I'm a total noob so please forgive my ignorance. I too was looking for a way to make canyons but I just went to Terrain...Heightfield generate...'add operator' and selected 'Heightfield-make river'. I then placed the camera super high in the atmosphere,pointed it down and copied the coordinates for where I wanted the canyon to start and end and and made the beginning altitude for the river -400 and the ending altitude -400 and it did exactly as I wanted it to...am I missing something cuz it was easy...? P.s. Terragen classic has a really easy painter to create heights and valleys...didn't they put that in Terragen 2 as well?

bobbystahr

must be a very old version you're using as Make River disappeared a few versions back IIRC
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist