About dinamic lights

Moderator: Graf Zahl

Locked
ElRodo
Posts: 1
Joined: Sun Jan 22, 2006 20:06

About dinamic lights

Post by ElRodo »

Hello,

My question is the following:

As I've been testing the use of the dinamic lights, I'd like to make a suggestion: When using Flickering or phasing lights, I think It'd be better to change the intensity of the light that is being rendered instead of changing the very size of it.

(since I don't have a good english you can ask me if you didn't understand something of the messaje above).

Many thanks!

ElRodo.
User avatar
Enjay
Developer
Developer
Posts: 4747
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Yeah, actual brightness rather than size? That would be a nice option. "Intensity" just seems to be the light diameter. Brightness isn't really part of them at all (flickering or otherwise) as far as I can tell. So it's not really possible to create a very bright, small point of light.

Also being able to vary the frequency of the pulsation/flicker for non random lights would be useful (although a max and min period value for random would also be good).

Whilst on that, I noticed that when I put 2 random flicker lights beside each other they both flickered at the same time. Fine if you want them both to represent the same light source, but strange looking if they are supposed to be 2 independently broken lights (as I wanted). Scripting solved it for me, but it would be nice to be able to link/unlink lights to set them up as coordinated or independent flickers as per requirements.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

For point lights it is simple: The brightness is always full so if you need a dimmer light just use a darker color. For flickering lights there should be some options . What is in there now is the stuff Timmie did for ZDoomGL. I haven't done anything with it except optimizing the code when I ported it to GZDoom.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

Yeah, when I need huge light radii with less bright lights, I just use a darker colour.

If the light is white, I would use, say, r100 g100 b100.

Just play around with the colour value to achieve the brightness you desire.

Control the radius with the "intensity" parameter the Dynamic Light thing uses.
User avatar
Enjay
Developer
Developer
Posts: 4747
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Darker colour... yeah, that makes sense. Thanks.
smg m7
Posts: 81
Joined: Mon Sep 26, 2005 17:48
Location: Here, I hope.
Contact:

Post by smg m7 »

Okay, that's really helpful for my stuff, too.
User avatar
Enjay
Developer
Developer
Posts: 4747
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Directional lights, would they be possible? Perhaps something like the direction the thing is pointing is the direction the light is shining and an argument could be used for the angle of the arc it covers?
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

I would love directional lights too.

Yes/No Graf?
User avatar
BetaSword
Posts: 132
Joined: Thu Sep 01, 2005 0:01

Post by BetaSword »

Directional lights would make flashlights a lot easier to do... Of course, in theory, it could be done already by making a decorate weapon that fires invisible projectiles a short distance ahead that have progressively larger, and darker, dynamic lights attached to them. I think.
User avatar
Enjay
Developer
Developer
Posts: 4747
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

BetaSword wrote:Of course, in theory, it could be done already by making a decorate weapon that fires invisible projectiles a short distance ahead that have progressively larger, and darker, dynamic lights attached to them. I think.
Forget theory, there are at least 3 mods that I have seen where that has been done. Works pretty well too. Of course, directional lights would probably be better.

I just wanted to be able to do something like the attached but using proper directional lights rather than sector lighting (as in the screeny) or placing a whole bunch of circular point lights.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Directional lights are considerably harder to do than simple point lights. You have to somehow mask the area that gets lit and that's not a trivial task.
DaniJ
Posts: 130
Joined: Sat Oct 08, 2005 19:22

Post by DaniJ »

Directional lights are considerably harder to do than simple point lights. You have to somehow mask the area that gets lit and that's not a trivial task.
Indeed. Infact the process is somewhat similar to decals and is the reason Doomsday hasn't implemented spotlights (as we don't have a decal system yet).

As you note, selecting the polys that require lighting is not overly difficult, the hard part is generating the masks for them (imagine a spot light behind a box). If we had a per-pixel lighting model this would be simple but as that is not the case we need to either (dynamicaly) generate extra textures from the POV of the spotlight, do some fancy footwork with stencils or generate new polys of the required shapes for each poly due for (spot) lighting.

Its the same reason why dynamic lights arn't "clipped" eg:

Code: Select all

     |   |
\----|-W-|---------
| \ c| c |        |
|   \|---|        |
|                 |
|        X        |
|                 |
|                 |
|                 |
-------------------
W = Wall
X = Center of dynamic light polys for planes
c = Area that SHOULD be clipped.
Jin
Posts: 20
Joined: Sun Jan 01, 2006 22:16
Location: Ontario, Canada
Contact:

Post by Jin »

Yeah I always hated that Dynlights weren't cliipped properly, but it's a limitation and I understand that.
Locked

Return to “Closed Feature Suggestions”