Planetside Software Forums

General => Terragen Discussion => Topic started by: rcallicotte on November 20, 2008, 11:28:05 AM

Title: Painted Shader and Water
Post by: rcallicotte on November 20, 2008, 11:28:05 AM
Has anyone figured out a way to use the Paint Shader and create a river?  I thought if I could just get a Density Shader input into the water itself, fine.  But, there is no such thing nor any such way.  Yet.

Any ideas or success?
Title: Re: Painted Shader and Water
Post by: PG on November 20, 2008, 11:50:49 AM
It was one of the first things I tried. Trouble is. The water shader doesn't have the capability to add a blending shader, nor is there any way to control the lake object in that way. The only way I think you could do it would be with a second terrain like DandelOs waterfall.
Title: Re: Painted Shader and Water
Post by: rcallicotte on November 20, 2008, 11:59:23 AM
I also figured out that if I create a thick jungle of trees (via population) and then use the paint shader on these, then invert it, I can put the water over this area and only the water shows through in that invert-painted area.  Everywhere else - just trees.

Title: Re: Painted Shader and Water
Post by: PG on November 20, 2008, 01:46:40 PM
Yeah, that's a good way of doing it.
Title: Re: Painted Shader and Water
Post by: Mohawk20 on November 20, 2008, 04:58:40 PM
I used a simple solution in my Hanging Valley project (see the renders in this post for the river: http://forums.planetside.co.uk/index.php?topic=5124.msg53804#msg53804 ).

Painted the river, attached as function to a displacement shader with a displacement multiplier setting of -200. That cuts the river out of the landscape, and you just use a lake at the right altitude to fill it up.

But you can also plug the painted shader in as blendshader of a surface layer that has a water shader as child. That worked a bit for the early renders of the hanging valley waterfalls/river.
Title: Re: Painted Shader and Water
Post by: PG on November 20, 2008, 05:39:28 PM
I think I may have asked this before but is there any way to use the painted shader at any other rotation? If you do anything with the shader as it is then everything is done horizontally.
Title: Re: Painted Shader and Water
Post by: old_blaggard on November 20, 2008, 05:44:26 PM
If you're asking for projection options, (like plan Y, plan X, etc.) then you can find them in the painted shader's "Transform" tab.
Title: Re: Painted Shader and Water
Post by: PG on November 20, 2008, 06:18:02 PM
Hmm. tried it but it didn't do anything. Basically, you ever seen pictures of a comet? They have the ice and stuff just in front of the comet being blown back in a convex shape. I know you can't rotate the lake object, not yet at least, but you could do it on terrain. Trouble is you can only seem to dig straight down into the terrain, or you use negative displacement to go upward. there's no horizontal displacement. Would the techniques used in renders like climbing the chimney work?
Title: Re: Painted Shader and Water
Post by: Mohawk20 on November 21, 2008, 03:29:58 AM
Yes you can, or in the side of a hightfield without border blending: http://forums.planetside.co.uk/index.php?topic=5133.msg53140#msg53140
Title: Re: Painted Shader and Water
Post by: rcallicotte on November 21, 2008, 09:28:45 AM
Brilliant!  This Painted Shader has changed everything!

Thanks Mohawk, O_B, and PG.  This has all helped collectively and I'm ready to experiment more.  I'm combining the trees with the cut river...this is just a beginning.  What I need is Amazonian type trees... 

woohoo!!!
Title: Re: Painted Shader and Water
Post by: Mandrake on November 21, 2008, 04:38:22 PM
Calico see my response to the thread below, it contains dandelo's no frills painted shader river.
http://forums.planetside.co.uk/index.php?topic=5157.0
Title: Re: Painted Shader and Water
Post by: FrankB on November 22, 2008, 06:35:23 AM
I'm using the painted shader as a mask for a regular surface layer, then attach the water shader as a child. This way I painted the little stream onto the ground in my WIP project "down below". Easy.
As long as your painted mask follows the terrain elevation somewhat correctly, it should look ok. That way you don't need a lake object, and also can paint rivers that flow down a slope. It's not 100% optimal though, you may not want to allow a too close look at its borders.

Frank
Title: Re: Painted Shader and Water
Post by: rcallicotte on November 22, 2008, 05:07:49 PM
Thanks Mandrake, dandelO and Frank.  I'm learning a lot of cool things we can do with this shader.
Title: Re: Painted Shader and Water
Post by: rcallicotte on November 22, 2008, 06:17:54 PM
Frank, how did you paint your river this way?  Did you use the defaults of the Paint Shader or change anything?  I setup the Blended Shader fine, but couldn't get all of the river to shine through.  I wonder if it has something to do with the Absolute or View Relative brush or maybe some setting under Coordinates on the Transform tab.
Title: Re: Painted Shader and Water
Post by: FrankB on November 23, 2008, 05:46:42 PM
Quote from: calico on November 22, 2008, 06:17:54 PM
Frank, how did you paint your river this way?  Did you use the defaults of the Paint Shader or change anything?  I setup the Blended Shader fine, but couldn't get all of the river to shine through.  I wonder if it has something to do with the Absolute or View Relative brush or maybe some setting under Coordinates on the Transform tab.

I'm not at my computer at the moment, but can look that up tomorrow. However, if i recall correctly, I haven't done anything in particular, other that what I described. Maybe, which I haven't mentioned before: I have used a hard brush (no soft borders).
I'm also not sure what you mean with the river not shining through. Shining through what?

Title: Re: Painted Shader and Water
Post by: rcallicotte on November 23, 2008, 07:40:20 PM
Frank, I have since tried another way to do this by using a Displacement Shader with the Paint Shader, but if you can think of anything different about your idea than what was mentioned here, I'll try it. 
Title: Re: Painted Shader and Water
Post by: dandelO on November 23, 2008, 08:40:08 PM
Here's a river.tgd I made a couple of weeks ago for someone else, Calico.
It uses the painted shader as the base to build the rest of the scene on. The water will only render where the river shows, not beneath the terrain. :)

[attachimg=#]

[attachimg=#]

* Please excuse the low quality preview*
Title: Re: Painted Shader and Water
Post by: rcallicotte on November 23, 2008, 11:04:39 PM
I didn't think about using a plane.  Did Frank say something about a plane...am I missing something?

Thanks DandelO!
Title: Re: Painted Shader and Water
Post by: FrankB on November 24, 2008, 03:05:52 AM
[attachimg=#]

Here's the river the way I painted it. I'm also attaching the tgd.
You can see I have painted too fast: in the foreground, you still see the round shapes of the brush.

Hope that helps,
Frank

Title: Re: Painted Shader and Water
Post by: jaf on November 24, 2008, 04:30:34 PM
I guess this is a good place for me to ask this question.  I tried searches to find the answer with no luck. And I couldn't find any documentation.

I wanted to play with the Painted Shader.  I downloaded a few scenes that use it and saw the "painted" image to make a river.  I read a message with some painted shader tips.  But I can't paint!

I click on the button to open shader preview in a new window and let the render finish and expected to be able to paint in that window.  Nothing happens.  I have enable checked.  I can't figure out how to do the actual painting.

I know I'm going to feel like a real dummy when I find out what I'm doing wrong (or not doing.)  Any hints?
Title: Re: Painted Shader and Water
Post by: PG on November 24, 2008, 04:41:28 PM
Shader preview? Do you mean 3D preview? If so, I just tried it and it works as you can see in this screenshot.
Title: Re: Painted Shader and Water
Post by: Mohawk20 on November 24, 2008, 05:26:07 PM
Yeah, as PG's screenshot shows, you have to use the 'B' button (B for brush) above the preview to start painting.
Title: Re: Painted Shader and Water
Post by: jaf on November 24, 2008, 05:43:31 PM
Thanks.  That was it -- I didn't notice the "B" button.

PG, the button on the Painted Shader (top far right) is called "Open shader preview in new window".  That window also has the "B" button.
Title: Re: Painted Shader and Water
Post by: PG on November 24, 2008, 06:07:00 PM
Ah I see. That's just previewing the result of the shader through a "Virtual" camera, so you'll have to adjust that camera to be over the position that you want the mask to be. It's generally easier to do this in the 3D preview because you can see where you are more easily. Just move the camera to the area you want to paint so you can be more accurate then snap the camera back to where it should be afterwards with the select different view camera button then current render camera.
Title: Re: Painted Shader and Water
Post by: al91 on January 03, 2009, 10:53:51 AM
Quote from: FrankB on November 24, 2008, 03:05:52 AM
[attachimg=#]

Here's the river the way I painted it. I'm also attaching the tgd.
You can see I have painted too fast: in the foreground, you still see the round shapes of the brush.

Hope that helps,
Frank


like the previous qn.how did u make the river somehow reflect or shine? any tips? :)

and the river looked as if it has ripple
Title: Re: Painted Shader and Water
Post by: rcallicotte on January 03, 2009, 06:22:56 PM
He included the TGD.

Quote from: al91 on January 03, 2009, 10:53:51 AM
Quote from: FrankB on November 24, 2008, 03:05:52 AM
[attachimg=#]

Here's the river the way I painted it. I'm also attaching the tgd.
You can see I have painted too fast: in the foreground, you still see the round shapes of the brush.

Hope that helps,
Frank


like the previous qn.how did u make the river somehow reflect or shine? any tips? :)

and the river looked as if it has ripple
Title: Re: Painted Shader and Water
Post by: al91 on January 04, 2009, 03:29:33 AM
hmm i know but i cant seem to reproduce it  :-[
Title: Re: Painted Shader and Water
Post by: rcallicotte on January 04, 2009, 08:54:18 AM
The ripples are painting too fast with certain settings.  It's like a smudge.

Quote from: al91 on January 04, 2009, 03:29:33 AM
hmm i know but i cant seem to reproduce it  :-[
Title: Re: Painted Shader and Water
Post by: al91 on January 04, 2009, 10:10:58 AM
yes. but i cant seem to make the river reflect light like his did  :-\
Title: Re: Painted Shader and Water
Post by: dandelO on January 04, 2009, 10:19:34 AM
You do have a water shader in there, shading the surface that the painted shader is describing?

I usually make the water layer a normal surface layer(no colour applied). I use my river mask in a default shader's opacity function that feeds into the surface layer input. The water shader is then set as a child layer...

[attachimg=#]