Questions on Dynamic Lighting

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Rex Claussen
Developer
Developer
Posts: 2659
Joined: Tue Jul 11, 2006 18:36
Contact:

Questions on Dynamic Lighting

Post by Rex Claussen »

I have read the basic documentation on dynamic lighting on this site, and have looked everywhere else I can think of for more details. From what I've read, dynamic lighting seems to be associated with a thing (even for the variations on sector lights). I have experimented with the various things described in the documentation, but have not achieved the effect I wish for. In its simplest form, I have a ceiling light (i.e., a flat) that is the source of illumination in a room. In real life, the part of the ceiling with the light would be the brightest area, with the light intensity decreasing with distance from the light source. An excellent example is shown in the screenshot posted by TheDarkArchon of Enjay's Thief Project for Heretic, in which the candle chandelier is casting a realistic glow around itself. Although the light source is a thing (the chandelier) and not a flat, I would imagine the principle is the same. So here are my questions:
  • 1. Can the chandelier effect be created with simply the basic thing definitions of dynamic lights (e.g., Thing 9800 for a point source of light)?
    2. If so, how?
    3. If not, how (e.g., will I need to create new definitions)?
A small example wad would be ideal. Thanks.

Btw, I have opened up a couple of wads, including Enjay's NJOL, but have not been able to figure this one out.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: Questions on Dynamic Lighting

Post by Enjay »

Rex Claussen wrote:
  • 1. Can the chandelier effect be created with simply the basic thing definitions of dynamic lights (e.g., Thing 9800 for a point source of light)?
    2. If so, how?
    3. If not, how (e.g., will I need to create new definitions)?
A small example wad would be ideal. Thanks.
1. Yes

2. Set the arguments of the light thing. Arg1=how red the light should be, arg2 how green it should be, arg3 how green it should be. Arg4 is the "intensity" of the light which is effectively the radius. Then place the light object at a z-height that allows it to illuminate what you want.

3. Small example attached. The lights are possibly a little exaggerated to make them obvious. The wall light is a pulsing type so it slowly goes between its max and min intensity.
User avatar
Rex Claussen
Developer
Developer
Posts: 2659
Joined: Tue Jul 11, 2006 18:36
Contact:

Post by Rex Claussen »

Thanks, boss. I was using the special correctly; however I see what I was doing incorrectly. First, I had the light thing at the same height as the ceiling (i.e., flush with it rather than, say, 16 units below). The second, probably biggest mistake, was that I was using a very small radius - just 8 units. These two factors combined to make the light not do what it was supposed to do.

I guess they got the proverb wrong: You can teach an old dog new tricks.

Thanks, again.
User avatar
Syfo-Dyas
Posts: 182
Joined: Sun Oct 09, 2005 21:54
Location: Ohio
Contact:

Post by Syfo-Dyas »

I was about to ask questions about this too! I can't believe how much easier this is to do in gzDOOM than it was in DOOM Legacy. This saves sooooooo much time and effort!
Locked

Return to “GZDoom”