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

Nutcracker: RGB effects builder released

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

  1. smeighan

    smeighan Dedicated Elf

    Joined:
    Jan 19, 2012
    Messages:
    1,076
    Likes Received:
    16
    Location:
    4217 Greenfinch Dr CO 80126
    Hi all;


    I have released the Effects builder for the Nutcracker.


    There are 4 parts to the nutcracker


    1) Build a target model
    2) Create effects and add them into your user library
    3) Pick a target model and an effect and create an animated sequence. Produce this as an animated GIF
    4) Create this sequence as an xml file for lsp,lor or vixen


    I have 1-3 working now. It is pretty cool. There are lots of moving parts on this. Error checking,navigations is still rough. All of the forms are built dynamically so i have to load up the effect_class table, i have to join the effect generators to the user models.






    This is an alpha release. Things can and will break. Things that were working, may now become broken.
    I will be releasing new code every single day for the next 1-2 weeks. Play with it and give me some feedback on usability, features and bugs.


    So some caveats:
    I dont have all of the color working like i want. If you select 3 spirals, i will override your color choice and make each spiral red, white and blue. If you pick more than 4 spirals then i will use your color selections. I think i need to prompt for each spiral for color.


    navigation and error checking are pretty rough right now, i am releasing it so you can start to play.


    Login in to http://meighan.net/nutcracker/login/login-form.php
    1) Be sure you have target models saved!!. This is the number one error i am seeing.
    You can safely click on a target and resave it. This creates a files that is needed by the effects generator.
    2) Select Effects Generator
    3) Now you select one of your target models and an effect class.
    These are the effect classes i have so far
    a) spirals
    b) bands
    c) pictures
    d) meteors
    e) text
    f) snowflakes


    With this release I have only connected spirals to the effects generator. I will be connecting the others over the next week.


    4) After submitting the form , you are now asked to customize the effect class.
    Give a name to your effect and submit form to go and it will generate an animated gif.


    Loop on #4 , changing parameters and see what spiral effects you like.


    Here are some user effects


    Array
    (
    [username] => f
    [user_target] => ZZ_ZZ
    [effect_class] => spirals
    [effect_name] => sean6
    [number_spirals] => 7
    [number_rotations] => 2
    [spiral_thickness] => 2
    [start_color] => #40FF40
    [end_color] => #FF59DE
    [frame_delay] => 22
    [direction] => 2
    [submit] => Submit Form to create your target model
    )
    [​IMG]


    The same target, modify parameters of effect
    (
    [username] => f
    [user_target] => ZZ_ZZ
    [effect_class] => spirals
    [effect_name] => sean5
    [number_spirals] => 7
    [number_rotations] => 2
    [spiral_thickness] => 1
    [start_color] => #FF7417
    [end_color] => #EFFF08
    [frame_delay] => 22
    [direction] => cw
    [submit] => Submit Form to create your target model
    )
    [​IMG]


    (
    [username] => f
    [user_target] => ZZ_ZZ
    [effect_class] => spirals
    [effect_name] => sean4
    [number_spirals] => 3
    [number_rotations] => 2
    [spiral_thickness] => 5
    [start_color] => #FF7417
    [end_color] => #EFFF08
    [frame_delay] => 22
    [direction] => ccw
    [submit] => Submit Form to create your target model
    )
    [​IMG]


    thanks, enjoy!
     
  2. Tallahassee Dreamer

    Tallahassee Dreamer New Elf

    Joined:
    Feb 17, 2012
    Messages:
    17
    Likes Received:
    0
    Location:
    Tallahassee, Florida
    Ok I went to the page followed the prompts and got an error and no animation. On speed do we type 50 or 50ms. Perhaps you could look at my selections or perhaps capture a screenshot of what a finish selection form should look like. also can we delete a stored file?
     
  3. OP
    OP
    smeighan

    smeighan Dedicated Elf

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

    you type 50.


    But your error had nothing to do with that.


    If your user name or your effect name has embedded spaces, it currently is not working. I am fixing this now.


    Effect name with embedded spaces is now fixed and released.


    I am working on fixing users who had embedded spaces, for example "Tallahassee Dreamer".
    [/size]
    [/size]it will be fixed shortly.
    [/size]
    [/size]thanks
     
  4. OP
    OP
    smeighan

    smeighan Dedicated Elf

    Joined:
    Jan 19, 2012
    Messages:
    1,076
    Likes Received:
    16
    Location:
    4217 Greenfinch Dr CO 80126
    Embedded spaces are fixed in user names and effect names.


    thanks
     
  5. OP
    OP
    smeighan

    smeighan Dedicated Elf

    Joined:
    Jan 19, 2012
    Messages:
    1,076
    Likes Received:
    16
    Location:
    4217 Greenfinch Dr CO 80126
    New option on spiral class added.


    sparkles is a number form 0-100. This indicates what percentage of the pixels being drawn should have their color overwritten and instad be set to white.
    0 means , do not have any sparkles.


    I did this as a test, to verify i can add options to the class without needing to touch the html forms.


    it works as expected and is now another option for you to choose.


    Here is an example, notice sparkles is now one of the options. BTW, i think something like 10% looks better. go ahead and play


    (
    [username] => Tallahassee Dreamer
    [user_target] => MEGA1
    [effect_class] => spirals
    [effect_name] => sean4
    [number_spirals] => 7
    [number_rotations] => 2
    [spiral_thickness] => 3
    [start_color] => #1812BD
    [end_color] => #0F0C6B
    [frame_delay] => 22
    [direction] => 1
    [sparkles] => 10
    [submit] => Submit Form to create your target model
    )
    [​IMG]




    thanks
     
  6. AussiePhil

    AussiePhil Dedicated Elf Administrator

    Joined:
    Jun 20, 2009
    Messages:
    1,391
    Likes Received:
    1
    Location:
    Canberra, ACT, Australia
    Find Me On:
    [SIZE=small]Sean[/SIZE]

    [SIZE=small]wow this is really starting to come together.[/SIZE]


    [SIZE=small]Couple things for you from my experience playing just now.[/SIZE]


    [SIZE=small]- Calling your point of origin "pixel 1" is confusing to me even though you make it clear it's for internal use.[/SIZE]


    [SIZE=small]- the start colour, end colour are describe as morphing top to bottom, playing with different numbers of spirals shows that is not how it currently functions. [/SIZE]


    [SIZE=small]- you went back to total string length rather than pixel spacing, seems a backward step when you collect the count.[/SIZE]


    [SIZE=small]- certainly for spirals it would be nice to specify each spiral colour and or the vertical colour change.[/SIZE]

    [SIZE=small]Taking that a step further making complex olour gradients both around the tree and vertically on a tree would be unreal[/SIZE]


    Think i still owe you some vixen files, i've lost track


    Cheers
    Phil
     
  7. OP
    OP
    smeighan

    smeighan Dedicated Elf

    Joined:
    Jan 19, 2012
    Messages:
    1,076
    Likes Received:
    16
    Location:
    4217 Greenfinch Dr CO 80126
     
  8. OP
    OP
    smeighan

    smeighan Dedicated Elf

    Joined:
    Jan 19, 2012
    Messages:
    1,076
    Likes Received:
    16
    Location:
    4217 Greenfinch Dr CO 80126
     
  9. OP
    OP
    smeighan

    smeighan Dedicated Elf

    Joined:
    Jan 19, 2012
    Messages:
    1,076
    Likes Received:
    16
    Location:
    4217 Greenfinch Dr CO 80126
    I have added a gallery on the effects form screen.


    This basically goes and finds every gif image that has been created and shows them. I will create a hyperlink that will allow you to click on an image and then copy that effect into your private library. This will save you from answering 20 questions.


    Because i make so many releases per day, sometime > 20. I am going to start ending my posts with a summary of all changes. This readers digest version means you kind jump to the end of these threads and not miss anything.


    we will see if this helps.

    NUTCRACKER SUMMARY OF CHANGES



    Effect builder now has new options:
    1) sparkles: is a number form 0-100. This indicates what percentage of teh pixels being drawn should have their color overwritten and instad be set to white.
    0 means , do not have any sparkles.


    2) window_degrees: Value 0-360 degres
    this is how much of your tree will be displayed.
    360 will show entire tree, 180 = half a tree, 90 = 1/4 of a tree.
    thanks


    3) Nutcracker now displays timing as it runs


    Example:
    Creating Effect, spirals class: : Elapsed time = 0.13534 seconds
    Finished Effect, spirals class: : Elapsed time = 0.24950 seconds
    Starting Rotate image about Z axis : Elapsed time = 0.24957 seconds
    Finished Rotate image about Z axis : Elapsed time = 11.28429 seconds
    Making gnuplot command file: : Elapsed time = 11.28435 seconds
    Finished gnuplot command file: : Elapsed time = 11.38652 seconds
    Calling Gnuplot: : Elapsed time = 11.38672 seconds
    Finished Gnuplot: : Elapsed time = 26.79310 seconds
    Calling Imagick to make animated GIF: : Elapsed time = 26.79319 seconds
    Finished Imagick to make animated GIF: : Elapsed time = 27.30974 seconds


    4) Two new options to set background color
    use_background Y
    background_color #067306


    If you answer yes u want a background color, every pixel of your tree will be set to that color.
    Next i take whatever animation you have and put it on top of the background.




    5) Added the Gallery of effects
    to the effects form. Now you can see all other users effects.


    END OF SUMMARY


    Thanks
     
  10. OP
    OP
    smeighan

    smeighan Dedicated Elf

    Joined:
    Jan 19, 2012
    Messages:
    1,076
    Likes Received:
    16
    Location:
    4217 Greenfinch Dr CO 80126
    Doing the current meter, i found a bug in my color transformation code. Nutcracker never uses r,g,b anywhere except whenit is all finished. Everything is in HSV, http://en.wikipedia.org/wiki/HSL_and_HSV.


    The Hue allows me to morph colors easily. Well when i morphed from one color to the second, H1,S1,V1 into H2,S2,V2 i morphed the hue (H1=>H2) but i set the S and V to 100%. Why? I don't remember. Maybe because at the time i liked bright colors. S=100% Indicates full saturation of the Hue, V=100% is full brightness.


    I fixed the logic so now all three are morphing correctly.


    What does this mean? It means before you could not do grays. You also couldnt fade a bright red down to black. Now you can.


    Here is a gray color scheme


    username f
    user_target AA
    effect_class spirals
    effect_name GRAY_CHECK
    number_spirals 4
    number_rotations 2
    spiral_thickness 2
    window_degrees 360
    start_color #CFCFCF
    end_color #A3A3A3
    frame_delay 22
    direction cw
    sparkles
    use_background n
    background_color #0B3802
    submit Submit Form to create your target model


    [​IMG]




    And here is a color hue , leaving the hue and fading to black.
    _POST
    username f
    user_target AA
    effect_class spirals
    effect_name GRAY_CHECK
    number_spirals 4
    number_rotations 2
    spiral_thickness 2
    window_degrees 360
    start_color #FA053E
    end_color #3D3637
    frame_delay 22
    direction cw
    sparkles
    use_background n
    background_color #0B3802
    submit Submit Form to create your target model


    [​IMG]




    Here is readers digest of all changes so far this last week:





    NUTCRACKER SUMMARY OF CHANGES



    Effect builder now has new options:
    1) sparkles: is a number form 0-100. This indicates what percentage of teh pixels being drawn should have their color overwritten and instad be set to white.
    0 means , do not have any sparkles.


    2) window_degrees:[/B] Value 0-360 degres
    this is how much of your tree will be displayed.
    360 will show entire tree, 180 = half a tree, 90 = 1/4 of a tree.
    thanks


    3) Nutcracker now displays timing as it runs


    Example:
    Creating Effect, spirals class: : Elapsed time = 0.13534 seconds
    Finished Effect, spirals class: : Elapsed time = 0.24950 seconds
    Starting Rotate image about Z axis : Elapsed time = 0.24957 seconds
    Finished Rotate image about Z axis : Elapsed time = 11.28429 seconds
    Making gnuplot command file: : Elapsed time = 11.28435 seconds
    Finished gnuplot command file: : Elapsed time = 11.38652 seconds
    Calling Gnuplot: : Elapsed time = 11.38672 seconds
    Finished Gnuplot: : Elapsed time = 26.79310 seconds
    Calling Imagick to make animated GIF: : Elapsed time = 26.79319 seconds
    Finished Imagick to make animated GIF: : Elapsed time = 27.30974 seconds


    4) Two new options to set background color
    use_background Y
    background_color #067306
    [/B]
    If you answer yes u want a background color, every pixel of your tree will be set to that color.
    Next i take whatever animation you have and put it on top of the background.




    5) Added the Gallery of effects
    to the effects form. Now you can see all other users effects.


    6) Added current meter to show how much DC current is being drawn by your animation


    7) Fixed color bug. In H1,S1,V1 => H2,S2,V2 transformations, i was only modifying the hue.




    END OF SUMMARY

    [/b]
     
  11. OP
    OP
    smeighan

    smeighan Dedicated Elf

    Joined:
    Jan 19, 2012
    Messages:
    1,076
    Likes Received:
    16
    Location:
    4217 Greenfinch Dr CO 80126
    New release of Nutcracker has spiral class option: handiness


    The choice is L or R indicating which way the spiral goes down the tree.


    Here is a right handiness tree
    [​IMG]


    here is same tree but with left handiness
    [​IMG]


    And here are the settings for the models
    LEFT
    _POST
    username f
    user_target AA
    effect_class spirals
    effect_name left_TEST
    handiness L
    number_spirals 4
    number_rotations 2
    spiral_thickness 2
    window_degrees 180
    start_color #FF147A
    end_color #FFF712
    frame_delay 5
    direction cw
    sparkles
    use_background n
    background_color #FFFFFF
    submit Submit Form to create your target mode


    and the RIGHT model


    _POST
    username f
    user_target AA
    effect_class spirals
    effect_name RIGHT_TEST
    handiness R
    number_spirals 4
    number_rotations 2
    spiral_thickness 2
    window_degrees 180
    start_color #FF147A
    end_color #FFF712
    frame_delay 5
    direction cw
    sparkles
    use_background n
    background_color #FFFFFF
    submit Submit Form to create your target model


    And I finish with summary of changes to Nutcracker.



    NUTCRACKER SUMMARY OF CHANGES



    Effect builder now has new options:
    1) sparkles: is a number form 0-100. This indicates what percentage of teh pixels being drawn should have their color overwritten and instad be set to white.
    0 means , do not have any sparkles.


    2) window_degrees: Value 0-360 degres
    this is how much of your tree will be displayed.
    360 will show entire tree, 180 = half a tree, 90 = 1/4 of a tree.


    3) Nutcracker now displays timing as it runs


    Example:
    Creating Effect, spirals class: : Elapsed time = 0.13534 seconds
    Finished Effect, spirals class: : Elapsed time = 0.24950 seconds
    Starting Rotate image about Z axis : Elapsed time = 0.24957 seconds
    Finished Rotate image about Z axis : Elapsed time = 11.28429 seconds
    Making gnuplot command file: : Elapsed time = 11.28435 seconds
    Finished gnuplot command file: : Elapsed time = 11.38652 seconds
    Calling Gnuplot: : Elapsed time = 11.38672 seconds
    Finished Gnuplot: : Elapsed time = 26.79310 seconds
    Calling Imagick to make animated GIF: : Elapsed time = 26.79319 seconds
    Finished Imagick to make animated GIF: : Elapsed time = 27.30974 seconds


    4) Two new options to set background color
    use_background Y
    background_color #067306

    If you answer yes u want a background color, every pixel of your tree will be set to that color.
    Next i take whatever animation you have and put it on top of the background.




    5) Added the Gallery of effects
    to the effects form. Now you can see all other users effects.


    6) Added current meter to show how much DC current is being drawn by your animation


    7) Fixed color bug. In H1,S1,V1 => H2,S2,V2 transformations, i was only modifying the hue.


    Handiness option now on spiral class. You can specify which way the spirals are drawn as they go from top to bottom on your tree.




    END OF SUMMARY
     
  12. joeengler

    joeengler Apprentice Elf

    Joined:
    May 20, 2010
    Messages:
    90
    Likes Received:
    0
    Location:
    Garden City, MI 48135
    This is a great project that will help a lot of people using RGB trees this year. I can't wait until we can click on everyones sample and see how each one was configured or use it as a base to set your own up.
     
  13. OP
    OP
    smeighan

    smeighan Dedicated Elf

    Joined:
    Jan 19, 2012
    Messages:
    1,076
    Likes Received:
    16
    Location:
    4217 Greenfinch Dr CO 80126
    One user has loaded a vir file and got the profile setup for Vixen.


    he made a movie of what it looks like:



     
  14. AussiePhil

    AussiePhil Dedicated Elf Administrator

    Joined:
    Jun 20, 2009
    Messages:
    1,391
    Likes Received:
    1
    Location:
    Canberra, ACT, Australia
    Find Me On:
    Sean

    I'm going to ask this without knowing how hard it is.

    Is it possible to create a pixel string input that goes goes up-down N-Times.

    Two reasons.
    One for short trees it's quite possible to go up-down-up-down in a single universe, thus maximising channels usage
    Two, it will shortly be possible to drive thousands of Pixels from a single controller port so the actual pixel data drive would be a continous run.
    as in a 32 x 50 count string tree has 1600 pixels with 16 x Up-Down sections with pixels numbered 1->1600.
    Shouldn't impact the vir/profile stuff in Vixen or any other software, it's more about the logical way we enter data into the model for you generate the actual Pixel Map.

    Cheers
    Phil

    Sorry to keep throwing requirements at you
     
  15. OP
    OP
    smeighan

    smeighan Dedicated Elf

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

    I already committed to this earlier today.





    all Nutcracker RGB effects are based on a simple topology


    The top of the model is always Nutcracker Pixel #1
    Going around the model , the vertical direction is called strands.


    whatever rgb device u have, a mega-tree a horizontal or vertial grid, lights wrapped around the spheres of a snowman. The top is always 1, vertical bars are strands .


    By keeping this internal form, all of my effects can be applied to any rgb device.


    This is why earlier i had said that the target modeler was the key to getting all the cool effects.


    I plan on some mini trees. I will take two strings, 120 pixels each. I will wrap each string 10 times, up and down. Each strand will have 12 pixels or 36". I will build a 180 degree, half tree.


    So with just two strings I will have a minitree that is 35" high.
    Here is what a two string minitree looks like:


    http://meighan.net/nutcracker_sean/effects/workspaces/2/AMINITREE+MINITREE1.gif


    [IMG]http://meighan.net/nutcracker_sean/effects/workspaces/2/AMINITREE+MINITREE2.gif


    [IMG]http://meighan.net/nutcracker_sean/effects/workspaces/2/AMINITREE+MINITREE3.gif


    I want to think of how to get some greate effects with only a few rgb strings. This will allow entry for more people.


    So yes, i plan on a target model that is 1-N up/down's


    thanks
    thanks
     

Share This Page