Jump to content


Photo

Hanging light model question


65 replies to this topic

#26 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37633 posts

Posted 18 December 2018 - 12:51 PM

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.


TDM Missions:   A Score to Settle   *   A Reputation to Uphold   *   A New Job   *    A Matter of Hours
 
Video Series:   Springheel's Modules   *   Speedbuild Challenge   *   New Mappers Workshop  *   Building Traps

#27 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9341 posts

Posted 18 December 2018 - 12:53 PM

It only produces incorrect shadows under "shadow map" mode (r_shadows 2).
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

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

#28 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37633 posts

Posted 18 December 2018 - 01:01 PM

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?


TDM Missions:   A Score to Settle   *   A Reputation to Uphold   *   A New Job   *    A Matter of Hours
 
Video Series:   Springheel's Modules   *   Speedbuild Challenge   *   New Mappers Workshop  *   Building Traps

#29 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9341 posts

Posted 18 December 2018 - 01:26 PM

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.thedar...06/#entry414396

 

(work is blocking me from getting images)


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

http://www.indiedb.c...ds/the-dark-mod

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

#30 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37633 posts

Posted 18 December 2018 - 01:46 PM

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.thedar...06/#entry414396

 

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


TDM Missions:   A Score to Settle   *   A Reputation to Uphold   *   A New Job   *    A Matter of Hours
 
Video Series:   Springheel's Modules   *   Speedbuild Challenge   *   New Mappers Workshop  *   Building Traps

#31 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9341 posts

Posted 18 December 2018 - 01:49 PM

 

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.c...ds/the-dark-mod

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

#32 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37633 posts

Posted 18 December 2018 - 02:03 PM

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.

 


TDM Missions:   A Score to Settle   *   A Reputation to Uphold   *   A New Job   *    A Matter of Hours
 
Video Series:   Springheel's Modules   *   Speedbuild Challenge   *   New Mappers Workshop  *   Building Traps

#33 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9341 posts

Posted 18 December 2018 - 09:47 PM

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.c...ds/the-dark-mod

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

#34 duzenko

duzenko

    Advanced Member

  • Active Developer
  • PipPipPip
  • 1976 posts

Posted 19 December 2018 - 05:42 AM

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.



#35 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37633 posts

Posted 19 December 2018 - 08:38 AM

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?


TDM Missions:   A Score to Settle   *   A Reputation to Uphold   *   A New Job   *    A Matter of Hours
 
Video Series:   Springheel's Modules   *   Speedbuild Challenge   *   New Mappers Workshop  *   Building Traps

#36 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9341 posts

Posted 19 December 2018 - 08:46 AM

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.c...ds/the-dark-mod

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

#37 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37633 posts

Posted 22 December 2018 - 09:47 AM

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.

 

 

Attached Thumbnails

  • nhat3_2018-12-22_09.41.18.jpg

TDM Missions:   A Score to Settle   *   A Reputation to Uphold   *   A New Job   *    A Matter of Hours
 
Video Series:   Springheel's Modules   *   Speedbuild Challenge   *   New Mappers Workshop  *   Building Traps

#38 duzenko

duzenko

    Advanced Member

  • Active Developer
  • PipPipPip
  • 1976 posts

Posted 22 December 2018 - 11:11 AM

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

 

You would have to attach the map if you need a confirmation



#39 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37633 posts

Posted 22 December 2018 - 11:17 AM

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.

Attached Files


  • duzenko likes this
TDM Missions:   A Score to Settle   *   A Reputation to Uphold   *   A New Job   *    A Matter of Hours
 
Video Series:   Springheel's Modules   *   Speedbuild Challenge   *   New Mappers Workshop  *   Building Traps

#40 duzenko

duzenko

    Advanced Member

  • Active Developer
  • PipPipPip
  • 1976 posts

Posted 22 December 2018 - 11:21 AM

 

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

 

Map attached.

Going to look later today or tomorrow



#41 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37633 posts

Posted 22 December 2018 - 11:26 AM

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.


TDM Missions:   A Score to Settle   *   A Reputation to Uphold   *   A New Job   *    A Matter of Hours
 
Video Series:   Springheel's Modules   *   Speedbuild Challenge   *   New Mappers Workshop  *   Building Traps

#42 duzenko

duzenko

    Advanced Member

  • Active Developer
  • PipPipPip
  • 1976 posts

Posted 22 December 2018 - 03:14 PM

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?



#43 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37633 posts

Posted 22 December 2018 - 03:55 PM

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.

 

 

Attached Files


  • duzenko likes this
TDM Missions:   A Score to Settle   *   A Reputation to Uphold   *   A New Job   *    A Matter of Hours
 
Video Series:   Springheel's Modules   *   Speedbuild Challenge   *   New Mappers Workshop  *   Building Traps

#44 duzenko

duzenko

    Advanced Member

  • Active Developer
  • PipPipPip
  • 1976 posts

Posted 22 December 2018 - 04:01 PM

I can only suggest copy pasting from NHAT



#45 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37633 posts

Posted 22 December 2018 - 04:08 PM

See my edit.


TDM Missions:   A Score to Settle   *   A Reputation to Uphold   *   A New Job   *    A Matter of Hours
 
Video Series:   Springheel's Modules   *   Speedbuild Challenge   *   New Mappers Workshop  *   Building Traps

#46 duzenko

duzenko

    Advanced Member

  • Active Developer
  • PipPipPip
  • 1976 posts

Posted 22 December 2018 - 04:52 PM

See the attached

Attached Thumbnails

  • Untitled.jpg


#47 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37633 posts

Posted 22 December 2018 - 05:22 PM

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.


TDM Missions:   A Score to Settle   *   A Reputation to Uphold   *   A New Job   *    A Matter of Hours
 
Video Series:   Springheel's Modules   *   Speedbuild Challenge   *   New Mappers Workshop  *   Building Traps

#48 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9341 posts

Posted 22 December 2018 - 05:56 PM

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.c...ds/the-dark-mod

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

#49 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37633 posts

Posted 22 December 2018 - 05:57 PM

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?


TDM Missions:   A Score to Settle   *   A Reputation to Uphold   *   A New Job   *    A Matter of Hours
 
Video Series:   Springheel's Modules   *   Speedbuild Challenge   *   New Mappers Workshop  *   Building Traps

#50 duzenko

duzenko

    Advanced Member

  • Active Developer
  • PipPipPip
  • 1976 posts

Posted 23 December 2018 - 01:00 AM

 
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



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users