Software "Dynamic Lighting"

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Software "Dynamic Lighting"

Re: Software "Dynamic Lighting"

by StrikerMan780 » Tue Mar 17, 2015 2:03 am

If this were to be done, the best option would to be to go the way of light sourcing in Rise of the Triad. (Radial, colormap-based lighting.)

It's probably the closest you'd get to the Doom software renderer to compare to.

Re: Software "Dynamic Lighting"

by ibm5155 » Thu Feb 26, 2015 11:57 am

Graf Zahl wrote:That will never work with the 8 bit software renderer simply due to lack of needed colors.
Then it would work just like quake 2 lights, colored for opengl and white/black for software.

IF the lights were fixed sized and would never change, it would be easier, but, it could create a texture buffer just to store the textures of the places with dynamic light, apply that circle sprite as a brightmap and tadah, you got a dynamic light :D but the limitation for that result would be the management form that extra textures AND a way to bright up sprites/voxels on that area (on my method, it would only birght up floors and ceiling/walls).

At least it would be a start for software users Use Gzdoom, give up from zdoom and his pentium mmx render era, come back to the new world and feel the beauty of opengl. Unless you have a pentium mmx with a voodoo
Why can't I use a 50 size font? its the tinny config '-'

Re: Software "Dynamic Lighting"

by Gez » Thu Feb 12, 2015 5:44 am

Extralight brightens everything. Dynamic lighting as defined in GZDoom consists of localized pointlights that only brighten their surrounding.

Re: Software "Dynamic Lighting"

by NeuralStunner » Mon Feb 09, 2015 7:35 pm

Revanic wrote:The only thing I am really suggesting here is taking what little "fake" dynamic lighting software mode has and expand upon it in some way.
There isn't any, so there's nothing to expand on.

Re: Software "Dynamic Lighting"

by Revanic » Mon Feb 09, 2015 7:18 pm

The only thing I am really suggesting here is taking what little "fake" dynamic lighting software mode has and expand upon it in some way. Colored lighting is not necessary for this, nor is overbrightening.

Re: Software "Dynamic Lighting"

by NeuralStunner » Mon Feb 09, 2015 4:14 pm

I would love some Quake overbrighting. Too bad >255 sector light already has a "defined" behavior - Not that there couldn't be a new sector flag to enable overbrighting.

You can kind of fake it with sector fades currently, but that's a pain in the arse. (And can't quite work properly with light specials, if you need to transition from overbright to darkened.)

Re: Software "Dynamic Lighting"

by Hellser » Mon Feb 09, 2015 10:26 am

I am sort of leaning towards the white-light idea as well. How hard would it be to add overbright to ZDoom, I wonder?

Re: Software "Dynamic Lighting"

by Gez » Mon Feb 09, 2015 6:27 am

If dynamic lights are limited to white light, it could work with an overbright colormap. If I'm not mistaken, Quake used something like that.

All the examples of dynamic light in original software renderers (not advanced ports written over a decade after the game) that I remember were limited to white light.

Re: Software "Dynamic Lighting"

by Graf Zahl » Mon Feb 09, 2015 6:22 am

That will never work with the 8 bit software renderer simply due to lack of needed colors.

Re: Software "Dynamic Lighting"

by RaveYard » Mon Feb 09, 2015 5:44 am

I wouldn't consider method 1 as dynamic lighting since it would be just range for a_light (which on itself isn't a bad idea).

I was thinking about this: The light would be image which would be drawn and the tilted to the floor and walls on top of the scene. (wait, isn't that something like GZDoom?)
Something like this:
(maybe not) possible result: https://www.dropbox.com/s/vqxi53maak1h8 ... A.png?dl=0
Lighting tilted: https://www.dropbox.com/s/z3w4vnf7hgrtb ... B.png?dl=0
Combined picture: https://www.dropbox.com/s/t395uqesgyttv ... C.png?dl=0

But I am not even thinking about dreaming that something like this would even be attempted.

Re: Software "Dynamic Lighting"

by randi » Sun Feb 08, 2015 9:16 pm

Revanic wrote:I believe a few Build engine games did something like this.
If you're thinking of the flare in Blood, it does it by adding extra round, see-through flat sprites to the render list for each flare sprite that was visible from drawrooms and within a certain distance of a floor or ceiling.

Software "Dynamic Lighting"

by Revanic » Sun Feb 08, 2015 12:15 pm

I thought of 2 ways to simulate dynamic lights in software mode that shouldn't have much more of an impact on resources/fps as DooM's regular dynamic lighting ( Weapon flash).

Method 1
The easiest of the two.
Essentially just adding the light values to the player's extralight (like weapon light), or something similar, possibly attenuated by distance from the player (because a monster attacking another far away from the player shouldn't just randomly light up all the sectors). You would get the illusion of a dynamic light as the lit object would approach you. May be able to determine attenuation through the defined lights in lights.pk3. I believe a few Build engine games did something like this.

Method 2
More correct (but not totally), and possibly more resource intensive, though I do not know by how much. Should be cheaper than GZDoom's dynamic lights still.
You would treat each light casting thing like how light is treated for the player's view, but disregard all sector lighting (treating it like its all at 0), and then add it on top of the default lighting. This will look pretty good and allow the player to see dynamic lights from anywhere, however the lighting would have no Z attenuation, meaning the floor and ceiling will have the same brightness created around the object regardless of height difference. Would be better than nothing though. Could definitely use the lights from the lights.pk3 in this one.


Edit: Actually the above is wrong. Something similar can be done, but just not the way I suggested it exactly. I guess for now I am only suggesting Method 1.

Just an idea. I may try coding either of these myself if I can get the source to compile.

Top