Page 1 of 1

Black shadow look

Posted: Sat Jul 02, 2011 7:27 pm
by kaustic
I keep getting this black shadow effect in random areas in my map.
When I first made the map and in its alpha state there were only
small areas and the effect was very mild.Now that I'm farther along
and doing ajustments to the lighting and such,its getting worse it
seems every time I compile the map. Putting an entity light by it
does nothing.Is this caused by the light grid, and if so How do you
fix it?

Re: Black shadow look

Posted: Sat Jul 02, 2011 11:44 pm
by obsidian
It looks like it's vertex lit - not the same thing as the light grid which only affects player models and other movable entity models.

Make sure your shader for the material has a lightmap stage. Check your settings and make sure r_lightmap is set to 1.

Re: Black shadow look

Posted: Sun Jul 03, 2011 7:02 pm
by kaustic
From the setup menu I have always had lightmap lighting set
From the console I set /r_lightmap 1 and this is what I got
shot0090.jpg
I compiled the map using gamma 2 in the light stage and with
/r_lightmap 0 set this is how it looks.(Used gamma 2 to brighten
things up).

Re: Black shadow look

Posted: Sun Jul 03, 2011 7:19 pm
by obsidian
Err... I meant r_vertexlight 0.

Regardless, there is something wrong with your lightmaps, they shouldn't be pure white like that. Try using default gamma settings. Are any of those surfaces using shaders?

Re: Black shadow look

Posted: Sun Jul 03, 2011 9:56 pm
by kaustic
Yes that texture had a shader attached to it. Just for the sake of seeing if
it had anything to do with it I removed the shader script from the file and the
effect went away.This is the shader for that texture-
textures/aty3dm8_txt/aty8_wood_grey
{
qer_editorimage textures/aty3dm8_txt/aty8_wood_grey.tga
q3map_nonplanar
q3map_shadeangle 60
{
map $lightmap
rgbGen identity
}
{
map textures/aty3dm8_txt/aty8_wood_grey.tga
blendFunc GL_DST_COLOR GL_ZERO
}
}
I know that (after you mentioned shaders I went and looked in the shader manual and a couple of
other places) the q3map_nonplanar and q3map_shadeangle 60 have to do with Phong Shading and that
blendFunc GL_DST_COLOR GL_ZERO was probably causing the black shadow effect,but why I have no
idea.I'm still learning alot about shaders.I'm basicly a shader idiot :D . The texture set I'm using is
Soc's Medieval textures.

Re: Black shadow look

Posted: Sun Jul 03, 2011 11:24 pm
by obsidian
GL_DST_COLOR GL_ZERO is a filtering blendFunc (same as "blendFunc filter") and used here it is correct.

Remove q3map_nonplanar and q3map_shadeAngle, you shouldn't need it here.

Re: Black shadow look

Posted: Tue Jul 05, 2011 8:10 pm
by kaustic
Thanks Obsidian. I removed the lines you suggested and reapplied the shader
and everything is all good :up: .