Sun light source

Moderator: GZDoom Developers

User avatar
Nash
 
 
Posts: 17429
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Sun light source

Post 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.
Gez
 
 
Posts: 17831
Joined: Fri Jul 06, 2007 3:22 pm

Re: Sun light source

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

Re: Sun light source

Post 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
User avatar
Nash
 
 
Posts: 17429
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Sun light source

Post 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)
User avatar
Cherno
Posts: 1308
Joined: Tue Dec 06, 2016 11:25 am

Re: Sun light source

Post by Cherno »

I wonder, is there any progress on this, possibly? :)
Gez
 
 
Posts: 17831
Joined: Fri Jul 06, 2007 3:22 pm

Re: Sun light source

Post by Gez »

https://github.com/coelckers/gzdoom/tree/sunlighttest
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.
enderandrew
Posts: 108
Joined: Mon Dec 12, 2016 1:12 pm

Re: Sun light source

Post 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?
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: Sun light source

Post 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.
User avatar
Nash
 
 
Posts: 17429
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Sun light source

Post 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.
dpJudas
 
 
Posts: 3036
Joined: Sat May 28, 2016 1:01 pm

Re: Sun light source

Post 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.
skornedemon
Posts: 154
Joined: Mon Aug 02, 2010 11:10 am

Re: Sun light source

Post 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.
dpJudas
 
 
Posts: 3036
Joined: Sat May 28, 2016 1:01 pm

Re: Sun light source

Post 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.
skornedemon
Posts: 154
Joined: Mon Aug 02, 2010 11:10 am

Re: Sun light source

Post by skornedemon »

Thank you for the feedback, understood.
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Sun light source

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

Re: Sun light source

Post by Guest »

Hi

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)
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”