Can someone tell me how to make a flashing neon sign for SL? I'm assuming some kind of script is used.
tia
These forums are CLOSED. Please visit the new forums HERE
Neon signs in SL |
|
|
tr0n Rich
Registered User
Join date: 25 Apr 2006
Posts: 19
|
11-25-2006 08:45
Can someone tell me how to make a flashing neon sign for SL? I'm assuming some kind of script is used.
tia |
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
11-25-2006 09:15
I'd recommend using a texture animation script. The simplest thing to do is to divide your texture into two halves (two animation frames), one half showing the sign all lit up, and the other half showing it unlit. The script will then simply flip back and forth between which half is displayed on the prim surface.
I'm pretty sure a sample texture animation script comes in your library, but if not, it's easy enough to grab one from the texturing forum or from the wiki. Speaking of the wiki, I'd suggest you read the section on how to use texture animation, so you'll know what all the variables in the script are for. I wouldn't bother with trying to make the sign actually cast light. Lighting in SL is still in its infancy. You can certainly set it up to flip between states of emitting light and not emitting light, but it will be taxing on the server to keep updating the object. Also, not everyone will be able to see the effect since not everyone has local lighting turned on. Textures are always a safer bet. Everyone's guaranteed to be able to see them. And since the animation is a client-side effect, you don't need to worry about stressing the server. Oh, and I'd suggest keeping Full Bright turned on for the sign, so it will stay fully lit in the dark. As with the local lighting thing, you could script the object to turn Full Bright on and off if you really wanted to, but again, you're putting unnecessary load on the server when you do that. It's better just to leave it on, full time. Chances are your unlit version of the sign will just be black (neon tubes are always painted black on the back, and are transparent in the front, so they appear black when unlit), so you won't need to worry about the Full Bright making the unlit sign glow in the dark. Black looks the same with or without Full Bright. _____________________
.
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. |
|
tr0n Rich
Registered User
Join date: 25 Apr 2006
Posts: 19
|
11-25-2006 09:44
Thank you so much Chosen. This is exactly what I was looking for. Thanks for sharing this with me. You are a fountain knowledge.
|
|
tr0n Rich
Registered User
Join date: 25 Apr 2006
Posts: 19
|
11-25-2006 10:51
Oh, one more thing. (You knew I'd be back, right? hehe)
What's the difference between frames and textures? I thought the idea was to just dump two textures in the content menu and add the script to rotate them on one surface of the prim. |
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
11-25-2006 12:13
By "frames", think of an image kind of like a filmstrip. It's one canvas, divided to contain two or more images.
Your idea of using a completely separate texture for each frame, and storing them all in the content menu would work, except there'd be a couple of practical issues. First, it will take time to rez each new texture every time the sequence advances to the next frame. Second, every time you change the properties of an object, you have to involve the server. Constantly flipping through an inventory of textures and reassigning which one is applied to the surface is a lot of unnecessary work for the server to have to do. Think of it kind of like playing a movie in RL. There are two ways to do it. You can use a flip book or you can use a film strip. The flip book seems much simpler in concept (which is why it was invented first), but it's actually much more complicated in practice. Flipping through a book of still image cells to create a moving picture does work, but there are a lot of lot of relatively complex mechanics involved to make it happen. A lot of moving parts are be required to align each page properly in the viewer at speed. The filmstrip in contrast is just one piece, much more efficient, much simpler and easier to work with. In SL, by putting all the images in the animation onto one master sheet, you only have to involve the server once to apply the single texture once. The animation script will set up the proper repeat and offset settings to show only that portion of the texture which constitutes a single frame. It will then cycle through the offsets to show the frames in sequence. That offset-cycling process is all client-side, very simple and efficient. The texture itself only has to be rezzed once. _____________________
.
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. |
|
tr0n Rich
Registered User
Join date: 25 Apr 2006
Posts: 19
|
11-26-2006 09:03
The simplest thing to do is to divide your texture into two halves (two animation frames), one half showing the sign all lit up, and the other half showing it unlit. The script will then simply flip back and forth between which half is displayed on the prim surface. Ok, I think I follow, but how do we divide the texture? Lets say my texture is 256 x 256. I would have to extend my canvas size to 512 x 256, correct? But, what does this do to the aspect ratio? Also, this will make a odd size texture for SL, no? |
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
11-26-2006 09:32
Yes, if you want two frames at 256x256, then your canvas would be 256x512. The aspect ratio will be fine since the animation script will instruct the prim to show only half of the texture at any given time. As long as your prim is square, so will be the texture.
As for sizes, SL will allow each dimension of the texture to be any power of two between 8 and 1024. They don't have to be square. You can have an 8x1024, a 256x32, a 128x 64, whatever you want, as long as it's powers of two within the range. For a complete list of acceptable texture sizes, see the sticky at the top of the forum. _____________________
.
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. |
|
tr0n Rich
Registered User
Join date: 25 Apr 2006
Posts: 19
|
11-26-2006 14:05
Yes, if you want two frames at 256x256, then your canvas would be 256x512. 256x512? Does this mean the frames should be lined up vertically...one above the other? |
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
11-26-2006 14:14
Either way, horizontally or vertically, whatever you prefer. If you take a look at the page I linked earlier about the animation script, it tells you what all the variables are. There's one for the number of frames on the X axis and one for the number of frames on the Y axis. Just plug your 1 and your 2 into the right spots in the script and you're good to go.
_____________________
.
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. |
|
Thunderclap Morgridge
The sound heard by all
Join date: 30 Sep 2006
Posts: 517
|
11-26-2006 15:30
Also remember to put in a location that while I am flying if I stop to look at something for a moment it will rez in front of me.
![]() I am curious, what you making that needs neon lighting? _____________________
Gimp:
n : disability of walking due to crippling of the legs or feet ie. lameness, limping, gameness, claudication secondlife://Amaro/77/130/39 Come to Thunderclap: the gospel chapel and Thunderburst: Mens clothes and more. |
|
tr0n Rich
Registered User
Join date: 25 Apr 2006
Posts: 19
|
11-26-2006 16:56
I am curious, what you making that needs neon lighting? Just want to learn howto make a sign that flashes...like a gif image. Thanks again Chosen. You rock! |