Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Making animated textures IN WORLD?!

Jopsy Pendragon
Perpetual Outsider
Join date: 15 Jan 2004
Posts: 1,906
08-18-2006 13:48
With the new snapshot system we can create perfectly square 512x512 textures from in-world snapshots... and... if we set up the snapshot cleverly, we can even use them as animated textures. (who needs fancy 3rd party software anyway? ;))

Just for fun I set up 2 'gears' with a post connecting them as a sample to animate.

O-o

Then I selected all the bits, and using grid-snap and shift-drag, I created 15 copies, placed like so:

O-o O-o O-o O-o

O-o O-o O-o O-o

O-o O-o O-o O-o

O-o O-o O-o O-o

Then on each version, I made a slight adjustment. Rotated each gear 1/16th of a turn, changed the color a little, moved&rotated the post so it connected to the right part of each gear. The proper sequence goes from left to right, and then top down, ie:

01 02 03 04
05 06 07 08
09 10 11 12
13 14 15 16

I then hit (snapshot), set the resolution to 512x512, and carefully lined up the framing window so that it fit around my prims as closely as possible. *click* Then I dropped the texture on a prim and added the script:

CODE

default {
state_entry() {
llSetTextureAnim( ANIM_ON | LOOP, ALL_SIDES,
4, 4,
0.0, 16.0,
10.0 );
// Options , Sides,
// # of Frames Wide , # of Frames Tall,
// Starting Point , Ending Point ,
// Animation Speed
}
}


It took a few tries to get the alignment right to reduce the 'jiggling/jumping', but the end result worked out moderately well. (the example is next to TEAL(200,50) if you're curious!)

Tip: Don't try to snap the texture looking down from straight above, I don't think the camera can point exactly straight down which will cause your image to be keystoned a slight bit. Set up your frames so that they can be viewed and snapped from the side instead.

(oops)
Note: I only display 15 frames from the image, because rotating at 1/16th increments is easy to do, but would result in frame 16 being identical to frame 1. If both were displayed then it would cause the animation to look like it had stopped for a moment each loop.(oops)

Has anyone else tried setting up animated textures completely in world?
_____________________
* The Particle Laboratory * - One of SecondLife's Oldest Learning Resources.
Free particle, control and targetting scripts. Numerous in-depth visual demonstrations, and multiple sandbox areas.
-
Stop by and try out Jopsy's new "Porgan 1800" an advanced steampunk styled 'particle organ' and the new particle texture store!
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
08-18-2006 14:15
Very cool, Jopsy. Great idea.
_____________________
.

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.
Skah Ramona
Registered User
Join date: 21 Jan 2005
Posts: 9
08-19-2006 00:56
Excellent concept. But, it seems you are thinking too hard on the number of frames. You should use all 16 frames, unless you are moving 1/15th increments instead of 1/16th. Think of it this way, if you rotated in 1/4th you would need 4 frames, right? And if in 1/12ths (like a clock dial) you would need 12 frames.
Jopsy Pendragon
Perpetual Outsider
Join date: 15 Jan 2004
Posts: 1,906
08-19-2006 01:52
From: Skah Ramona
Excellent concept. But, it seems you are thinking too hard on the number of frames. You should use all 16 frames, unless you are moving 1/15th increments instead of 1/16th. Think of it this way, if you rotated in 1/4th you would need 4 frames, right? And if in 1/12ths (like a clock dial) you would need 12 frames.


You're so right. I started off with a 3x3 with 1/8th rotations and threw away frame 9 because it was a duplicate, then grew it to 4x4 grid and didn't adjust it back! :)
Reitsuki Kojima
Witchhunter
Join date: 27 Jan 2004
Posts: 5,328
08-21-2006 12:18
Way ahead of you, Jopsy ;) Although I did a little post-processing in photoshop.

I do it as a HUD attachment: It gives you a nice orthographic perspective for the snapshot.
_____________________
I am myself indifferent honest; but yet I could accuse me of such things that it were better my mother had not borne me: I am very proud, revengeful, ambitious, with more offenses at my beck than I have thoughts to put them in, imagination to give them shape, or time to act them in. What should such fellows as I do crawling between earth and heaven? We are arrant knaves, all; believe none of us.
Jopsy Pendragon
Perpetual Outsider
Join date: 15 Jan 2004
Posts: 1,906
08-21-2006 16:12
From: Reitsuki Kojima
Way ahead of you, Jopsy ;) Although I did a little post-processing in photoshop.

I do it as a HUD attachment: It gives you a nice orthographic perspective for the snapshot.


That would certainly make it easier! I'm gonna have to give that a try! :D