"Natural" lighting for mouth of caves?

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:

"Natural" lighting for mouth of caves?

Post by Rex Claussen »

I would like the mouth of a cave (or tunnel) to have some light from the outdoors but fade to darkness inside the cave. Using sectors & gradient lighting it's possible to achieve the appearance of fading light, of course. But if the cave roof and floor are themselves composed of multiple sloped sectors it becomes very tedious to create light with a natural appearance.

Is there a dynamic light thing for this type of application?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

No. Dynamic lights are only spherical.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

I asked about a more linear or directional dynamic light myself some time ago and Graf explained the difficulties with such a thing to me.

Obviously I haven't seen the particular area you are trying to work with but I guess it will be down to subtle use of multiple smaller dynamic lights. Also, don't forget subtractive lights (essentially placeable darkness - if you haven't used them before). It might be easier to light the cave mouth evenly with sector lighting and place dynamic subtractive lights to darken the area. Possibly a combination of normal and subtractive lights?

I have noticed some minor difficulties with natural slopes and dynamic lights. If carelessly placed, they do tend to show up the many-triangles nature of the slopes.
User avatar
Rex Claussen
Developer
Developer
Posts: 2659
Joined: Tue Jul 11, 2006 18:36
Contact:

Post by Rex Claussen »

This complicates matters, but not terribly so. The way I'll probably handle it is to have a man-made entrance (e.g., wooden beams, concrete walls, etc.) with the natural rock deeper inside. That way I'll be able to deal with the lighting without messing with too many sectors, etc.

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

Post by Rex Claussen »

Update: I did a couple of things:
  • 1. Opted for a man-made tunnel-type entrance with beams & concrete.
    2. Used a Thing Type 9800 dynamic light and gave it a z-coordinate value of 4 (i.e., 4 units above the floor) and diameter that is just the width of the tunnel & its opening.
    3. Placed the light thing right at the boundary between the outside sector and inside sector.
    4. Played around with the light value, and ended up with RGB values considerably less than the lighting of the sector outside the tunnel entrance (i.e., outside tunnel entrance = 144, light RGB values = 112, 112, 112). This allows the inside sector to be lighted up without making the outside sector too bright.
This passes off as a reasonable facsimile of "natural" lighting. Perhaps I'll post a screenshot when I get a chance.
User avatar
chopkinsca
Posts: 183
Joined: Thu Dec 29, 2005 8:09

Post by chopkinsca »

Rex Claussen wrote: This passes off as a reasonable facsimile of "natural" lighting. Perhaps I'll post a screenshot when I get a chance.
I'd like to see a screenshot. I'm a caveaholic and wonder what your method looks like (I just used sector gradients).
Locked

Return to “GZDoom”