So, I've been trying to render HD lightmaps in q3map2 without success. The process takes too long and you may not get good results in the end.
Blender can bake shadows on models so I decided to test it with TC:E.
The simplest method I could come up with was:
-exporting a map to .ase format
-removing unneeded faces and unwrapping it (lightmaps need unique UV's)
-reimporting it in Radiant over the original geometry
Here are some images of the last steps of the process:
.ase model with baked shadows on the left, original map on the right:
.ase model placed directly over the original geometry (notice the z-fighting):
Shader used for the model:
Code:
textures/ddtest/testl
{
surfaceparm nonsolid
polygonOffset
qer_trans 0.5
qer_editorimage models/ddtest/testl.jpg
{
map models/ddtest/testl.jpg
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
}
}
polygonOffset makes the shaded surface drawn after the base one so there's no z-fighting in-game.
blendFunc Gl_DST_COLOR GL_ZERO blends the shaded surface like a lightmap on top of the base surface
Here are some comparison shots (better Q3map2 light compile vs. my method):
Bars (q3map2):
Bars (.ase method):
Corner (q3map2):
Corner (.ase):
Crates (q3map2):
Crates (.ase):
Couple more shots:
I know my shadows are faint in comparison, still working on finding the best contrast. Also, some radiosity (bounce) and perhaps bump maps would be nice.
Surfaces in-game shouldn't be lighted but lightgrid should still be calculated for dynamic models.
In the end, this method requires more work but the results are rewarding.
If you're wondering about the size impact, Northport has 60 lightmaps at the size of 11MB. That's because the default lightmaps are .tga. weighing ~200KB at 256x256. I can make 1024x1024 lightmaps (like the example above) at 20-40KB's. That is a lot of room for HD shadows.
Don't worry about the compression artefacts, since they're blended on detailed textures, none are visible in-game.