An Experiment With Lights
|
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
|
01-23-2005 18:40
there's been some talk about setting the 0 side of a prim to black preventing it from casting light when its material is set to Light. just for fun i did some experimentation to see how it affected performance.
this was with Local Lighting on of course. before i started my average fps was about 37. i rezzed 20 standard cubes and made them lights. this brought my framerate down to about 30. i set all the 0 sides of the prims to black and this caused them to stop casting light, however my framerate remained the same right around 30. then i deleted all the lights and my framerate went back to about 37.
so looks like that trick stops them from casting visible light but doesn't help performance any if you have Local Lighting on.
|
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
|
01-23-2005 19:19
Uh huh.
_____________________
</sarcasm>
|
Brad Lupis
Lupine Man
Join date: 23 Jun 2003
Posts: 280
|
01-23-2005 21:09
The question is....was it the prims themselves that brought your FPS's down some, or was it the light. You should have checked your FPS with the prims out first, before setting them to light
_____________________
Stupidity Should be Painful.
|
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
|
01-23-2005 21:21
ah yeah i did but i didn't really think it would be important. good call.
i couldn't tell a difference between my framerate before rezzing the 20 cubes and my framerate after rezzing them but before making them lights. it bounced around a little just standing there but call it average of 39 fps. when i switched on the lights it dropped to about 30.
so i'm going to say it was the lights and not the prims.
extra lil experiment: i checked my fps in two different spots both with Local Lighting on and off for each location. one was a crowded sim at ground level and one was same sim but 250 meters up. in the crowded area i got about 15 fps without Local Lighting and 7 with. up higher i got about 55-60 fps without Local Lighting and 30 with. turning on Local Lighting cut my framerate about in half in both cases. ouch.
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
Don't speak too soon.
01-23-2005 22:54
I tried the same type of experiment. My version was a little more thorough, and my results were a bit different from yours. My experiment had 5 phases to it. First, I rezzed 20 lit boxes, just as you did. Second, I turned them black. Third, I turned the lights off. Fourth, I deleted the original boxes and rezzed 20 new unlit ones. Finally, I rezzed 20 lit boxes that were already black. My FPS before starting the experiment was hovering around 24 (+/- 1 or 2 at any given moment). Phase 1 - Rezzing the lights - Immediately upon rezzing the 20 lit cubes, FPS dropped to 16 for a second, then shot back up to 24 for a second, and fially settled to hover between 19 and 21. Phase 2 - Turning side zero black - FPS remained unchanged, hovering between 19 and 21. Phase 3 - Turning off the lights - Suprisingly, the exact same pattern repeated as during the initial rez. FPS first dropped to 16, then shot up to 24, and then settled to 19-21. [Phase 4 - Rezzing the unlit boxes[/u] - I rezzed the same objects as wood instead of light this time. The FPS pattern repeated, but the initial drop was only to 18, not to 16, a difference in drop of about 25%. The end result though turned out to be exactly the same, FPS fluctuating between 19 and 21. Phase 5 - Rezzing the black lights - For the final phase of the experiment I rezzed the same 20 boxes, this time with side zero already black on them. The results were the same as phase 4. FPS first dropped to 18, then shot back up to about 24, then settled to fluctuate between 19 and 21. I repeated the entire experiment three times and got the same results each time. It would seem, at least in my case that a few conclusions can be drawn: 1. The most lag intensive point is when the objects are first rezzed. 2. Light objects create more lag when they are rezzed than non-light objects. 3. Light objects with side zero black create the same lag upon rez as non-light objects. 4. All objects, lit or unlit, create the same amount of lag once they exist. 5. Changing the lit/unlit status of an existing object causes the same lag patern as rezzing the object. It's important to note that this experiment was done in Indigo, a very smooth-running sim with super low lag, and I was the only one in it at the time. I would imagine the results could vary dramatically under conditions where there are a lot of other people around and where there are a lot of other lag-producing objects in the sim. It's also possible that further variance could exist in relation to system specs and SL settings. I'll post mine below. Perhaps if others who want to try the experiment post theirs as well, we can draw more definitive conclusions. Pentium 4 2.54 GHz HT 768 MB RDRAM 256 MB Nvidia Quadro FX3000 graphics card DSL connection averages about 500kbps All performance options on except anistropic filtering and ripple water. Av bump & cloth Terrain full Object detail & tree detail around 50%, av detail 100% Draw distance 128 Fog 1.2 Bump distance 20 Max partical 4096 Outfit composite 5
_____________________
.
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.
|
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
|
01-24-2005 00:28
so you're saying in your experiments there was no difference between 20 light cubes (regular or black) and 20 non light cubes after the rezzing settled down? crazy. you sure you had Local Lighting on?  i dunno how much your computer's specs matter in all this. there's probably so many variables going on that two people with identical settings will get different results. i was only testing whether there was a any difference between a bunch of regular lights and a bunch of black side 0 lights, not how much of a performance difference everyone could expect. if anyone cares i did mine in Palulop with an awesome sim fps of about 70 and a couple other people around. again i didn't think it mattered much just in seeing if there was a difference. hehe i hate to keep beating the edit button but when you say lag you're talking about framerate right?
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
01-24-2005 01:24
From: Zuzi Martinez so you're saying in your experiments there was no difference between 20 light cubes (regular or black) and 20 non light cubes after the rezzing settled down? crazy. you sure you had Local Lighting on?  i dunno how much your computer's specs matter in all this. there's probably so many variables going on that two people with identical settings will get different results. i was only testing whether there was a any difference between a bunch of regular lights and a bunch of black side 0 lights, not how much of a performance difference everyone could expect. if anyone cares i did mine in Palulop with an awesome sim fps of about 70 and a couple other people around. again i didn't think it mattered much just in seeing if there was a difference. hehe i hate to keep beating the edit button but when you say lag you're talking about framerate right? LOL, yes, I'm sure I had local lighting on, and yes, I'm talking about FPS. As for your first question, that's correct; after the initial spike caused by rezzing the objects, the FPS was identical whether the prims were lit, black lit, or unlit. The only noticeable difference was that the FPS slowed down more as the lights were rezzed than as the non-lights or black lights were rezzed, but again, everything was identical beyond that. I'll run the test again tomorrow during the day when more people are around. I'll bet the results will be very different.
_____________________
.
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.
|
Selador Cellardoor
Registered User
Join date: 16 Nov 2003
Posts: 3,082
|
01-24-2005 02:20
Chosen, I don't know how you managed to achieve such a consistent frame rate. You are very lucky. Just lately my frame rate has been continuously fluctuating, so that, for example, it might swing between 0.5 and 22 fps. Driving me mad. 
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
01-24-2005 09:14
Selador,
My framerate is not usually quite that consistent, but provided I'm in a sim that's running smoothly it is normally fairly steady. Keep in mind I had a few factors deliberately in my favor when I did the test. First, I did it in Indigo, where we take active steps to combat lag, somethng most land-owners do not do. As a result, Indigo is one of the most stable sims in SL. Also, it was the middle of the night and there was not another soul around. Additionally, I made sure not to move during the test, and although I did move the camera around, I made sure to keep it pointing to the North (toward the ocean) so as to minimize the chance that external activity could affect my reslults. In other words, I kept the test as scientiifcally controlled as possible. The steady framerate was deliberately achieved.
So, you can relax a little I guess. Fluctuations are normal; rock-solid steadiness is not. During normal interaction with the world, my framerate jumps up and down all the time, although from the sound of it, not as dramatically as yours.
You've got me curious now though. You might want to run a little test of your own to try to figure out what's causing such extreme fluctuations for you. Come to Indigo some time, stand in the middle of the sci fi museum (which is where I did the test), face North, and see if your FPS becomes more steady. If it setlles down then I think you can attribute your fluctuations to the sims you tend to hang out in normally and what is going on in them. If the fluctuations continue though, then I'd say your computer is having issues with SL.
_____________________
.
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.
|
Moriash Moreau
Registered User
Join date: 1 Jan 2005
Posts: 39
|
Black Light
01-24-2005 10:45
I'll add one little tidbit to the mix here. Hopefully, this isn't just common knowledge.
Colored objects cast colored light. We know this, of course. White makes white highlights, red makes red... And black makes black! Check it for yourself. Make a prim, and create a script to cycle it from a black light material, to a white light material, and then to a non-light material. Stand near it and watch the light on your avatar. There will be black highlights in the same spots as the white highlights, both of which disappear when the object is unlit. (I suppose you could perform the same experiment by manually editing the prim properties, but the experiment works better if you can walk around the object and watch it through a few cycles. This is tedious with manual edit, especially with the camera being yanked from your control each time.)
Maybe I'm misinterpreting what I see, but it sure seems like te black object is actually casting black light. If that's true, then it would be expected that the FPS is unaffected by the black lit surface color. (It's a shame you can't designate prim material type by face.) The sim is still calculating the lighting, and applying a black tint after the fact. Like local lighting, this local darkening isn't very strong compared to ambient daylight. But unless I'm completely hallucinating here, it does make a difference.
|
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
|
01-24-2005 11:42
that sounds pretty wild Moriash. thanks for the tip.
to keep track of the lighting i just had a white prim up close to the lights so i could see if they were tinting it or not and i didn't notice any tinting with black lights but i guess it could have been a light gray and i wouldn't have noticed. gotta check that out.
|
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
|
01-24-2005 15:51
ok did a little more checking after Chosen and Moriash posted.......
my framerate usually wobbles around a 3 fps range when i'm standing still and not lookign around. like 39-41 just for example so all the framerates i use are good guesses within the range where it hovers.
so with Local Lighting on and my fps right around 39 i rezzed 20 wooden cubes. framerate dropped to 37 with no real fluctuations. got rid of the cubes.
fps around 39 and i rezzed 20 light cubes. framerate went to 34, stayed stable for about 5 seconds then dipped to 24 and right back up to 34. deleted the lights.
fps around 39 and i rezzed 20 black light cubes. framerate immediately dropped to 31 then right back to 34.
i'ma go out on a limb and say the results are going to vary for everyone and all this probably will affect you differently depending on your computer but it looks like the one thing that's pretty clear is that the 0 black light trick doesn't help performance any and should only be used if you need a light that doesn't visibly cast light.
however, i tried what Moriash was talking about and while i didn't see any "black highlights" the 20 black lights pretty clearly made things darker overall. i did this part during SL night so it was obvious when it happened.
|
Moriash Moreau
Registered User
Join date: 1 Jan 2005
Posts: 39
|
01-25-2005 07:13
By highlights, I just meant the areas where the light sources strike objects- usually a set of uneven light spots on the surface of your avatar facing the source. (I have a freebie black leather jacket that shows this pretty well. It may depend on the properties of the fabric texture/alpha settings/whatever. That's all voodoo to me, though.) Maybe I should have referred to the overall color shift on adjacent walls, instead, but that's harder to make out. Try placing the black light object a bit overhead, and looking at the reflection on your av's hair. Might work on a shiny object, too. I don't remember if the shiny setting picks up local light sources or not- I try to avoid them, for the most part. The change isn't that dramatic, though, you're right about that.
|
Marker Dinova
I eat yellow paperclips.
Join date: 13 Sep 2004
Posts: 608
|
01-25-2005 07:34
Since we're on Lights...
Has anyone tried DEBUG > RENDER > LIGHT GLOWS?
Lights look really cool like this, but it drops framerate even lower.
_____________________
The difference between you and me = me - you. The difference between me and you = you - me. add them up and we have 2The 2difference 2between 2me 2and 2you = 0 2(The difference between me and you) = 0 The difference between me and you = 0/2 The difference between me and you = 0 I never thought we were so similar 
|
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
|
01-25-2005 12:09
Moriash i just used my face and the black lights seemed to darken it pretty evenly over all when they were on. it was like it sucked brightness out of the area.
Marker i tried that one time but the glows showed through buildings and things and looked weird.
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
The jury is still out, but Zuzi is probably right, according to LL.
01-25-2005 20:37
After completing several more inconclusive tests, I finally decided to do the easy thing and ask LL for the definitive answer. I had a fairly lengthy talk with Lee Linden on the subject. Unfortunately I can't post the entire conversation because he was called away from his computer before I could ask if it would be okay to do so (Not that I think he'd mind, but pinciple is principle. I'll never post a chat log without the other person's permission). I can, however, summarize what he told me:
1. Lights are a client side effect, so they do not affect network traffic at all. This is true regardless of color, including black.
2. Lights appear before all other objects and are visible from further distances, which will slow things down a little bit if there are a lot of them around. This is also true regardless of color, including black.
3. Light caculations are wholly additive, and black light has a value of zero, so the reports of dimming or black highlights on avatars due to black lights are impossible. I would chalk such reports up to the human capacity to find whatever we want to find if we spend enough mental energy looking for it. It's just like when someone says, "Shh, listen real hard. Do you hear that?" If you listen hard enough you very well may think you hear something, whether there's really a noise or not. It's just the way we're wired.
4. Light objects cause the most load on the client CPU, not the graphics card. It's assumed by LL that black lights cause the same load as any other color, but this is untested for now. It's not clear whether processors will simply ignore the equasions that call for an additon of zero, in which case there would be no increase in load, or whether they will actually do the math, in which case the load increase would be the same for black lights as for non-black ones. Lee indicated he believed the latter to be the case, but he can't be sure, and it's possible that different computers may handle the situation differently.
5. Black lights, white lights, or no lights at malls are unlikely to make or break your FPS. The reason many graphics cards "choke", as Lee put it, at malls is because there are simply too many textures around. He said many malls have well over 500 MB of textures in the average viewable area, while many graphics cards can only process 64MB worth of textures at a time. After that it has to eat up CPU power, "which is where the real hit comes from". So, lighting your sign or not isn't going to significantly affect your customer's FPS in relation to the number and size of all the textures around.
In summary, it appears that Zuzi is probably right that black lights will slow you down as much as any other lights will, but there is no way to say for sure until and unless LL does the testing Lee says hasn't been done. Someohow I doubt that kind of testing is very high on their priority list, so we may never know.
I'm going to assume that Zuzi was right and I was wrong, and that black lights act the same as any others in terms of FPS. There are still practical uses for them though, as we do now know for a fact that black lights do not cast black tints onto surrounding objects. If you want prims that will light themselves without affecting their surroundings, the side zero black method works. If you want to use it as an FPS saver, it likely doesn't work, at least not for everyone.
_____________________
.
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.
|
Moriash Moreau
Registered User
Join date: 1 Jan 2005
Posts: 39
|
01-26-2005 09:51
Well, crap. I guess either I was misinterpreting what I saw the previous times I tried this, or I was hallucinating. I tried the black light experiment again last night, and didn't see the projected shadow results this time. I think they changed the code when I wasn't looking, just to make Moriash feel like a noob.
Thanks for getting an authoritative answer, Chosen Few.
|
CrazyMonkey Feaver
Monkey Guy
Join date: 1 Jul 2003
Posts: 201
|
01-26-2005 11:29
I see 2 problems with your test chosen, although you did a great job  one is you used such a small area for the light to cast on, it would actually be better to do it more in the center of the sim looking into a void so more surrounding prims can be "lit". Its not a light that lowers fps but the lighting of other prims that does. And no.2 is the size of the prims creates more light. not sure if no.2 will actually matter.
|
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
|
in your face Lee Linden (kiddin')
01-26-2005 11:49
let History be my judge! 
|
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
|
01-26-2005 12:03
forgot to mention it only seems to work on avatars not prims. so i guess Lee was partially right. i guess........
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
01-26-2005 12:16
From: CrazyMonkey Feaver I see 2 problems with your test chosen, although you did a great job  one is you used such a small area for the light to cast on, it would actually be better to do it more in the center of the sim looking into a void so more surrounding prims can be "lit". Its not a light that lowers fps but the lighting of other prims that does. And no.2 is the size of the prims creates more light. not sure if no.2 will actually matter. Crazy, Thanks for the input, but please read my follow-up post, outlining my conversation with Lee Linden. Most of the answers we were all looking for are there. As for your suggestions, I'm not sure how standing in the center of the sim would make a difference. The light radius generated by lit prims is not very big. Only a realtively small area around the lights will end up lit, whether that area is in the center or closer to an edge. Besides, the center of Indigo is not my property. I doubt Vicki would mind, since we're a pretty close knit group in Indigo, but it's precisely because we all are such good neighbors that I wasn't about to go folling around on her land without her permission. Also, I'm fuzzy on your definition of "looking into a void". A void would imply there's nothing around to look at, but you say that would somehow mean more surrounding objects would be there. I'm confused. Anyway, as I said, Lee Linden answered the question better than any of us have I think.
_____________________
.
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.
|