Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Problenm with Lights

Shifting Dreamscape
Always questioning ...
Join date: 12 Dec 2007
Posts: 266
03-27-2008 02:20
At the risk of being reprimanded I am posting this in both the Building and Texture fora as I am not sure if it is an issue of one or the other. The situation is a bit difficult to explain but I will make an effort, so please bear with me.

To set the scene, I have a wall, lets say 4m long and 2.5m high, call this lower wall (lw). Then at the right corner of the wall i have another piece (on top) that is 1m long and 1.5m high, call this upper wall (uw). On the ceiling I have a light prim, approx centred and 2.5m away from the walls. Both are the same color, same texture, with the textures aligned.

The issue I have is that, at night, uw shows brighter than lw, it is completely obvious that they are two different prims. In daylight there is no problem. I have to assume that this is due to how SL/Open GL deals with light. I have tried stretching up to be 4m tall , but it continues to show differently. I know it is due to the light because if I move it out of range or delete it then there is no noticeable difference between the two pieces.

One other comment is that this is not an isolated incident. I have a similar wall setup on the floor below and have the same issue.

So, again assuming this is due to how light works, is there any object setting, or texture setting that I can use to fix this?

Any help would be greatly appreciated, and as well I will be in world after 1130 SLT if anyone wants to see what I am talking about.

In advance .. thanks!
Dekka Raymaker
thinking very hard
Join date: 4 Feb 2007
Posts: 3,898
03-27-2008 03:22
light is a sphere, therefore if the radius of the light is just touching the center of the lower wall at it's maximum circumference, it stands to reason that with the curvature of the sphere of light, that it would not reach the top part.

Wall ==> |O <== Light
Shifting Dreamscape
Always questioning ...
Join date: 12 Dec 2007
Posts: 266
03-27-2008 03:38
Deka .... actually it is the uper wall piece that shows brighter than the lower wall piece. Did assume that is was due to the center of the upper piece being closer to the light source than the center of the lower piece. That I assume is (in a simplified manner) the physics used by OpenGL.

What I am hoping for is some settings on the objects themselves that could counteract this.
Dekka Raymaker
thinking very hard
Join date: 4 Feb 2007
Posts: 3,898
03-27-2008 04:21
Well the only other thing I can think of is that the upper wall could have 'full bright' on? Which I assume it doesn't, so I can't help you.

If you take away the light prim, do both walls match at all times of the day?

I could try and reproduce this if you let me know what settings you have in the light prim.
Shifting Dreamscape
Always questioning ...
Join date: 12 Dec 2007
Posts: 266
03-27-2008 04:57
Deka ... no full bright not on /me smiles

The light is set to 10 meteres and 0.75 fall-off if I remember correctly

<edit> And yes .. if the light is gone they match no mater the time of day
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
03-27-2008 06:17
Well, you could set the upper prim to be a darker color. With a little experimentation, you can probably make it match the apparent color of the lower one. You can use a simple script to have the dark color apply only at night.

However, be aware that it won't look the same to everyone. If someone has local lighting turned off, for example, they'll just see two differently colored prims. Also, I'm not even sure local light behaves the same way on all video cards. Where you're seeing one prim fully lit, the other unlit, someone else might more accurately see a circle of light that partially covers both prims.

If it were me, I probably wouldn't be using local light. I'd rather just set the light object to fullbright/glow, and then bake lighting into my texturing, so that the room appears to be well lit and well shadowed in all the right places. Until SL gets a more sophisticated lighting engine, baked lighting will always look better than "real" lighting.
_____________________
.

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.
Shifting Dreamscape
Always questioning ...
Join date: 12 Dec 2007
Posts: 266
03-27-2008 06:29
Chosen ... with regards to darkening the upper prim, thought about that, but then the problem becomes that in daylight said prim is darker.

In regards to your suggestion for baking lighting into the texture ... sadly texture creation or detailed manipulation goes well beyond my skillset ... if I could do it in a script then great, but have no abilities or experience when it comes to image work. In any case ... wouldn't that though as well cause a problem in daylight?
2k Suisei
Registered User
Join date: 9 Nov 2006
Posts: 2,150
03-27-2008 07:22
I see the problem. Seems to be a slight bug in the vertex lighting.

Are you low on prims?. If not, you can fix it by building your larger wall section from several smaller prims of a similar size to the smaller wall section. After doing this there'll be far more vertices available for lighting and it seems to help hide the slight discrepancies. It also looks really cool too because you get a far smoother fall off on the light.

I'm really glad I've looked into this because I've actually learnt something!
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
03-27-2008 07:44
From: Shifting Dreamscape
Chosen ... with regards to darkening the upper prim, thought about that, but then the problem becomes that in daylight said prim is darker.

That's why I said use a script to apply the darker color only at night. It's not foolproof, since if someone forces daylight, they'll see the two different colors, but most people will see it correctly (assuming that light is behaving similarly on their graphics cards to the way it behaves on yours).

From: Shifting Dreamscape
In regards to your suggestion for baking lighting into the texture ... sadly texture creation or detailed manipulation goes well beyond my skillset ... if I could do it in a script then great, but have no abilities or experience when it comes to image work.

Hmm. Well, you could always learn. That would be the best option. Or the second best would be to hire someone to texture the place for you. Neither is a quick and easy solution, and the latter could get expensive, but both are better than the alternatives, in my opinion.

If you want to go half way with it, one solution would be to fullbright both pieces, and then darken them both. Fullbright will make them immune to the effects of local lighting, so they'll both look the same. Darkening them will keep them from looking too washed out. It's not the best option, but if your main goal is just to make the two look the same as each other, that's the simplest thing to do.

Or you could add more prims, as 2K said. That's not ideal, obviously, but it could work.

From: Shifting Dreamscape
In any case ... wouldn't that though as well cause a problem in daylight?

Not at all. First, if you're going to use self-lit textures, it's best to fullbright everything, so that in-world lighting conditions can't mess with your pre-defined lighting/shading scheme. So the room will look the same all the time. Avatar appearances will of course still change throughout the day, but the room itself will not.

If the fact that avatars will darken at night, in contrast with the apparent lighting of the room, is something that bothers you, well that's where you can put your local lighting to good use. Just be careful not to overdo it. You don't want people looking washed out. Keep it subtle.

Second, if you're concerned about the fact that in RL, interior lighting schemes do change between day and night, I'd say you're over-thinking it a bit. There are certain things that are always constant, and those are the things you want your texturing to accent. Your overhead light, for example, is always going to cast a glow around itself onto the surrounding ceiling (unless it's turned off, which it never needs to be in SL). The ceiling will always cast a shadow onto the upper wall. The walls will always cast a shadow onto the perimeter of the floor. Furniture in the room will always cast shadows onto the floor. Etc., etc., etc.

Those are things that local lighting can never do, which is why it looks so fake. Accentuated shadows are what bring a build to life.

Third, if the idea of a static, never-changing, lighting scheme is too unrealistic for you, you could always step up the game by creating two (or more) schemes, and have all the prims switch textures at regular times, to show each scheme in accordance with the SL day/night cycle. Setting all that up is incredibly time consuming, of course, which is why it's not done very often. But if one has the time to do it, the results can be very cool.


In any case, the point is that local light doesn't behave much like light should. It's gotten better as SL has developed, but it's still got a long way to go. It's best not to rely on it too much.
_____________________
.

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.
Shifting Dreamscape
Always questioning ...
Join date: 12 Dec 2007
Posts: 266
03-27-2008 09:04
2k --- Nice sugestion an at the least I'll play around with it to see myself how that works

Chosen --- HUGE thank you for the detailed response. You have given me lots of food for thought and things I will be trying, I really do appreciate you taking the time to help me here. Missed your comment on the script for night/day and do now remember I was reading about the LSL functions for that just the other day.

And I do agree with you about learning to create and manipulate textures, and that will come, at the moment I am concentrating on learning the ins and outs of building, and LSL ... and unfortunately my bosses expect me to do RL work for my paycheck ;-)