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.
external lightmaps problems
Re: external lightmaps problems
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.
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
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.
however the blendfunc isn't blending the ightmap.
Re: external lightmaps problems
Lightmaps don't have an alpha channel so blendFunc blend doesn't work with it. Lightmaps usually use blendFunc filter.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Re: external lightmaps problems
I know i am using blendfunc filter, poor choice of words i guess. I should have said they're not being filtered.obsidian wrote:Lightmaps don't have an alpha channel so blendFunc blend doesn't work with it. Lightmaps usually use blendFunc filter.
It looks like external lightmap is replacing the texture.
Re: external lightmaps problems
Post your shader as well as the one generated by Q3Map2.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Re: external lightmaps problems
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
}
}

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.