Simple question about dynamic lighting
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Re: Simple question about dynamic lighting
If I recall correctly, the shape of dynamic lights is determined by brightmap PNG textures right? If so, wouldn't it be possible to create custom dynamic light Things shaped as half or quarter circles to be placed at walls or in corners?
- Caligari87
- Admin
- Posts: 6229
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Simple question about dynamic lighting
If so, that would be something new and exciting for me. I know in gzdoom.pk3 there's a "mask" for dynamic lights, but I've never messed around with it...


Re: Simple question about dynamic lighting
I did a quick search and yes, that seems to be the case. This would be amazing for light shining through windows and such too.
- Caligari87
- Admin
- Posts: 6229
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Simple question about dynamic lighting
I can't seem to find anything right offhand, and the Wiki is blocked at work for me. How does it work, how's it defined, etc?


Re: Simple question about dynamic lighting
Uhh wouldn't that alter every single dynamic light in the game if you replaced that graphic? Every light will be shaped as a half/quarter circle and you can't have fully circular dynamic lights anymore...
- Caligari87
- Admin
- Posts: 6229
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Simple question about dynamic lighting
Yeah, but I'm curious what kodi was talking about with using a "brightmap" for a custom dynamic light thing to define the shape. Or maybe that was just speculation and I misinterpreted it.


Re: Simple question about dynamic lighting
I assumed/speculated there was some way of creating multiple light shapes and assigning them to custom pointlight actors. Found this example of the effect: http://s50.photobucket.com/user/sirbard ... p.jpg.html but he did indeed alter every light everywhere.
- Caligari87
- Admin
- Posts: 6229
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Simple question about dynamic lighting
Since it's possible globally by editing the mask, I wonder if Graf would be willing to expose it as a feature somehow...


Re: Simple question about dynamic lighting
There are a few problems with that approach.kodi wrote:If I recall correctly, the shape of dynamic lights is determined by brightmap PNG textures right? If so, wouldn't it be possible to create custom dynamic light Things shaped as half or quarter circles to be placed at walls or in corners?
First: there's only one dynlight texture (they aren't brightmaps), so you change one, you change all.
Secondly: this method is only used as a legacy system, I believe that when you use shaders for lights, the texture isn't used
Thirdly: I'm pretty sure it's going to be entirely gone in a future version of GZDoom as I remember a commit message to that effect; but GitHub doesn't allow to search for commit messages
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49228
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Simple question about dynamic lighting
What Gez said.
The next version is most likely going to remove it for GL3.x and higher completely, it'll only be available as a fallback for GL 2.x
The next version is most likely going to remove it for GL3.x and higher completely, it'll only be available as a fallback for GL 2.x
- Caligari87
- Admin
- Posts: 6229
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Simple question about dynamic lighting
Ah, good to know. So would "shaped" lights ever be a viable option (foregoing dynamic shadows), or is that pretty much impossible without significant work on the renderer?


Re: Simple question about dynamic lighting
I've always wanted cone/directional lights for a very long time... would make those silly "stack incrementally-larger dynamic lights" hacks to create flashlights redundant.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49228
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Simple question about dynamic lighting
Directional lights could be done with a shader - but they are computationally extremely expensive and prohibitive on older hardware - something I know many people still have.
Besides, there are more important things to be done first. I won't bother with this unless I have completely ported the renderer to OpenGL 4.x core profile.
Besides, there are more important things to be done first. I won't bother with this unless I have completely ported the renderer to OpenGL 4.x core profile.
-
- Posts: 5
- Joined: Mon Mar 31, 2014 1:26 pm
Re: Simple question about dynamic lighting
Back to the original problem of this thread, I was looking for a solution to this too. To work around dynamic light 'bleeding' to the next room's floor and ceiling is to place a small sector in the neighbouring room that encloses the affected area and have an open script to tag that sector with Sector_SetPlaneReflection (<tag>, 1, 1). Apparently, sectors flagged with reflective surfaces will not pick up any dynamic lighting, even at its lowest value. It corrects those undesired light bleeds while keeping me free to light the next room any way I please.
- Kappes Buur
-
- Posts: 4177
- Joined: Thu Jul 17, 2003 12:19 am
- Graphics Processor: nVidia (Legacy GZDoom)
- Location: British Columbia, Canada
- Contact:
Re: Simple question about dynamic lighting
For me, the only way to bypass those light bleeds is by moving the sectors apart by more then the lights radii.Rev_Heretic wrote:..... It corrects those undesired light bleeds while keeping me free to light the next room any way I please.
Spoiler:
Spoiler:Could you post your map with that effect?