Terrain


(Thej) #1

Since no one seemd to notice the last bit on my earlier post. i thought i better make a new post. :smiley:

well i got the terrain textures working now, but now i seem to be having a problem with my fog
cause it doesnt seem to like Lightmapped terrain very much

This is how it looks like http://www.headstompers.com/shot0100.jpg
U see how the building looks strangely lit now.
and the terrain looking like a checkered board

i made a fog shader and this is the code

textures/eagle/Sky
{
qer_editorimage textures/eagle/sky_m01dmcmp
surfaceparm noimpact
surfaceparm nodlight
//surfaceparm nolightmap
surfaceparm sky
surfaceparm nomarks
q3map_globaltexture
q3map_lightsubdivide 2048
q3map_surfacelight 35
skyparms full 300 -
fogvars ( .75 .75 .75 ) 2300
{
map textures/eagle/sky_m01dmcmp.tga
tcMod scale 12.0 12.0
}
}

here is the terrain shader:
(specially for Wils )

textures/lightmap/terrain_0
{
q3map_lightmapsamplesize 64
q3map_lightmapaxis z
q3map_texturesize 512 512
q3map_tcGen ivector ( 400 0 0 ) ( 0 400 0 )
{
map textures/temperate_sd/grass_path1.tga
rgbgen identity
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
rgbgen identity
}
}

textures/lightmap/terrain_1
{
q3map_lightmapsamplesize 64
q3map_lightmapaxis z
q3map_texturesize 512 512
q3map_tcGen ivector ( 400 0 0 ) ( 0 400 0 )
{
map textures/temperate_sd/master_grass_dirt3.tga
rgbgen identity
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
rgbgen identity
}
}

textures/lightmap/terrain_2
{
q3map_lightmapsamplesize 64
q3map_lightmapaxis z
q3map_texturesize 512 512
q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
{
map textures/temperate_sd/dirt3.tga
rgbgen identity
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
rgbgen identity
}
}

textures/lightmap/terrain_0to1
{
q3map_lightmapsamplesize 64
q3map_lightmapaxis z
q3map_texturesize 512 512
q3map_tcGen ivector ( 400 0 0 ) ( 0 400 0 )

{
map textures/temperate_sd/grass_path1.tga
rgbgen identity
}
{
map textures/temperate_sd/master_grass_dirt3.tga
alphaGen vertex
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbgen identity
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
rgbgen identity
}
}

textures/lightmap/terrain_0to2
{
q3map_lightmapsamplesize 64
q3map_lightmapaxis z
q3map_texturesize 512 512
q3map_tcGen ivector ( 400 0 0 ) ( 0 400 0 )

{
map textures/temperate_sd/grass_path1.tga
rgbgen identity
}
{
map textures/temperate_sd/dirt3.tga
alphaGen vertex
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbgen identity
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
rgbgen identity
}
}

textures/lightmap/terrain_1to2
{
q3map_lightmapsamplesize 64
q3map_lightmapaxis z
q3map_texturesize 512 512
q3map_tcGen ivector ( 400 0 0 ) ( 0 400 0 )

{
map textures/temperate_sd/master_grass_dirt3.tga
rgbgen identity
}
{
map textures/temperate_sd/dirt3.tga
alphaGen vertex
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbgen identity

}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
tcGen lightmap
rgbgen identity
}
}

textures/lightmap/terrain.vertex
{
{
map textures/temperate_sd/dirt3.tga
rgbGen vertex
}
}

Any help would be apreciated

Thej


(chavo_one) #2

Stop being so helpless. Do a search and you might find topics on this already…like this one:
http://www.splashdamage.com/forums/viewtopic.php?t=670&highlight=lightmapped+terrain+fog

I think I saw where sock said this problem was fixed in ET.


(Thej) #3

Hehehe, thx for ur reply, but i went over a 100 posts already doing lightmapped terrain in the search bit, but couldnt find anything usefull

So i was getting a bit helpless :smiley: