Blending on Dynamic Light Shading for Map Geometry

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

Moderator: GZDoom Developers

Blending on Dynamic Light Shading for Map Geometry

Postby RockstarRaccoon » Wed Feb 24, 2021 7:05 pm

Odd thing that I came across in some experimentation with maps lit entirely with Dynamic Lights. When you have a dynamic light shining on geometry that was made to look rounded in some way, the effect is broken by the way dynamic lights are applied across the surface. This ends up looking even worse if you're using PBR materials.

Basically, this means you can't effectively use things like triangular sectors or rounded walls too close to a stark light source, as the light source will create sharp shadows which ruin the rounding effect.



I have no idea how to go about implementing this, but if someone wanted to take a whack at it, here's a (Doom2) WAD I made which would make it all stick out.
https://drive.google.com/file/d/1P_3K8qntMtKSX6BBP4g8tmIuW3jT3VGv/view?usp=sharing

Edit:
Phantombeta suggested "add a way for modders to specify smoothing groups and such" which would be a good fix for anyone making maps right now. It might be the best thing to do. (in fact, if I had a choice, it'd be my preference)

Another one would be some way to detect when two connected surfaces have the same texture and somehow specify a "max delta" under which they end up blended. This would work for maps which didn't/don't implement it, but wouldn't have the same level of control for mappers who are building around dynamically-lit areas.
Last edited by RockstarRaccoon on Thu Feb 25, 2021 6:37 pm, edited 1 time in total.
User avatar
RockstarRaccoon
Totally Babies
 
Joined: 31 Jul 2016

Re: Blanding on Light Shading for Map Geometry

Postby Graf Zahl » Thu Feb 25, 2021 12:57 am

It's not really that easy. Map geometry in Doom does not have any normals whatsoever so they'd have to be added to all data in the game.
Besides, creating surfaces like this test map with lots of tiny triangular sectors is not a good idea due to the limitations of the physics code. Moving around in this map feels really awkward.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Blanding on Light Shading for Map Geometry

Postby RockstarRaccoon » Thu Feb 25, 2021 6:37 pm

Graf Zahl wrote:It's not really that easy.
Hence why I have no idea how to improve this myself: I'm not even entirely sure how you guys programmed the lighting system to work, aside from how pretty much all lighting systems work...
creating surfaces like this test map with lots of tiny triangular sectors is not a good idea due to the limitations of the physics code. Moving around in this map feels really awkward.

The map that I encountered it in had larger triangles than this, but this does raise the idea that perhaps I could make an MD3 model with rounded edges and proper shading applied and stick it over a low-poly version of the ground... Or maybe I should see if getting down the number of triangles, using larger ones, will help...

Either way, if something could be done, engine side, to smooth lighting on triangles and/or walls, I think it'd really help people who want to make realistic looking natural areas and light them like this. I'm interested at the moment because I've been toying with the idea of what I'm describing as "a world lit only by fire.", and this stuff just doesn't look as good in torchlight...
User avatar
RockstarRaccoon
Totally Babies
 
Joined: 31 Jul 2016

Re: Blanding on Light Shading for Map Geometry

Postby Apeirogon » Fri Feb 26, 2021 1:52 am

Graf Zahl wrote:Map geometry in Doom does not have any normals whatsoever so they'd have to be added to all data in the game.

Hmmm?
Sectors already have normal, in secplane floorplane/ceilingplane structs, and for walls/lines it just (-line.delta.y, line.delta.x), which will always pointed in the direction of the line front.

Unless we talking about something that called "normal" not in mathematical meaning.
User avatar
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: Blending on Dynamic Light Shading for Map Geometry

Postby Graf Zahl » Fri Feb 26, 2021 2:20 am

Yes, that's just the default normal, but the engine has no facilities for per-vertex normals and which edges should be smoothed.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Blending on Dynamic Light Shading for Map Geometry

Postby Apeirogon » Sat Feb 27, 2021 3:53 am

Ohh, it lack any code which can be used as a base for implementation, okay.
User avatar
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017


Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests