lightmap color


(ratty redemption) #1

I have a penumbra sky shader, with q3map_sunext and a q3map_lightrgb setting the same color.

this works fine for my terrain and buildings, but when adding a lightmap stage to my water, which has a light blue color tex, the translucent areas of the water look wrong being colored with a yellow, brownish color from the sun light… so is there a way to have the water`s lightmap retain the brightness, shadow data, but not the color?


(ydnar) #2

Got a screenshot?

y


(obsidian) #3

The only thing that I can think of at the moment is that q3map_lightRGB doesn’t affect the colour of radiosity or lightfiltered light. So it’s possible that light being bounced onto the surface of the water or light cast by lightfilters is altering the colour.


(ratty redemption) #4

I ul the pics and posted some of the shaders over at the jolt.co.uk wolf forum, here`s the link

@obsidian, I`m not compiling with bounce yet, nor using any lightfilters in my shaders, but thanx for the reply.

my test compile lines are…

-meta -light -fast -fastgrid

and

-meta -light -fast -patchshadows -samples 2 -fastgrid

I am new to lightmapped shaders so any help is welcome.


(ratty redemption) #5

@ydnar, can you please tell me if this is possible, or am I wasting my time trying to remove the color from a lightmap stage? …I don`t mind using vertex lit water if I have to, I just want to know what my options are.


(obsidian) #6

You might want to upload those screenshots somewhere else. It asks for a password just to view the screenshots, and I really don’t feel like registering just for this. I don’t mean to sound like an ass, but it is kind of annoying…


(rgoer) #7

BTW, Obsisian: check your PMs here at SD


(ratty redemption) #8

sorry, I didnt know that, have you guys got any recommendations for free web hosting? Ive got a small ftp site my isp gives me but it`s currently full… although I could clear some space for a couple of pics I guess.


(ratty redemption) #9

I got the pics temporally ul, can someone have a look and try to help me with this.
1st pic is with my vertex lit “soft edge” water, but the 2nd pic shows what happened when I tried to add a lightmap stage, the color of the sun light turned the water yellow, brownish.

I`m trying to have the lightmap shadows, brightness without the color of the light affecting the water.

here`s the sky shader…

textures/_water_test/day_sky
{
	qer_editorimage textures/_water_test/shader_images/sky.tga
	q3map_sunext 1 0.8 0.6 50 140 45 2 16
	q3map_lightmapfilterradius 0 64
	q3map_lightrgb 1 0.8 0.6
	q3map_skylight 50 3
	q3map_globaltexture
	q3map_backsplash -1 -1

	fogvars ( 0.02 0.02 0.02 ) 0.000001
	surfaceparm pointlight
	surfaceparm noimpact
	surfaceparm nodlight
	skyparms - 192 -
	{
		map textures/skies/newclouds.tga
		tcmod scroll -0.001 -0.003
		tcmod scale 6 6
		rgbgen identity
	}
	{
		map textures/skies/assa_clouds1.tga
		tcmod scroll 0.0005 0.00
		tcmod scale 2 1
		rgbgen identity
		blendfunc blend
	}
}

and a section of my water shader...

textures/_water_test3/terrain_water1_base
{
	qer_editorimage textures/_water_test/terrain_water1_base.tga
	q3map_lightmapsampleoffset 8
	q3map_lightmapmergable
	q3map_shadeangle 178
	q3map_bouncescale 0
	q3map_nonplanar
	q3map_tcgen ivector ( 1024 0 0 ) ( 0 1024 0 )
	surfaceparm nonsolid
	q3map_globaltexture
	surfaceparm trans
}

textures/_water_test3/terrain_water1_0
{
	q3map_baseshader textures/_water_test3/terrain_water1_base
	deformvertexes wave 512 sin 0 4 0 0.25
	deformvertexes wave 128 sin 0 2 0 0.5
	cull disable

	surfaceparm nodraw //comment to dedug
	{
		map $whiteimage
		rgbgen const ( 0.4 0 0 )
		blendfunc gl_one gl_src_color
	}
}

textures/_water_test3/terrain_water1_1  // scroll -0.15 0    360 degrees
{
	q3map_baseshader textures/_water_test3/terrain_water1_base
	deformvertexes wave 512 sin 0 4 0 0.25
	deformvertexes wave 128 sin 0 2 0 0.5
	cull disable
	{
		map $lightmap
		tcgen lightmap
		rgbgen identity
		blendfunc gl_dst_color gl_zero
	}
	{
		map textures/_water_test/shader_images/image05.tga
		tcgen vector ( 0.00130208333 0 0 ) ( 0 0.00130208333 0 )  // 768
		rgbgen wave sin 0.6 0.3 0 0.3
		tcmod turb 0 0.1 0.3 0.1
		tcmod scroll  -0.15 0
		alphagen vertex
		blendfunc blend
	}
	{
		map textures/_water_test/shader_images/image06.tga
		rgbgen wave sin 0.6 0.15 0.3 0.3
		tcmod turb 0 0.05 0.3 0.1
		tcmod scroll  -0.15 0
		alphagen vertex
		blendfunc blend
	}
	{
		map textures/_water_test/shader_images/image07.tga
		rgbgen wave sin 1 0.4 0.6 0.3
		tcmod turb 0 0.075 0 0.05
		tcgen environment
		tcmod scale 2 2
		alphagen vertex
		blendfunc blend
	}
}