Author Topic: Nutcracker, new effect, butterfly part2  (Read 1511 times)

Offline smeighan

  • Moderator
  • Sr. Member
  • *****
  • Posts: 2285
    • Nutcracker RGB Sequence Builder
Nutcracker, new effect, butterfly part2
« on: March 22, 2012, »
There are now three more prompts on the butterfly effect.

They are
background_chunks: You put a number here of how many chunk to divide your color range into
background_skip: You put a number to indicate how of the above chunks to skip before your background color is applied
background_color: You put the color to override here, #000000 - #FFFFFF

So it may be easier to show by example.

We start with the background feature disabled. This is done by setting background_chunks=0

_POST
username   f
user_target   ZZ_ZZ
effect_class   butterfly
effect_name   FLY_0_0
window_degrees   180
frame_delay   50
sparkles   
seq_duration   5
radian_shift   .05
start_color   #FFFFFF
end_color   #FFFFFF
background_chunk   0    <== This indicates background effects are turned off
background_skip   0
background_color   #000000

submit   Submit Form to create your effect



_POST
username   f
user_target   ZZ_ZZ
effect_class   butterfly
effect_name   FLY_10_4
window_degrees   180
frame_delay   50
sparkles   
seq_duration   5
radian_shift   .05
start_color   #FFFFFF
end_color   #FFFFFF
background_chunk   10
background_skip   4
background_color   #6468DE

submit   Submit Form to create your effect



_POST
username   f
user_target   ZZ_ZZ
effect_class   butterfly
effect_name   FLY_10_2
window_degrees   180
frame_delay   50
sparkles   
seq_duration   5
radian_shift   .05
start_color   #FFFFFF
end_color   #FFFFFF
background_chunk   10
background_skip   2
background_color   #000000

submit   Submit Form to create your effect




_POST
username   f
user_target   ZZ_ZZ
effect_class   butterfly
effect_name   FLY_50_2
window_degrees   180
frame_delay   50
sparkles   
seq_duration   5
radian_shift   .05
start_color   #FFFFFF
end_color   #FFFFFF
background_chunk   50
background_skip   2
background_color   #000000

submit   Submit Form to create your effect



So many combinations possible now, have fun
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, butterfly part2
« Reply #1 on: March 22, 2012, »
Another feature request... :)

I like this effect, but the discontinuity experienced if I looped this effect would be an annoyance.  If I attempted to do another similar sequence with the object of sequencing one after another would not help... the second sequence would not match up the the first.

So...  my suggestion is a general feature that might be available for all effects:  "[X] Reverse pattern 1/2-way through effect"

If I ask for a 10-second sequence, then at the 5-sec mark the pattern would turn back in the other direction... and it would return back to the original pattern.  I'm thinking that the coding would be minor, and it can be applied generally to spirals, butterflies, and whatever else comes along.

Assuming you loop the 10-second effect using your sequence editor...  to the viewer the effect might have a clockwise rotation followed by a counter-clockwise rotation, and back to CW, then CCW, etc.

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

Offline smeighan

  • Moderator
  • Sr. Member
  • *****
  • Posts: 2285
    • Nutcracker RGB Sequence Builder
Re: Nutcracker, new effect, butterfly part2
« Reply #2 on: March 22, 2012, »
You are not allowed to view links. Register or Login
Another feature request... :)

I like this effect, but the discontinuity experienced if I looped this effect would be an annoyance.  If I attempted to do another similar sequence with the object of sequencing one after another would not help... the second sequence would not match up the the first.

So...  my suggestion is a general feature that might be available for all effects:  "[X] Reverse pattern 1/2-way through effect"

If I ask for a 10-second sequence, then at the 5-sec mark the pattern would turn back in the other direction... and it would return back to the original pattern.  I'm thinking that the coding would be minor, and it can be applied generally to spirals, butterflies, and whatever else comes along.

Assuming you loop the 10-second effect using your sequence editor...  to the viewer the effect might have a clockwise rotation followed by a counter-clockwise rotation, and back to CW, then CCW, etc.

what do you think?

Great minds Steve. i already coded what you asked yesterday. I havent released it,
The other way to do this is to bring the radian value back to the original start.

This is the current logic for butterfly

radian=0;
for (frame=1;frame<=maxFrame;frame++)
{
butterfly(xx,xx,xx,radian_offset);
}

function butterfly(xx,xx,xx,radian_offset)
{
radian=radian+=radian_offset;
do the rest
}

I will release this code to stop jumps by tomorrow night, i hope.




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 smeighan

  • Moderator
  • Sr. Member
  • *****
  • Posts: 2285
    • Nutcracker RGB Sequence Builder
Re: Nutcracker, new effect, butterfly part2
« Reply #3 on: March 22, 2012, »
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 cause the movemtn betweem frames. The issue is it was not an even multiple of 2pi over the rfames.

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

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, butterfly part2
« Reply #4 on: March 22, 2012, »
You are not allowed to view links. Register or Login
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 cause the movemtn betweem frames. The issue is it was not an even multiple of 2pi over the rfames.

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
great!  will this work for other non-butterfly effects?  spirals, etc.?
You are not allowed to view links. Register or Login  |  110K channels, 50K lights  |  Nutcracker, Falcon, DLA, HolidayCoro

Offline smeighan

  • Moderator
  • Sr. Member
  • *****
  • Posts: 2285
    • Nutcracker RGB Sequence Builder
Re: Nutcracker, new effect, butterfly part2
« Reply #5 on: March 22, 2012, »
You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login
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 cause the movemtn betweem frames. The issue is it was not an even multiple of 2pi over the rfames.

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
great!  will this work for other non-butterfly effects?  spirals, etc.?

Spirals should be done. I create the same frames as strands.

The others need adjustment to make then cycle correctly. It is on my to do list.

It is great that people are bringing up these issues, it tells me people are using the tool.

I do expect to polish all effects by the time the beta release come out in May.

thanks
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