Shadow blotches in lightmap

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
DonX
Posts: 22
Joined: Tue Sep 26, 2006 5:16 am

Shadow blotches in lightmap

Post by DonX »

I've been having this problem with certain shaders that I want to be non solid, translucent, cull disabled, light from shader/entity sources are being chopped up and resulting in shadow blotches in the lightmap.

I did an insane amount of testing and recompiling to try and solve this, but it either resulted in the texture blocking light or the blotches. I give the shader light parameter's it only faces one direction, I take away certain surface parms, it screws with its function in the map. I tried moving the entity light away or inside, or below, same results.

If someone could suggest an alternative method to fix such a problem that would be great.

PICS:

Image

Image

Image

SHADERS:

Code: Select all

textures/xb_textures/xb_beam_fx1
{
	qer_editorimage textures/xb_textures/xb_beam_fx1.tga
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm nonsolid
	surfaceparm lightfilter
	sort additive
	cull disable
	nomipmaps
	deformVertexes autosprite2
	{
		map textures/xb_textures/xb_beam_fx1.tga
		blendfunc add
		rgbGen identity
		tcMod scroll 0 -5
	}
}
--== Every Path Leads Must Lead Somewhere ==--
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Post by obsidian »

I'm not entirely sure what's causing the splotches, but here are a few pointers. One of them might be the source of the problem.

surfaceparm noimpact probably doesn't do what you think it does. If you shoot a rocket at the beam, it will just disappear rather than just go through the beam.

Remove surfaceparm lightfilter. If it's a beam of light, it shouldn't be casting coloured shadows and could be the reason for the splotches.

sort additive: any reason why you have to specify this? Sort is generally handled automatically, so unless you actually have a sorting issue, you shouldn't need this.

You should add surfaceparm trans.
DonX
Posts: 22
Joined: Tue Sep 26, 2006 5:16 am

Post by DonX »

Awesome ! Removing the surfaceparm noimpact & lightfilter, then adding in trans did the trick. Works well with light entity as well. Thanks obsidian !

Image

Code: Select all

textures/xb_textures/xb_beam_fx1
{
	qer_editorimage textures/xb_textures/xb_beam_fx1.tga
	surfaceparm nonsolid
	surfaceparm trans
	cull disable
	nomipmaps
	deformVertexes autosprite2
	{
		map textures/xb_textures/xb_beam_fx1.tga
		blendfunc add
		rgbGen identity
		tcMod scroll 0 -5
	}
}
--== Every Path Leads Must Lead Somewhere ==--
User avatar
Foo
Posts: 13840
Joined: Thu Aug 03, 2000 7:00 am
Location: New Zealand

Post by Foo »

I got this when a light entity was dead level with a textured face. It'd be considered as a light that was casting on the surfaces around it for some of the light traces, and discarded for some of the others. The end result was a random set of splotched 'on and off' light traces just like your 2 shots.

For me, shifting the light entity manually away from the surface by a few units fixed the issue, but it looks like I could have edited the texture and got the right result.
Post Reply