I'm trying to make a light that will randomly turn on and off, or flicker (if used with a fast timer), but I can't find out how to change the "Full Bright" setting of a prim on and off.
Unless someone has a better idea?
Lewis
These forums are CLOSED. Please visit the new forums HERE
Flickering light |
|
|
Lewis Nerd
Nerd by name and nature!
Join date: 9 Oct 2005
Posts: 3,431
|
05-06-2006 10:03
I'm trying to make a light that will randomly turn on and off, or flicker (if used with a fast timer), but I can't find out how to change the "Full Bright" setting of a prim on and off.
Unless someone has a better idea? Lewis _____________________
Second Life Stratics - your new premier resource for all things Second Life. Free to join, sign up today!
Pocket Protector Projects - Rosieri 90,234,84 - building and landscaping services |
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
05-06-2006 12:13
wiki and llSetPrimitiveParams()
|
|
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
|
05-06-2006 12:27
Bear in mind that llSetPrimitiveParams() has a built-in script delay of 0.2 seconds, so very rapid flickering may not be possible with this function. You may also be able to use things like texture animation or changing the alpha or colour of the objects to get the desired effect as well, since I don't believe they're delayed.
_____________________
- Making everyone's day just a little more surreal -
Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?" |
|
Lewis Nerd
Nerd by name and nature!
Join date: 9 Oct 2005
Posts: 3,431
|
05-06-2006 12:29
Texture swapping just doesn't seem to work as they aren't cached properly, and there's no way to pre-load the textures like you can sound.
I guess a colour tint of white > grey > white might do the job. Lewis _____________________
Second Life Stratics - your new premier resource for all things Second Life. Free to join, sign up today!
Pocket Protector Projects - Rosieri 90,234,84 - building and landscaping services |
|
Evol Menoptra
Registered User
Join date: 25 Nov 2005
Posts: 7
|
Flicker light
05-06-2006 12:35
you might want to try the effect rotating a texture.. cros 2 prims or more and set them up might have the result you want
|
|
Champie Jack
Registered User
Join date: 6 Dec 2003
Posts: 1,156
|
05-06-2006 12:45
Texture swapping just doesn't seem to work as they aren't cached properly, and there's no way to pre-load the textures like you can sound. I guess a colour tint of white > grey > white might do the job. Lewis I'm curious about this comment. Once the client loads a texture, I see no problems when "swapping" textures quickly. Additionally, how is this much different than using llSetTextureAnim? I'm interested to find out if others think Lewis' statement is accurate |
|
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
|
05-06-2006 13:12
Well, llSetTextureAnim() is all done client-side, which doesn't force updates like actually changing the texture with llSetTexture() does. I haven't tried rapid calls to llSetTexture() before.
![]() _____________________
- Making everyone's day just a little more surreal -
Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?" |
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
05-06-2006 15:19
According to the wiki llSetTexture carries a 0.2s sleep penalty, llOffsetTexture too - so there's that delay. But if I'm looking at a object once it's loaded all its textures I can flick them around quite happily at the limit of that speed.
But yes, if you're aiming at more than 5 flicks a second then setting up a texture anim might be the only way. Adjusting them is a PITA if you want to be able to alter the timings genuinely at random. |
|
Joannah Cramer
Registered User
Join date: 12 Apr 2006
Posts: 1,539
|
05-06-2006 15:38
I'm trying to make a light that will randomly turn on and off, or flicker (if used with a fast timer), but I can't find out how to change the "Full Bright" setting of a prim on and off. llSetPrimitiveParams( [PRIM_FULLBRIGHT, ALL_SIDES, TRUE] ); // full bright on llSetPrimitiveParams( [PRIM_FULLBRIGHT, ALL_SIDES, FALSE] ); // full bright off can replace ALL_SIDES with specific face, if/when necessary. Texture swapping just doesn't seem to work as they aren't cached properly You could probably do it by dividing your texture in smaller areas, painting both 'off' and 'on' colour on it (or maybe even use gradients to cram number of flicks/colour changes into single texture) ... then switch between areas by adjusting UV parameters. |
|
Logan Bauer
Inept Adept
Join date: 13 Jun 2004
Posts: 2,237
|
05-06-2006 22:45
Texture swapping just doesn't seem to work as they aren't cached properly, and there's no way to pre-load the textures like you can sound. Actually, I've had success with preloading textures... Just bury a small prim inside your object and set each side of it to a different one of the textures you intend to preload. Or, with the hud you can make the sides/backs/anywhere that's not visible when attached have your preloading textures. Even though you don't really see it, if you've got it on your hud or are close enough to the object, should work... _____________________
![]() PICS - BLOG - http://arcticgreenhouse.blogspot.com/ XSTREET - INWORLD -http://slurl.com/secondlife/Alternate Reality/144/138/54/ |
|
Lewis Nerd
Nerd by name and nature!
Join date: 9 Oct 2005
Posts: 3,431
|
05-06-2006 23:36
I'm curious about this comment. Once the client loads a texture, I see no problems when "swapping" textures quickly. Additionally, how is this much different than using llSetTextureAnim? I'm interested to find out if others think Lewis' statement is accurate I had a dancefloor, which basically randomly dragged one of twelve textures (different light patterns) out of itself to display on the top surface. The texture wouldn't just flip, I'd get the grey box and then a fuzzy rendition before the texture appeared... just before it disappeared again whilst the next one was loaded. Lewis _____________________
Second Life Stratics - your new premier resource for all things Second Life. Free to join, sign up today!
Pocket Protector Projects - Rosieri 90,234,84 - building and landscaping services |
|
Yeti Freeloader
Registered User
Join date: 6 Dec 2005
Posts: 13
|
05-06-2006 23:53
depending on what exact light style you are looking for you can get a good flicker with particles, on, off, and double bright (2+ stacked on top of each other).
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
05-06-2006 23:58
Is the dancefloor one prim or several?
I suspect the problem is that with 12 textures you've got quite a long run time before all 12 textures have been loaded, and depending on your cache size, SL etc. you might have lost one by the time it comes around again, especially if it's busy. This will be especially true if you've got big textures. There are two solutions to this - one is to make a 2 prim floor if it's currently only 1 prim. Make one a hollow cut cube (that gives you 9 faces and should be hidden), the main floor prim then has 3 hidden faces (more, but you only need three). Set the 12 hidden faces to each of the 12 textures, then load the relevant one onto the top surface so the textures are all preloaded. This will kill most clients unless your textures are nice and small - they'll have to load an extra load of textures and in clubs there are usually a LOT of other textures around, clothes, skins, etc... The other, which will also encourage you to use smaller textures - make one floor texture. 12 nicely divides up into a 4X3 grid, or 6X2, and use llOffsetTexture to move the texture around so it displays nicely. I *think* although I've not tested it, that 4X3 will work better in terms of less risk of bleeding across. |