light bug? lightmaps passing through brush joins


(narc) #1

ok its hard to explain so i have pictures.

front side (you can see its solidly joined)

back side (lightmap passed through the join!)

you can see through other solid joins as if there was a crack.

any way to fix the errors?

also my shader/texture lights are omnidirectional, is there a way to make them directional instead? it would be a big timesaver instead of creating and targetting many pointlights.

thank you


(ydnar) #2

If the wall is thinner than the lightmap sample size of the surface behind it, then light will leak.

To get around this, use a thicker brush or use _lightmapscale to make the lightmap higher resolution (put the brush with the leak into a func_group with a _lightmapscale 0.5 key/value).

To prevent the omnidirectional light pooling on shader lights, add this to the shader:

q3map_backsplash 0 0

y


(gynec) #3

ydnar can you help me in my topic

PLZZZZZZZZZZZZZZ :frowning:


(narc) #4

_lightmapscale worked great thanks :drink: i thought that was for enhancing shadow resolutions only.

i have only a problem now of decal lights showing thru where the wall brush meets the cieling brush. (shown by the picture with the red arrow) do you know why this would happen? the decals are patchmesh and co-planar with the ceiling brush. i have never noticed this happen in other maps which use decals for lights.


(ydnar) #5

Is that a decal brush on the floor?


(narc) #6

what do you mean? its a 3x3 patchmesh flush with the cieling. in the picture its inside the hallway of the building but you can see it right through the wall as if there was a hairline crack where the wall meets the cieling. the red arrow points it out. – in the first picture you can see what they look like, the round spotlights are my decals.

or did you mean detail brush? all brushes are worldspawn.


(narc) #7

well i tested it some more, it isnt only showing through the junctions where brushes meet, it will infact show through the middle of a wall too.

if viewed from a certain angle, you can see the decal through a wall :disgust: is there an error in my decal shader perhaps>?

textures/ro_blockhouse/d_lightspot
{
	qer_editorimage	textures/ro_blockhouse/d_lightspot
	q3map_flare	gfx/misc/lens_flare
	surfaceparm	nomarks
	q3map_lightimage	textures/colors/white
	q3map_surfacelight	0
	q3map_backsplash 0 0
	nopicmip
	nomipmaps
	polygonOffset
	q3map_material	Glass
	q3map_nolightmap
	q3map_onlyvertexlighting
    {
        map textures/ro_blockhouse/d_lightspot
        alphaFunc GE128
        rgbGen exactVertex
    }
    {
        map textures/ro_blockhouse/d_lightspot_glow
        blendFunc GL_ONE GL_ONE
    }
}

(ydnar) #8

Check the polygonoffset cvar values. Sometimes that pushes stuff through brushes.

You might want to nuke the polygonOffset stuff and just embed it in the floor…

y


(narc) #9

i cant just make it a normal textured brush and embed it because the light is circular and needs an alpha to mask it. removing polygon offset from the shader did seem to cure the problem, but of course that caused z-fighting :disgust:

dont know of any cvars for polygon offset, the shader manual indicates there isnt one for Q3 (although im using sof2)

The distance between the offset and the polygon is fixed. It is not a variable in QuakeIII Arena.


(ydnar) #10

Hm. It was a cvar in ET at least.

You could try just shifting the light 1 or 2 units off the floor manually.

y


(narc) #11

removing polygonOffset and placing the patch 1u under the surface fixed it :cool: i think setting that offset distance in the compiler would make a good feature, 1u is a bit much – thanks for helping me troubleshoot :drink: