Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

animated gifs

swaffette Firefly
Registered User
Join date: 23 Jul 2004
Posts: 126
09-11-2004 04:07
Can anyone tell me if animated gifs can be used as textures on second life - if they can do they need a script? and are there any tutorials :rolleyes:
Thanks in advance:D
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
09-11-2004 10:36
You cannot use animated GIF's in SL. All uploaded images must be in TGA or JPG format.

You can simulate the effect though by placing each frame of the animation sequence in a specific area of the canvas and using a script to move the viewable area of the texture from one location to another. Think of the texture as a filmstrip sliding past a projector bulb. All "frames" are on the same piece of material, but the viewable area of that material changes in sequence.
_____________________
.

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.
Jake Cellardoor
CHM builder
Join date: 27 Mar 2003
Posts: 528
09-11-2004 10:38
It's possible, but you'll need a script. First you have to convert your animated GIF to a static texture, where the individual frames of the animation are all visible and laid out in rows. Once you upload that texture into SL, you can add a script that uses llSetTextureAnim to animate it. There may be a tutorial for this somewhere, I don't know.

Edit: the script is simple, I can give you a copy. I don't know how to convert an animated GIF into a JPEG, though.
Eddie Escher
Builder of things...
Join date: 11 Jul 2003
Posts: 461
09-13-2004 01:03
Google for a program called 'Gif MovieGear'. The trial should let you load and save without problem. You can load in a GIF and export a 'gifstrip', with all the frames laid out on one image.
_____________________
Eddie Escher
...apparently 3 out of 4 people make up 75% of the population here...

Eddie Escher Gadgets & Skins: Hotei and Seacliff
Ark Gullwing
I didn't do it, I swear
Join date: 30 Jul 2004
Posts: 24
Scriptage
09-20-2004 23:14
Hey can i get a copy of that script too? =P I wanna make blinking eyes for my avatar.
andre Spaight
will work for food
Join date: 4 Aug 2004
Posts: 23
09-28-2004 18:10
dont their eyes already blink?
_____________________
ALS- andres logo service

makes logos for all

im me in da game for more info...
Essence Lumin
.
Join date: 24 Oct 2003
Posts: 806
09-28-2004 18:18
The Gimp is a free picture editing program too. When you load an animated gif into the gimp it puts each frame into a layer. Then you can save each layer as a jpeg or whatever.
Essence Lumin
.
Join date: 24 Oct 2003
Posts: 806
09-28-2004 18:21
The blinking eyes won't work unless you put an attachment on your eyes. Nowhere to put the script into.
Dragon Stryker
Destroyer of Heavens
Join date: 4 Jun 2004
Posts: 156
10-08-2004 11:25
From: Jake Cellardoor
It's possible, but you'll need a script. First you have to convert your animated GIF to a static texture, where the individual frames of the animation are all visible and laid out in rows. Once you upload that texture into SL, you can add a script that uses llSetTextureAnim to animate it. There may be a tutorial for this somewhere, I don't know.

Edit: the script is simple, I can give you a copy. I don't know how to convert an animated GIF into a JPEG, though.


I too would like a copy of that script if possible. Thanks.
Meiyo Sojourner
Barren Land Hater
Join date: 17 Jul 2004
Posts: 144
10-08-2004 17:24
I have a "Video Frame" that I sell for pretty cheap that is more or less an animated GIF player. Go to Eagan,226,152 if you want to play with a working model of it and see what various clips I've done so far look like. Also, see http://www.badgeometry.com/wiki/llSetTextureAnim for the basic concept behind the script.

The trick to making decent texture clips from animated gifs is balancing duration/ framerate/ and frame resolution. Also, making the clip texture a straight row of frames isn't as good as making it as several rows of frames. You can get a 49 frame clip to look fairly decent for most people (ie it shows up well when being displayed as a 512) but that's kinda pushing it. Stick with 36 frames or less when possible.

HTH.
-Meiyo
_____________________
I was just pondering the immortal words of Socrates when he said...
"I drank what??"
Jake Cellardoor
CHM builder
Join date: 27 Mar 2003
Posts: 528
10-09-2004 00:13
Here's a simple script to do texture animation:

CODE

default
{
state_entry()
{
llSetTextureAnim( FALSE, 1, 1, 1, 0, 0, 1 );
}

touch_start(integer total_number)
{
if ( llDetectedKey( 0 ) == llGetOwner() )
state running;
}
}


state running
{
state_entry()
{
llSetTextureAnim( ANIM_ON | LOOP,
ALL_SIDES, // face to display animation on
2, 2, // layout of cels in texture
0, // start frame
0, // number of frames to animate
4 ); // frames per second
}

touch_start(integer total_number)
{
if ( llDetectedKey( 0 ) == llGetOwner() )
state default;
}
}


This script toggles the animation on or off when the owner touches the object.
Nick Fortune
National Alchemist
Join date: 30 May 2003
Posts: 74
10-10-2004 08:01
Yes, your eyes should already blink on their own, that is unless you arent paying them enough and offering a competative benefits package. :rolleyes:
Ryntha Suavage
Kitten
Join date: 4 Jul 2004
Posts: 419
10-15-2004 06:14
From: Nick Fortune
Yes, your eyes should already blink on their own, that is unless you arent paying them enough and offering a competative benefits package. :rolleyes:


I think they were talking about an avatar that they created out of prims, (NOT the default avatar) which you can animate to blink much like what the Luskwood Creatures crew does.
_____________________