Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Caustics Generator

Arielyn Docherty
I DO Believe in Santa!
Join date: 3 Jul 2007
Posts: 625
04-20-2009 14:21
Hi all...was wondering if anyone has used Caustic Generator at dualheights.se? I love it, but I think I'm doing things the hard way. When I render the animation from the program, it is saved in individual bmp files. I then have to open them using Photoshop, load them as a layered file and animate that before converting it to an animated gif using an SL converter. Is there a way to save the rendered images as the actual animation from the generator that I'm missing?? If not is there an easier way to animate the rendered files other than PS? Thanks in advance...and thanks to Ting Luminos for the heads up on the program.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
04-20-2009 16:15
I'm confused why you're using GIF at all. You're losing more than 99.99999% of your potential color information that way. GIF only supports 256 colors, while those BMP's you're rendering can have more than 16 million colors in them.

To turn those renderings into an SL-compatible animation, simply size them appropriately, paste them into a larger master image, and position them in the proper order. Considering that even a very large animation for SL wouldn't have more than 64 frames or so in it, it shouldn't take you more than a minute or two to position them all.



To answer your specific question about rendering directly to a video file or pre-animated GIF, that's almost never a good idea. The usual way animations are put together is to render an image sequence, just as you've been doing. From there, the sequence can be imported into compositing program like After Effects or Photoshop for post processing, and/or a video editing program like Premiere or Final Cut if the goal is to turn the sequence into a movie.

Here's why. If you're rendering to a single movie file, and you need to stop at any point during the process, you'll need to do the whole thing over again. But if you're rendering to an image sequence, you can stop and start at any time, and just pick up right at the frame at which you left off.

Also, movie files can quickly overwhelm a computer's resources. Since the entire sequence is a single file, you need to be able to fit the whole thing in memory at once. That puts a serious limit on the maximum length and resolution you can have. But if you're doing an image sequence, you only need to keep one frame in memory at any given time. A movie can be 10 frames or 10 million frames, and the computer won't care.

For this reason, Hollywood movies are not delivered to theaters as video. They come as sequences of thousands of JPEG2000 images, which the digital projectors display one by one in sync with the audio track. It's basically a virtual filmstrip.

The only difference between that method and the SL method is that the Hollywood sequences are a bunch of individual files, while the SL sequences put all the image frames on a single canvas. The principle is exactly the same, though.

In other words, the behavior you're seeing from Caustics Generator is nothing unusual. Image sequencing is standard practice for animation.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Arielyn Docherty
I DO Believe in Santa!
Join date: 3 Jul 2007
Posts: 625
04-20-2009 16:41
The script I am using to "play" the anim is one that is from a converter I'm using. So forgive my ignorance, but I wouldn't know where to start with the frame rate, etc. in LSL....that's why the GIF--the converter needed a gif to produce the animation. So...I put these images into a master image, appropriately sized and in sequence....four x 8? There are 32.... The final step is the script. Suggestions? Or am I misunderstanding?

Edited to add: Yeah, you're spot on about the loss of depth due to the color limitations of the gif format. I noticed it right away but didn't know enough to realize why it was happening!
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
04-20-2009 19:19
From: Arielyn Docherty
The script I am using to "play" the anim is one that is from a converter I'm using. So forgive my ignorance, but I wouldn't know where to start with the frame rate, etc. in LSL....that's why the GIF--the converter needed a gif to produce the animation. So...I put these images into a master image, appropriately sized and in sequence....four x 8? There are 32.... The final step is the script. Suggestions? Or am I misunderstanding?

Edited to add: Yeah, you're spot on about the loss of depth due to the color limitations of the gif format. I noticed it right away but didn't know enough to realize why it was happening!

I personally don't have a time to work with it tonight but if you post what you are doing over in Scripting Tips someone, or a handful, should be able to fix you up Arielyn. We were just talking about starting a series to help new scripters. Start the title of the thread with [Challenge] in brackets so that it is easily identifiable.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
04-20-2009 19:57
From: Arielyn Docherty
So...I put these images into a master image, appropriately sized and in sequence....four x 8? There are 32.... The final step is the script. Suggestions? Or am I misunderstanding?

Sounds like you're understanding perfectly. If there are 32 frames, then the arrangement could be 4x8, or 2x16, or even 1x32, depending on how you want to set it up. 4x8 would obviously give you the maximum possible size per frame. A 4x8 layout at 128x128 for each frame, would give you a total image size of 512x1024.

Simply arrange the frames from left to right, and from top to bottom, just as you would if you were putting them on a page in a book, to be read in order. Then you'll adjust the script parameters to reflect that layout, and to set the speed at which you want them to play. It's actually a lot easier than you think it is. I couldn't script much of anything if my life depended on it, but even I can handle a texture animation command. It's just a question of knowing which numbers in the command line control which functions.

You can read up on that at http://wiki.secondlife.com/wiki/LlSetTextureAnim or you can take Jesse up on his offer to help you over in Scripting Tips. For now, the way I'd set up the command line would be:

llSetTextureAnim( ANIM_ON | LOOP, ALL_SIDES, 4, 8, 1, 32, 10 );

In English, that translates to:

"Turn the animation on. Loop it so it plays continuously. Play it on all sides of the prim. There are 4 frames in the X dimension and 8 frames in the Y dimension. Start the animation at frame 1. Finish the animation at frame 32. Play 10 frames per second."

That last number can be whatever you want it to be. I just picked 10 at random. The higher the number, the faster the animation will play.

I don't want to divert this thread to dive too much into scripting, since this is Building Tips, not Scripting Tips, so I'll just leave it at that. Plus, I wouldn't be able to explain too much more anyway. Scripting's really not my thing. I'm sure Jesse or someone else over there could do a much more thorough job than I could.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
04-20-2009 20:23
From: Chosen Few
I don't want to divert this thread to dive too much into scripting, since this is Building Tips, not Scripting Tips, so I'll just leave it at that. Plus, I wouldn't be able to explain too much more anyway. Scripting's really not my thing. I'm sure Jesse or someone else over there could do a much more thorough job than I could.

Modesty does not befit you. You are brilliant, could handle this baby script with no problem(which you did) and much more, and have successfully covered all of the bases. Please don't ever worry about territory and just keep on helping people any way you can.

We have just been thinking of easy scripts for new people to sink their teeth into. Allow multiple people to post the way they would do a script so that everyone can learn. There really was not much meat in this one anyway.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Arielyn Docherty
I DO Believe in Santa!
Join date: 3 Jul 2007
Posts: 625
04-21-2009 03:41
Thank you so much to you both! I'm adept at PS and texturing, but scripting language just confounds me. I was able to follow Chosen Few's directions VERY easily and have never seen even a simple script made so accessible. Thank you, thank you, thank you!!!