Nutcracker: New effect, layers

smeighan

Dedicated elf
Joined
Jan 19, 2012
Messages
1,109
Location
4217 Greenfinch Dr CO 80126
Well this effect has lots of things to it.


First, the nutcracker now produces a internal file of type nc. This file is your entire animation (Think the contents of the animated gif). I needed these files in order to do the layers correct.


To use layers, follow these steps


1) Recreate any effects you like up till the point where you get an animated gif. You do NOT need to export anything. Now when an animated gif is created there is also a nc file created. Repeat this for all the effects you will use for layering
2) Select the effect class called "layer"
3) Give your layer effect a name.
4) Select from the nc files shown in the table. I suggest you pick effects that have the same window_degrees and the same target RGB device. Most of you have only created one target model so this should not be an issue. Do not try to layer across two different targets. If you have a mega tree target, use that for all the layers .
5) Select from one of the 5 methods of joining layers
a) Pri-1 means the first effect has priority over the second. In other words if both effects are trying to light up String 1, Pixel 5, effect 1 will take precedence.
b) Pri-2. Second effect has precedence
c) Avg. If both pixels are on, average the Hue values between them
d) Mask-1. Whereever effect 1 has a non zero value, use the rgb value from Effect2. In other words, the shape from effect 1 and the colors from effect 2. This is a good candidate when using text joined onto say a butterfly effect
e) Mask-2, Effect 2 must be non zero in order to see the value from effect1

6) Note, effect 1 is what ever file is listed first in the checkbox area.


Ok, lets see it at work.




We will use these two effects


EFFECT#1, Butterfly
AA+FLY_0_0.gif



EFFECT#2, Text
AA+TEXT2.gif



Ok, now lets layer them together and choose Pri-2, in other words if the same pixel is trying to be lit by both effects, pick the value from Effect#2


Effect Settings
username f
user_target AA
effect_class layer
effect_name Layer_FLY_TEXT
layer_method Pri-1
file1 AA+TEXT2.nc
file2 AA+FLY_0_0.nc
LAYER_EFFECTS Array
lmethod Pri-1
frame_delay 100
seq_duration 4
submit Submit Form to create your effect
OBJECT_NAME layer


AA+LAYER_FLY_TEXT.gif





Ok, Same two effects, but this time we will use Mask-2, We will choose values wherever the text effect has non-zero rgb but pull the rgb value from effect #1. This basically should show through the butterfly in the shape of our scrolling text.


AA+LAYER_FLY_TEXT_MASK.gif





Ok, lets try two new effects
EFFECT#1, LEFT HAND SPIRAL
AA+LEFT_TEST.gif



EFFECT#2, RIGHT HAND SPIRAL. The only parameter changed was the handiness
AA+RIGHT_TEST.gif



Now let's layer both together with a Pri-2 join
AA+LAYER_SPIRAL.gif





One final thought, when you layer two effects together you get a new nc file. This file can be used to layer again.
Take above nc file and layer with a 3rd effect, solid blue fading over seq_duration.
AA+LAYER_SPIRAL_WITH_3RD.gif





What happens if one effect is 4 seconds long and the second is 8?
You will get an 8 second animation. the first 4 seconds will have them both joined together and then the last 4 seconds will be just effect#2. Maybe start by setting your seq_durations the same.


Use user-defined to get solid color backgrounds.


Here is a oneline effect you paste into the php body portion of user defined
$rgb=hexdec("#00DD00");


This will give you a solid color animation. Set the duration and then use it as one of the effects for layering.


If you want a solid color to fade over the life of your duration, use this program. Here the color is set to hue 0.66.


$V=1-$frame/$maxFrame;
$H=0.66;
$S=1.0;
$rgb=HSV_TO_RGB ($H, $S, $V);
return $rgb;



Well, have fun ....
sean
 
G

GoofyGuy

Guest
SWEET!

The reversing spirals I have been waiting for! I still cant figure out how to duplicate the one on the login page, but this will do.

Also so the horizontal matrix in there! WOOT for progress!
 

smeighan

Dedicated elf
Joined
Jan 19, 2012
Messages
1,109
Location
4217 Greenfinch Dr CO 80126
GoofyGuy said:
SWEET!

The reversing spirals I have been waiting for! I still cant figure out how to duplicate the one on the login page, but this will do.

Also so the horizontal matrix in there! WOOT for progress!


The login page spiral should be something like this
Effect Settings
username
f
user_target
AA
effect_class
spirals
effect_name
SEAN6
handiness
l
number_spirals
7
number_rotations
4
spiral_thickness
2
window_degrees
360
start_color
#FF0000
end_color
#FF004C
frame_delay
100
direction
cw
sparkles
0
use_background
n
background_color
#12FFEF
seq_duration
5
show_frame
n
effect_type
s
submit
Submit Form to create your effect
OBJECT_NAME
spirals


for 360 degree window
AA+SEAN6.gif



and same effect but with a 180 degree window.
[/size]
Effect Settings
username
f
user_target
AA
effect_class
spirals
effect_name
SEAN6_180
handiness
l
number_spirals
7
number_rotations
4
spiral_thickness
2
window_degrees
180
start_color
#FF0000
end_color
#FF004C
frame_delay
100
direction
cw
sparkles
0
use_background
n
background_color
#12FFEF
seq_duration
5
show_frame
n
effect_type
s
submit
Submit Form to create your effect
OBJECT_NAME
spirals



AA+SEAN6_180.gif
 
Top