Sun light source

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: Developers

Re: Sun light source

Postby Nash » Sun Jul 30, 2017 12:41 am

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.
User avatar
Nash
Nash Muhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Re: Sun light source

Postby Gez » Sun Jul 30, 2017 6:24 am

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.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Sun light source

Postby Graf Zahl » Sun Jul 30, 2017 12:06 pm

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
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Sun light source

Postby Nash » Sun Jul 30, 2017 3:38 pm



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
Nash
Nash Muhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Re: Sun light source

Postby Cherno » Sat Nov 04, 2017 7:18 pm

I wonder, is there any progress on this, possibly? :)
User avatar
Cherno
 
Joined: 06 Dec 2016

Re: Sun light source

Postby Gez » Sat Nov 04, 2017 8:00 pm

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.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Sun light source

Postby enderandrew » Wed Nov 08, 2017 2:57 pm

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?
enderandrew
 
Joined: 12 Dec 2016

Re: Sun light source

Postby Lud » Wed Jan 24, 2018 5:02 am

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.
Lud
 
Joined: 11 Feb 2016

Re: Sun light source

Postby Nash » Wed Jan 24, 2018 5:07 am

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.
User avatar
Nash
Nash Muhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Re: Sun light source

Postby dpJudas » Wed Jan 24, 2018 5:22 am

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.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Sun light source

Postby skornedemon » Thu Jun 14, 2018 12:34 am

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.
skornedemon
Doom modding since '99.
 
Joined: 02 Aug 2010
Discord: Skorne#1213

Re: Sun light source

Postby dpJudas » Thu Jun 14, 2018 4:00 am

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.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Sun light source

Postby skornedemon » Thu Jun 14, 2018 4:16 pm

Thank you for the feedback, understood.
skornedemon
Doom modding since '99.
 
Joined: 02 Aug 2010
Discord: Skorne#1213

Re: Sun light source

Postby RockstarRaccoon » Fri Jun 22, 2018 10:21 pm

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.
User avatar
RockstarRaccoon
Totally Babies
 
Joined: 31 Jul 2016

Re: Sun light source

Postby Octavia Bruddledock » Wed Aug 01, 2018 2:20 pm

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)
Octavia Bruddledock
 

PreviousNext

Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest