Lightmap issues with terrain brushes


(DarthStevenus) #1

I noticed the other day that some terrain brushes in a map of mine (which use a specular shader) were not lighted quite like they should be. It was almost like the specular map on certain brushes was brighter than it should be or was not…in line with the other brushes I guess. If that makes sense. So I compiled it again with -border and -normalmap in the light phase and this is what I got:



Now some of those are patches because I couldn’t use quadsoups or trisoups for that particular area (all sorts of vertex issues). But anyway, does anyone know how to fix this?

EDIT: Smaller pics now, sorry didn’t see a spoiler tag


(obsidian) #2

Can you resize your screenshots and re-upload… it’s making reading this thread problematic.

Do you have a shader that you are using with that terrain?


(DarthStevenus) #3

Yeah, I’m using a specular/phong shader. Here it is:

textures/batcave/rock_layered_phong
{
	qer_editorimage	textures/batcave/rock_layered
	q3map_shadeangle	90
	q3map_material	rock
	q3map_nonplanar
	q3map_splotchfix
	q3map_forcemeta
    	{
        	map $lightmap
        	rgbGen identity
    	}
   	{
        	map textures/batcave/rock_layered
		blendFunc GL_DST_COLOR GL_ZERO
        	rgbGen identity
    	}
	{
		map textures/batcave/rock_layered_specmap
		blendFunc GL_SRC_ALPHA GL_ONE
		rgbGen const ( 0.3 0.3 0.3 )
		alphaGen lightingSpecular
		glow
	}
}

nonplanar, splotchfix, and forcemeta commands I put in the shader at the suggestion of another mapper although I can’t remember what their exact function is. It’s been a month or two since I tried to tackle this problem.


(obsidian) #4

Try removing alphaGen lightingSpecular.


(DarthStevenus) #5

I’ll try that, but I just noticed something else (possibly unrelated). I was looking at the q3map2 wiki and saw one of the light minor switches called -shade, that just said “enables phong shading.” Which I thought was a bit odd because in everything I’ve read about phong shaders I’ve never seen that mentioned.