Simple question about dynamic lighting

Archive of the old editing forum
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.
User avatar
kodi
 
 
Posts: 1361
Joined: Mon May 06, 2013 8:02 am

Re: Simple question about dynamic lighting

Post by kodi »

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?
User avatar
Caligari87
Admin
Posts: 6229
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Simple question about dynamic lighting

Post by Caligari87 »

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...

8-)
User avatar
kodi
 
 
Posts: 1361
Joined: Mon May 06, 2013 8:02 am

Re: Simple question about dynamic lighting

Post by kodi »

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.
User avatar
Caligari87
Admin
Posts: 6229
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Simple question about dynamic lighting

Post by Caligari87 »

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?

8-)
User avatar
Nash
 
 
Posts: 17487
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Simple question about dynamic lighting

Post by Nash »

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...
User avatar
Caligari87
Admin
Posts: 6229
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Simple question about dynamic lighting

Post by Caligari87 »

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.

8-)
User avatar
kodi
 
 
Posts: 1361
Joined: Mon May 06, 2013 8:02 am

Re: Simple question about dynamic lighting

Post by kodi »

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.
User avatar
Caligari87
Admin
Posts: 6229
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Simple question about dynamic lighting

Post by Caligari87 »

Since it's possible globally by editing the mask, I wonder if Graf would be willing to expose it as a feature somehow...

8-)
Gez
 
 
Posts: 17939
Joined: Fri Jul 06, 2007 3:22 pm

Re: Simple question about dynamic lighting

Post by Gez »

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?
There are a few problems with that approach.

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
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49228
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Simple question about dynamic lighting

Post by Graf Zahl »

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
User avatar
Caligari87
Admin
Posts: 6229
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: Simple question about dynamic lighting

Post by Caligari87 »

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?

8-)
User avatar
Nash
 
 
Posts: 17487
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Simple question about dynamic lighting

Post by Nash »

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49228
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Simple question about dynamic lighting

Post by Graf Zahl »

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.
Rev_Heretic
Posts: 5
Joined: Mon Mar 31, 2014 1:26 pm

Re: Simple question about dynamic lighting

Post by Rev_Heretic »

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.
User avatar
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

Post by Kappes Buur »

Rev_Heretic wrote:..... It corrects those undesired light bleeds while keeping me free to light the next room any way I please.
For me, the only way to bypass those light bleeds is by moving the sectors apart by more then the lights radii.
Spoiler:
Spoiler:
Could you post your map with that effect?
Locked

Return to “Editing (Archive)”