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

Nutcracker: new effect, butterfly wing

Discussion in 'xLights (Nutcracker)' started by smeighan, Mar 20, 2012.

  1. smeighan

    smeighan Dedicated Elf

    Joined:
    Jan 19, 2012
    Messages:
    1,077
    Likes Received:
    16
    Location:
    4217 Greenfinch Dr CO 80126
    I came across this equation that simulates the color on a butterfly wing.
    http://mathworld.wolfram.com/ButterflyFunction.html


    [​IMG]


    So , you now have a new effect.
    The RADIAN_SHIFT parameter is how much each frame the colors are shifted. I found values between .05 and .1 are good. The higher the number the faster the shift across the tree.




    username f
    user_target ZZ_ZZ
    effect_class butterfly
    effect_name FLY1
    window_degrees 180
    start_color #FFFFFF
    end_color #FFFFFF
    frame_delay 50
    sparkles
    seq_duration 5
    radian_shift .05
    submit Submit Form to create your effect
    [​IMG]


    If you increase the radian shift, you get faster color movement


    _POST
    username f
    user_target ZZ_ZZ
    effect_class butterfly
    effect_name BUTTERFLY2
    window_degrees 180
    frame_delay 50
    sparkles
    seq_duration 5
    radian_shift .3
    submit Submit Form to create your effect


    [​IMG]


    And if your show has heavy metal, try a radian shift of 1.0
    [​IMG]
     
  2. OP
    OP
    smeighan

    smeighan Dedicated Elf

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

    Thanks for the support. I will put a pay pal donate if anyone wants to kick in a few bucks to offset some of my costs. It is NOT needed and the tool will stay free.


    I have released a new verdsion of the butterfly effect.


    Now you can define the color range that the butterfly wing will have.


    Set START and END color to #FFFFFF and you will get the entire color spectrum.


    Here are some examples of using a smaller color band.


    _POST
    username f
    user_target ZZ_ZZ
    effect_class butterfly
    effect_name BUTTERFLY4
    window_degrees 180
    frame_delay 50
    sparkles 0
    seq_duration 5
    radian_shift .1
    start_color #FF0313
    end_color #0505FF
    submit Submit Form to create your effect


    [​IMG]




    _POST
    username f
    user_target ZZ_ZZ
    effect_class butterfly
    effect_name BUTTERFLY5
    window_degrees 180
    frame_delay 50
    sparkles 0
    seq_duration 5
    radian_shift .1
    start_color #3D3D3D
    end_color #D6FFE0
    submit Submit Form to create your effect
    [​IMG]


    Be aware that my animated gif's only use 256 colors. This causes banding on the animations, that should not be true on our actual trees.


    thanks
     
  3. joekin

    joekin Apprentice Elf

    Joined:
    Dec 19, 2010
    Messages:
    92
    Likes Received:
    0
    Location:
    Ipswich - Queensland
    I really love the effect
     
  4. Charles Belcher

    Charles Belcher New Elf

    Joined:
    Mar 14, 2012
    Messages:
    45
    Likes Received:
    0
    Location:
    Dallas, Texas
    Sean,


    Have you made a model whereby we can construct an element with curves?


    Charles
     
  5. OP
    OP
    smeighan

    smeighan Dedicated Elf

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

    Not yet, i have maybe 30-50 new effects in my plan. curves is certainly one of them.


    avi movies
    fireworks using physics for the particles
    snow in a snowstorm, particle movements
    lots of f(x,y) functions. Look to the demo gallery on http://gnuplot.info for some ideas


    .etc
     
  6. OP
    OP
    smeighan

    smeighan Dedicated Elf

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

    Ok,


    Enhancement.


    I now readjust your radian shift parameter so that it is a multiple of 2pi


    You pass in a variable called $radian_shift. This is what causes the movement betweem frames. The issue is it was not an even multiple of 2pi over the frames.


    This corrects your entry.


    $new_radian_shift = intval(($maxFrame*$radian_shift+0.5)/$pi2)*$pi2/$maxFrame;


    some examples


    radian_shift new_radian_shift
    .01 .0785
    .05 .0785
    .1 .2355
    1.0 .942
    3 2.983
    7 6.9865


    You just pick values, ill make them into a multiple of 2pi and the max frames.


    try Butterfly now, there should be no jumps.


    thanks
     
  7. Charles Belcher

    Charles Belcher New Elf

    Joined:
    Mar 14, 2012
    Messages:
    45
    Likes Received:
    0
    Location:
    Dallas, Texas
  8. OP
    OP
    smeighan

    smeighan Dedicated Elf

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

    AussiePhil Dedicated Elf Administrator

    Joined:
    Jun 20, 2009
    Messages:
    1,391
    Likes Received:
    1
    Location:
    Canberra, ACT, Australia
    Find Me On:
  10. Charles Belcher

    Charles Belcher New Elf

    Joined:
    Mar 14, 2012
    Messages:
    45
    Likes Received:
    0
    Location:
    Dallas, Texas
    Sean,


    I am trying to relate the one you listed to some type of Christmas element. That looks more like a grid in Blender that is used to warp video than it does a matrix grid.


    I will stay tuned. Either next month or May, I am buying enough pixel ribbons and controllers to demo each one of these designs with LOR S3. Should be fun.


    Charles
     
  11. OP
    OP
    smeighan

    smeighan Dedicated Elf

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


    Butterfly now has 3 equations u can use


    1) [​IMG]




    2) sin(x*x + y*y) / (x*x + y*y)
    [​IMG]


    3) sin(x) * cos(y)
    [​IMG]


    New option , butterfly fomula. Values 1,2 or 3


    So , leaving all other parameters alone, here is formula 1 (our original butterfly wing).


    _POST
    username f
    user_target ZZ_ZZ
    effect_class butterfly
    effect_name FLY_FORM1
    window_degrees 180
    frame_delay 50
    sparkles 9
    seq_duration 5
    formula 1
    radian_shift .05
    start_color #FFFFFF
    end_color #FFFFFF
    background_chunk 0
    background_skip 0
    background_color #000000
    submit Submit Form to create your effect


    [​IMG]


    Here is formula 2
    _POST
    username f
    user_target ZZ_ZZ
    effect_class butterfly
    effect_name FLY_FORM2
    window_degrees 180
    frame_delay 50
    sparkles 9
    seq_duration 5
    formula 2
    radian_shift .05
    start_color #FFFFFF
    end_color #FFFFFF
    background_chunk 0
    background_skip 0
    background_color #000000
    submit Submit Form to create your effect


    [​IMG]


    Here is formula 3, i kind of like this one
    _POST
    username f
    user_target ZZ_ZZ
    effect_class butterfly
    effect_name FLY_FORM2
    window_degrees 180
    frame_delay 50
    sparkles 9
    seq_duration 5
    formula 3
    radian_shift .05
    start_color #FFFFFF
    end_color #FFFFFF
    background_chunk 0
    background_skip 0
    background_color #000000
    submit Submit Form to create your effect
    [​IMG]


    [​IMG]
     

Share This Page