Useless experiment: Candy necklace!
![Post Post](./styles/prosilver_se/imageset/icon_post_target.gif)
Posted:
15 Feb 2013, 11:24
by ben-o
So I was going for a very different result, something specific involving size changes and colors and in my various tests I ended up with almost this result. I laughed a lot, then spend some time finding a way to match the color change to the shape and there it is, the best useless brush ever!
I still have to finish the brush I actually wanted tough.
![Image](https://trello-attachments.s3.amazonaws.com/4ebcebb1f26b3ddb1e059c28/50bc7af70efb4885090021a4/a9a653a48026d1ad1b9d9317682b0164/CandyNecklace.jpg)
The shading effect comes from a gradient going all the way and back every time the size changes. The colors change with the color shifting function, with controllers plugged in the "hue" output.
It should be possible to do this the other way, with the actual colors coming from a gradient and the shading from value shifting.
Re: Useless experiment: Candy necklace!
![Post Post](./styles/prosilver_se/imageset/icon_post_target.gif)
Posted:
18 Sep 2013, 16:06
by munx
looks incredibly yummy >.<
Re: Useless experiment: Candy necklace!
![Post Post](./styles/prosilver_se/imageset/icon_post_target.gif)
Posted:
19 Sep 2013, 05:22
by qerglepop
it almost looks like a real candy necklace!
![lol :D](./images/smilies/icon_lol_2.png)
Re: Useless experiment: Candy necklace!
![Post Post](./styles/prosilver_se/imageset/icon_post_target.gif)
Posted:
26 Sep 2013, 03:27
by mttorley
As an exercise, I wanted to dissect this brush and learn how it works via the brush controllers, and I thought writing it down for others to benefit might be helpful.
Making the string shape:
Shape Setting- adjust the size to vary between 0 and X, in this case, 20px.
Controllers:
Length - an ever increasing value -->Feeds into Sinus
Sinus - takes the ever increasing # and applies a sin() function to it, creating a value that varies between -1 and 1 continually. Sinus Amplitude set at 1.2 - this is so the output range varies between -1.2 and +1.2 (more than the size brush parameter can handle). Feeds to Abs
ABS - Takes the Absolute value of the Sine wave, giving us a wave that ranges from 0 to 1.2. If you do not apply the ABS function, the system sends a less than one signal to the length, which, is zero length.
The total wave will CLIP (the hard edge of the candy) between 1.0 and 1.2 giving you an output that goes from 0 to 1.0..waits for a second and 1, and then goes back down to 2.
Creating the shading from string to candy center and back again
Color Setting: A Fixed Gradient from black to a single candy color. This gives us our range.
Adjust the COLOR brush parameter - we will go back and forth along that gradient (0 to 1 to 0) at the same rate of the size. No need for clipping (with a 1.2 sinus wave amplitude here) because the gradient just works with out it.
otherwise, IF YOU WANTED to shrink the shadow, and stay at the higher end of the gradient for longer, and introduce sine wave clipping, you would Increase the amplitude)
Varying color between EACH piece of candy
What is changing here is the HUE - which is the variation between colors, not the darkness of the color (value) or the intensity of the color (saturation)
The Hue is set to vary between a unique set of values from 23 degrees to 359 degrees... This was determined by experimentation.
The HUE controller then varies inside of that range...
INPUT - LENGTH - an ever increasing value
LENGTH ADDED to 0.15 - which gets us passed the first bump in the sine wave
FRAC The fractional value of that input is taken (so, we start at 0.15, go up to 1 linearly, and then start over at 0.
MUL - Input now varies between 0 and 4 (0.15x4 to start = 0.6 to 4, and then just 0 to 4 again.
FLOOR FUNCTION - creates STEPS, so values sit at 0000000 then 1111111 then 22222 then 3333333 then back to 00000000 - there is no output of 1.3, 2.7, or 3.884 - the FLOOR quantizes the outputs.
DIV - The DIV function brings us back down in the 0 to 1 range, but gives us 000000 .25 .25 .25 .25 .5 .5 .5 .5 .75 .75 .75 .75 and then back to 000000.
So the hue controller is essentially a stepper function.. interesting.
Re: Useless experiment: Candy necklace!
![Post Post](./styles/prosilver_se/imageset/icon_post_target.gif)
Posted:
04 Apr 2014, 03:02
by huckleseed
That is a fun brush. Really nice breakdown of the elements there Matt. In the long run, understanding how to accomplish various effects will lead to some master brush makers.
Re: Useless experiment: Candy necklace!
![Post Post](./styles/prosilver_se/imageset/icon_post_target.gif)
Posted:
27 Apr 2015, 06:25
by andrewsonsmith
I like your experiment and its really look like really candy.