changing the q3map2 code for greater lightmap sizes

(Captaintoottoot) #1

I’m trying to increase the default lightmap size. I’ve already read posts like:

I would rather just do this by changing/improving the q3map2 code to use more up-to-date sizes. I’ve fidgeted around with changing the LIGHTMAP_WIDTH and LIGHTMAP_HEIGHT and it did something but the shadows are off/misaligned. What would be required to increase the lightmap size via code?

(ailmanki) #2

Which size are you aiming at - bigger then 4096^2?

Probably its easier to use the already coded stuff to change the size.

(Captaintoottoot) #3

1024 x 1024 would be good and 4096 x 4096 would be awesome. The problem is that there has to be more than just simple number adjustments to the code because the shadows end up being unaligned and messed up. This is why I was wondering all of what would be required to change the code correctly.

(ailmanki) #4

It is not often used cause of the limits the engine imposes. But that guide you linked pretty much sums it up.

If you only enlarge the lightmap - it just has more space for the low quality shadows. But actually you want both, high quality shadows and a huge lightmap.

So best would be to set it to render external lightmaps, and use a very low samplesize. Default is 16, if you use 1 - you get a long compile them, and better shadows. But its not simple.
The code for having high detailed lightmaps is already there, you only need to use it correctly.