Jump to content
The Dark Mod Forums

Hanging light model question


duzenko

Recommended Posts

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

 

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

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

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

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...