[phpBB Debug] PHP Notice: in file [ROOT]/includes/bbcode.php on line 37: Undefined offset: 2
Bleank • View topic - Clouds Brush
Page 1 of 1

Clouds Brush

PostPosted: 02 Feb 2014, 14:49
by ghmd
Hello,

I have some ideas I want to transform into different pictures. At least one of them requires a brush that can create some kind of clouds.

After trying for more than one day, I had to give up. I created more than 20 brushes. Some of them quite nice, but none of them is NEAR something that looks like a cloud.

Is there ANY tutorial anywhere how to create a clouds brush?


I reached a dead end :(.

Re: Clouds Brush

PostPosted: 03 Feb 2014, 20:39
by maninmachine
ghmd wrote:Is there ANY tutorial anywhere how to create a clouds brush?


Nothing quite so specific that I'm aware of, but someone has posted a cloud brush in the exchange.

What type of effect are you looking for? Cartoony, abstract, realistic, cumulus/stratus, clean/smoggy?

We can construct something, if you'd like.

Re: Clouds Brush

PostPosted: 06 Feb 2014, 02:00
by maninmachine
Preliminary tests...
cloudtestgallery.jpg
cloudtestgallery.jpg (105.41 KiB) Viewed 16772 times

Re: Clouds Brush

PostPosted: 06 Feb 2014, 08:37
by ghmd
maninmachine wrote:
ghmd wrote:Is there ANY tutorial anywhere how to create a clouds brush?


Nothing quite so specific that I'm aware of, but someone has posted a cloud brush in the exchange.

What type of effect are you looking for? Cartoony, abstract, realistic, cumulus/stratus, clean/smoggy?

We can construct something, if you'd like.

The first one of the ones you presented.

I recently watched some old TV shows and I thought about a "city in the skies" - so that is the kind of clouds I would need for that.

Re: Clouds Brush

PostPosted: 07 Feb 2014, 03:41
by maninmachine
Ok, here it is, deconstructed.

cloud1preview.jpg
cloud1preview.jpg (7.47 KiB) Viewed 16748 times


First, we'll talk about the intended result:
Simple clouds are commonly monochromatic, with a stark value range. However, if we're dealing with unusual light sources or atmospheric effects we'll want it to have multiple hues. They're fluffy, so we'll want something that is heavily layered and scattered at low opacity (this creates a soft texture). Parameters that encourage a circular motion can also help with fluffiness.

- use a color gradient for easier control over the hue change.
- opt for a behavior scheme that constantly creates depth by scattering and alternating hue

Adjusting the parameters:

Remember that some of the exact numbers actually used in the brush were basically determined by experimentation, and are somewhat arbitrary (in a relative sense).

1) Scatter
- Start with a simple direction. Pull in ToVec2 node and set input B to -1.00. Think of this as defining your direction, specifically down on the Y axis. Now we just need to create a controlled pattern, then we'll define the magnitude.
- Use length as the stroke parameter to keep the pattern consistent. Multiply it by a big amount, then apply a small value (we'll use 2) modulo function to it. This creates a rapid sawtooth pattern.

If you're interested in why: In the modulo function the number you define is the divisor, the input is the dividend, and the result is the remainder, ignoring the quotient. For instance, for an input of [1,2,3,4]: 1 mod 2 = 1, 2 mod 2 = 0, 3 mod 2 = 1, 4 mod 2 = 0. You'll find that, once you account for continuous input, your function will increase from 0 in a linear fashion to (but will not quite reach) the modulo number. Then it will drop back to 0.

- Since our range is [0,2) we just need to floor it to get a function that alternates between two whole numbers. (There is a subtract thrown in, but it's negligible - just playing around originally trying to get the scatter to oscillate around the cursor. Realized I messed up later.) Up to this point the mod function could have been replaced by a sin or frac function to get something similar by the way.

-The rest uses multiplication and addition to get the right result after tampering with the brush settings. Pressure and a bit of randomness are implemented.

2) Color
-Use the same pattern as scatter to then alternate color with position.

3) Other
-Other controllers are for flavor, and are pretty self explanatory.

Using the brush:
The color selected at the far left of the gradient will be tucked under the color selected at the far right. Because there is constant overlapping, the direction you layer your strokes matters. It will help build perspective and depth. Shown below:

cloudsample1.jpg
cloudsample1.jpg (58.36 KiB) Viewed 16730 times

Re: Clouds Brush

PostPosted: 08 Feb 2014, 02:38
by maninmachine
Using the brush (continued):
Now we'll look at the effects of pressure. Light pressure yields soft wispy puffs. As the pressure increases, so does the opacity. When the pressure gets really high, the value starts to rapidly increase. This will let us make big bright clouds. Getting these effects to time properly are just a matter of adjusting the power curves to your liking. The properties of a power function with a linearly increasing input are important here. Just remember that an input of 1 is pivotal. Inputs below one, when raised to a higher and higher power, will get smaller ((.5 x .5) vs. (.5 x .5 x .5)). Inputs above one will get bigger . This means you can delay an effect and have it come in really strong later with a higher power. This behavior is quadratic. You can also have the effect rise rapidly at first, taper and level off, then rise rapidly again later. That behavior is cubic. Pressure study shown below:

cloudsample2.jpg
cloudsample2.jpg (65.89 KiB) Viewed 16730 times


Then we leave the behavior schemes alone, and just mess around with the other brush settings...

cloudsample3.jpg
cloudsample3.jpg (131.86 KiB) Viewed 16723 times

Re: Clouds Brush

PostPosted: 09 Feb 2014, 16:49
by ghmd
Thank you VERY much! :)

It will take a while to see what I can do with all of that. It is awesome!

Re: Clouds Brush

PostPosted: 10 Feb 2014, 12:37
by u2bleank
Note that this kind of brush ( a cloud brush ) suffer from the lack of Shape hardness.
It will be really better when we will have finally implemented this feature