Controlling cloud placement with the painter shader / "Fit to blendshader to thi

Started by reck, November 21, 2008, 10:54:46 AM

Previous topic - Next topic

reck

Is it possible to mask out clouds using the painter shader?

I've got an image that you can see below where I would like to mask out all the clouds below the red line, I only want to see the clouds above the red line.

I created a painter shader and painted white in the 3d window where I wanted the clouds to appear. You can see the painter shader mask below. Then I connected the painter shader to the clouds density fractals blend input. The problem is that as soon as I turn the blend by shader setting on all the clouds disappear. I'm not sure what settings I should be using with the painter shader but I used an absolute brush in this case not a view relative brush although I did try both. Also I tried Plan Y projection and 3D projection but neither seemed to make any difference.

If the painter shader is not capable of controlling cloud placement what's the next best way to do it?


One separate questions I've been meaning to ask for a while. What does the "Fit blendshader to this" setting do?

Mohawk20

I have not tried painting the sky, but I fear the logical place the paint sticks is on the background object. If you move the camera around in painting mode, does the paint stay in the right place?

Have you tried different settings (like 'plan y', 'face z', and especially '3D')?
Howgh!

reck

If I move the camera round I can see the patch of white mask I created with the painter shader. By zooming out I can see its massive, even when I zoomed out to space. When I turn the blend shader on I get no clouds at all, when I click invert blend shader I get ALL clouds back with no masking.

I wonder if it is working but my mask is so big is taking up the whole sky, so i'm either getting all clouds or none. But how do I paint the mask using a smaller brush? I have to have the brush so big so I can paint the sky, if I make it much smaller the brush just disappears.

So far I have tried 3d and plan Y with absolute brush. Maybe I should be using the view-relative brush?


reck

Well i've just gone through and just tried all the combinations of 3d/y/x/z projections and absolute/view-relative brush szie but I can't get any clouds to show at all when using the painter shader as the cloud blend shader.

PG

Only the absolute brush works properly but it needs to be very large. You'll probably need to type the number in rather than use the slider. Type in something like 6 million and if it's too big or too small then adjust it from there.

Edit: a good technique I found is to wait until the preview has rendered to at least 80% and pause it. That way you can paint what you want without it rerendering with every click.
Figured out how to do clicky signatures

reck

I'm using an absolute brush size of 16 million! Trying to paint with anything less than a million and no white appears. I have to go up to 16 million+ just to get a reasonable sized brush.

Any idea why I see no clouds though?

EDIT: Yeah I use the pause trick as well.

PG

I always enable fit blendershader to this. It definately works. But for what you're doing here it is probably better to paint the area below the imaginary red line and then check the invert blendshader option. That way if you decide to change the angle or position of the camera you won't have to repaint it.
Figured out how to do clicky signatures

sjefen

Quote from: reck on November 21, 2008, 05:27:44 PM
I'm using an absolute brush size of 16 million! Trying to paint with anything less than a million and no white appears. I have to go up to 16 million+ just to get a reasonable sized brush.

Why don't you use the view-relative brush?

- Terje
ArtStation: https://www.artstation.com/royalt

AMD Ryzen Threadripper 1950X
128 GB RAM
GeForce RTX 3060 12GB

Matt

Just because milk is white doesn't mean that clouds are made of milk.

reck

Quote from: PG on November 21, 2008, 06:48:13 PM
I always enable fit blendershader to this.

What does this setting do? I can't find any information on this setting anywhere in the forums or the docs section.

Quote from: PG on November 21, 2008, 06:48:13 PM
It definately works. But for what you're doing here it is probably better to paint the area below the imaginary red line and then check the invert blendshader option. That way if you decide to change the angle or position of the camera you won't have to repaint it.

Well I will try this, but i'm not sure how you got it to work. Matt has just posted a link where he said it's a bit tricky to use the painted shader with clouds because it needs something to paint onto. PG do you have an example file where you've used a painted shader to control cloud placement?

Quote from: sjefen on November 21, 2008, 07:36:33 PM
Quote from: reck on November 21, 2008, 05:27:44 PM
I'm using an absolute brush size of 16 million! Trying to paint with anything less than a million and no white appears. I have to go up to 16 million+ just to get a reasonable sized brush.

Why don't you use the view-relative brush?

- Terje

I've tried that to but it made no difference. I stuck to absolute brush size because someone said that was the way to go.

Matt said in the other post

QuoteA Painted Shader could be connected directly after your cloud fractal, then if you use black paint it will remove clouds. Be aware that you might be removing negative values as well as positive, so you wouldn't be able to use a coverage adjust that is greater than 0 in the cloud shader. Using coverage adjust in the cloud fractal would be the best option in that situation.

So i'm going to try this next. I've always used white paint with the painted shader.


PG

Because you need to restrict the altitude you won't currently be able to do it. As matt said, the painter shader needs something to paint on. Currently it's painting somewhere about 70000 miles in space. I have come up with a theoretical application but it would require a way to invert the surface of an object like a sphere. Perhaps that's something that Matt or Jo could implement as a plugin. I'm a pretty handy programmer so I could do the bug testing for it. This is a pain in the arse method but it would work.
you'd need to create an object like a sphere, I wouldn't recommend a planet because it creates big displacements, and centre it on the core of your planet. Copy the radius of your planet and increase it slightly until it is around the same height as your planet. You wouldn't want your clouds to be visible at this time because you'll want to paint right in front of them. so adjust it until they disappear, which I've found isn't too tricky. Then disable the atmosphere, paint your mask, replace the atmosphere and turn the sphere off. Essentially you'd just be giving the brush a canvas. It could have loads of applications for water too.

EDIT: I just thought of using a plane. If you can get one or more planes to cover the area you want to mask then you can paint on that. It'd be a helluva job getting them in position though. Alternatively you could create a sphere in 3ds Max, maya, blender etc. with the surface on the inside. Does the same thing as the inverted surface idea I was talking about before.
Figured out how to do clicky signatures

Mohawk20

Quote from: PG on November 22, 2008, 03:00:00 PM
I have come up with a theoretical application but it would require a way to invert the surface of an object like a sphere. Perhaps that's something that Matt or Jo could implement as a plugin.

That would be the Background object...
If you reduce it's radius, it could be pretty easy to paint in the sky.
Howgh!

reck

I love the painter shader. It's so easy to use and very intuitive it makes it easy to get results fast, which is not the case with a lot of other areas of TG. However in this case it's not proved very useful so i've given up and gone back to using a distance shader.

But the question remains, does anyone understand what the "Fit blendshader to this" option does?

This is the only thing I could find in the documentation.

QuoteFit blendshader to this – Need more info.

We certainly do "need more info".  :)

PG

d'you know, I actually forgot that was there :D Well it's in negatives which is weird but I reduced it's radius to -5e+008, then -9e+008, -12e+008, -19e+008 and finally -24e+008 before I gave up. Tried painting to it and the brush froze which wasn't helpful.

Edit: keep forgetting to come back to the fit to blendshader thing ;D All I know is it makes masks work :D. Honestly I don't know, I'd take a guess that it's something to do with restricting the mask to....nope, no idea. heh. I'll ask Oshy when he comes on MSN and report back.
Figured out how to do clicky signatures

Mohawk20

I think you should decrease the negative value.
As I understand it's just a planet but scaled in negatives, so it's pulled through itself. If you go from -5e+008 to -5e+007, that should make it smaller.

A standard planet is 6.378e+006, so the background should in your case be something like -7e+006 or a bit higher perhaps (like -7.5e+006).

(Sorry I can't test right now, both pc's are rendering 4096x3072 poster size images on full CPU usage.)
Howgh!