Sun light source

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Sun light source

Re: Sun light source

by Cherno » Fri Jan 11, 2019 4:31 pm

Semi-necroing inbound :3:

After experimenting with models and voxel-models in GZDoom (Alone in the Dark TC, Chibi Voxel Doom, §D Dot Game Heroes/Legend of Zelda TC, Lego Doom TC), I now have an idea of what I would want from a sunlight system which I would like to share so perhaps sometime it will be implemented. At least this way, the dev team knows one possible application.

Basically, we have the well-known situation of models being lit uniformly without a light source. This means that models that have no baked lighting textures (which is an art style I prefer) looks pretty bad in outdoor environments where you can't put some kind of light source everywhere. Even indoor environment that are supposed to be dark can be problematic for the same reason. Outsoor lighting can be "hacked" to a certain degree with angled spotlights with a very large intensity and radius. Far from ideal, but possible. Sine these ligths stop at one-sided sector lines, a global directional light for the dark indoor spaces mentioned before won't work in any case.

Which leaves me with what I would love to see: A directional light that only lights models, and does so throughout the whole map without any blocking by walls etc.

I fear that this is one of those features that only benefits a very small percentage of modders, but I wanted to state my idea anyway. Thank you! :wub:

Re: Sun light source

by Graf Zahl » Wed Aug 01, 2018 3:55 pm

The main problem is actually determining what should be affected by a sun light source and what not. Adding one static directional light source with infinite distance to the shader is simplicity itself but without casting shadows it is pretty useless.

Re: Sun light source

by Gez » Wed Aug 01, 2018 3:53 pm

As dpJudas explained, what holds the feature back is simply not having yet a clear idea how best to implement it and expose it to the modders. I believe that at the moment the biggest cloud to darken a sunlight feature is the ongoing development of a Vulkan backend to future-proof the engine. Once it's done, there will be more clarity for adding yet more features, this topic included.

Re: Sun light source

by Rachael » Wed Aug 01, 2018 3:38 pm

I don't think there's any worry about "risks" for implementing bold things at all - at least not from the overall perspective - if there were, ZDoom and GZDoom would be NOTHING like what they are, today.

I think the worst of it is, is that when we get cool new features, there's always someone who complains that it's the worst thing, it's terrible, people will abuse it horribly, etc, when the feature is really is well loved by the community at large. It's made some developers a bit shy to contributing.

Re: Sun light source

by Guest » Wed Aug 01, 2018 1: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)

Re: Sun light source

by RockstarRaccoon » Fri Jun 22, 2018 9: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.

Re: Sun light source

by skornedemon » Thu Jun 14, 2018 3:16 pm

Thank you for the feedback, understood.

Re: Sun light source

by dpJudas » Thu Jun 14, 2018 3: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.

Re: Sun light source

by skornedemon » Wed Jun 13, 2018 11:34 pm

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

by dpJudas » Wed Jan 24, 2018 4: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.

Re: Sun light source

by Nash » Wed Jan 24, 2018 4: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.

Re: Sun light source

by Accensus » Wed Jan 24, 2018 4: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.

Re: Sun light source

by enderandrew » Wed Nov 08, 2017 1: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?

Re: Sun light source

by Gez » Sat Nov 04, 2017 7: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.

Re: Sun light source

by Cherno » Sat Nov 04, 2017 6:18 pm

I wonder, is there any progress on this, possibly? :)

Top