the lm_000x.tga external images are generated in the map/mymap directory. The q3map2_mymap.shader is generated in the scripts directory, but the image is not used in game and the terrain is fully illuminated (like when not using q3map2 -light phase)

Something is probably missing in the runtime part of the shader, but what ?

-- func_groups I have 4 different func_groups for multiple parts of the terrain. q3map2 outputs 4 different image, one for each func_group with a black border between them (I can see the black border between func_groups at runtime)Should I merge all func_groups ?

-- _lightmapscale _lightmapscale is set to 0.250. Is this a good value ? Shoud I set _lighmapscale 0.250 for all wordspawn entities (which are not part of my terrain func_groups) ?

JeanMarcLeProut wrote:-- func_groups I have 4 different func_groups for multiple parts of the terrain. q3map2 outputs 4 different image, one for each func_group with a black border between them (I can see the black border between func_groups at runtime)Should I merge all func_groups ?

You shouldn't have to merge all the func_groups. I thought the high res lightmap was only applies to brushes that have the high res shader. I had this problem with Durango (last page of that help thread, I had the ground in a different func_group with a different _lightmapscale. So I guess, try making your highres lightmap brushes all in the same func_group. Just be careful because your texture blending also depends on func_groups.

JeanMarcLeProut wrote:-- _lightmapscale _lightmapscale is set to 0.250. Is this a good value ? Shoud I set _lighmapscale 0.250 for all wordspawn entities (which are not part of my terrain func_groups) ?

tweaking the _lightmapscale will adjust the size of the shadow image in the lightmap texture (maps/mapname/lm_000x.tga). Joe used 0.25 in Alamo, Red tried 0.125 and got good results, but 0.0625 yeilded no extra results.

What is the use of "qer_editorimage" in this shader ? I'd like to know where this image is used (only for mean color of the brush face ?), if it needs to have an alpha channel, and what happends if I remove this line.

- What is the effect of having an alpha channel in the q3map_lightimage (with the same shader described in this thread) ?- Does this image have to be the same size as the blended texture images ?- Does the blended images have to be the same size ?

JeanMarcLeProut wrote:- What is the effect of having an alpha channel in the q3map_lightimage (with the same shader described in this thread) ?

I think the shader would cast different shadows. I am struggling to think of an example... I might be incorrect, but if the shader would not cast light in the areas that are transparent.

JeanMarcLeProut wrote:- Does this image have to be the same size as the blended texture images ?- Does the blended images have to be the same size ?

They do not need to be the same size. I think the game draws both textures separately. This is why texture blending takes more resources than regular texturing. If you look at my NoNameCity, you can see that I have a grass texture blending with a dirt texture that are obviously different resolutions.

JeanMarcLeProut wrote:- What is the effect of having an alpha channel in the q3map_lightimage (with the same shader described in this thread) ?

I think the shader would cast different shadows. I am struggling to think of an example... I might be incorrect, but if the shader would not cast light in the areas that are transparent.

I really don't know what it could produce, and I don't see any logic at all with an alpha light

Pardner wrote:

JeanMarcLeProut wrote:- Does this image have to be the same size as the blended texture images ?- Does the blended images have to be the same size ?

They do not need to be the same size. I think the game draws both textures separately. This is why texture blending takes more resources than regular texturing. If you look at my NoNameCity, you can see that I have a grass texture blending with a dirt texture that are obviously different resolutions.

At runtime, those 2 textures can have different resolution, however, at compile time, it can cause a lot of trouble... So... If your texture coordinate are computed at compile-time (99% of time) you can have few seams. In fact, as long as you use only the blending shader, it will work more or less, but if you try to mix your blending shader with other one, what you see in radiant will be different that what you get ingame.

All the trouble come from the fact that OpenGL texture coordinate works with the texture frequency but the Q3 .map format use pixel frequency instead.

Joe Kari wrote:In fact, as long as you use only the blending shader, it will work more or less, but if you try to mix your blending shader with other one, what you see in radiant will be different that what you get ingame.

I am aware of this problem.... for example NNC ground texture (blended) has a seam with the hill texture (no blended). So if I make sure that both my blend textures are the same resolution, the seam would be less noticeable?

Joe Kari wrote:In fact, as long as you use only the blending shader, it will work more or less, but if you try to mix your blending shader with other one, what you see in radiant will be different that what you get ingame.

I am aware of this problem.... for example NNC ground texture (blended) has a seam with the hill texture (no blended). So if I make sure that both my blend textures are the same resolution, the seam would be less noticeable?

It can help.For what I saw, the frequency is not the same for ground and for hills...

However, you will have hard time fixing it anyway, once you solve the frequency trouble there will be other issue...

You can try to project the texture along the z-axis, but your texture will be streched for the hills.

Sometime the best answer is to hide those seams behind some vegetation