[bzr] Light shines through doors
#61
Quote:
(06-23-2011, 02:45 PM)zico Wrote: If two cubes join, they share the Verecies the cubes ar econnected with. This makes for a certain amount of illumination.

And that's exactly what I wouldn't change. It causes glitches with closed doors, true. But open doors on the other hand or simple connections between to tunnels looks more 'realistic' this way if one might dare to call it realistic at all. And it does so because of this seemingly uncorrect behaviour.

This is exactly what I was talking about: Visbility lighting like shown in the comparison screenshot does NOT change this behaviour. So no, I would not change that.

However it's exactly what provokes the mistakes on doors, too.
You are talking about the face normals but they have nothing to do with the lighting. They don't matter in this dynamic light engine. One side has FOUR vertecies. And for each we can store light ONE time. To "fix" this I must rewrite the dynamic lighting from scratch.

Also yes I am aware that when you talk about illumination you do not only refer to metallic reflections. But actually: This WOULD be the only thing that MATTERS in Descent. Look at the game. If you turn off colored light you would not even be able to tell where the light that something illuminates does come from.
And you cannot as in Descent the static light can light up a room bright as the sun even if there is not even a light source.

So besides really worrying if secondary light I would just like to make Descent even BARELY realistic. And it IS NOT at the moment. Any other lighting system would be better than what we have right now (for colored lights at least).

I will probably not really go on further in this discussion anymore. It just does not make sense trying to explain details of concepts I have not worked out already. By time I will implement the system and everyone will be able to give feedback.

As said I only have posted ONE screenshot now and not even wrote one single line of code. So talking about this any further is just pointless.
The greatest pleasure in life is to do what people say you cannot do.
Uhm... Honey, there's a head in the toilet!
Reply
#62
Quote:And you cannot as in Descent the static light can light up a room bright as the sun even if there is not even a light source.
Sorry for being sarcastic, but thanks for pointing that out. Wouldn't have thought that.

Quote:I will probably not really go on further in this discussion anymore. It just does not make sense trying to explain details of concepts I have not worked out already. By time I will implement the system and everyone will be able to give feedback.

You're right, doesn't make sense. As you might or might not remember, my initial wish was to make your enhacements optional. I wouldn't have started any discussion at all, if you simply had said yes to that very simple suggestion.

Wasn't the idea behind DXX-rebirth to be as true to the original as possible? Everything else you plan in this regard and more was done by d2x-xl already, why copy that?

But as I said before, this is your baby. Do what you feel is right. Luckily this is open source.

Sorry for bothering you.

Reply
#63
Don't worry - while I wrote during the last post and now I - with Hawkins help - found an even better way which fully supports your demands AND does fix the issues I am having with this lighting system.
I don't wanna spoil the details now. I can just say that it will possibly look about the same as it does now - just without the light being able to pass solid matter while rather support "bouncing" light.
The greatest pleasure in life is to do what people say you cannot do.
Uhm... Honey, there's a head in the toilet!
Reply
#64
Well, usually I only wanted to attend to bugs for the Bugfix release and what I did now will most likely not be an option already for the Bugfix version (but I am planning that with a single code line change everyone can try it out).

Still I am pretty much done with my first draft of the new dynamic lighting. If I have to describe it to how it works then I would need to say: It almost works like sound. Descenteer brought up this fact about illumination. And I took care of that. Now the old lighting just lights everry point depending on the distance between the light source and the point of the wall. However this light does not care if there is something between this point and the light source - like a wall.

An illustraction of a "U-turn" tunnel shows pretty much the disadvantage of the old system and how I want to improve it:
http://www.dxx-rebirth.com/blog/zico3/oldnfcd.png

Here you already see my new approach:
Before the light source is able to light up something, it has to find it's way through the actual level architecture and the amount how much a wall will light up is calculated by the distance the light had to travel.

Advantages:
- This lighting does not change the atmosphere much but it effectively removes bright flashes of light where no light source is visible but compliments towards global illumination in a more realistic way (in terms of how the engine works).
- If a light source is visible to you, the changes compared to the original lighting is insignificant however. This way the general atmosphere will possibly not change for you.
- This code already works with grills, fences and so forth so the light can travel through "open" parts the player cannot pass.
- Since the lighting path depends on the Render path created from the player POV this lighting works very well with doors and other 2D walls. It does not work all the time - depending on the render path and level architectures but for most part if a light source is on the other side of a door than you yre the door will not light up. Markers are different - they are specifically written to be bright but also limited to their own segment. Their light will be visible through doors. Still I think by the nature of markers this is acceptable.
- This lighting does NOT need any openGL acceleration. It STILL works with engine builtin functions ONLY. This way it still looks VERY "original" and "classic". Still this way is not the fastest one. There is a reason normally lighting is done via OpenGL or Direct3D. Therefor I still need more optimizations. Currently this new lighting increases the game requirements from 10% to 100% depending on if you play a standard sized level or a level with 9000 segments and 350 objects. Still I was not able to get "more" than the double CPU usage of the standard lighting but I also have not even begun to optimize it.
- Still I suspect in the end the new lighting will always need a bit more CPU usage. So I am probably going to add an option to fall back to the old lighting if necessary. If I can optimize the new light very good it will only be an INI option but if the new lighting will have a significant raise of your CPU usage, I'll add a menu option for this
EDIT START:
- This system will work for both colored and uncolored light. I only have choosen to use colored light in my examples since it shows the effects better.
- This new routine does NOT change the lighting the level itself has (i.e. static light or light emitted by lamps. Only light emitted by OBJECTS is affected by this. So it will not compromise the work of the level authors in any way.
EDIT END

Oh and by the way here is a little example image which sows howthis new lighting works with doors:
http://www.dxx-rebirth.com/tmp/comp2.png
It's not the best example I'll admit since shield powerups are VERY dim. Howewver you can see that with the door closed there is no blue light visible. If opened the whole area around the door is slightly blue. Even the ledge on top of the Screenshot is still illuminated while there is no real visible connection to the light source (the powerup). This way however it stays very realistic and "original" in the same way.
The greatest pleasure in life is to do what people say you cannot do.
Uhm... Honey, there's a head in the toilet!
Reply
#65
Happy news indeed. (off-topic) On a side-note zico, don't you think this should be posted in a development blog as well? It is a great milestone for DXX alright. Smile
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
#66
I'll soon start anew development blog and add this post there as well. Possibly with some more infos on performance and settings (if any).
The greatest pleasure in life is to do what people say you cannot do.
Uhm... Honey, there's a head in the toilet!
Reply
#67
Ah man, if this light issue gets fixed, I won't be able to take advantage of it to get awesome screenshots. ;D You know the one of D2 level 21 I sent you, zico, where a Spawn somewhere was shooting repeatedly and illuminating my dark room in green?

Kidding, of course--great work, guys!
Reply
#68
This is an old topic I know, but since the new lighting is not coming until 0.53, I thought I'd voice an opinion.

I've been having a great time lately playing D1 and D2 in single-player mode, and have paid careful attention to, for example, the blue glow from shield powerups shining though secret doors.

I think this is a great (if unintended) feature.  The glow from powerups gives a much-needed hint about where secret doors and hidden powerups are.  Without it, it is nearly impossible to find many hidden powerups.  Besides, it looks very cool.

Furthermore, who says that the light from shield powerups, for example, can't shine through doors and walls?  Smile Those blue orbs are highly radioactive, that's why the radiation goes though walls and doors!  The Pyro is built of a special material that blocks the radiation, to protect the pilot!
Reply
#69
Hey lloyd,

Well I have to admit I haven't gotten far to improve that feature.
To be fair however wittout colored lighting, the light effects itself weren't to visible so secret rooms are actually more secret. So a more realistic lighting would possibly balance this advantage out again towards the intended behaviour.

However I am a fan of how the original game works. This means I enjoy how it is now - specifically the door thing... If I close myself in a dark room I can always see light coming through the gaps of the door. I always imagined Descent does this effect.

Still as i am a fan of the "old ways" it also means I would like to do the dynamic lighting via pure Software computation. No hardware ligthing. And this is the problem right now. I can generate lighting that respects geometry but it takes resources up to no end.

So I guess whatever will happen with the lighting, it will *not* happen in the next version.
The greatest pleasure in life is to do what people say you cannot do.
Uhm... Honey, there's a head in the toilet!
Reply
#70
Hi Zico,

I'm strongly in favor of your development philosophy of not changing the game from what it was intended to be, even though graphics effects and lighting is improved.  And I know that colored light makes the "glow shining through walls and doors" more visible that it was in the original game.  So by preferring the way colored light currently looks shining through doors/walls, I know I'm preferring something that was not in the original game.  I guess that means I'm not a "purist." If I were, I would play the game with colored light turned off.

I just want to say that I REALLY like the way the light looks now, and I STRONGLY hope that the game will not get significantly more CPU intensive.  It is very important to me that the game runs fast on less-than-optimal hardware, as it presently does. 

In sum: the current lighting looks great and the program runs great, so why change it?  Do you really think that the current lighting artifacts are bothersome?  They were after all in the original game, albeit less noticeable without colored light.  You could say that colored light EXPOSED a feature that existed all along in descent, but was less visible.

Again, if anybody asks why light from weapons shots and powerups goes though doors and walls in descent, just tell them these things emit, in addition to normal visible light, high energy radiation that penetrates solid objects, causing them to glow.  Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)