Jump to content
Light-O-Rama Forums

Nutcracker: new effect, animated gif's


smeighan

Recommended Posts

Well, i have been busy. New Effect Class: gif


New effect will load an animated gif and project it onto your rgb device.

You each have a gif library space. Load up some animate gifs and see what they look like. Here is a suggestion, find very small gifs (like 32x32) that look good. Big gifs wont look so good .


So, since i knew i wanted as big a canvas as possible. These are going to be shown on a 16 string by 128 pixel matrix.
Each string is folded three times. This will make 49 strands of 42 pixels each.

So lets see what they look like.

First we will see the gif
usaCa.gif

array_to_save
username f
user_target AA22
effect_class gif
effect_name GIF1
file1 usaCa.gif
frame_delay 111
seq_duration 5
submit Submit Form to create your effect
OBJECT_NAME gif
[img width=753 height=600]http://meighan.net/nutcracker/effects/workspaces/2/AA22+GIF1.gif



lights11.gif
[img width=753 height=600]http://meighan.net/nutcracker/effects/workspaces/2/AA22+GIF2.gif

wreath06.gif
[img width=753 height=600]http://meighan.net/nutcracker/effects/workspaces/2/AA22+GIF3.gif

firework64.gif
[img width=753 height=600]http://meighan.net/nutcracker/effects/workspaces/2/AA22+GIF4.gif

Not all gifs seem to work as nicely.

bells2.gif
AA22+GIF5.gif

santa.gif
[img width=753 height=600]http://meighan.net/nutcracker/effects/workspaces/2/AA22+GIF6.gif


So enjoy. There are number of things i will probably add to the class. Black out backgrounds, look at fixing some transparency issues , .etc.

It is enough for you to get started.

thanks

Link to comment
Share on other sites

I get an error:

make_gp(workspaces/117, CCB_16+GIF.dat, CCB_16.dat, , Array, jimswinder, 50, 1334203184.08, Array, 10, N);

path=,, base= [b]Warning[/b]:  fopen(/.gp) [[url=http://meighan.net/nutcracker/effects/function.fopen]function.fopen[/url]]: failed to open stream: Permission denied in [b]/users/meighan.net/htdocs/nutcracker/effects/read_file.php[/b] on line [b]1030[/b]
can't open file

Link to comment
Share on other sites

re posting because some of teh gifs did not display

New effect will load an animated gif and project it onto your rgb device.



So lets see what they look like.

First we will see the gif
usaCa.gif

array_to_save
username f
user_target AA22
effect_class gif
effect_name GIF1
file1 usaCa.gif
frame_delay 111
seq_duration 5
submit Submit Form to create your effect
OBJECT_NAME gif
[img ]http://meighan.net/nutcracker/effects/workspaces/2/AA22+GIF1.gif



lights11.gif
AA22+GIF2.gif

wreath06.gif
[img ]http://meighan.net/nutcracker/effects/workspaces/2/AA22+GIF3.gif

firework64.gif
AA22+GIF4.gif

Not all gifs seem to work as nicely.

bells2.gif
AA22+GIF5.gif

santa.gif
[img ]http://meighan.net/nutcracker/effects/workspaces/2/AA22+GIF6.gif


So enjoy. There are number of things i will probably add to the class. Black out backgrounds, look at fixing some transparency issues , .etc.

It is enough for you to get started.

thanks

Link to comment
Share on other sites

jimswinder wrote:

I get an error:

make_gp(workspaces/117, CCB_16+GIF.dat, CCB_16.dat, , Array, jimswinder, 50, 1334203184.08, Array, 10, N);
path=,, base= [b]Warning[/b]:  fopen(/.gp) [[url=http://meighan.net/nutcracker/effects/function.fopen]function.fopen[/url]]: failed to open stream: Permission denied in [b]/users/meighan.net/htdocs/nutcracker/effects/read_file.php[/b] on line [b]1030[/b]
can't open file




You didnt spell out your gif file exactly.

You had "jeff-giff" when the filename is actually "jeff-giff.gif".

Filenames must match your gif files exactly. They are case sensitive.,

Also your gif file is 128x128 pixels in size. You dont have a target file that is that big.

Also, i have not released the RAY targets yet. I know they are a choice, the coding is not done for them

So i created a new target CCB_16_SEAN with is 16x50 with 1 fold. Your original CCB_16 said 16x150. Remember , I need the number of pixels per string, not LED's. I dont think anyone has a string that supports 150 pixels. Is this an CCR? If yes, then the pixel count is 50.

So , when i try my target CCB_16_SEAN , which is 16x50 matrix, folded. i get 32 strands by 25 pixels.

Projecting your 128x128 is only going to catch the top of the image. Here is what it looks like:


CCB_16_SEAN+GIF.gif

As i suggested, you should look for small animated gif's that are around 32x32.


Here is the wreath on your target

wreath06.gif
The wreath is a 50x50 gif.

CCB_16_SEAN+GIF2.gif

i will right an autoscaler, but it is going to only make the images look worse as i throw some away to make it fit.
Link to comment
Share on other sites

smeighan wrote:

you didnt spell out your gif file exactly.

how about being able to "Browse" for the file instead of typing it in?
Link to comment
Share on other sites

jimswinder wrote:

smeighan wrote:
you didnt spell out your gif file exactly.

how about being able to "Browse" for the file instead of typing it in?


It is on my todo list.

Next up fot this effect is autoscaling the gif's. This requires that i convert the image into true color, then adjust size then create a palette of < 256 colors and finally recreate the new gif.

I will give the option of using the gif the way it is (This is what we have now) or have it auto converted to match your target rgb device.

Also many animated gifs use transparency (like the bells and santa in my first example). They expect to drop one layer and then drop another letting teh first layer show through. I currently am only display each frame without persistence from previous frames. It will require work on my part to do that.


thanks for being patient, there is just a lot of little things i need to work on.
Link to comment
Share on other sites

Does the size of the gif have to match the number of pixels in the target? So if I was trying to do a matrix, to do a 32 x 32 gif I would need a 32 x 32 matrix at least?

Link to comment
Share on other sites

ainsworth wrote:

Does the size of the gif have to match the number of pixels in the target? So if I was trying to do a matrix, to do a 32 x 32 gif I would need a 32 x 32 matrix at least?


Right now yes. I am writing auto sizing code now.

suppose you have 16 CCR's. I would fold them into

32x25 matrix.

Now when i map the wreath (which is 50x50) you will only see 32x25.

The autoscale is going to do this
change the 50x50 256 color into a 50x50 16 million true color image

Scale 50x50 down to say 25x25. It will average the colors together .

Now change the 25x25 true color image and select up to 256 colors for the new gif. Create a new resized gif.

There are many tools that manipulate gif files so i am not sure how much of photoshop i will recreate into Nutcracker.
I would never finish if i let myself become a photoshop lite. I will put in a few simpler image manipulations.

To make these look good , you need more pixels. The secret is finding someone who made a cool animation with very little pixel count. There are 100,000's of gif's out there. Maybe people could share the better sites.

My rule of thumb: if it looks good as a 32x32 gif, it will probably work in Nutcracker.

thanks
Link to comment
Share on other sites

New option to allow a brightness increase. There is a new prompt in the effect class, BRIGHTNESS.

If you answer yes then
for every pixel who has a brightness > 10%
increase its brightness by 50%

Here is what it does
Original
AA22+GIF1.gif




(Note for Apr12) With new BRIGHTNESS option set to Y
AA22+GIF1_BRIGHT.gif

Link to comment
Share on other sites

Sean,

As I've said before, super job, you da man!

Question: Can you setup a sequence so that it only makes one pass through the gif but times it to match the number of cells you want it to produce. Example, I make a gif that has 20 frames but I want it spread over 200 cells will it create 10 cells for each frame thus totaling 200 cells?

Auto scaling is going to be great!

Link to comment
Share on other sites

smeighan wrote:

Here is the wreath on your target

wreath06.gif
The wreath is a 50x50 gif.

CCB_16_SEAN+GIF2.gif
Hey Sean...

you sure that wreath is on my target? I thought my target was in the shape of a tree...
Link to comment
Share on other sites

I have populated into everyones account a copy of the animated gifs i have been using. Your gif library is now pre-seeded with a dozen or so gif's.


I also forgot to mention , that all the animated gifs work on any target, not just the Matrix targets..

Here is an animated firework on a 16x100 megatree that has been folded into 32x50

fireworks16.gif
AA+GIF_FIREWORKS16_MTREE.gif

thanks

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...