light texture


(stealth6) #1

I’m using the texture : textures/lights/light_tp_m06

The problem is the lights don’t look very realistic, there appear to be 2 lights above the texture. Is there a way to make more “lights” so it looks like the whole line is glowing instead of 2 sections?


(Mateos) #2

Hello,

Done through shaders or light entities?

If 1), please post the shader, if 2) please take a screenshot from the editor :slight_smile:


(h20xyg3n) #3

Pretty sure that’s done via shader lighting, you’ve just got that weird result. I like your hexagon texture, pretty shweet.


(Mateos) #4

That’s why I’m asking… A surface light shader isn’t supposed to behave like this. But if the light-emitting surface and the one supposed to receive light are at the perfect same level, I dunno if the engine can light the targeted surface. There should be some trick… Will try to find, it could be useful for any mapper ^^


(stealth6) #5

As I said in the OP i’m using textures/lights/light_tp_m06 which is a default texture. Regardless here is the shader:


textures/lights/light_tp_m06
{
	qer_editorimage textures/lights/light_tp_m06.tga
	q3map_surfacelight 6000
	surfaceparm nomarks
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/lights/light_tp_m06.tga
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
	{
		map textures/lights/light_tp_m2.blend.tga
		blendFunc GL_ONE GL_ONE
	}
}

Normally the texture is used to make small lights that are 1 section, but I just made a whole row of them, but that has the effect you see above. I could probably solve it by adding light entities or maybe by cutting the brush into smaller pieces, but I was hoping it’s a simple adjustment in the shader file. (I’ll obviously make a new shader not edit the current lights.shader)

Anyway any ideas what could be possible? :slight_smile:


(ailmanki) #6

That q3map_surfacelight is a fast way to create light entities, q3map_lightSubdivide allows to modify the distance between the lights created.
Depending on what you want, it might be better to create multiple lights manually.

There is some more info: Topic: Texture lighting


(stealth6) #7

[QUOTE=ailmanki;408128]That q3map_surfacelight is a fast way to create light entities, q3map_lightSubdivide allows to modify the distance between the lights created.
Depending on what you want, it might be better to create multiple lights manually.[/QUOTE]

Thanks I’ll give it a shot.

I came up with a bad solution. Just divide the brush into smaller parts. This makes the lighting look better, but is a T-junc disaster.


(Mateos) #8

Why not make a new texture from it? I mean, add several squares side by side in a new texture file, and copy/paste the shader?


(stealth6) #9

So I tried both ailmanki’s and Mateos’ suggestion.

Copying the texture to make it longer didn’t work, this had the same effect as before.

Using q3map_lightSubdivide didn’t work either, or maybe I am using it wrong I tried the values: 240, 120, 30, 16, 60, 90, 96. Most of them resulted in only 1 light appearing and the rest made no lights at all (although they did light up textures in front of it - just not around it). I found this topic on a similar subject:
http://forums.warchestgames.com/showthread.php/8094-Best-quality-surface-lights

so I tried adjusting q3map_backSplash too, but this didn’t help at all. So I went with ailmanki’s other advice (also mentioned by ydnar) and used light entities and q3map_backSplash 0 0.

EDIT: Forgot to mention that I also tried different light compiles since I read somewhere that light -fast doesn’t always take subdivide into account? But it made no difference.

I attached the result.


(.Chris.) #10

That looks fine to me regarding the light?

As for the tris, just place the top side of the brush 1 unit above the floor rather than cut it into the floor, use nodraw on all other sides, that or use polygon offset in the shader and overlap it like a decal or so. Unless you purposefully want it raised out of the floor? Placing it into a func_group or func_static (can’t remember which) will also make sure it doesn’t cut up the floor.


(Mateos) #11

Can he adds polygonOffset to its shader, and just include the brushwork inside the surface, at the same level?


(.Chris.) #12

That’s what also suggested there, don’t know if works with light shaders, he will have to test. There’s few ways to get rid of the extra tris, though thinking about it, just placing a brush how he has done, shouldn’t create more tris unless it touches the edges.

http://forums.warchestgames.com/showthread.php/10838-Tutorial-T-Junctions


(stealth6) #13

Funny I didn’t think of using polygonoffset i have some lights a few units away that are using polygon offset :smiley:

Anyway here is the result.