Page 1 of 1
external lightmaps problems
Posted: Sun Oct 02, 2011 7:17 am
by Rav3n
I'm trying to figure out external lightmaps.
So I'm following these instructions but i can't get it to work.
http://www.smokin-guns.net/viewtopic.php?t=1444
The shader makes the texture i apply it to appear as missing texture.
But that's not the only problem, when the higher resolution lightmap is generated it basically looks like a 1024x1024 black square with the original 128x128 placed in the corner.
Anyone got an idea what I"m doing wrong.
Re: external lightmaps problems
Posted: Sun Oct 02, 2011 8:01 am
by Rav3n
i know now why do i get missing image problem, in the shader i shouldn't use .jpeg or .tga extensions or r_findimage can't find it.
Now i got a new problem, the lightmap is high res as i want it to be, shader applies it and all, but there's a huge offset.
Re: external lightmaps problems
Posted: Sun Oct 02, 2011 8:32 am
by Rav3n
looks like _samplesize 1 has to be in BSP stage in order to get the lightmap of proper resolution.
however the blendfunc isn't blending the ightmap.
Re: external lightmaps problems
Posted: Sun Oct 02, 2011 3:09 pm
by obsidian
Lightmaps don't have an alpha channel so blendFunc blend doesn't work with it. Lightmaps usually use blendFunc filter.
Re: external lightmaps problems
Posted: Sun Oct 02, 2011 4:52 pm
by Rav3n
obsidian wrote:Lightmaps don't have an alpha channel so blendFunc blend doesn't work with it. Lightmaps usually use blendFunc filter.
I know i am using blendfunc filter, poor choice of words i guess. I should have said they're not being filtered.
It looks like external lightmap is replacing the texture.
Re: external lightmaps problems
Posted: Mon Oct 03, 2011 12:44 am
by obsidian
Post your shader as well as the one generated by Q3Map2.
Re: external lightmaps problems
Posted: Mon Oct 03, 2011 4:38 am
by Rav3n
Code: Select all
textures/ut4_siberia/stone_wall
{
q3map_lightmapSize 1024 1024
q3map_lightmapbrightness 2.0
{
tcgen lightmap
map $lightmap
rgbGen identity
}
{
map textures/ut4_siberia/stone_wall
blendfunc filter
}
}
Code: Select all
// Custom shader file for high_res_test.bsp
// Generated by Q3Map2 (ydnar)
// Do not edit! This file is overwritten on recompiles.
high_res_test/7BBBA5E1C3B16F7FA2B3862B469EF80F
{
q3map_lightmapSize 1024 1024
q3map_lightmapbrightness 2.0
{
tcgen lightmap
map maps/high_res_test/lm_0000.tga
rgbGen identity
}
{
map textures/ut4_siberia/stone_wall
blendfunc filter
}
}
This is how it looks like in game.

As you can see the lightmap has a big offset and it seems to be mirrored as well. Blendfunc filter isn't kicking in either.
I'm using 27's FS_q3map2_radbump_4a
http://www.urbanterror.info/forums/topi ... -required/ to compile this but since I'm using shader instead of switches i think it shouldn't be affecting the outcome.