Page 1 of 1

Q3A: small lighting issue [solved]

Posted: Mon Mar 05, 2007 11:48 pm
by dichtfux
I've build a teleporter out of ordinary brushes and placed multiple light sources in front of it. The map contains 4 of these teleporters and 2 of them look good, but the others don't.

Here are two screenshots to illustrate what I'm talking about. Note the lighting on the blue frames around the teleporters.

good teleporter:
Image

bad teleporter:
Image


There is no black brush in front of the blue frames and the blue frame is completely visible in vertex lighting mode. I placed plenty of lights around it (4 light sources at different angles).

Map was compiled from radiant. I tried mutliple command lines (none of which fixed this issue), the one used on the screenshots above was:

Code: Select all

BSP -meta -vis -light -fast -filter
I don't know what's wrong with them, hope someone in here does.

Posted: Tue Mar 06, 2007 4:47 pm
by obsidian
Post the shader?

Posted: Tue Mar 06, 2007 9:58 pm
by dichtfux
There's no shader.

The blue texture is base_wall/metalfloor_wall_14_specular, the black one surrounding it is base_wall/metalblack03.

Posted: Wed Mar 07, 2007 1:05 am
by Shallow
Actually, there is a shader.

Code: Select all

textures/base_wall/metalfloor_wall_14_notspec
{
	qer_editorimage textures/base_wall/metalfloor_wall_14_specular.tga
	{
		map $lightmap
		rgbgen identity      
	}
	
	{
		map textures/base_wall/metalfloor_wall_14_specular.tga
		blendFunc GL_DST_COLOR GL_SRC_ALPHA
		rgbGen identity
		alphaGen lightingSpecular
	}
}
Personally I've never used specular lighting since its implementation in Q3 looks a bit naff on most brushwork, it looks better on things with lots of triangles. So you'll want a homegrown shader to get rid of it.

Code: Select all

textures/dichtfux/metalfloor_wall_14_specular
{
	qer_editorimage textures/base_wall/metalfloor_wall_14_specular.tga
	
	{
		map textures/base_wall/metalfloor_wall_14_specular.tga
	}
	{
		map $lightmap
		blendfunc filter
	}
}

Posted: Wed Mar 07, 2007 1:18 am
by obsidian
I suspected it had something to do with specular lighting, but couldn't be sure from the screenshot. :icon14:

Posted: Wed Mar 07, 2007 1:27 am
by dichtfux
Thanks a lot Shallow, I'll give that a try asap!

Any idea on why it goes mad on 2 of the 4 teleporters only?

btw: when I re-rendered the map with -bounce8 some hours ago the texture was completely black on 2 of the 4 teleporters. :icon28:

EDIT: Just realized that I simply picked the wrong texture, there's base_wall/metalfloor_wall_14_specular and base_wall/metalfloor_wall_14. Never intended to use the specular one, all I wanted was a blue wall. Problem solved, I suppose.

I don't really care why it worked with 2 of the teleporters, but I just checked and they were all using the same texture, the one with the shader.

I'll give Shallows shader a try anyways cause he took the time to make and post it. ;-)

Posted: Wed Mar 07, 2007 10:46 am
by dichtfux
For future reference:

Compilations finished, got it to work, but it had nothing to do with the texture/shader.

I gave both Shallows shader and base_wall/metalfloor_wall_14 a try, but the problem remained.

Fix:
The blue brushes were "carved" into the teleporter (or: the black ones stood out of the teleporter a tiny bit - 2 units to be specific). There were no overlapping brushes though and this was intentional to make the teleporter look cooler, the black brushes were intended as a kind of frame around it.
Problem was fixed when I also pulled the blue brushes out 2 units (so the black ones didn't stand out by a tiny bit anymore).

Thanks for your efforts anyways guys!

Final note:
Still don't really know why it didn't work the other way, but now it does. And I checked the other 2 teleporters that worked from the beginning and found out that the black brushes do stand out there - but lighting is fine there nevertheless. :confused: