Ayy Lmao
.lit2
#377 posted by ericw on 2015/05/19 23:14:38
If anyone wants to play with it, I posted some alpha builds over at inside3d at the bottom of the first post:
http://forums.inside3d.com/viewtopic.php?f=3&t=5696
Note that the format is not frozen yet, so please don't release maps using it yet :-)
NEW TOYS!
The pain of having the light compiling twice... ouch.
And .lit2 files are pretty big (only done a .5 lmscale so far). Like 3 times bigger than the original .lit file!
#379 posted by JneeraZ on 2015/05/20 01:31:05
Screenshots or GTFO.
Dude...
I'm trying to get a shot of the x16 lightmap-ness. It's taking an eternity to compile. I gave up on doing a full x16 pass after the line didn't move, instead I'm choosing a very select couple of surfaces.
I have to say though, even on 0.5 scale it's really really nice. I think having 0.5 scale as the default for .lit2 and then being able to up-res other areas should be the way .lit2 works IMO.
Screenshot
#381 posted by ericw on 2015/05/20 02:25:42
http://i.imgur.com/Zu35DBO.jpg
jam2_sock relit with "-lightmapscale 0.25 -extra" (so 4x vanilla resolution)
Screenshots -
1x res
https://www.dropbox.com/s/60oyen21bv83nc3/1.png?dl=0
https://www.dropbox.com/s/hdiiyktnsm56e6l/2.png?dl=0
2x res
https://www.dropbox.com/s/rsbvrohtens5ouc/1-2x.png?dl=0
https://www.dropbox.com/s/7eham7t5t8a9j68/2-2x.png?dl=0
16x res
https://www.dropbox.com/s/rtp7cildc0khzp2/1-16x.png?dl=0
https://www.dropbox.com/s/3ckqik3odfx4ko1/2-16x.png?dl=0
textured comparison, 1x res and 16x res
https://www.dropbox.com/s/xpz05jtj2p4dve7/start-1x.png?dl=0
https://www.dropbox.com/s/2pr08ltxp1bq1fs/start-16x.png?dl=0
Takes a fscking long time to compile at 16x res. Looks pretty awesome. File size for .lit2 at 16x res is 7mb, 2 floors were converted to func_detail and are the only areas with the higher lightmap. Took 20 minutes to compile 16x compared to 20 seconds on normal. Normal .lit is 449kb.
This is on my start map for retrojam 3.
I dunno if model lighting works well on 16x (model light is based on the floor luminosity rather than light entity), seems to get light or dark but doesnt always correlate to floor lighting. Probably needs more testing.
I think 2x scale is nice. 4x scale is probably going to be what most people will aim for. 8x at a push. I can't see myself wanting 16x normal lightmap res.
Hrm
#383 posted by necros on 2015/05/20 03:25:52
i think I prefer the blurry lightmaps in those examples... the high res ones just look like crummy doom3 shadows.
#384 posted by - on 2015/05/20 04:01:06
You'd likely want to approach lighting differently when at high resolution. Rather than do a single light entity that will cast stark shadows, which is ok when you have blurry lightmaps, you'd want a few slightly separated lights combined so that you get a penumbra effect to the shadows.
#385 posted by necros on 2015/05/20 04:03:06
thing is that adding more lights increases light time by a lot since each light is traced on every face, regardless of visibility or whatever. :(
Append
#386 posted by necros on 2015/05/20 04:03:39
i think the solution is to scale the antialiasing and the soft effect to now match the new resolution of the lightmap.
#387 posted by - on 2015/05/20 04:28:34
Yeah, you're probably right... thought -soft or -extra really affects compile time...
speaking of, ericw warned me this might happen on twitter... here's jam5_scampie with 16x lightmap and no other fancy options
http://scampie.net/etc/ohgosh.jpg
seems we hit some limits here?
Couple Of Notes
#388 posted by ericw on 2015/05/20 04:55:22
Thanks for the initial testing!
Careful with -extra/-extra4, they do make the compile roughly 4x/16x longer, and this will stack up with -lightmapscale to give you really long compiles. "-soft" should have much less performance impact, not sure exactly, but it does work against the resolution gain by blurring the lightmaps.
"-lightmapscale 0.25" with no "-extra" should be the same compile time as "-extra4" with no "-lightmapscale", as they both have to compute a 4x res lightmap.
Fifth: I think you found a bug with mdl lighting, and I got a comment from MH about the code being missing for that, so I will look into that.
necros: yeah I agree the 16x does look like a bad stencil shadow. scaling the "soft" effect is a good idea, haven't yet looked into that.
Also
#389 posted by ericw on 2015/05/20 05:15:46
Rather than do a single light entity that will cast stark shadows, which is ok when you have blurry lightmaps, you'd want a few slightly separated lights combined so that you get a penumbra effect to the shadows.
There IS a convenience option for this, which I stole from q3map2, setting "_deviance" "8" on a light entity will turn it into an 8-unit radius sphere of lights. Default if you use _deviance is to create 16 lights, but you can customize it with "_samples". This will slow down compiles of course!
Oh, Sweet!
#390 posted by - on 2015/05/20 05:30:57
Also, everyone disregard that pic I posted... I had forgotten to copy my .lit2 files into the right directory (necros, your compile gui doesn't copy .lit2 files for me you scum!!!!), and had made some out of date .lit files because it seems that when you generate a .lit2 file, no .lit file is created so you get out of sync really easily.
Lol
#391 posted by necros on 2015/05/20 05:37:45
source is here good sir. ;)
but yeah, I should try to get around to that if this is going to become a common lighting thing.
I'm still not convinced 16x is necessary. 2x or 4x with scaled blur effects. Oh and deviance lights, utterly badass.
Fifth
Nice thumbnails, asshole.
Fifth's Textured Shot
#393 posted by nitin on 2015/05/20 16:11:10
easily prefer the 1x lighting. But yeah could be because lighting method/other cvars unchanged.
#394 posted by Lunaran on 2015/05/20 17:15:53
Also, everyone disregard that pic I posted... I had forgotten to copy my .lit2 files into the right directory
so post the fixed shot shrimptease
#395 posted by - on 2015/05/20 18:32:12
TRIP REPORT ON 16x RESOLUTION AND -EXTRA4 AND -SOFT
After 2.5 hours, a 337mb .lit2 file was made. Quakespasm crashed with AllocBlock: Full even with "-heapsize 655360"
#396 posted by necros on 2015/05/20 18:33:37
lol... and how many lights and faces were there? :P :P :P
Yeah
#397 posted by ericw on 2015/05/20 19:26:25
Sorry about that, the "AllocBlock: full" is when you exceed the hardcoded lightmap limit in QS. Even if it did load, performance would be awful because dynamic lights are all rendered on the CPU. The 8x and 16x options are probably best avoided, or only used very selectively.
jam2_scampie looks pretty nice with "-extra -lmscale 0.25", though, and only takes 4 minutes to light.
I really need to code the thing that automatically lowers the resolution on faces with no detail.
#398 posted by - on 2015/05/20 19:34:24
It's jam2_scampie, so it's not excessive, but it's reasonable for a proper sized map.
4x resolution seems to be the max for this level, generating a 23mb .lit2, anything more and the .lit2 is too large to be loaded.
These are comparisons with -extra and -soft between standard .lit and .lit2 with 4x res.
area1, lit, textured
area1, lit, lightmap
area1, lit2, textured
area1, lit2, lightmap
area2, lit, textured
area2, lit, lightmap
area2, lit2, textured
area2, lit2, lightmap
The gains in this map are mostly in the spotlights being a bit sharper... but it's not very noticable when set against these textures. Perhaps a less noisy/dark/ugly set would be a better test? I'll give my Jam5 a go, since 4x isn't too excessively long to compile.
Hm
#399 posted by ericw on 2015/05/20 20:01:25
Yeah it really doesn't add anything to jam2_scampie in those comparisons, even the upward pointing spotlights probably look better in the vanilla version
#400 posted by - on 2015/05/20 20:18:36
To be fair, I also don't rely on shadows that much in my lighting. Mostly because Quake is so blurry (and I suck at lighting...)
As a bonus though, in my Jam5 map I notice I can actually get some lighting on some of the detailed faces I wasn't able to light correctly. The blue crystals and grass bits actually receive lighting on their small little faces much better... experimenting a bit now with the hanging vines to see if I can make them cast shadows, which I opted not to do because they were so blurry previously.
|