1. New to Christmas lighting? Get started with the AusChristmasLighting 101 Manual:
    auschristmaslighting.com/wiki/AusChristmasLighting-101

Nutcracker: New effect, layers

Discussion in 'xLights (Nutcracker)' started by smeighan, Jul 28, 2012.

  1. smeighan

    smeighan Dedicated Elf

    Joined:
    Jan 19, 2012
    Messages:
    1,077
    Likes Received:
    16
    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
    [​IMG]


    EFFECT#2, Text
    [​IMG]


    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


    [​IMG]




    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.


    [​IMG]




    Ok, lets try two new effects
    EFFECT#1, LEFT HAND SPIRAL
    [​IMG]


    EFFECT#2, RIGHT HAND SPIRAL. The only parameter changed was the handiness
    [​IMG]


    Now let's layer both together with a Pri-2 join
    [​IMG]




    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.
    [​IMG]




    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
     
  2. GoofyGuy

    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!
     
  3. OP
    OP
    smeighan

    smeighan Dedicated Elf

    Joined:
    Jan 19, 2012
    Messages:
    1,077
    Likes Received:
    16
    Location:
    4217 Greenfinch Dr CO 80126

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

    for 360 degree window
    [​IMG]


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

    [/td][/tr][/table][/td][/tr][/table]

    [​IMG]
     

Share This Page