_minlight not affecting terrain


(pazur) #1

Hey,

I noticed that _minlight is not affecting my light mapped terrain. Is there a work around maybe? My terrain looks just too dark at some places. :banghead:

Here my compile settings for light:
-light -bounce 5 -bouncegrid -fastbounce -patchshadows -samples 3

The screenshots shows _minlight with a value of 50 ! Note that the building on the right is illuminated properly, but not the terrain.

paz

Btw: I started to work on my ET map again :slight_smile: Like one year after doing nothing for level design. I guess ydnar doesn’t work on q3map2 anymore. d00d ! Are you around?


(Szico VII) #2

maybe maye the terrain a func_group and give the func group the _minlight key and value.


(SCDS_reyalP) #3

Depending on how you are doing the terrain you might need to do _minvertexlight


(pazur) #4

It`s lightmapped so i doubt that minvertexlight will work :confused: I remember that q3map_skylight is supposed to emit light from all directions (kind of ambient light). Need to do run some tests. Adding _minlight to the func group might work. Might… let’s see.


(kat) #5

What about ambient light (can’t remember the exact syntax for that) as an alternative?


(pazur) #6

Tried ambient already. No effect. Terrain was still quite dark.


(kat) #7

What settings are you using for the terrain in WorldSpawn? (How are you makign the Terrain?)


(SCDS_reyalP) #8

posting your terrain shader might help too.


(Q.) #9

One Qucik Q:
Did you specify color for your ambient light? :poke:


(pazur) #10

The terrain is an easygen terrain (nothing special) with the usual keys like layers and terrain… and yes. I have _color in worldspawn.

Here my shader for the terrain:

textures/paz/lmterrain_base
{
	qer_editorimage textures/temperate_sd/master_grass_dirt3.tga
	q3map_normalimage textures/paz/normalmap_terrain.tga
	
	q3map_lightmapsize 512 512
	q3map_lightmapMergable
	q3map_lightmapaxis z
	
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
	q3map_tcMod rotate 37
	
	surfaceparm grasssteps
	surfaceparm landmine
}

textures/trc10/terrain_0
{
	q3map_baseShader textures/paz/lmterrain_base
	{
		map textures/temperate_sd/master_grass_dirt3.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/trc10/terrain_1
{
	q3map_baseShader textures/paz/lmterrain_base
	q3map_foliage models/paz/stein1.md3 3 48 0.1 0
	q3map_foliage models/paz/stein2.md3 1.1 48 0.1 0
	q3map_foliage models/paz/stein3.md3 1.2 48 0.1 0
	{
		map textures/temperate_sd/dirt3.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/trc10/terrain_2
{
	q3map_baseShader textures/paz/lmterrain_base
	{
		map textures/temperate_sd/rock_ugly_brown.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/trc10/terrain_3
{
	q3map_baseShader textures/paz/lmterrain_base
	q3map_foliage models/paz/grass1.md3 0.7 96 0.1 0
	q3map_foliage models/paz/grass1.md3 1.2 64 0.1 0
	{
		map textures/temperate_sd/master_grass_dirt3.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/trc10/terrain_4
{
	q3map_baseShader textures/paz/lmterrain_base
	{
		map textures/temperate_sd/grass_dense1.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/trc10/terrain_0to1
{
	q3map_baseShader textures/paz/lmterrain_base
	q3map_foliage models/paz/stein1.md3 3 64 0.1 0
	q3map_foliage models/paz/stein2.md3 1.1 64 0.1 0
	q3map_foliage models/paz/stein3.md3 1.2 64 0.1 0
	{
		map textures/temperate_sd/master_grass_dirt3.tga
	}
	{
		map textures/temperate_sd/dirt3.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/trc10/terrain_0to2
{
	q3map_baseShader textures/paz/lmterrain_base
	q3map_foliage models/paz/grass1.md3 0.7 96 0.1 0
	q3map_foliage models/paz/grass1.md3 1.2 64 0.1 0
	{
		map textures/temperate_sd/master_grass_dirt3.tga
	}
	{
		map textures/temperate_sd/rock_ugly_brown.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/trc10/terrain_0to3
{
	q3map_baseShader textures/paz/lmterrain_base
	q3map_foliage models/paz/grass1.md3 0.7 96 0.1 0
	q3map_foliage models/paz/grass1.md3 1.2 64 0.1 0
	{
		map textures/temperate_sd/master_grass_dirt3.tga
	}
	{
		map textures/temperate_sd/master_grass_dirt3.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/trc10/terrain_0to4
{
	q3map_baseShader textures/paz/lmterrain_base
	q3map_foliage models/paz/grass1.md3 0.7 96 0.1 0
	q3map_foliage models/paz/grass1.md3 1.2 64 0.1 0
	{
		map textures/temperate_sd/master_grass_dirt3.tga
	}
	{
		map textures/temperate_sd/grass_dense1.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/trc10/terrain_1to2
{
	q3map_baseShader textures/paz/lmterrain_base
	q3map_foliage models/paz/stein1.md3 3 64 0.1 0
	q3map_foliage models/paz/stein2.md3 1.1 64 0.1 0
	q3map_foliage models/paz/stein3.md3 1.2 64 0.1 0
	{
		map textures/temperate_sd/dirt3.tga
	}
	{
		map textures/temperate_sd/rock_ugly_brown.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/trc10/terrain_1to3
{
	q3map_baseShader textures/paz/lmterrain_base
	q3map_foliage models/paz/stein1.md3 3 64 0.1 0
	q3map_foliage models/paz/stein2.md3 1.1 64 0.1 0
	q3map_foliage models/paz/stein3.md3 1.2 64 0.1 0
	q3map_foliage models/paz/grass1.md3 0.7 96 0.1 0
	q3map_foliage models/paz/grass1.md3 1.2 64 0.1 0
	{
		map textures/temperate_sd/dirt3.tga
	}
	{
		map textures/temperate_sd/master_grass_dirt3.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/trc10/terrain_1to4
{
	q3map_baseShader textures/paz/lmterrain_base
	q3map_foliage models/paz/stein1.md3 3 64 0.1 0
	q3map_foliage models/paz/stein2.md3 1.1 64 0.1 0
	q3map_foliage models/paz/stein3.md3 1.2 64 0.1 0
	{
		map textures/temperate_sd/dirt3.tga
	}
	{
		map textures/temperate_sd/grass_dense1.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/trc10/terrain_2to3
{
	q3map_baseShader textures/paz/lmterrain_base
	q3map_foliage models/paz/grass1.md3 0.7 96 0.1 0
	q3map_foliage models/paz/grass1.md3 1.2 64 0.1 0
	{
		map textures/temperate_sd/rock_ugly_brown.tga
	}
	{
		map textures/temperate_sd/master_grass_dirt3.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/trc10/terrain_2to4
{
	q3map_baseShader textures/paz/lmterrain_base
	{
		map textures/temperate_sd/rock_ugly_brown.tga
	}
	{
		map textures/temperate_sd/grass_dense1.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

textures/trc10/terrain_3to4
{
	q3map_baseShader textures/paz/lmterrain_base
	q3map_foliage models/paz/grass1.md3 0.7 96 0.1 0
	q3map_foliage models/paz/grass1.md3 1.2 64 0.1 0
	{
		map textures/temperate_sd/master_grass_dirt3.tga
	}
	{
		map textures/temperate_sd/grass_dense1.tga
		alphaGen vertex
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		tcGen lightmap
	}
}

This is my sky shader:

textures/paz/wolken
{
	qer_editorimage textures/paz/qer_sky.tga
	
	q3map_lightImage textures/paz/sky_detail1.tga
	
	q3map_sunExt 0.4 0.4 0.45  400 -30 45 16 12
	q3map_skyLight 140 3
	
	surfaceparm sky
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm nodlight
	
	skyparms textures/paz/env/sky 1500 -
	
	nopicmip
	q3map_nofog
	
	
	{
		map textures/paz/sky_detail1.tga
		tcMod scroll 0.001 -0.003
		rgbGen identityLighting
	}
	{
		map textures/paz/sky_mask1.tga
		blendFunc GL_ONE_MINUS_SRC_ALPHA GL_SRC_ALPHA
		tcMod transform 0.25 0 0 0.25 0.1075 0.1075
		rgbGen identityLighting
	}
}

(pazur) #11

Found a nice thread in q3world forums about skies: http://www.quake3world.com/ubb/Archives/Archive-000004/HTML/20040311-6-027331.html

Just ran a test with q3map_skyLight 200 5. No luck.

Hmm… q3map_lightmapBrightness N.N might be worth a try.


(Q.) #12

IIRC, “tcgen lightmap” should come first before “map $lightmap” for a lightmap to be mapped to though this is quite an unsure post and I might be totally wrong depending on the version of q3map2 you are using.
Again this is just my limited point of view based on my fractional experience(mainly q3). :twak:


(Shallow) #13

Any chance of posting a shot with r_lightmap 1? I’m wondering if the brightness difference may be texture related.


(Twisted0n3) #14

I’ve never seen any situation where “tcgen lightmap” was necessary. I had the impression it was automatic if you mapped $lightmap. I suppose fake-lightmap effects such as lightstyles might use it, but if so q3map2 generates those shaders automatically anyway…


(pazur) #15

I must admit that r_lightmap 1 looks wierd. The lightmaps of the terrain are not shown. I need to say that the terrain shader is an extra file. So I have two shader files. One with all the usual shaders and one with terrain only, but when I think about it I don’t really think it`s the reason.

Here the r_lightmap screenshot:


(pazur) #16

Guys. q3map_lightmapBrightness N.N works perfectly on the terrain. I can tweak now the brightness without any problems. :banana: