Page 11 of 18

Re: GZDoom discussion (Version 2.3.1 released 2016/jan/7)

Posted: Tue Jan 17, 2017 5:41 am
by Graf Zahl
Nevander wrote: And a full colored lighting system ala Doom 64. That guy did it but nobody knows how and I get the feeling he's not going to release his source code changes.

That one's on my list. but not with ultra-high priority. How important is this for you short-term?

Re: GZDoom discussion (Version 2.3.1 released 2016/jan/7)

Posted: Tue Jan 17, 2017 6:02 am
by Nevander
Graf Zahl wrote:That one's on my list. but not with ultra-high priority. How important is this for you short-term?
It's not critical. My plan was down the line when it becomes do-able I was going to just go through and update all the maps from my project, a sort of "lighting" update. So no rush.

Re: GZDoom discussion (Version 2.3.1 released 2016/jan/7)

Posted: Tue Jan 17, 2017 6:25 am
by Gez
It's not that hard. I know nothing about OpenGL and I got an approximation of that on the long-forgotten and by now probably unusable gzdoom64 branch.

By approximation I mean it did it only per-texture, so when you had a hole (to put, say, a window or a switch) then the effect on the upper and lower textures didn't match the effect on the midtextures nearby. Something that could have been solved easily with some more checks and computations.

Re: GZDoom discussion (Version 2.3.1 released 2016/jan/7)

Posted: Tue Jan 17, 2017 6:27 am
by Nash
Can someone explain to me what's so special about that GZDoom64 lighting? It looks to me like you applied coloured glow on the walls. Anything else?

[I've never played Doom64 BTW]

Re: GZDoom discussion (Version 2.3.1 released 2016/jan/7)

Posted: Tue Jan 17, 2017 7:41 am
by Nevander
Nash wrote:Can someone explain to me what's so special about that GZDoom64 lighting? It looks to me like you applied coloured glow on the walls. Anything else?

[I've never played Doom64 BTW]
If you mean that other "port" called GZDoom64, I did not make that. Someone by the name of nightside eventually released it, but it was clearly The Absolution TC converted to GZDoom. My project now is a fresh and brand new remake of the original to GZDoom, using no prior base for the maps. They have all been converted by hand from the source files to work in GZDoom, all in UDMF format of course.

Anyway, right now the best way to accomplish Doom 64's lighting look is with the extensive use of glowing flats. It's since been made easier by being able to directly apply a glow in UDMF but that's only a part of the lighting system. Doom 64 is capable of lighting the upper wall, lower wall, floor, ceiling and things all differently on a per sector basis. This allows for some really cool effects, like a dark blue room fading up into black but with a red floor for example.

That video I linked to shows the exact effect, and even has additive lighting on a per sector basis that strobes almost pure white instead of just the normal Doom "255 brightness" level.

Re: GZDoom discussion (Version 2.3.1 released 2016/jan/7)

Posted: Tue Jan 17, 2017 8:31 am
by Graf Zahl
Gez wrote:It's not that hard. I know nothing about OpenGL and I got an approximation of that on the long-forgotten and by now probably unusable gzdoom64 branch.

By approximation I mean it did it only per-texture, so when you had a hole (to put, say, a window or a switch) then the effect on the upper and lower textures didn't match the effect on the midtextures nearby. Something that could have been solved easily with some more checks and computations.

I'd do it in the shader, not in the C code. Applying the lighting is very simple stuff, actually.
Of course, I think it shouldn't be done as lighting but as alteration of the material color, so that dynamic lights won't screw it up.

Re: GZDoom discussion (Version 2.3.1 released 2016/jan/7)

Posted: Tue Jan 17, 2017 8:48 am
by Gez
I did it as color, not lighting. Shaders would be the way to go now, because IIRC it was just a simple modification of immediate mode calls, feeding colors to the vertices.

Re: GZDoom discussion (Version 2.3.1 released 2016/jan/7)

Posted: Tue Jan 17, 2017 9:08 am
by Graf Zahl
Gez wrote:I did it as color, not lighting. Shaders would be the way to go now, because IIRC it was just a simple modification of immediate mode calls, feeding colors to the vertices.
That would have been lighting, actually, because those colors would have been clobbered by the light texture overlay.

What I mean is that it needs to be applied to the pixel color value in the shader, not the light color value - with shaders I do have the control.
Of course, trying to make this work with the legacy render path is something I'd rather skip - it can't even do glows so why bother?

Re: GZDoom discussion (Version 2.3.1 released 2016/jan/7)

Posted: Wed Jan 18, 2017 3:56 pm
by Kinsie
Nash wrote:Can someone explain to me what's so special about that GZDoom64 lighting? It looks to me like you applied coloured glow on the walls. Anything else?

[I've never played Doom64 BTW]
Doom 64 lets you do more granular coloured lighting than current ZDoom solutions. Here's a excerpt from Kaiser's Doom 64 Tech Bible that explains it:
Image

Re: GZDoom discussion (Version 2.3.1 released 2016/jan/7)

Posted: Wed Jan 18, 2017 3:59 pm
by Nevander
Picturing a room in GZDoom that can look like that screenshot is exciting. I sure hope this comes to fruition in GZDoom for any and all purposes in map design.

Re: GZDoom discussion (Version 2.3.1 released 2016/jan/7)

Posted: Wed Jan 18, 2017 4:13 pm
by Nash
Kinsie wrote:Doom 64 lets you do more granular coloured lighting than current ZDoom solutions. Here's a excerpt from Kaiser's Doom 64 Tech Bible that explains it:
Image
Perfect explanation, thanks!

Although I don't see a way to control the light's alpha/intensity. I hope GZDoom will add alpha controls, too.

Re: GZDoom discussion (Version 2.3.1 released 2016/jan/7)

Posted: Wed Jan 18, 2017 5:31 pm
by Nevander
Nash wrote:Although I don't see a way to control the light's alpha/intensity. I hope GZDoom will add alpha controls, too.
You can change intensity after you click the little color wheel. That's how Doom 64 does lighting, all sectors in the editor are actually 255 brightness but the darker or lighter the color is determines brightness. This means you can have a really bright yellow lower wall but with a darker fade into pitch black. Really awesome lighting system.

Re: GZDoom discussion (Version 2.3.1 released 2016/jan/7)

Posted: Wed Jan 18, 2017 7:02 pm
by Gez
Yeah, that's it. Brighter light? Make it a whiter color. Dimmer light? Darker color. That's all there is to it. It's enough for Doom 64; and in GZDoom it would be combined with all the other effects at out disposal (fade, fog, per-surface light level...) so there's no real need for any further control.

Re: GZDoom discussion (Version 2.3.1 released 2016/jan/7)

Posted: Thu Jan 19, 2017 2:18 am
by Nash
No, what I mean is, what if I don't want the tint to be too much. Imagine like, reducing the Opacity slider in a Photoshop layer... if I set the light colour to be "whiter", it will still obstruct the wall/floor texture behind it by the same amount, it won't automatically be more "transparent"...

Re: GZDoom discussion (Version 2.3.1 released 2016/jan/7)

Posted: Thu Jan 19, 2017 4:09 am
by Gez
Set your photoshop light layer to multiply, then try again to see what happens when the light color is whiter.