Author Topic: Nutcracker: New effect, layers  (Read 1090 times)

Offline smeighan

  • Moderator
  • Sr. Member
  • *****
  • Posts: 2285
    • Nutcracker RGB Sequence Builder
Nutcracker: New effect, layers
« on: July 27, 2012, »
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


EFFECT#2, Text


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




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.




Ok, lets try two new effects
EFFECT#1, LEFT HAND SPIRAL


EFFECT#2, RIGHT HAND SPIRAL. The only parameter changed was the handiness


Now let's layer both together with a Pri-2 join



One final thought, when you layer two effects together you get a new nc file. This file can be used to layer again. Her ei will take the effect we just made and layer it with a third effec (Solid blue, fading)



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
« Last Edit: July 28, 2012, by smeighan »
Sean
Littleton, CO
Latest releases You are not allowed to view links. Register or Login
xLights/Nutcracker Forum You are not allowed to view links. Register or Login
Fbook You are not allowed to view links. Register or Login

Offline Steve Gase

  • Sr. Member
  • ****
  • Posts: 2915
    • WinterLightShow in Georgetown, TX
Re: Nutcracker: New effect, layers
« Reply #1 on: July 27, 2012, »
WOW!!!

That is everything I hoped it would be --- AND MORE!!

You are not allowed to view links. Register or Login  |  110K channels, 50K lights  |  Nutcracker, Falcon, DLA, HolidayCoro

Offline PJNMCT

  • Patron Member
  • Sr. Member
  • ****
  • Posts: 821
Re: Nutcracker: New effect, layers
« Reply #2 on: July 28, 2012, »
You just keep the hits coming. Incredible!

Thanks Sean  <res.

-Paul
Leesburg, FL

Offline RJ

  • Administrator
  • Sr. Member
  • *****
  • Posts: 8519
Re: Nutcracker: New effect, layers
« Reply #3 on: July 28, 2012, »
Awesome Work!  If I only had time to work on a show <wd..

RJ
Innovation beats imitation - and it's more satisfying