Page 1 of 1

Questions on Dynamic Lighting

Posted: Tue Apr 10, 2007 4:24
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.

Re: Questions on Dynamic Lighting

Posted: Tue Apr 10, 2007 12:26
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.

Posted: Tue Apr 10, 2007 18:02
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.

Posted: Thu Apr 12, 2007 7:54
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!