a few probs with modelled terrain


(Davros) #1

ive been building up some terrains in max but when using the picomodel shaders the terrain doent fog properly for sof2! it works fine in JA, same map,shaders and textures! in sof2 the terrain shows through the fog very dark help! (using latest q3map2 )

shader:


textures/lostbase/picoterrain
{
	qer_editorimage textures/terrain/pico_jungle_07
	q3map_forceMeta
	q3map_splotchfix
	q3map_material dirt
	q3map_nonplanar
	q3map_lightmapsampleoffset 8
	q3map_shadeAngle 179
	
	q3map_lightmapAxis z
	
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
	q3map_tcMod rotate 33
	
	q3map_alphaMod dotproduct2 ( 0 0 0.85 )
	q3map_clipModel
	
	q3map_lightmapSampleSize 32
	
	q3map_globalTexture
	
	{
		map textures/terrain/pico_jungle_07
		rgbGen identity
	}
	{
		map textures/terrain/pico_forest_1
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaFunc GE128
		rgbGen identity
		alphaGen vertex
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}


also during the meta phase i get a flipped triangle warning, is this bad? i didnt notice anything wrong with the map at the coordinates :drink:


(ratty redemption) #2

iirc, I`ve had flipped triangle warnings when the side faces of my trisouping have accidentally got painted with a visible terrain shader, when they should be caulk or nodraw.

hth

edit, slightly off topic, but do we need q3map_splotchfix if were also using q3map_lightmapsampleoffset? ...Im tweaking my own terrain shader as I learn new commands, but am unlcear on how some of these affect each other.


(obsidian) #3

q3map_splotchFix is only needed if you have nasty shadow zits appearing over the surface of the model. Generally speaking, you should use q3map_lightmapSampleOffset to fix any shadow artifacts. Use q3map_splotchFix as a last resort when q3map_lightmapSampleOffset doesn’t fix the problem. The surface using q3map_splotchFix must be more or less uniformly lit or this looks ugly.


(ratty redemption) #4

@obsidian, thanx :slight_smile:


(Davros) #5

yeh tnx, i didnt really know the difference either :beer: