Correcting tile lights ?


(adronix) #1

Hello everyone

This is my first post on the splash damage forum, Thought I could open up with an unpleasent texture surface lighting problem my map is experiencing. I frequently stop by these boards; somtimes just to browse, mostley though, to catch onto the wisdom from the ever resonating orb of intelligence which seems to exsist here.

Im wondering what I might do to correct this sort of lighting issue, without having to resort to building a mesh brush and spaning it across the map. I don’t even know what to call it let alone fix it, becaus it also happens often with vanilla q3 light shaders.

Im using q3map2 ver 2.5.16, without many light variables turned on, just normal test compiles. The compiler is beyond extensive, Its transtensive…I want to learn what I can before all the info gets parsed…The game is a modded q3.

The tile in the picture is applied to a planar face of 1 detail brush, is all its doing. Here is the shader script.


textures/adronix_textures1/dx_sv_basetrim_3blue
{
q3map_surfacelight 1000
q3map_vlight
{
map textures/donx_textures1/dx_sv_basetrim_3blue.tga
rgbGen identity
}
{
map $lightmap
blendfunc filter
tcGen lightmap
}
}

I dont know whether I was dreaming when I happened to read a quick notation about this exact problem in another post, which has failed to be found with several attempts…Thank you for any advise concerning this.

Mucho Gracious

*edit - I love it when I leave out full sentences.


(Twisted0n3) #2

You’ve lucked out finding this place. It seems to be the only forum still functioning that discusses q3 editing.

What’s the complaint, exactly? Light leaking through solid geometry? Aside from mapping for the D3 engine, the solution is generally to put a structural brush between the light source and the unwanted light, as or inside the geometry that the light shouldn’t pass through. It may also prove necessary to use hint brushes. Put a skip brush abutting the structural brush and containing the light, and another on the other side of the structural brush and containing the area you don’t want it lighting. In the case of a wall with a support beam protruding and a light on one side, then, you’d make the beam structural and possibly put skip brushes the same thickness as the beam to either side and stretched so one extends from the beam past the light and the other covers the unwanted leaked light. Then the faces parallel to and level with the front of the support beam need to be changed from skip to hint.

It may also help greatly if the wall behind the support beam is not made of continuous brushes behind the beam, but separate ones on each side of the beam. Try that, then making the beam structural, and then adding the hint/skip brushes.


(adronix) #3

TwistedO3 - Thanks for taking the time to describe that method for controling light and shadows using the skip/hint combo. It wasn’t exactly the problem, but it no doubt was another Im needing to be aware of. I wil try to test around with that, see what I can accomplish.

Technically, lighting is still the part of map design that I’m hazzy with, but Im slowly learning of how it is handled in the engine and compiler. Trying to find any info on how it works, maybe I’ll even stumble on a fix to properly light a long light_trim texture, so that its radiant light (the brighter blue areas) is spanned consitantly across the texture itself, not just condensed in those certain areas. Getting rid of that high low variation I dont want…I know with lava, that it creates a nice consistant ambient glow to surrounding surfaces. It must have to do with my shader.


(Shallow) #4

Light-emitting surfaces get divided up from the centre outwards to determine how many point sources are placed for them. The default is for the point sources to be every 120 units. You can control how often the sources are placed with q3map_lightsubdivide. Try a value of around 40 for these lights. It goes in the first bit of the shader with the other q3map_ stuff.


(Twisted0n3) #5

Agree with Shallow. If it’s spotty light from a “continuous” light texture that’s bothering you, the light shader needs a better (smaller) q3map_lightSubdivide. This tends to occur with trim lights that may be any length; spot light sources you use on a little 8x8 or 16x16 square work fine since there’s one light source generated, and it’s at the center of the small square.

Third party texture sets with long, thin lights sometimes miss the q3map_lightSubdivide from the light shaders in question that need them. Make a copy, change the shader name, add q3map_lightSubdivide 32 to the preamble (before the nested {…} that do individual layers), and change nothing else. Then change your map to reference the copy. Remember to include the copied shader in your .pk3 when you distribute the map.


(adronix) #6

Awsomeness! That works great, totally takes away the blotchy light area’s. I set the sublightdivid to 32 and 40, both worked good, compile times were much longer though. Im going to experiment with the limits I can get away with to make it quicker. ( I had a hunch it was to do with shader parameters, seems I need dive back into the manual and refresh my knowledge base.) Thanks for the help guys.

I have another texture light problem Im running into now. There is a texture I’ve made (256x256) and it has a light on it, but its centered into that texture and is basically a wall texture, not a light. What Id like to achieve is a small light radius emanating from only the light in that texture. I know this sort of thing can be effectively done, with shaders. Would I just be better off using light entities?


(Twisted0n3) #7

Shader method:

[ul]
[li] Put 128 as the light subdivide, or at least leave it default. Always use the texture so the light’s centered on the brush.
[/li][li] Possibly include a blend stage that adds a glow effect in the vicinity of the light part of the texture.
[/li][/ul]

Entity method:

[ul]
[li] Make the shader not emit light, but maybe include a glow effect and at least use a blend stage so the light itself is bright even in dim surroundings.
[/li][li] Put a light entity a short way in front of the wall, centered with respect to the light in the plane of the wall. Experiment to get the color key right, and document the results.
[/li][/ul]

Brushwork method:

[ul]
[li] Make a separate texture and shader for the light and for the surrounding wall; one, say, 32x32 and the other 256x256. The wall texture includes a 32x32 feature in the center that can be replaced with the 32x32 light shader and still look good. The light shader emits light and is like typical light-only shaders.
[/li][li] Build the wall with the wall texture, and for lights, use brushwork to put a 32x32 brush with the light shader in some or all the panel centers. With one panel, you can make this in five pieces without unneeded verts by making four trapezoidal pieces surround one central square piece, with edges surrounding the panel, the 32x32 light, and joinining the outside corners of the latter to the inside corners of the former. (Triangle count: 8 for each blend stage in the wall (likely two, texture and lightmap) plus 2 for each blend stage in the light.) For multiple panels in a horizontal row, you’d have a row of 32x32 lights, and between pairs of these Nx32 brushes with wall texture; above this long thin rectangle of brushes and below long thin trapezoids with the top (or bottom) edge of the wall, the bottom (or top) edge of the strip of brushes already described, and two diagonals for edges. Left and right, the same trapezoids as for a single panel. (Triangle count: 6 for each blend stage in the wall, plus 2 per light for each blend stage in the wall, plus 2 per light for each blend stage in the light.)
[/li][/ul]


(Twisted0n3) #8

By the way, why won’t “quick reply” work? It cryptically brings up a page that simply says “the network is busy” instead of doing the right thing, consistently, but posting a reply the “non-quick” way works as expected.


(adronix) #9

Twisted0n3 - Supurb…! I will definately will go with the light entity method, now that I can consider the alternatives…very insightfull.

**/ Best to make sure you dont go trippin on the intensity number too much, 10 on average worked better then 300 for this specific texture, I might even have to bring it down to 5 considering. Adding a blend stage is a good idea, mainly for using the shader method though, you can’t get away with it always with an entity light. Im using 5 now and its still super bright. I might have to decrease the whitescale (brightness) of the blend layer.

Just trying to resolve an issue with the backsplash now and it should be about perfect. Seems the texture still wants to hide in the shade of the lightmap even though its a light iteself…perhaps thats the clue. (>?)


(obsidian) #10

Just a few bits of info to add to what was mentioned above:

You shouldn’t need to use q3map_vlight anymore when using Q3Map2. Obsolete.

There are plenty of other active Q3 editing forums. www.quake3world.com level editing and modeling forum, for example.

Twisted, I wouldn’t use hint and skip to control light leaks, it is very possible that you will be generating additional and unnecessary portals. Instead, use structural caulk, that has always worked for me.

Surface lights generate point lights at fixed intervals along your texture. Decreasing subdivide values places lights closer together, increasing the number of point lights placed along your texture, therefore increasing compile times. You can also try using q3map_backSplash to even out lighting without extreme subdivide values.

You can control surface light colour by using q3map_lightRGB.

For specific effects like a strip of glowing light, it is usually better to include an extra stage using blendfunc add. That also gives you the freedom to add flickering or pulsating effects to your shader.


(Twisted0n3) #11

Hint/skips: I was suggesting those as a last resort, if merely breaking up the back brush doesn’t work, and then making the would-be light-blocking brush structural still doesn’t stop light leaking.

q3w: Wasn’t it hacked and totally destroyed? Ditto m-c?


(obsidian) #12

Hmm… I guess just typing the domains into your browser and seeing what happens isn’t going to work at all now, is it?