Black shadow look

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
kaustic
Posts: 184
Joined: Wed Mar 09, 2011 5:10 pm

Black shadow look

Post 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?
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Black shadow look

Post 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.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
kaustic
Posts: 184
Joined: Wed Mar 09, 2011 5:10 pm

Re: Black shadow look

Post 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).
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Black shadow look

Post 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?
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
kaustic
Posts: 184
Joined: Wed Mar 09, 2011 5:10 pm

Re: Black shadow look

Post 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.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Black shadow look

Post 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.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
kaustic
Posts: 184
Joined: Wed Mar 09, 2011 5:10 pm

Re: Black shadow look

Post by kaustic »

Thanks Obsidian. I removed the lines you suggested and reapplied the shader
and everything is all good :up: .
Post Reply