GZDoom "Dynamic" Lights: Possible in Software?

Discuss anything ZDoom-related that doesn't fall into one of the other categories.

GZDoom "Dynamic" Lights: Possible in Software?

Postby Minigunner » Sat Dec 04, 2010 3:31 am

I have looked at how GZDoom's dynamic lights are drawn, and since it's basically a brightmap graphic projected onto a plane/wall, with sprite brightness calculated by relative distance from the light source, it may be replicated in software. IMO it seems quite a bit similar to decals and brightmapped sprites/textures. Maybe with some careful coding, we could have GZLights in ZDoom. What do you think?
User avatar
Minigunner
You spin my gun round, baby right round...
 
Joined: 28 Dec 2009
Location: Oakhurst, CA

Re: GZDoom "Dynamic" Lights: Possible in Software?

Postby Graf Zahl » Sat Dec 04, 2010 4:40 am

The palette limitations alone would pretty much ensure that it'll look bad. And it still wouldn't be that easy for flats.
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

Re: GZDoom "Dynamic" Lights: Possible in Software?

Postby Minigunner » Sat Dec 04, 2010 5:59 am

If that is the case, then this could wait until ZDoom's possible implementation of hi-color mode (which is pretty damn unlikely as is). Otherwise, the best thing to do with software dynamic lights is to avoid using purple and cyan...
User avatar
Minigunner
You spin my gun round, baby right round...
 
Joined: 28 Dec 2009
Location: Oakhurst, CA

Re: GZDoom "Dynamic" Lights: Possible in Software?

Postby NeuralStunner » Sat Dec 04, 2010 3:46 pm

This and 3D floors are about all that defines a "GZDoom only" map/mod. I would be extremely happy to see at least the latter finished, even moreso to see both. I remember the time I spent unable to use GL at all.

(If you could implement this, would it open up the possibility of software brightmaps?)
User avatar
NeuralStunner
Registered to make one post
 
Joined: 21 Jul 2009
Location: Who?

Re: GZDoom "Dynamic" Lights: Possible in Software?

Postby Gez » Sat Dec 04, 2010 3:48 pm

NeuralStunner wrote:This and 3D floors are about all that defines a "GZDoom only" map/mod.

No love for FraggleScript? :P
Gez
 
Joined: 06 Jul 2007

Re: GZDoom "Dynamic" Lights: Possible in Software?

Postby NeuralStunner » Sat Dec 04, 2010 3:59 pm

Gez wrote:No love for FraggleScript?
I can't think of a single mod that uses it. :(
User avatar
NeuralStunner
Registered to make one post
 
Joined: 21 Jul 2009
Location: Who?

Re: GZDoom "Dynamic" Lights: Possible in Software?

Postby esselfortium » Sat Dec 04, 2010 4:34 pm

I think the palette issues could be worked around in the same way that sector lighting and texture choices are made to look good in software, but I don't think any remotely 'easy' implementation of this would really work in software for another, unrelated reason: the existing colormap-based lighting system would likely break the effect unless the dynamic lights could be somehow rendered as a series of circular, dynamically-split partial segs and subsectors with the appropriate light levels' colormaps.

Because drawing them as bright overlays wouldn't really work out with the existing software lighting system, I don't think. Best case implementation that way they'd probably stick out like a sore thumb, especially when all the lighting around them brightens/darkens with distance fading and the dynamic lights don't.

tl;dr: hfgl
User avatar
esselfortium
A Birdcage Until Further Notice
 
Joined: 19 Sep 2006

Re: GZDoom "Dynamic" Lights: Possible in Software?

Postby Minigunner » Sat Dec 04, 2010 4:52 pm

Yeah, software dynlights would probably need quite a bit of work in order for it to look good in software. However, I screenshotted some dynamic lights and converted the images to the Doom palette, and they don't look half bad; basically, the light levels would have to be calculated in 16-bit in order to look almost the same. As for the possible r_visibility troubles, I guess the lights could also be affected by it.

All in all, it seems that the way I'm proposing may consume a shitload of CPU usage, so there would have to be a way around it, or they will just about be useless and not worth the effort. :cry:
User avatar
Minigunner
You spin my gun round, baby right round...
 
Joined: 28 Dec 2009
Location: Oakhurst, CA

Re: GZDoom "Dynamic" Lights: Possible in Software?

Postby Gez » Sat Dec 04, 2010 6:20 pm

DelphiDoom is the most advanced software renderer as far as eye candy goes; it has 32-bit color depth, dynamic lights, and fake perspective correction.

I am a bit surprised nobody backported that code to a C/C++ Doom port; but I guess those people interested by these features just go for hardware rendering.
Gez
 
Joined: 06 Jul 2007

Re: GZDoom "Dynamic" Lights: Possible in Software?

Postby esselfortium » Sat Dec 04, 2010 6:36 pm

I was really intrigued by the fake perspective correction as seen in the DelphiDoom website's screenshots, but when I tried it out I found it to actually be rather nauseating in action. :?
User avatar
esselfortium
A Birdcage Until Further Notice
 
Joined: 19 Sep 2006

Re: GZDoom "Dynamic" Lights: Possible in Software?

Postby phi108 » Sat Dec 04, 2010 8:57 pm

esselfortium wrote:...the existing colormap-based lighting system would likely break the effect unless the dynamic lights could be somehow rendered as a series of circular, dynamically-split partial segs and subsectors with the appropriate light levels' colormaps.


I've often wondered if the ZDoom colormap light fading could ever be more dynamic, allowing the light to brighten in a circle as it got closer to a bright item, not dependent on the player position anymore. But this would only allow white lights the same as all light fading, unless it could somehow use ZDoom's colored sector lighting.
User avatar
phi108
Magical Error?
 
Joined: 01 Dec 2007

Re: GZDoom "Dynamic" Lights: Possible in Software?

Postby Minigunner » Sat Dec 04, 2010 10:31 pm

I just looked at DelphiDoom, and its "dynlights" are just sprites, while the perspective correction blows.
Wait a minute. The light effects could fit well in software, if they aren't rendered as additive.
The perspective correction seems to just be the widening of the screen towards the bottom (like this: |`| -> /`\ ; it even occurs when looking down :| ). However, that tends to provide even more distortion than no "correction" at all. It should be narrowing of the screen towards the top when looking up ( |`| -> /\ ), and narrowing towards the bottom when looking down ( |`| -> \/ ).
As for 32-bit color, I think that ZDoom would be better off with 16-bit color, considering that ZDoom in itself consumes more resources than DelphiDoom (that is, if the fancy settings aren't enabled), and that ZDoom doesn't use any texture filters that could easily expose the visual disadvantages of 16-bit over 32-bit.
User avatar
Minigunner
You spin my gun round, baby right round...
 
Joined: 28 Dec 2009
Location: Oakhurst, CA

Re: GZDoom "Dynamic" Lights: Possible in Software?

Postby NeuralStunner » Sun Dec 05, 2010 12:09 am

Minigunner wrote:ZDoom doesn't use any texture filters that could easily expose the visual disadvantages of 16-bit over 32-bit.
Meh, in GZDoom especially, I've noticed a distinct lack of color quality in 16-bit color mode (with lighting in particular).
User avatar
NeuralStunner
Registered to make one post
 
Joined: 21 Jul 2009
Location: Who?

Re: GZDoom "Dynamic" Lights: Possible in Software?

Postby Eriance » Sun Dec 05, 2010 7:39 pm

Didn't Quake have Dynamic lights in software mode? O_o I'd imagine it would be possible?
User avatar
Eriance
Now delivering MORE of LESS!
 
Joined: 26 Jul 2004
Location: Somewhere in nowhere

Re: GZDoom "Dynamic" Lights: Possible in Software?

Postby InsanityBringer » Sun Dec 05, 2010 7:41 pm

Quake's software renderer was also much different than doom's.
User avatar
InsanityBringer
 
Joined: 05 Jul 2007

Next

Return to General

Who is online

Users browsing this forum: No registered users and 2 guests