Jump to content
The Dark Mod Forums

Recommended Posts

Posted

It's casting a shadow when it shouldn't.

 

So I checked and the model casts a circular shadow when lit from below, which definitely isn't ideal, but most of our early light models cast unattractive shadows by default. That's why mappers typically set them to noshadows manually or use the entities that do it automatically. If that wasn't done in this case, isn't it a map problem rather than a model problem?

 

If so, a barely visible hot coal texture inside the cage lamp goes black on custom skinned models?

 

Collateral damage seems to be minimized there.

 

 

Except that that black texture would also cast shadows, so you would potentially be making the problem worse, not better.

 

 

There are at least ten models that use that texture, all of which have been around since the early days, so the odds of someone having done something custom with one of them seems high.

Posted

It only produces incorrect shadows under "shadow map" mode (r_shadows 2).

 

I just tried that setting in my testmap and saw no difference in the shadows, except that they weren't soft anymore. Do you have a screenshot of what you're seeing?

Posted

What happens if you set the entity to noshadows in your test map, does shadow map mode respect that?

This is where it's happening in NHAT 2:

http://forums.thedarkmod.com/topic/19163-beta-testing-206/?do=findComment&comment=414396

 

(work is blocking me from getting images)

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...)

Posted

What happens if you set the entity to noshadows in your test map, does shadow map mode respect that?

 

This is where it's happening in NHAT 2:

 

http://forums.thedarkmod.com/topic/19163-beta-testing-206/?do=findComment&comment=414396

 

(work is blocking me from getting images)

 

That link takes me to two screenshots but I don't see any cagelights in them...?

 

I'll test the noshadows thing.

Posted

 

That link takes me to two screenshots but I don't see any cagelights in them...?

 

I'll test the noshadows thing.

 

The warehouse in NHAT where that iron gate border is upstairs.

 

If you play the mission with shadow maps enabled, you will see that cagelamp shadow blot out almost all the gate post shadows.

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...)

Posted

I just tested, and noshadows is respected.

 

Here's a video. The candle indicates where the light is positioned. The cagelamp below the light casts no shadows. The three cagelight models in the center, above the light, do, except for the center one which has noshadows set. The two outside lights are entities, which work as expected, casting no shadows when lit and full shadows when unlit. Nothing changes when setting r_shadows 2 except the soft shadows go away.

 

Posted

I think that there is some relationship to the light action script and entity.

 

In my local NHAT copy, I used an override material for the coal texture and it cured the shadow map bug.

 

By the way, the "hard shadows" in shadow map mode are because the shadow casters are so close to the wall.

That is the way "contact hardening" soft shadows work (and real world shadows too). To see softening in

shadow map mode, either move the light closer to the shadow casters or move the casters farther from the wall. :)

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...)

Posted

The conversation seems to have strayed from the subject.

 

This is not a problem with "noshadows" or "*_lit". The static in NHAT does not use those.

 

This is about the model material that is casting shadows with maps but not with stencil due to the fact that maps use both front and back tri's for shadowing.

 

Are you using a mere static model in your test map or the full entity def?

 

Maybe open the NHAT map and see how they implemented it there. Best copy-paste it from there.

Posted
By the way, the "hard shadows" in shadow map mode are because the shadow casters are so close to the wall.

 

 

I'm not sure that's the case here. I moved the models closer to the wall for that video, but they were quite a bit further away originally, and the shadows were still completely hard. Is there perhaps some other setting I should have on?

 

Maybe open the NHAT map and see how they implemented it there. Best copy-paste it from there.

 

 

I don't remember many details about that map. How would I find the problem location?

Posted

I'm not sure that's the case here. I moved the models closer to the wall for that video,

but they were quite a bit further away originally, and the shadows were still completely hard. Is there perhaps some other setting I should have on?

 

Hmm. Maybe you need to increase your softness slider or set r_softShadowsRadius to something like 1.1 ? ( or override with a negative value like -0.8 )

 

It might be worthwhile to look at your Darkmod.cfg.

 

I don't remember many details about that map. How would I find the problem location?

 

I'll post the coordinates tonight but here is a rough path:

 

1) Install NHAT

2) map anoott in the console

3) Noclip past the Broken Broadsword pub to the Police Station on the right

 

nhat3_2015-05-31_21.25.57.jpg

 

4) Noclip past the Police station and turn right on to the side street

 

nhat3_2017-09-29_15.44.41.png

 

5) On the left you will see a warehouse with double doors, go in

6) Switch between r_shadows modes

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...)

Posted

Ok, I've done some more tests, and something odd is going on.

 

The screenshot shows identical cagelamp models. The one on the left has a "light_torchflame" entity as the light (the one used in anoott). The one on the right has a regular default "light" entity. This is on r_shadows 2.

 

As you can see the one on the left casts a shadow and the one on the right does not.

 

There's no reason I'm aware of that the two lights should behave differently in regards to shadows.

 

 

post-9-0-46914000-1545490019_thumb.jpg

Posted
Obviously one has the noshadows spawn arg and the other does not

 

 

:huh: And where do you think the noshadow spawnarg would come from? I didn't add it.

 

Map attached.

testlamp.txt

  • Like 1
Posted

For extra information:

When I change the texture of the light on the right to lights/fire_walltorch (the same as the one on the left), there are still noshadows cast.

 

However, when I replace the light with a light_torchflame entity, it casts a shadow.

 

So clearly different lights are behaving differently.

Posted

For extra information:

When I change the texture of the light on the right to lights/fire_walltorch (the same as the one on the left), there are still noshadows cast.

 

However, when I replace the light with a light_torchflame entity, it casts a shadow.

 

So clearly different lights are behaving differently.

Sorry, the test map has multiple similar models and lights and it's just too difficult in runtime to figure out which one is which.

Can you either delete everything but the two lights/entities from your last screenshot and/or even better, make the chains swing like they do in NHAT?

Posted

I made a new testmap, but both cagelamps were casting shadows this time. Went back to a slightly modified version of the one I sent you, and now both are casting shadows there too.

 

Downloaded the one I sent you again, and the right hand one didn't cast shadows.

 

Not quite sure what's going on. I'll try to narrow down what the difference is.

 

 

edit: Ah, I think I've narrowed it down. It has to do with the light radius. The default light has a radius of 320 320 320 and casts a shadow with r_shadow 2. When I increase the size of the light to 828 848 732, it no longer casts a shadow. See if you see the same thing.

 

 

testlamp1.txt

  • Like 1
Posted

So I should see a stencil shadow in that case? That's not happening for me. I see no shadow at all. Let me test it in the fresh beta download, just to make sure it's not something leftover in my .cfg.

 

edit: Nope, even then, I get the same result as my screenshot above. No shadow.

Posted

I think Duzenko was trying to relay the new r_maxShadowMapLight cvar.

 

Currently, if you have a light is over 1000 units it will render un-softened stencil shadows.

You can increase it to something crazy like 5000000 and force all lights to use shadow maps.

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...)

Posted
Currently, if you have a light is over 1000 units it will render un-softened stencil shadows.

 

 

Right. But mine isn't rendering any shadows at all. Or are you saying this is so new that it's not in the beta yet?

Posted

 

Right. But mine isn't rendering any shadows at all. Or are you saying this is so new that it's not in the beta yet?

Not that new

 

Please attach your darkmod.cfg

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

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...