Merge shader, or something else?

Started by N-drju, June 23, 2017, 06:58:50 AM

Previous topic - Next topic

N-drju

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...
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

Hannes

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.

Dune

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.

René

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... :)

bobbystahr

something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

N-drju

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...? :)
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

René

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. ;)

N-drju

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!
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

bobbystahr

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!
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

bobbystahr

#9
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
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

N-drju

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.
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

Oshyan

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

bigben

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.

bobbystahr

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.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

ajcgi

Good lord! After all these TG projects I've worked on... never thought to use coloured painted shaders like this.