Planetside Software Forums

General => Terragen Discussion => Topic started by: N-drju on June 23, 2017, 06:58:50 AM

Title: Merge shader, or something else?
Post by: N-drju on June 23, 2017, 06:58:50 AM
So I've got two painted shaders named ROADS and TOWN.

TOWN is a painted area where building populations are to be "planted", while ROADS... yeah, you guessed it.

Question: How can I use the TOWN shader to mask the building population and at the same time exclude the ROADS shader from its coverage? Obviously, you don't want houses popping up in the middle of the main street...

I tried to merge both painted shaders via merge shader but, believe it or not, regardless of what option I chose and how I arranged both shaders I ended up with populations limited to the streets only... The TOWN shader was completely disregarded, whether it was difference, subtract or screen mixes...
Title: Re: Merge shader, or something else?
Post by: Hannes on June 23, 2017, 07:53:58 AM
You can use a distribution shader or a simple surface layer with color turned off.
Use your first painted shader as breakup shader, set coverage to 0.5, and fractal breakup (the value below) to 1. Then use the other painted shader as mask shader. Maybe you'll have to invert one of them.
Title: Re: Merge shader, or something else?
Post by: Dune on June 23, 2017, 08:05:52 AM
Or use a (blue node) subtract node, and subtract the road mask from the town mask. Or add the town mask as child to an empty surface shader, inversely masked by road shader. Plenty ways.
Title: Re: Merge shader, or something else?
Post by: René on June 23, 2017, 09:05:40 AM
Quote from: N-drju on June 23, 2017, 06:58:50 AM
So I've got two painted shaders named ROADS and TOWN.



I tried to merge both painted shaders via merge shader but, believe it or not, regardless of what option I chose and how I arranged both shaders I ended up with populations limited to the streets only... The TOWN shader was completely disregarded, whether it was difference, subtract or screen mixes...


Maybe this is a silly remark, but I assume you merged the color and NOT the displacement. It happens to me occasionally... :)
Title: Re: Merge shader, or something else?
Post by: bobbystahr on June 23, 2017, 09:06:58 AM
They got the ones I have used
Title: Re: Merge shader, or something else?
Post by: N-drju on June 23, 2017, 09:23:35 AM
Wow, thanks for a reliable and quick support guys!

@ René - Does it make a difference? I must admit I did uncheck the displacement, since I understood the object masking is a black-and-white color business...? :)
Title: Re: Merge shader, or something else?
Post by: René on June 23, 2017, 09:50:57 AM
No, if the color is checked it doesn't make a difference wether you check or uncheck the displacement tab. It has happened to me that I was accidentally mixing the displacements and wondered why the heck the masking didn't work. ;)
Title: Re: Merge shader, or something else?
Post by: N-drju on June 27, 2017, 08:50:21 AM
You won't believe it... :-\

None of the solutions worked because... the painted shader was navy-blue in color! Apparently TG was reading it as a black "no effect" area. I had no idea the color of a painted shader has any meaning!
Title: Re: Merge shader, or something else?
Post by: bobbystahr on June 27, 2017, 11:40:26 AM
Quote from: N-drju on June 27, 2017, 08:50:21 AM
You won't believe it... :-\

None of the solutions worked because... the painted shader was navy-blue in color! Apparently TG was reading it as a black "no effect" area. I had no idea the color of a painted shader has any meaning!


Live and Learn eh!
Title: Re: Merge shader, or something else?
Post by: bobbystahr on June 27, 2017, 12:26:32 PM
Quote from: N-drju on June 27, 2017, 08:50:21 AM
You won't believe it... :-\

None of the solutions worked because... the painted shader was navy-blue in color! Apparently TG was reading it as a black "no effect" area. I had no idea the color of a painted shader has any meaning!


Check this out, when painting the shader I changed colours for the 2nd shape. I also loaded this as the colour map and the mask, play around with inverting those to see what happened. The Painted shader can do many more things than suspected
Title: Re: Merge shader, or something else?
Post by: N-drju on June 28, 2017, 02:46:06 AM
Quote from: bobbystahr on June 27, 2017, 11:40:26 AM
Live and Learn eh!

Right on.

Yeah, I mean I find it very useful at numerous occasions. Even painting (masking) clouds with it occasionally.

The color setting in Paint Shader though is just a gimmick if you ask me. Since it can make so much difference, there is really no reason why you should be using it... Unless you use it as a texture or surface color, sure. Maybe then.
Title: Re: Merge shader, or something else?
Post by: Oshyan on June 28, 2017, 05:03:44 PM
The color options in the Painted Shader can actually be quite useful. People think of it just as a mask, but you can use it to directly paint color, texture tint, population tint, and other things. It's really no different than how the Power Fractal can output color (other than just black or white). Just something to be aware of so you use it correctly.

- Oshyan
Title: Re: Merge shader, or something else?
Post by: bigben on July 14, 2017, 08:57:28 AM
You can also use colour to draw combined/overlapping masks e.g. red, green and yellow...  Use function nodes to pull out the red and green to scalars and use yellow (or white) wherever you want to draw overlaps without having to use extra functions. In some situations this can be an easier way to visualise the mask as you draw it.
Title: Re: Merge shader, or something else?
Post by: bobbystahr on July 14, 2017, 10:00:29 AM
Quote from: bigben on July 14, 2017, 08:57:28 AM
You can also use colour to draw combined/overlapping masks e.g. red, green and yellow...  Use function nodes to pull out the red and green to scalars and use yellow (or white) wherever you want to draw overlaps without having to use extra functions. In some situations this can be an easier way to visualise the mask as you draw it.

Good one Ben, never thought of the function nodes as I'm BlueNodeAdverse as I'm, math disabled due to a crappy educational system.
Title: Re: Merge shader, or something else?
Post by: ajcgi on July 14, 2017, 01:28:38 PM
Good lord! After all these TG projects I've worked on... never thought to use coloured painted shaders like this.
Title: Re: Merge shader, or something else?
Post by: bigben on July 14, 2017, 06:19:22 PM
In my red/green/yellow example you can create a mask for the yellow by multiplying red x green, or subtract the result to exclude it etc...