Garux / netradiant-custom

The open-source, cross-platform level editor for id Tech based games.
https://garux.github.io/NRC/
Other
301 stars 52 forks source link

"Dark near sky" dirtmap fix? (+a question) #101

Open TomArrow opened 2 years ago

TomArrow commented 2 years ago

I noticed that when there's a surface adjacent to a skybox, dirtmap is still applied to it, which likely isn't how it should be. I found a fix for this from 2008 for the classic NetRadiant here: https://github.com/divVerent/NetRadiant/commit/aed67288161213f0cf60ba3602aba979c3a7da78

This appears to fix it for me on my fork. Thought it might be a good idea to port that fix over unless there's a good reason not to.

A bit unrelated, I was wondering if you could help me try identify a particular form of shading that I just can't seem to replicate with dirtmaps. If you don't have time for that, that's okay.

dirtmap vs original

On the left side you can see the kind of shading I get from a dirtmap. On the right side is how the original map compiled in 2002 looked. Any idea what kind of switch or parameter in worldspawn or whatever I might need? I also tried playing around with floodlight but none of the settings I tried were remotely useful, especially since they always seem to add light of their own, but also none created such shading for me. I've attached the mapfile for testing. I don't need a perfect match but something resembling that kind of shading would be cool.

The compile settings I used were:

-game jk2 -fs_basepath "[JK2 path]" -bsp -meta -verboseentities -flares -v 
-game jk2 -fs_basepath "[JK2 path]" -vis -saveprt -v 
-game jk2 -fs_basepath "[JK2 path]" -light -dirty -style -samplescale 1 -super 2 -filter -patchshadows -nocollapse -nolightmapsearch -debugsamplesize  

Map file (same one for both the topics I mentioned): mapfile.zip

Garux commented 2 years ago

This is known problem to fix, thanks for pointing. Referenced code was changed to proper after that 😊 https://github.com/divVerent/NetRadiant/commit/aa00101d5ec781aaacc755e5409d10c01956964d Possibly it's not problem of dirtmapping itself? Requires investigation.

Wrt the shading question: shadow on slope looks like just shadow leak for me, i.e. bug, not feature.