Best compiling for light?


(lennyballa) #1

Hi there :slight_smile:
I got a large outdoor map, with alot of greek ruins. Someone has some suggestions for a realistic and nice looking compile? (The “code”) I compile with -light -samples 2 -filter -bounce 8 (Only, bounce takes ages, i only do that for the final one :wink: ) Btw, it’s for ET.


(ydnar) #2

Don’t forget to use -fast.

I don’t recommend using -bounce without -fast or -fastbounce.

Also, using -filter with -samples is more or less pointless, because -filter blurs out any advantage -samples gives.

y


(Matt) #3

Ydnar, how does this sound?

-fast -novertex -patchshadows -samplesize 2 (is that the right syntax or should it be -samplesize 2x2? Never got that one.) -super 4 -thresh .1


(redfella) #4

I like -bounce 4 …/me thinks -bounce 8 creates to much diffusion. -But selecting the “correct” -bounce number will depend soley on what you want your map to look like.

gl


(ydnar) #5

It’s -samplesize 2 (not 2x2), and that won’t work–the sample size is determined in the BSP phase (or by manually editing the .srf file).

Also, -super 4 means it will take 16x the time and memory. The difference between -super 4 and -super 2 is negligible at best. But if you want to do it, it’s there… :slight_smile:

I generally use -light -fast -super 2 -filter -bounce 8 for final compiles. For ET maps, I’d add -external -lightmapsize 256 -approx 4.

y


(Emon) #6

What about samples? It was my impression that that would be the best thing to use. Or is it to maintain sharper, yet antialiased shadows, where as -super 2 -filter is more blurred?


(ydnar) #7

Using -super does uniform supersampling. -super 2 = 4x AA, -super 3 = 9x AA, -super 4 = 16x AA, etc.

The -samples switch does adaptive “smart” AA by only supersampling shadow edges.

Why this is different with -filter:

The filtering code runs on the raw lightmap data, before subsampling. Since -samples runs at 1:1 ratio of raw luxels to final luxels, the filter radius when using -samples (or simply not using -super) is 1 luxel.

When you use -super 2, the filtering radius is dropped to effectively half a pixel. Still, the results tend to generally be superior to a regular -super 2 compile.

I’d say -super 4 -filter would be nearly identical to just using -super 4.

I’m working on all-new lightmap filtering code that adapts the filter radius to world units rather than luxels. This is so sky lights can have a high filter radius (to blur out the “half shadows”) and per-light tuning becomes possible.

To get really into it, all super/samples does is take multiple, slightly-offset samples per luxel (lightmap pixel). This is exactly the same as if you had 4 point lights close together with 1/4 brightness instead of a single point light.

Well, I’m happy to announce that you will be able to do that automatically with the next version of Q3Map2. Adding these keys to light entities will do per-light jittering for nice umbra/penumbra simulation and look nicer than supersampling:

“_deviance” “N” where N is world units for point/spot lights and arc degrees for _sun lights
“_samples” “N” where N is the number of samples/jitters to split this light into

See the skylight/surfacelight thread for screenshots of the effects possible with this.

y


(Emon) #8

Thanks, the clears it up. So why still user -super 2 -filter? It seems like -samples 2+ is better.

Two questions on penumbra. First, is there something you can put in the compile line or worldspawn to enable it for all lights, then go around to each one and set keys that have precedence over the globals? You could filter out all but lights and multiselect, but still. Second, from what I understand, penumbra won’t affect map performance at all, just take longer to compile?