Jump to content


Photo

Hanging light model question


65 replies to this topic

#51 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37781 posts

Posted 23 December 2018 - 09:16 AM

It happens in both the trunk and a fresh install of the beta build.  Here's the cfg from the latter:

 

Spoiler


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

#52 duzenko

duzenko

    Uber member

  • Active Developer
  • PipPipPipPip
  • 2318 posts

Posted 23 December 2018 - 09:22 AM

Your config has

 

seta r_maxShadowMapLight "1000"

Once I change that to 10000 the second shadow appears



#53 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37781 posts

Posted 23 December 2018 - 12:10 PM

That's the default value that comes with the mod.

 

Also, why should that value result in no shadow being cast?  As I understand it, the only two possible results should be 1.  Normal soft shadow, or 2. Hard stencil 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

#54 duzenko

duzenko

    Uber member

  • Active Developer
  • PipPipPipPip
  • 2318 posts

Posted 23 December 2018 - 12:55 PM

That's the default value that comes with the mod.

That's not related to the original issue.

 

Use smaller, closer lights if you don't want the r_maxShadowMapLight to interfere.

 

If you insist on using giant lights please adjust the cvar as above.

 

 

Also, why should that value result in no shadow being cast?

Because big enough lights are rendered with stencil, and with stencil that model does not cast shadows because, as I find myself repeating once again in this thread, stencil only uses back faces for shadowing.

 

 

As I understand it, the only two possible results should be 1.  Normal soft shadow, or 2. Hard stencil shadow.

You're confusing it with r_softshadowquality



#55 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9518 posts

Posted 09 January 2019 - 12:53 AM

Added the "translucent" keyword to this material in trunk.

Should be the ideal compromise here.

Shadows will work.

Shadow Maps wont render erroneous 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...)

#56 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37781 posts

Posted 09 January 2019 - 08:45 AM

Added the "translucent" keyword to this material in trunk.

Should be the ideal compromise here.

Shadows will work.

Shadow Maps wont render erroneous shadows.

 

What about other models that use this material?  It's used on the interior of small stoves; will adding the translucent keyword cause the light to shine out through the sides now?


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

#57 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9518 posts

Posted 09 January 2019 - 08:48 AM


 

won't adding the translucent keyword cause the light to shine out through the sides now?

 

 

No, because it's still a shadow-casting material. It's just special-cased by the shader system for "local interactions".


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

#58 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1773 posts

Posted 09 January 2019 - 10:01 AM

No, because it's still a shadow-casting material. It's just special-cased by the shader system for "local interactions".

If I understand correctly, this code says the opposite:

    // translucent automatically implies noshadows
    if ( coverage == MC_TRANSLUCENT ) {
        SetMaterialFlag( MF_NOSHADOWS );
    } else {
        // mark the contents as opaque
        contentFlags |= CONTENTS_OPAQUE;
    }

Aside from that, translucent shadows do not fill depth buffer and are rendered at different --- all of that is probably not important...



#59 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9518 posts

Posted 09 January 2019 - 12:20 PM

Good find.

 

I guess we're back to:

 

Fix maps vs Fix entities.

 

:(


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

#60 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37781 posts

Posted 09 January 2019 - 12:36 PM

It would be useful to know how many maps this would be an issue for, in both cases.  If NHAT is the only map affected by the bad shadow, and only under one shadow method, that wouldn't be worth breaking three or four other maps.  But it's possible no maps use a skin that would be affected by that change.  And it's possible several maps might have incorrect shadows.


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

#61 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9518 posts

Posted 14 January 2019 - 11:35 PM

Missions broken by cagelamps in shadowmap mode:

NHAT 1 and 2

Lich Queens Demise

visual annoyance:

The Rat's Triumphant
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...)

#62 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9518 posts

Posted 18 January 2019 - 01:25 AM

Trying out findstr:


E:\Old\fms>findstr /s /i /m "\<torch_cagelamp_hanging\>" *.*

braeden_church.map
builderroads.map
hols_manor.map
hols_monastery.map
itb.map
lordsnlegacy.map
requiem.map
ws2_homeagain.map

Not sure it's picking up all the affected missions but it stopped at these for some reason?
  • duzenko likes this
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...)

#63 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1701 posts

Posted 18 January 2019 - 01:41 AM

SteveL provided me with a Python Script some time ago that searches files for specific entries. Maybe this would be of help for you:

Spoiler

This has helped me a lot of times to find specific stuff in all pk4 files.



#64 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37781 posts

Posted 18 January 2019 - 03:21 PM

Am I correct that this is the same issue that affects the hanging cagelamp?  http://forums.thedar...g-207/?p=433236

 

Here's the problem: with shadow stencils, the front faces, facing the light, don't cast shadows? I don't know if that's the right way to explain it. With shadow volumes, shadowpass on or off, they do.

 


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

#65 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 9518 posts

Posted 18 January 2019 - 03:33 PM

It's closely related, yes. Unfortunately, it can't be cured by disabling the single-pass shadow maps optimization (which is disabled by default anyway).


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

#66 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37781 posts

Posted 20 January 2019 - 01:14 PM

Trying out findstr:


E:\Old\fms>findstr /s /i /m "\<torch_cagelamp_hanging\>" *.*

braeden_church.map
builderroads.map
hols_manor.map
hols_monastery.map
itb.map
lordsnlegacy.map
requiem.map
ws2_homeagain.map

Not sure it's picking up all the affected missions but it stopped at these for some reason?

 

Full Moon Fever has the same problem but with a different model, as there are several light models using this texture.  So unless we're looking at half a dozen or so FMs with custom skins, changing the models is starting to sound like the more desirable fix.


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



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users