Q3Map2/Light

From Wikibooks, open books for an open world
< Q3Map2
Jump to navigation Jump to search

Light phase minor switches:[edit | edit source]

-areascale <N.N>[edit | edit source]

  • Scales up area (shader) lights by the prescribed factor. Q3Map2 -light -areaScale 0.25 will result in area lights that are only 25% as bright as those in a .bsp compiled with -light -areaScale 1.0.

-approx <N>[edit | edit source]

  • Approximates lightmaps within a byte tolerance of N. Q3Map2 -light -approx forces simple surfaces without much shadow detail to be vertex lit, thus saving lightmaps. The range is from 0-255, 0 being default (no approximation).

-border[edit | edit source]

  • Creates a debugging border around each lightmap.

-bounce <N>[edit | edit source]

  • Enables Q3Map2 radiosity, calculating radiosity light through N bounces.

-bouncegrid[edit | edit source]

  • Allows bounced light to affect the lightgrid.

-bouncescale <N.N>[edit | edit source]

  • Scales up radiosity lights by the prescribed factor.

-cheap[edit | edit source]

  • Stops Q3Map2 from calculating light on a sample after it exceeds (255, 255, 255). This may produce odd artifacts on maps with lots of saturated colored lighting. Also, do not use cheap with radiosity if you want to preserve all the emitted light.

-cheapgrid[edit | edit source]

  • Stops Q3Map2 from calculating light on a sample after it exceeds (255, 255, 255), but only for the lightgrid.

-compensate <N.N>[edit | edit source]

  • Scales back lightmap values to adjust for overbrighting when -gamma is used. For Quake III: Arena, a good compensate value is 4, though some experimentation may be needed to find an aesthetic that suits your particular map.

-cpma[edit | edit source]

  • Enables full vertex lighting including occlusion on all surfaces, including lightmapped. Causes incorrect handling of -approx in Q3A even with special shaders.

-dark[edit | edit source]

  • Enables darkening of lightmaps at brush/lightmap seams. Sort of like a half-assed occlusion pass, ends up looking a bit Unreal 1-ish. Very subtle.

-debug[edit | edit source]

  • Enables lightmap debugging.

-debugaxis[edit | edit source]

  • Colors lightmaps based on their projection axis.

-debugcluster[edit | edit source]

  • Colors lightmaps based on the PVS cluster the luxel falls into.

-debugorigin[edit | edit source]

  • Colors lightmaps based on the luxel origin relative to the raw lightmap's bounding box.

-debugunused[edit | edit source]

  • Colors unused luxels hot pink.

-deluxe[edit | edit source]

  • Generates deluxemaps for directional light attenuation. These are only used by engines that have the capability, such as Darkplaces(Nexuiz), QFusion(Warsow) and XreaL.

-dirty[edit | edit source]

  • Enables ambient occlusion or "dirtmapping". Ambient occlusion approximates light attenuation due to occlusion. Basically, less-visible areas (such as nooks and crannies, cracks and crevices) will become darker. Check the 2.5.14 release thread for further details.

-dirtdepth <N>[edit | edit source]

  • Use with -dirty. Sets maximum depth of occlusion checking in game units (default 128).

-dirtmode <N>[edit | edit source]

  • Use with -dirty. Controls the mode in which the dirtmap is calculated. According to RaP7oR: "The Uniform Mode tries to create a very smooth looking dirtmap, while the Noise Mode is, uh, noisy."
  • 0 = Uniform Mode (default)
  • 1 = Noise Mode

-dirtscale <N.N>[edit | edit source]

  • Use with -dirty. Scales up the "darkness" of the dirtmapping effect by the prescribed factor.

-dump[edit | edit source]

  • Dumps radiosity lights into numbered prefabs.

-fast[edit | edit source]

  • Enables light envelopes for area (shader) lights. This includes radiosity lights. Results in a much quicker -light compiles, but darkens all enveloped light sources considerably—this can be compensated for easily by raising your surfacelight values.
  • Do not be confused by the "fast" nomenclature... -fast is perfectly suitable for "final" compiles.

-fastbounce[edit | edit source]

  • Enables -fast style calculations, but only for radiosity lights.

-faster[edit | edit source]

  • Enables -faster light calculation. Faster is a debug test mode only, and produces really crappy results (but quickly). Use only when your compiles are taking forever for testing. Fast is the mode you should be using for normal/final compiles.

-fastgrid[edit | edit source]

  • Enables -fast style calculations, but only for the lightgrid.

-filter[edit | edit source]

  • Applies a gaussian blur to lightmaps, smoothing out shadows. Sounds good in theory, but -filter doesn't play nice with a lot of the more interesting effects... don't use it. Use -samples instead.

-gamma <N.N>[edit | edit source]

  • Creates a more realistic color ramp between "light" and "dark." Good values are in the 1.4-2.2 range. Games that use r_overBrightBits and r_mapOverBrightBits (Quake III: Arena, most notably) will need those cvars disabled unless -compensate is used accordingly.

-lightmapsize <N>[edit | edit source]

  • Limits the lightmap size. Default is 128.

-lomem[edit | edit source]

  • Trades increased compile time for decreased memory usage. If you are getting safe_malloc errors (or just running out of RAM), try this switch.

-nocollapse[edit | edit source]

  • Disables collapsing of identical lightmaps. This switch is required for Q3Map2 lightstyles.

-nogrid[edit | edit source]

  • Disables calculation of the lightgrid.

-normalmap[edit | edit source]

  • Colors lightmaps based on the facings of their vertex normals.

-nosurf[edit | edit source]

  • Disables the surface tracing of detail brushes and patch meshes for shadow casting.

-notrace[edit | edit source]

  • No light tracing is performed. As a result, no shadows will be cast.

-novertex[edit | edit source]

  • Disables the calculation of vertex lighting.

-patchshadows[edit | edit source]

  • Enables the casting of shadows by patch meshes.

-pointscale <N.N>[edit | edit source]

  • Scales up point (entity) lights by the prescribed factor.

-samples <N>[edit | edit source]

  • Enables intelligent antialiasing of shadow edges in lightmaps. A value of 2 both looks good and compiles quickly, while a value of 3 looks great but compiles somewhat more slowly.

-samplesize <N>[edit | edit source]

  • Writes the prescribed samplesize argument to the .srf surface file. The .srf file (and thus -samplesize) affects the -light phase of compile. A lower -samplesize value produces more sharply defined lightmaps. The default samplesize is 16; a samplesize value of 8 produces a blurry, but good quality compile, suitable to call "final" if you aren't looking for extreme detail. A value of 4 produces a more detailed one, but small artifacts may start appearing occasionally. A samplesize value of 1 produces the most possible detailed lightmap, but also creates "stadium lights" artifacts, a much larger BSP file size and lower game performance.
  • Note that the .srf surface file is generated by the -bsp phase of the compile, so -samplesize must be added to the -bsp phase aswell as to the -light phase to make any effect.

-scale <N.N>[edit | edit source]

  • Scales up all light sources by the prescribed factor.

-shade[edit | edit source]

  • Enables phong shading.

-sky <N.N>[edit | edit source]

  • Scales up all sun/sky light sources by the prescribed factor. In this new era of -gamma -compensate, -sky 3 can allow "old style" sky shaders to be used without manually rewriting them.

-sunonly[edit | edit source]

  • Computes sun/sky light only, no other light sources.

-super <N>[edit | edit source]

  • Enables arbitrarily ordered grid supersampling of lightmaps. This is much, much, much slower than -samples, by the way.

-thresh <N.N>[edit | edit source]

  • Sets the recursive triangle subdivision threshold. The range is 0.0-1.0.
  • In order to determine the luxel normal for phong shading and bumpmapping, Q3Map2 recursively subdivides the map's triangles until no side is longer than the distance specified in -thresh (T) times samplesize (S).
  • The reason lower values of -thresh are used are for when you want more accurate phong and bumpmapping. Lower values = smaller triangles = more samples per luxel (lightmap pixel) = more accurate normal = smoother shading.

-v[edit | edit source]

  • Enables verbose mode. Always use this.