Jump to content
  • 0

Prevent zdoom point light propagating through 3D floor


smeghammer

Question

Hi all, As the title says - how would I prevent a zdoom point light (flicker) propagating through a 3D floor?
 

Spoiler


propagate_light.png?raw=true


 

I need the outer radius to be large enough to light the sector horizontally, but because the light source is near the 'ceiling' (i.e. the bottom of the above 3D floor), the light radius is enough to show above.

 

I suspect it's to do with the flags, but can't figure it out.

Share this post


Link to post

3 answers to this question

Recommended Posts

  • 1

My advice: put a lamp on the upper floor, so that the glow is drowned in the lamp's own light.

 

 

More seriously, though: no, it's not possible. You could try reworking your level to use portals instead of 3D floors, then the light would not go through. But that's all.

 

Dynlight clipping is only done in a 2D plan for performance reasons. This is the drawback of allowing thousands of dynamic lights. In modern games that have full shadow sourcing, there's typically a ridiculously low limit, like only 4 lights "active" at once in Skyrim IIRC.

Share this post


Link to post
  • 0

Thanks @Gez. Portals not an option for this level - it's kind of committed with 3D floors now. Portals will be my next thing to investigate.

 

48 minutes ago, Gez said:

My advice: put a lamp on the upper floor, so that the glow is drowned in the lamp's own light.

 

Hah, yeah, did this for the first floor - what you are seeing is the second floor. I can probably work in a more subtle non-flickery light here too to drown out the bleedthrough. 

 

 

Share this post


Link to post
  • 0
On 8/21/2020 at 5:59 AM, smeghammer said:

I need the outer radius to be large enough to light the sector horizontally, but because the light source is near the 'ceiling' (i.e. the bottom of the above 3D floor), the light radius is enough to show above.

A hacky way to do this is to create multiple point lights in a cluster, so that they create the illusion of a single light source. However, set the radii of each point light to be small enough that the cluster illuminates the ceiling, but doesn't bleed through to the floor above.

 

The limitation of this approach, when setting up a light flicker, is that you might not be able to synchronize the flicker of all the point lights. I have never used this method (i.e., using a cluster of point lights to simulate a single light source), so I'm not quite sure how to set up a synchronized flicker. One way might be to assign a single TID to all the point lights (Thing Type 9802), make them dormant, and set them to become active via a single linedef somewhere on the map.

 

The thing I am uncertain about is this: The ZDooM wiki states that "the angle is used to determine the probability the light will flicker to its secondary radius". I'm guessing is that if you set an identical angle for each point light they will each have an identical probability of flickering to its maximum radius.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...