Lightmap texture coords out of range?


(MadJack) #1

I’ve got 4627 :eek3: lines worth of that when I -light -fast -filter -samples 2 -bounce 8 -patchshadows on my map…

It doesn’t seem to affect anything though it’s hard to say. Anyway there is lighting. That’s that.

Now, the tough question is… what is it and how do I fix it?

There’s 11 lines that look like this:

WARNING: Lightmap texture coords out of range: S 63.0366 > 63 || T 26.0122 > 124

The rest (the 4616 some lines) is:

WARNING: Lightmap texture coords out of range: S 104.0122 > 104 || T 32.3537 > 124

They’re all 104.0122 > 104…

EDIT: I should add that I’m using q3map2’s latest version 2.5.15 on a regional map.


(ydnar) #2
  1. Don’t use filter. Besides disabling -samples entirely, it leaves seams between patch meshes and nonplanar geometry. I don’t really advocate its use anymore.

  2. Your map might have degenerate patch meshes in it. Do you get any warnings in the BSP phase?

y


(MadJack) #3

I wasn’t happy with the generated light I was having with the textures I was using (those were the ones that were generating the messages above) and since then it stopped. I was still using the same switches… shrugs

Anyway, I’ll remove -samples # in the .bat file that I posted in the level design forum so others don’t get that kind of stuff.

As for the -filter, do you mean I shouldn’t use it at all or simply not in the particular case where I get the “lightmap texture coords” prob?

Thanks for the answer :slight_smile:


(pazur) #4

question ydnar: if not -filter and not -samples … what else should we use to blur/antialias shadows(lightmaps). sometimes i see the pixels of the lightmap. this looks odd. but with filter the shadows look definitively better. so what do you suggest for “clean” shadows? using very high _lightmapscale in worlspawn?


(obsidian) #5

y didn’t say not to use samples, just not filter. For clarity:


(pazur) #6

ah ic dude


(MadJack) #7

Sorry about the late reply, I didn’t notice the question :banghead:

No, there was no warnings of any kind during BSP.


Now, I’ve changed texture lighting yet again and I get some, though not as many, warning messages.

I’ll try some compiles without -filters and/or -samples combinations to see what will happen.


(]UBC[ McNite) #8

Got same error-message:

— SetupSurfaceLightmaps —
WARNING: Lightmap texture coords out of range: S 123.0532 > 123 || T 31.8191 > 33
(26 lines, only in this section)
6392 surfaces
5499 raw lightmaps
95 surfaces vertex lit
6297 surfaces lightmapped
6144 planar surfaces lightmapped
153 non-planar surfaces lightmapped
0 patches lightmapped
0 planar patches lightmapped
— SetupTraceNodes —
555428 trace windings (139.84MB)
1054572 trace triangles (88.50MB)
377652 trace nodes (23.05MB)
188691 leaf nodes (11.52MB)
2 average windings per leaf node
32 max trace depth
That s what comes then.

I use Q3map2build with latest Q3map2 (Q3Map (ydnar) - v2.5.15) and GTK Radiant v1.5.0
All I did was adding some brushes, changing the pic of my skybox (exchanged the pic in the folder by another pic with same size and name) and changed the light settings for the sun and the skybox texture, and compiled with
BSP -meta -v
VIS -fast -v
LIGHT -fast -v

Having a look at the map with Bobtoolz, Cleanup Brushes shows no brushes hightlighted (i had to delete about 150 2 days ago :angry: - yea i m a newbie :smiley: )
Well didn’t do any obvious damage to the map but i don’t like WARNINGs in general. So what do I do… ignore it?


(WolfWings) #9

Just to recap… the reason not to use -filter is because it doesn’t blend between samples that cross lightmap-section borders. q3map2 doesn’t support calculating that, more or less.

A ‘proper’ solution to jagged shadows from an off-axis shadow line is:
A smaller _lightmapscale on the shadowed surface
q3map_lightmapFilterRadius on the light-emitting shader casting the shadow
_deviance and _samples on a point-light casting the shadow
q3map_sunExt and related keyword adjustment on sky shaders to increase the iterations used

Also, -samples doesn’t change the actual resolution of a lightmap, so shadows can still be just as jagged. Think of it akin to building a command map from a 1024x1024 tracemap (-samples 3) instead of a 256x256 one (-samples 1, or no -samples, or -filter used at all), but ending up with a 512x512 command map either way. It’s an optimised FSAA implementation for the lightmap rendering, in over-simplified-and-not-technically-correct terms.

-filter only makes the shadows look blurry, it doesn’t actually solve the underlying problem of a sharp shadow cast at an angle across a low-resolution lightmap. It ‘fixes’ jagged shadows because it smooths out the gradiant of the shadow edge. Getting more samples with jitter from the source light will solve the problem more correctly, which is what the above options do, without causing ‘lightmap seams’ to show up randomly.

And I’ll write an article about this as soon as I finish the article about non-linear blends using q3map2… unfortunately all of the above has to wait, because I just got stiches in my left hand after getting it slashed up nicely while unloading the trunk of the car and having a picture fall on it that had a broken front face of plexiglass.


(Codja X) #10

I get this in JA when I use the textures/colors/white texture. When I texture over these faces, I don’t get the error any more.

Try replacing some of your lightemitting / fullbright textures with something else