[Added] Shadowmaps for GZDoom (can be tested in QZDoom now)

Moderator: GZDoom Developers

Re: Shadowmaps for GZDoom (can be tested in QZDoom now)

Postby Tormentor667 » Sun Mar 12, 2017 5:36 am

Another try: Copy and paste the exact same light from the testmap do my map, made the sectors light level 0, made sure the lines are 1-sided and solid
Image
Same issue. When I warp to MAP01 it works perfect in the test map.

Additionally made a complete new test room in C2M5 with only the light and two columns, doesn't work as well. Made an own testmap with BoA resources with one room and a light source and it worked perfect. Question: Do these shadow maps have limits? For example if the map is too large?
Last edited by Tormentor667 on Sun Mar 12, 2017 5:42 am, edited 1 time in total.
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: Shadowmaps for GZDoom (can be tested in QZDoom now)

Postby Nash » Sun Mar 12, 2017 5:38 am

That light's radius might not be big enough to cast shadows. To visualize where shadows will be cast, look at the radius wireframe in GZDB. Imagine that circle as where all the surface will be painted white. Then you place blocking 1-sided lines in that radius to "block" the light.

Also try raising the Z height of the light to be higher.
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: Shadowmaps for GZDoom (can be tested in QZDoom now)

Postby Rachael » Sun Mar 12, 2017 5:38 am

Attenuated lights add realism to the scene. They use a more realistic falloff formula than normal lights do. They should be an additional set of lights in GZDoomBuilder you can use, and also they are available in GLDefs as well.

They should not affect your shadowmaps. As I said I think the problem is your obstacle is too small for the ray test.
You do not have the required permissions to view the files attached to this post.
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: Shadowmaps for GZDoom (can be tested in QZDoom now)

Postby Tormentor667 » Sun Mar 12, 2017 5:44 am

Doing the same situation in a new map on BoA resources, I simply think that the system can't handle large maps as in Boa ...
Image
So it actually DOES work with these setup but not in my live map... maybe I have something overridden with defaultmap?
Image
Exactly same room placed in C2M5
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: Shadowmaps for GZDoom (can be tested in QZDoom now)

Postby Rachael » Sun Mar 12, 2017 5:46 am

Tormentor: For the 4th time I don't keep saying this so that you and Nash can keep ignoring me. Your obstacles in C2M5 are too small.

Okay, seeing the second picture, yes, there's a definite problem. That does seem to be a bug, and you may be right in your theory about map size.
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: Shadowmaps for GZDoom (can be tested in QZDoom now)

Postby Tormentor667 » Sun Mar 12, 2017 5:53 am

Rachael wrote:Tormentor: For the 4th time I don't keep saying this so that you and Nash can keep ignoring me. Your obstacles in C2M5 are too small.

Notived it already the 1st time and tried to enlarge it to 80x32 units, that didn't change anything - but yes, the 2 screenshots are obvious ;)
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: Shadowmaps for GZDoom (can be tested in QZDoom now)

Postby Rachael » Sun Mar 12, 2017 5:56 am

Can you send me a copy of that map, with the extra room added please? Your BOA git is very big.
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: Shadowmaps for GZDoom (can be tested in QZDoom now)

Postby Gez » Sun Mar 12, 2017 7:53 am

There's a limit of 1024 light sources. If your map is large enough to have already over 1024 light sources, some of them won't work.


I had suggested to dpJudas to check for player viewpoint proximity. People won't really notice if the light isn't culled by a pillar that like 2000 units away from the player.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Shadowmaps for GZDoom (can be tested in QZDoom now)

Postby Tormentor667 » Sun Mar 12, 2017 8:53 am

Rachael wrote:Can you send me a copy of that map, with the extra room added please? Your BOA git is very big.

It's map C2M5.WAD at the Git, if that helps :)

Gez wrote:There's a limit of 1024 light sources. If your map is large enough to have already over 1024 light sources, some of them won't work.
I had suggested to dpJudas to check for player viewpoint proximity. People won't really notice if the light isn't culled by a pillar that like 2000 units away from the player.

I guess that could be the problem, but after searching for all light objects in C2M5, I only found 593 (no monsters are added yet). Beyond in C1M1 the demo room works perfect, where I only counted 66 light sources. I think the viewpoint proximity addition would be the right approach.
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: QZDoom - ZDoom with True-Color (Version 1.2.2 released!)

Postby dpJudas » Sun Mar 12, 2017 9:08 am

ZZYZX wrote:It's just that you essentially made something that has all the limitations of Doom3 stencil shadows (as in it doesn't work with non-solid geometry), and on top of that requires a 2013 videocard to not lag horribly.

First of all, I didn't make this feature for you. I wanted to play with ray tests, then saw a simple opportunity to generalize it as a small contribution to GZDoom. Secondly, the heavy part of this pass currently is the way I'm doing soft shadows - that code isn't too far to how you do nice soft shadows in modern games either. Strangely enough, running the latest Battlefield on a 2013 video card with high quality shadows runs like shit too. And last, I don't really care how it runs on a 2013 card. I don't own one of those. What do you think a NV 980 user will say when you say your 2013 card can't run the latest Battlefield on max settings?

As for the limitations, yes, 1D shadowmaps are not as feature rich as 2D shadowmaps. Let me ask you a simple question - if you could choose between no shadows under actors, or the simple sprite shadow dot that games like UT 99 used, which one would it be? Because you're under the illusion that your choice is actually between my patch and a full featured shadowmap implementation. It is not.

ZZYZX wrote:Again, here I'm assuming that if you merged it from your dev branch to the master branch and said "test it", then you think it's done enough...
If it's not, then I'm sorry for the reaction and you should have said that it's 10% done instead of "go and test it".

I merged it into QZDoom master because the feature was working as I intended and I wanted to see if it gave any problems before PR'ing it up against GZDoom. If you don't like the effect, then don't enable it! If you have a 2013 card, then improve the GLSL, or don't enable it. If you write a full lightmap implementation that makes better light, then we will delete my code and replace it with yours.

ZZYZX wrote:Also: isn't classic shadowmapping dumb and very straightforward to implement?

Why don't you implement it then? I never signed up for that.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Shadowmaps for GZDoom (can be tested in QZDoom now)

Postby dpJudas » Sun Mar 12, 2017 9:36 am

Gez wrote:I had suggested to dpJudas to check for player viewpoint proximity. People won't really notice if the light isn't culled by a pillar that like 2000 units away from the player.

Probably a good way of doing it. I just need a good easy way of taking portals into account when doing it. Maybe something like check if a portal line is in sight, then repeat the test on other side of portal as well.
dpJudas
 
 
 
Joined: 28 May 2016

Re: QZDoom - ZDoom with True-Color (Version 1.2.2 released!)

Postby Tormentor667 » Sun Mar 12, 2017 9:47 am

dpJudas wrote:
ZZYZX wrote:It's just that you essentially made something that has all the limitations of Doom3 stencil shadows (as in it doesn't work with non-solid geometry), and on top of that requires a 2013 videocard to not lag horribly.

First of all, I didn't make this feature for you.

My thought, and to be honest dpJudas, I really appreciate all the additions you made to the renderer lately - ambient occlusion, tonemaps, all that fancy stuff - this really enhances the engine a lot. Same goes to the shadows. It is limited, yes, but so is Doom! :)
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: Shadowmaps for GZDoom (can be tested in QZDoom now)

Postby dpJudas » Sun Mar 12, 2017 10:16 am

Thanks, Tormentor. For what it is worth, I'm not questioning that also having true shadow maps in GZDoom would be really cool - I'm just saying this feature was never intended to be that. They are entirely out of scope for what this pass is trying to do.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Shadowmaps for GZDoom (can be tested in QZDoom now)

Postby Rachael » Sun Mar 12, 2017 10:25 am

You are probably too used to hearing me say this by now, but I am thankful for *all* the additions you've done - both in Software and OpenGL. This is the coolest toy I've played with since I first stumbled upon ZDoom, itself, right alongside with when Graf first added the current DECORATE parser, and it seems like every month it is only getting better. :)

(P.S. where were you 10 years ago?! :D rofl)
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: Shadowmaps for GZDoom (can be tested in QZDoom now)

Postby dpJudas » Sun Mar 12, 2017 10:35 am

Rachael wrote:(P.S. where were you 10 years ago?! :D rofl)

Busy playing WoW, of course. Like Romero and everyone else. :D
dpJudas
 
 
 
Joined: 28 May 2016

PreviousNext

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests