Springheel 4674 Posted December 18, 2018 Report Share Posted December 18, 2018 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. Quote 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 Link to post Share on other sites
nbohr1more 2238 Posted December 18, 2018 Report Share Posted December 18, 2018 It only produces incorrect shadows under "shadow map" mode (r_shadows 2). Quote 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 post Share on other sites
Springheel 4674 Posted December 18, 2018 Report Share Posted December 18, 2018 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? Quote 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 Link to post Share on other sites
nbohr1more 2238 Posted December 18, 2018 Report Share Posted December 18, 2018 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) Quote 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 post Share on other sites
Springheel 4674 Posted December 18, 2018 Report Share Posted December 18, 2018 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. Quote 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 Link to post Share on other sites
nbohr1more 2238 Posted December 18, 2018 Report Share Posted December 18, 2018 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. Quote 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 post Share on other sites
Springheel 4674 Posted December 18, 2018 Report Share Posted December 18, 2018 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. Quote 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 Link to post Share on other sites
nbohr1more 2238 Posted December 19, 2018 Report Share Posted December 19, 2018 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 inshadow map mode, either move the light closer to the shadow casters or move the casters farther from the wall. Quote 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 post Share on other sites
duzenko 668 Posted December 19, 2018 Author Report Share Posted December 19, 2018 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. Quote Link to post Share on other sites
Springheel 4674 Posted December 19, 2018 Report Share Posted December 19, 2018 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? Quote 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 Link to post Share on other sites
nbohr1more 2238 Posted December 19, 2018 Report Share Posted December 19, 2018 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 NHAT2) map anoott in the console3) Noclip past the Broken Broadsword pub to the Police Station on the right 4) Noclip past the Police station and turn right on to the side street 5) On the left you will see a warehouse with double doors, go in6) Switch between r_shadows modes Quote 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 post Share on other sites
Springheel 4674 Posted December 22, 2018 Report Share Posted December 22, 2018 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. Quote 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 Link to post Share on other sites
duzenko 668 Posted December 22, 2018 Author Report Share Posted December 22, 2018 Obviously one has the noshadows spawn arg and the other does not You would have to attach the map if you need a confirmation Quote Link to post Share on other sites
Springheel 4674 Posted December 22, 2018 Report Share Posted December 22, 2018 Obviously one has the noshadows spawn arg and the other does not And where do you think the noshadow spawnarg would come from? I didn't add it. Map attached.testlamp.txt 1 Quote 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 Link to post Share on other sites
duzenko 668 Posted December 22, 2018 Author Report Share Posted December 22, 2018 Where do you think the noshadow spawnarg would come from? I didn't add it. Map attached.Going to look later today or tomorrow Quote Link to post Share on other sites
Springheel 4674 Posted December 22, 2018 Report Share Posted December 22, 2018 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. Quote 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 Link to post Share on other sites
duzenko 668 Posted December 22, 2018 Author Report Share Posted December 22, 2018 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? Quote Link to post Share on other sites
Springheel 4674 Posted December 22, 2018 Report Share Posted December 22, 2018 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 1 Quote 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 Link to post Share on other sites
duzenko 668 Posted December 22, 2018 Author Report Share Posted December 22, 2018 I can only suggest copy pasting from NHAT Quote Link to post Share on other sites
Springheel 4674 Posted December 22, 2018 Report Share Posted December 22, 2018 See my edit. Quote 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 Link to post Share on other sites
duzenko 668 Posted December 22, 2018 Author Report Share Posted December 22, 2018 See the attached Quote Link to post Share on other sites
Springheel 4674 Posted December 22, 2018 Report Share Posted December 22, 2018 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. Quote 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 Link to post Share on other sites
nbohr1more 2238 Posted December 22, 2018 Report Share Posted December 22, 2018 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. Quote 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 post Share on other sites
Springheel 4674 Posted December 22, 2018 Report Share Posted December 22, 2018 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? Quote 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 Link to post Share on other sites
duzenko 668 Posted December 23, 2018 Author Report Share Posted December 23, 2018 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 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.