Page 3 of 4

Re: Sun light source

PostPosted: Sat Jul 29, 2017 11:41 pm
by Nash
Patience!!! This feature is super-ultra-early-WIP, and me and dpJudas have been working it out on Discord.

There is sun shading in there, it's just not strong in the screenshots. I have been hard at work creating some demo scenes to truly show this off, but this is taking time.

@Graf Zahl: I agree that there should additionally be an easy "set and forget" MAPINFO F_SKY version. Will remind dpJudas about it when we both get on Discord.

That said, there are indeed situations where having automatic F_SKY only, with no per-sector alternative, is unusable. I'm talking about an indoor scene with windows to the outside, that needs to have subtle directional illumination (especially more so when decorative models are involved in that scene).

Am doing my best to prepare good test materials to demonstrate all possibilities.

Re: Sun light source

PostPosted: Sun Jul 30, 2017 5:24 am
by Gez
Remember that there are a couple of sector types that mark an interior (no sky ceiling) sector as having external lighting. This is mostly used for Hexen's lightning effect. So ideally you could have the "set and forget" apply sun lighting to outside sectors whether they have a sky ceiling or the outside type; and then where needed it can be overridden by sector properties.

And while I'm talking about that stuff: I believe Strife VE has a single sun per level, so we could potentially have an option* to enable SVE sunlight which would apply it on the set-and-forget approach.

* Option because it's debatable whether SVE's outside light features really fit the game. The ambience in the original game is a very overcast, kinda gloomy sky; and with SVE it becomes a dazzling bright summer sky despite all the clouds. Still, it'd be one more notch on the check list; kinda**.

**Yes I'm aware Strife's sunlight is mostly about projecting shadows from world geometry, which this feature isn't about.

Re: Sun light source

PostPosted: Sun Jul 30, 2017 11:06 am
by Graf Zahl
Regarding Strife VE, I have to say that the shadow feature was a bit misguided. It was clearly not done because it made sense but because it could be done, screw the setting of the game.
It's not just the sun position, the maps also contain a few things that alter certain sector properties if the lightmaps are active, like different light levels for some sectors

Re: Sun light source

PostPosted: Sun Jul 30, 2017 2:38 pm
by Nash

Here's an educational video on what directional lighting can do for map visuals in GZDoom.

Very heavily WIP, everything about this is WIP, I won't be putting out builds... dpJudas is still trying to figure this whole thing out, all the little details. No ETA, When It's Done(tm) etc etc

(the branch is called sunlighttest if you want to build it yourself)

Re: Sun light source

PostPosted: Sat Nov 04, 2017 6:18 pm
by Cherno
I wonder, is there any progress on this, possibly? :)

Re: Sun light source

PostPosted: Sat Nov 04, 2017 7:00 pm
by Gez

Latest commit ed0b92a on Jul 31

So, no. dpJudas kind of moved to other projects apparently (like the softpoly renderer) and hasn't been around for about a month apparently.

Re: Sun light source

PostPosted: Wed Nov 08, 2017 1:57 pm
by enderandrew
Perhaps this is a stupid question, but if you add support for directional lighting, would there be benefit to add support for normal maps, parallax occlusion, etc?

Re: Sun light source

PostPosted: Wed Jan 24, 2018 4:02 am
by Accensus
Massive bump to ask Graf whether he approved of this or not. It seems that development on this has been stalled for unknown reasons. However, this would most definitely be utilized by one WIP and epic feature (something something Discord #development for those who are there) called specular and normal maps for textures.

Re: Sun light source

PostPosted: Wed Jan 24, 2018 4:07 am
by Nash
Yes, I spoke to dpJudas about it last night. My concern was, with the (WIP) DNS/PBR shading model, it relies heavily on dynamic lights to do its magic, so if you walk into an area where there area no dynamic lights touching anything at all, the image quality basically reverts back to 2005-era GZDoom with absolutely flat lighting.

With physically based rendering, I imagine the lack of any light source would be worse - since PBR standards dictate that the albedo (base or diffuse) texture must have absolutely NO lighting or shadows baked in - I can imagine in GZDoom, this would manifest as a room with a solid block of a single colour when there are no dynamic lights at all.

The proposed feature in the OP would somehow help this situation by allowing the author to define a "base light" value so that even in the complete absence of dynamic lights, there is at LEAST still SOME kind of subtle illumination.

As for this feature itself - the sunlighttest branch has a lot of conflicts so I think it's best to just redo it. :P

What was missing from this feature the last time I heard from Graf was he requested a way to set the sun light data through MAPINFO. What was possible the last time was to only set the sun light data per-sector via GLDEFS which - understandably - can be a bit tedious for editing.

Re: Sun light source

PostPosted: Wed Jan 24, 2018 4:22 am
by dpJudas
I stopped working on the sunlight branch partly because I wasn't sure if Graf was in favor of the feature or not, and partly because I'm not 100% sure if I'm in favor of it myself. The thing is, if something lands in GZDoom as an official feature we will have to support it forever.

While I did like the visual effect Nash was able to produce with the sunlight branch, I'm less certain whether it is the ideal way to create more light depth to sector light. The thing about light is that manually tweaking shades can be quite tricky and you often get much better quality light by using actual math calculations.

As for the original branch, it was a "proof of concept" branch, but never coded in a way intended to be merged into master. I wanted to see how it would look like, for future light related decisions basically.

About PBR, keep in mind that the AO texture would still be applied for flat shading. Another thing is that I might try to create some form of light probing that can act as the fake contrast for sector light.

Re: Sun light source

PostPosted: Wed Jun 13, 2018 11:34 pm
by skornedemon
I'm not sure if it's okay if I bump this, however this is something I would absolutely love as I enjoy making nice outdoor levels/areas in my doom mods.
Either way commented so I can keep an eye on this like a hawk.

Re: Sun light source

PostPosted: Thu Jun 14, 2018 3:00 am
by dpJudas
Don't expect this feature to ever land in GZDoom in the form it was experimentally done on that branch. While Nash did manage to make a nice test, I think it also revealed the solution wasn't that good compared to other possible ways. It would be better to improve the scene drawer to support drawing shadow maps and then address it as part of a more general shadow map solution.

Re: Sun light source

PostPosted: Thu Jun 14, 2018 3:16 pm
by skornedemon
Thank you for the feedback, understood.

Re: Sun light source

PostPosted: Fri Jun 22, 2018 9:21 pm
by RockstarRaccoon
Actually, since it was brought back up, I've kind of been wondering if it would be possible to give some sort of angle to the lighting in a sector. If we could do that, we could perhaps use a modified version of the directional lighting that is applied to the walls and maybe screw with the way that 3D objects are lit and shadows are cast. This would mean that each sector would have to have an optional pair of angles for the lighting direction, and a byte for the intensity of the lighting effect. How hard would such a thing be to implement?

Edit: Aaaand after writing that, I read a little more carefully and realized he was talking about that and not simply a Light Thing as it seemed he was initially.

Re: Sun light source

PostPosted: Wed Aug 01, 2018 1:20 pm
by Octavia Bruddledock

i have registered to beg for this feature lol... i've come back to doom modding and i get the politics, but myself i don't want to be obsessed with original engine limitations (we already have enough of these)

now while GZDoom is the biggest baddest in town, could this not be a possible feature? It seems GZDoom and Zandorum kinda hole everything in this scene atm, and wouldn't be at a huge risk if they implemented something bold.

Please redirect me if i missunderstand, but what we want here is an infinite range light that affects tagged sectors? so it doesn't have to be called sunlight right? is there any other way i can achieve this.

Most of this Doom stuff i can handle... and i am enjoying learning to map again (after experience with a lot of more advanced engines)... i just can't stand the idea of painting all my light by hand, and it looking worse. It's an important part of my lowfi look.

Thanks, Richard (please link me to anything else if i can already achieve this with a different trick)