Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

rotate on 2 axis? lighting model

Cirian Pacer
Registered User
Join date: 25 May 2005
Posts: 2
09-21-2005 11:34
alright, i'm trying to model some intelligent lighting to use in my friends club. the problem im coming across is i would like it to rotate on 2 axis. there is a square base, with an arm that comes off of it that i would like to rotate BACK AND FORTH 180 degrees. that arm has a tube attatched to it that is the "bulb" if you will. i need that to rotate back and forth about 90 degrees. and the kicker, id like to be able to place multiple ones of these and have them all syncronized together. also is there a script i can put to automatically change the colors of light ever few seconds?
a picture of what i have can be found here http://img.photobucket.com/albums/v717/BlueChee/light.jpg

thanks
-Chee
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
09-21-2005 18:25
For the colors, it's easy. Simply use an animated texture that has each color in its own frame. Set the texture animation script to change frames at whatever timing you want the color change to occur at.

For the animation, it's a bit more complicated. I'd probably use set postion and rotation scritps for each component.
_____________________
.

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.
Cirian Pacer
Registered User
Join date: 25 May 2005
Posts: 2
09-21-2005 18:27
could you explain the "its own frame" thing to me? i've got photoshop cs2 but im not sure exactly how the frame spacing is set up and such... is there a post around here you could link me to?
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
09-21-2005 20:00
First, see the scripting wiki for an explanation of how texture animation works. What is meant by a frame is section of the texture, which the script will "focus" on to display on the prim for a specified length of time before moving to the next section. Think of it like playing a filmstrip. Whe you look at it as a whole, it's one continuous piece of material, but when you view it one section (frame) at a time, at the proper speed (by using a movie projector), it appears to be an animated image. Think of the script as the projector, and the texture as the film. When you look at the texture as a whole, it's just gonna be a series of pictures layed out across a canvas, but when the script "plays" it, it can be an animation, a series of flashing colors, or whatever else you can think of that you could make out of a series of images.

For an example, here's what the texture for an animated for a bouncing ball would look like. The canvas is divided into 8 frames. You can't see any lines inbetween them, but that's not important. What is important is that the ball changes position every 1/8 of the width of the image. By the way, this particular sequence is only one frame tall for simplicity purposes (to go with the filmstrip analogy), but it doesn't have to be that way. It could just as easily have been 2x4 instead of 1x8. It could even have been 3x3 with one frame ingonred by the script since 8 is all we need for this particular example. Whatever numbers you plug into the script will be how SL thinks the canvas is divided into frames. Putting the images into the frames so it looks believable on playback is up to you. SL just shows the sections one at a time according to how the script has been instructed ti divy it up.
_____________________
.

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.