[bzr] Light shines through doors
#31
So just curious...this is all planned for 0.58 right? (As apposed to 0.57) Smile
Reply
#32
Technically it is planned for sth greater to 0.57 yes. Tongue
Descent Rangers
Captain of Black Lions squadron

The Stalker 21.126
Zica Laser
Guided Micro Bombs
Microcorp HXS Class C
Gravitron PulseWave
Zica SuperCharger
Reply
#33
Quote:Well if no one would care too much about doors I'd have a solution that would not take THAT much additional performance but could very well improve the lighting.

Like this before/after shot shows:
http://www.dxx-rebirth.com/tmp/comp.png

Please don't mess with the lighting. Or at least make every change you make optional. The original shot in your comparison looks much more 'realistic' than the second. Why ist that? Quite simple: in the real world there isn't just direct light from light sources but also secondary lighting which bounces between lit objects (in this case from wall to wall). In the situation pictured in your comparison that means that any light in the room below would indeed create an effect that is more or less similar to the simple vertex lighting without visiblitiy checks. May seem a bit strange at first thought, but believe me, it's the truth. I'm working as a 3d-artist for over 10 years, that is a topic I know very, very well.

To get really 'realistic' lighting you would have to do two calculation passes (plus shadows if you want it all). The first one, more ore less looking like your second image. The direct light. And a second one, the indirect light (often called Global Illumination or short GI). There are several algorithms for that, but all of them are very demanding computationally and apart from some pretty new, but still heavy, GPU based algorithms not really suited for real time lighting.

As long as you don't plan to compute these secondary lighting effects or place extra lights in the levels which simulate secondary effects, which is the normal way to do this without GI, the current vertex lighting will look better in most situations (the closed doors problem aside). Trust me. Especially considering the fact that all light sources were set by the level desigers to fit exactly that vertex lighting scheme.

Btw.: That's one of the problems with d2x-xl's advanced lighting. As good as d2x-xl's lightmaps sound theoretically, they really don't work well in many cases (i.e. large rooms are often way too dark, way too harsh shadows in many places etc.). Simply because the levels were built with another lighting scheme in mind and the lightmap calculation suffers from the same fundamental flaw your sample picture does: no secondary lighting.

So in a nutshell: By trying to fix the shortcomigs of Descents lighting you will definitely create at least as many problems as you will solve as long as you don't consider global illumination. And even then there will most likely be places that will look strange.


Reply
#34
Of course you have a point: Indirect light is not considered in the way I planned to and this is actually where the original lighting has an advantage.

But adding visbility check will not COMPLETELY prevent indirect light as each vertex stores ONE light value. That means that if a vertex is visible from a light source, the joining sides on this vertex will be lit as well. So if a light source illuminates the corner of a tunnel, the light will spread out around the corner slightly, still adding part of indirect ligthing as well.

But consider also that my changes ONLY affect the dynamic light from objects - NOT the intitial level light set by the authors. Making this "realistic" is simply impossible.

In the end I have to make a decision:
1) If I set the light for visibility it will partially consider "indirect light" from object-based light sources such as weapon fire or powerups.
2) If I keep it this way a light CAN go from one room to another even if both rooms have NO connection to each other.
The greatest pleasure in life is to do what people say you cannot do.
Uhm... Honey, there's a head in the toilet!
Reply
#35
Quote:In the end I have to make a decision:
1) If I set the light for visibility it will partially consider "indirect light" from object-based light sources such as weapon fire or powerups.
2) If I keep it this way a light CAN go from one room to another even if both rooms have NO connection to each other.

Exactly. I for one would rather live with the occasional closed door problem. I think situations like the one you show in your example are occuring way more often, so that would be my priority. And the second picture in that comparison really looks just plain wrong.

But maybe others have another opinion on that. Please just make any changes completely optional, so that users can decide for themselves. That's my only wish. Smile

Reply
#36
Well possibly I can also work using light similar to sound. This just checks the connected segments and if a cube is "close" in terms of the shortest "way" between cube A and cube B I can still decide wether to light up a room or not. Still that could always cause light that seems travelling through a solid wall in cases where the light just has to pass a small U-Turn. so.. yeah it's not so easy.

But again, nothing is really set so far. I'd prefer simple visibility check (like the bottom picture in my example shows) at any given time. This matches best how Descent 2 works when you shoot out a static light source and even if not visible on my example picture it DOES do some simple indirect light. So in the end I might think it could be the best compromise.
However I will not do that without extensive playing and seeing how it affects the atmosphere and how good it looks.

Surely the lighting will NEVER be 100% realistic. It would not even fit to the simple architecture of the world in Descent. I want something that fits there.
The greatest pleasure in life is to do what people say you cannot do.
Uhm... Honey, there's a head in the toilet!
Reply
#37
Quote:But again, nothing is really set so far. I'd prefer simple visibility check (like the bottom picture in my example shows) at any given time.

As long you tell me where to look in the sourcecode to revert the changes... Wink

Where's the problem with having this as an option? I could understand that you don't want to make the menu too overcomplicated, but what speaks against an ini parameter like -originallighting, that simply keeps the lighting as it ever was. Choice is good.

Just in case I sound too demanding: The original lighting method is the main reason I use dxx-rebirth over d2x-xl at all. So this is quite important to me. d2x-xl is so focussed on effects and so much was changed that currently it's not really possible anymore to go to back to the original state. And that's not really a good thing.

Reply
#38
Again, I do understand your point about this and it concerns me, too. If I implement a new lighting method I do not want you to recognize the "changes" it brings but rather the "fixes" it introduces.
You raise some very good points that make me rethink this whole process once more and things I will consider the time I'll implement this or an alternative.

But we also must consider that the most changes any lighting system might introduce is mostly connected to colored lighting. If I'd post the comparison screenshot again - without colored light - the changes would be WAY less noticable. And this is what I also want to check when I compare the atmosphere between the original and a new dynamic lighting engine.
Example: If you load up D2 level 1 you'll see that there is a blue glow lighting the floor in front of you. This is a shield powerup hidden in a secret room. If you turn OFF colored lighting, due to the normal level lighting you do only barely notice that there IS some light at all.
So if we count in "realism" for dynamic lighting, I must see that the priorities for non-colored and colored lighting are different, even tho colored lighting does not do anything "different2 than the non-colored.

Depending on what you brought up I came up with another idea but I gotta check out how good I can realize that.

As it may be if a new lighting method is more demanding, there WILL be an INI switch to revert back to the original.
The greatest pleasure in life is to do what people say you cannot do.
Uhm... Honey, there's a head in the toilet!
Reply
#39
Quote:Example: If you load up D2 level 1 you'll see that there is a blue glow lighting the floor in front of you. This is a shield powerup hidden in a secret room. If you turn OFF colored lighting, due to the normal level lighting you do only barely notice that there IS some light at all.

I see. That should be really easy to fix, btw. I'm not 100% sure if Descent's geometry considers face normals, but it would be very strange if it did not. If so, to prevent glitches like this, all you would have to do in your dynamic lighting code is to check whether a light is on the front or on the back side of a polygon to decide whether that specific face is going to be lit or not. Is this, apart from the colored lights, code that comes from Parallax?

Maybe they left this check out back in 1995 to gain some speed, but nowadays that shouldn't be a problem at all. Algorithms to check a point against a triangle can be found easily on the internet. For speed reasons it might make sense though to first make a simple test of a triangles vertices against the max radius of the light to completely save the normals test in all obvious cases.
Reply
#40
Having light on both side of one face just is a problem of the vertex lighting. If there's only a two-dimensional wall it only has four vertecies for each side. So if one side lights up, the other side does, too. This is the same problem with doors and until I define at least 8 vertecies for ONE segment/cube, I cannot fix this properly.
Not having any visibility check makes the issue even worse of course.

But still this is unrelated to the major issue that light passes even through three-dimensional obstacles as if matter does not influence light at all. If a light source lights up a verttex only the distance to this is checked - not if anything is in it's path.
The greatest pleasure in life is to do what people say you cannot do.
Uhm... Honey, there's a head in the toilet!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)