Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

animated gif imported into SL

Tazmania Trefusis
Registered User
Join date: 13 Jan 2008
Posts: 85
05-12-2008 12:02
I wanted to do a HUD type display for a vehicle on a flat semi transparent.
You know the HUD type of display....grid, moving crosshairs, some small text, numbers (speed etc)
I tried one frame, black on white and then inverted in CS3.
Applied that to the flat prim which was bright green with 50% transparancy. The effect was very good.... green vector gfx on dark semi trans glass.

So I started on the animated version using Xara Extreme (my fav gfx prg!)
I ended up with a 56 frame animated gif (or as seperate frames)
So then I had to find a way of getting it into SL.
Using the texture anim script which plays the frames from a 8x7 grid.
So 1st, I tried to get it gif converted to grid layout
I tried various animated gifs programs but the none offered export to a 8x7 grid..only vertical or horiz strips!

I tried the web based gif converters (www.peregrinesalon.com etc) and also tried bitstrip (no joy with bitstrip!)

In the end, I made up the grid in Xara by hand. 8 x 7 frames
Each frame was 512x512 so you can imagine how much detail was lost when the huge TGA came into SL as a 1024 texture!!

So I set up the script with correct number of columns and rows etc and tried it. It looked pretty good but the while animation was shifting to the right and back again by 1-2 pixels! (about 3 times during 56 frame loop)
I checked the original grid in Xara and none of the pasted frames were out, not by one pixel so the shifting must have happened in the conversion when brought into SL

So..am I trying with way too many frames?..am I expecting too much?
This was a VERY simple vector HUD and by no means finished, I just wanted to see what it looked like before doing any more detail on the HUD gfx. Concentric circles getting smaller to middle, full screen vertical & horix crosshairs moving from top left to bottom right..thats it so far!

So maybe try using smaller grid? less frames?
Mexico Nightfire
Registered User
Join date: 7 Feb 2008
Posts: 29
05-12-2008 12:10
try it with a basic frame number like 5 in gif movie gear

move it up til you find a limit then import in sections ?
Tazmania Trefusis
Registered User
Join date: 13 Jan 2008
Posts: 85
05-12-2008 12:41
Why import in sections?
To switch between selection of grid textures? to form one long/bigger animation?
I havent the appropiate script for that (if thats what you meant!)
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
05-12-2008 13:04
Instead of an 8x7 grid, use 8x8. You'll end up with a few empty frames at the end of the animation, but the script can easily be set to ignore those. The problem with 8x7 is that 1024 cannot be evenly divided by 7.

Your frame size at those divisions is 128x146.28571. Obviously, there can't be any such thing as .28571 of a pixel, so the system has to do it's best to try to round things as evenly as it can. Six out of every seven frames are likely coming out to 128x146, while the seventh is coming out to 128x148. That's why you're seeing things appear to shift by two pixels and there throughout the animation.

Go with 8x8, and you'll have an even 128x128 for your frame size. You won't experience any shifting with that at all (assuming you place everything precisely within each frame, which it sounds like you already were anyway).

Remember, for all things texture-related, including animation, powers of two are what it's all about. 8 will always work perfectly. 7 never will.

Happy animating. :)
_____________________
.

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.
Tazmania Trefusis
Registered User
Join date: 13 Jan 2008
Posts: 85
05-12-2008 15:28
Thanks Chosen..never thought of that!
I'll try the 8x8 asnd see what happens
Im not sure where I can specify certain frames to be left out??
It wouldnt be too much hassle in redoing the anim in a base 2 frame total
Does anyone know of a Gif Animator that outputs to a grid size of your requirements?
The 2 I tried output to strips and not grids.
One vert or horiz strip of 56 frames scaled down to 1024 would look terrible..18 pixels per frame lol

Also I have heard about a setup/script etc in SL that will allow you to load several small animations (your original animation broken down to smaller ones) for a texture face and load one after the other to create the full seamless larger animation.
Anyone come across that setup?
Tazmania Trefusis
Registered User
Join date: 13 Jan 2008
Posts: 85
05-20-2008 17:15
Okay, update
I recreated the animation and scaled down to 36 frames on a 6x6grid layout.
Produced in Xara, exported out to TGA and PNG as 3072x3072 pixel (6 x 512=3072)

Brought into Photshop, inverted to white on black and saved back out (same size) and then Imported into Second Life which esults in 1024x1024 texture

Setup the texture anim script to 6x6 and watch the results!

It's better!..but a center vertical line on the HUD is still moving from right to left & then back again :-(

Also a center horiz line is moving up & down very slightly but thats okay.

Am I going to have to put up with these 'abnormalities' in the conversion to second Life?

I know I have to put up with it being low res and somewhat pixely because of the max texture being 1024 but this seems to be alot of work for a small effect!
Ollj Oh
Registered User
Join date: 28 Aug 2007
Posts: 522
05-20-2008 18:37
image scales should be 16>= integer^2 <=1024
otherwise animations become jumpy and blurry.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
05-20-2008 19:42
6x6 cannot work smoothly for the same reason we discussed earlier. 6 is not a power of two. Change it to 8x8, or even 8x4 (32 frames instead of 36), and it will work just fine. I can't stress enough how important it is to stick with powers of two at all times for all things texture related.

If you really, really, really want 36 frames, go with an 8x8 grid, and leave the final 28 frames blank. Then just tell the script to ignore frames 37-64. You do that by setting the float start (third number in the script) to 1 and the float length (fourth number in the script) to 36. You'll be wasting a lot of pixels that way, but if you absolutely need 36 frames, that's the only way.

If it were me, I'd probably find a way to drop four frames, and go with an 8x4 grid (1024x512 canvas).


Just to repeat it one more time because it really is that important, stick with powers of two at all times. No if's, and's, or but's. Powers of two are the keys to the kingdom in texturing. Use any other numbers, and you'll always have problems.
_____________________
.

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.
Robin Sojourner
Registered User
Join date: 16 Sep 2004
Posts: 1,080
05-23-2008 12:42
Ummm.. I suggest that you save yourself a lot of grief, and just use the little web program that FlipperPA Peregrine made.

You'll find it at
http://www.peregrinesalon.com/anim/


Hope this helps!
_____________________
Robin (Sojourner) Wood
www.robinwood.com

"Second Life ... is an Internet-based virtual world ... and a libertarian anarchy..." Wikipedia
madddyyy Schnook
SLGuides Virtual Worlds
Join date: 2 Jan 2006
Posts: 207
06-03-2008 19:38
I use a program which is on the forums, its called bitstrip. drop the gif onto the program and it strips the gif to one long strip. then drop into sl and use the animated script. and use chosens advice of power of 2 and its good and easy.
Tazmania Trefusis
Registered User
Join date: 13 Jan 2008
Posts: 85
06-03-2008 23:38
One long strip would be terrible for any animations with a fair amount of frames. Even a 36 frame anim..would be what 28 pixels per frame horiz!!..that would look real bad.
The square 'column & Row' grid is much better allowing more resolution per frame.