About dinamic lights
Moderator: Graf Zahl
-
- Posts: 1
- Joined: Sun Jan 22, 2006 20:06
About dinamic lights
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.
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.
- Enjay
- Developer
- Posts: 4747
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
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.
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.
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
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.
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
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.
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.
- Enjay
- Developer
- Posts: 4747
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
-
- Posts: 81
- Joined: Mon Sep 26, 2005 17:48
- Location: Here, I hope.
- Contact:
- Enjay
- Developer
- Posts: 4747
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
- BetaSword
- Posts: 132
- Joined: Thu Sep 01, 2005 0:01
- Enjay
- Developer
- Posts: 4747
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
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.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.
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.
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
-
- Posts: 130
- Joined: Sat Oct 08, 2005 19:22
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).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.
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 |
| |
| |
| |
-------------------
X = Center of dynamic light polys for planes
c = Area that SHOULD be clipped.
-
- Posts: 20
- Joined: Sun Jan 01, 2006 22:16
- Location: Ontario, Canada
- Contact: