Jump to content
The Dark Mod Forums

TDM Engine Development Page


zergrush

Recommended Posts

Only in that map ?.

 

Ill have a look but if it is only in one map then it sounds like something that might have gone bad with it,

like the portal in crucible of omens that closed to early causing the sky to bleed through a solid wall.

 

Blinking sounds like something unrelated though so lets see.

Link to comment
Share on other sites

Hmm no blinking here so at first i thought everything was ok, but then i changed back to r_shadows 1 and there is definatly something fishy going on.

r_shadows 1 looks fine, r_shadows 2 also looked ok but then i noticed a huge black outline covering parts of the starscape.

It also seems its not static cause if i move a certain distance it dissapears.

 

this resembles the bug i had in another map, but there the outline was blue not black, so easier to notice.

 

But if this is a portal bug would it not affect stencil shadows as well ?

Link to comment
Share on other sites

Hmm no blinking here so at first i thought everything was ok, but then i changed back to r_shadows 1 and there is definatly something fishy going on.

r_shadows 1 looks fine, r_shadows 2 also looked ok but then i noticed a huge black outline covering parts of the starscape.

It also seems its not static cause if i move a certain distance it dissapears.

 

this resembles the bug i had in another map, but there the outline was blue not black, so easier to notice.

 

But if this is a portal bug would it not affect stencil shadows as well ?

 

Could it be the shadow mapping code not being handled by invisible dev materials and so a invisible brush is casting a shadow? This would mean that many more brushes using such materials would have this bug tho.

Edited by HMart
Link to comment
Share on other sites

Yeah that would affect more maps then, it seems to only happen in a few, though it might be because you need to noclip above obstructions to notice it in other maps.

Ill see if that is the case, but tbh it looks like the viewport is not resetting properly when shadowmaps are on.

i noticed a comment in duzenkos code mentioning that, so this might actually be it in visible terms.

Link to comment
Share on other sites

Not good with shaders so im going to ask some questions.

Am i right when assuming this is not peter panning ? if i understood it correctly peter panning just means the shadow newer connects fully with the ground (or floats a bit above it).

 

But peter panning the sky would just be rediculous, or might this actually happen ?.

 

The weird thing is the outline is a perfect square (a huge one even) and does not seem to represent any object in the world. The rendertool for shadowcasting does not show anything that should cast a shadow with that form unless it was actually throwing a shadow of the whole map onto the skyportal, if that is the case ouch.

 

noclipping a few maps showed a few others who had this bug, but it does not seem to be consistent, so finding out which conditions cause this is going to ruin my sleep lol.

Link to comment
Share on other sites

Was mentioned in a thread elsewhere with shadowmap pitfalls, bias etc.

Just making sure its not related before i go bughunting :)

 

It does not seem to be a thing at all, that is why im a little mystified about it. In fact i do not think its a shadow at all now cause the other map i mentioned witht this bug had a blue square in the sky not a black one, but else they behaved the same.

  • Like 1
Link to comment
Share on other sites

Its the freaking moon :huh: well actually its a combination of some unlucky circumstances, the maps affected seem to have a world box that is no bigger than the highest building (checked by noclipping) in fact those maps have places where the world actually is smaller than the highest object, causing some weird shadow glitches like the moon now casting darkness instead of light.

  • Like 1
Link to comment
Share on other sites

Not sure what the best way to get around this one would be, id propose a distance check so that we do not draw shadows further than a set distance, or in another word only close to the players view. Does this sound ok ?

 

After i finally found out what this bug was it turns out it is caused by bad geometry of the map, this is also why it was so inconsistent, since not all maps are affected.

Link to comment
Share on other sites

Not sure what the best way to get around this one would be, id propose a distance check so that we do not draw shadows further than a set distance, or in another word only close to the players view. Does this sound ok ?

 

After i finally found out what this bug was it turns out it is caused by bad geometry of the map, this is also why it was so inconsistent, since not all maps are affected.

It's not urgent, we have time to think about the best fix.

Link to comment
Share on other sites

Pretty neat.

 

Too bad stencil shadows are invisible when soft shadows are enabled.

 

If you are going to get hybrid mode working with soft shadows, I think you'll need to normalize the softening behavior somehow.

Currently r_softShadowsRadius 8 in shadow maps is about equivalent to r_softShadowsRadius 2 in stencil shadow mode.

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Pretty neat.

 

Too bad stencil shadows are invisible when soft shadows are enabled.

 

If you are going to get hybrid mode working with soft shadows, I think you'll need to normalize the softening behavior somehow.

Currently r_softShadowsRadius 8 in shadow maps is about equivalent to r_softShadowsRadius 2 in stencil shadow mode.

Appreciate the testing

...

Couldn't get that fixed tonight. Reverted my bigger changes and for now only committed separate FBO's for cubemap and stencil shadows. To be continued.

Link to comment
Share on other sites

Pretty neat.

 

Too bad stencil shadows are invisible when soft shadows are enabled.

 

If you are going to get hybrid mode working with soft shadows, I think you'll need to normalize the softening behavior somehow.

Currently r_softShadowsRadius 8 in shadow maps is about equivalent to r_softShadowsRadius 2 in stencil shadow mode.

Try now.

Note that when falling back to stencil the shadows are not softened. Reasons:

  • for contact hardening we'd have to do both stencil and shadow map render which is probably going to get expensive - want to hear from other devs first. This is not so much the cost of actually drawing shadows as the cost of additional texture samples in the interaction fragment shader.
  • general murkiness of stencil SS due to its screen-space nature
  • adding more condition checks to code which is already not looking exactly pretty
  • personally not excited to invest more time in stencil shadows at this point
  • normalizing soft radius is something I'd need @stgatilov's input on
Link to comment
Share on other sites

Works as advertised.

 

I think Stgatilov wanted to look at using a "low resolution" shadow map as an input

for contact hardening softening behavior for stencil shadows. So if you got the softening

part done with the same method on both Shadow Maps and Stencil Shadows that would

be 90% done.

 

With that said, I will suggest that it wouldn't be too hard to add a bias factor to the shader

that toggles radius_size vs (radius_size / 4 for stencil) when in hybrid mode and then render both

styles of softening?

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Works as advertised.

 

I think Stgatilov wanted to look at using a "low resolution" shadow map as an input

for contact hardening softening behavior for stencil shadows. So if you got the softening

part done with the same method on both Shadow Maps and Stencil Shadows that would

be 90% done.

I'm wary of adding more code weight to the current solution on my own. I would like a peer review first. I suspect some of my softener shader code to be suboptimal at best. And I would really like someone to figure out the "side blocker" math.

Re that particular idea I particularly need @stgatilov's input.

 

 

With that said, I will suggest that it wouldn't be too hard to add a bias factor to the shader

that toggles radius_size vs (radius_size / 4 for stencil) when in hybrid mode and then render both

styles of softening?

Right, that should be straightforward. The big deal is to balance it between the decent output quality and GPU class requirement.

 

In other words, I feel a bit out of my league here.

Link to comment
Share on other sites

How is that skybox bug? Any progress?

 

I would try reverting the transparency change in rev 7661.

 

I'll test that when I get enough PC time.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Trying to get a hold on a standing workstation cause im having problems sitting down in front of my PC atm.

 

well strange thing happens here, world is now fullbright :huh: edit: had to delete DarkMod.cfg its back to normal now.

atleast it allowed me to clearly see where the skybox goes bonkers.

 

It seems to be a map bug to me cause even with SS on, this map clips off the top of the buildings "no better way to describe it im afraid".

Should be rather noticable with high gamma just try and walk around while looking at the top of the highest buildings.

with SM on i still get the dark block in skybox to in that map, looks like farclip is messed up but it only affects a few maps.

Link to comment
Share on other sites

It seems to be a map bug to me cause even with SS on, this map clips off the top of the buildings "no better way to describe it im afraid".

Should be rather noticable with high gamma just try and walk around while looking at the top of the highest buildings.

with SM on i still get the dark block in skybox to in that map, looks like farclip is messed up but it only affects a few maps.

You don't see how we can fix it on the renderer level? What about @nbohr1more's suggestion above?

Link to comment
Share on other sites

Not sure it can be fixed on renderer level, but we could try with nbohr1mores suggestion.

Maybe its the same bug i have in crucible of omens, in that one it is just a far away solid object that acts like a portal untill you get closer.

Unfortunatly it is hard to see in screenshots in that particular map, but what happens is that a solid object "a wall in this case" lets the skybox shine through at a far away distance.

 

Hmm this could indeed be caused by a bug with transparency after further thought, ill have a look at the commit in question.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 2 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
×
×
  • Create New...