Last modified on 9 February 2011, at 16:44

Q3Map2/Light

Light phase minor switches:Edit

-areascale <N.N>Edit

  • 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

  • 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).

-borderEdit

  • Creates a debugging border around each lightmap.

-bounce <N>Edit

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

-bouncegridEdit

  • Allows bounced light to affect the lightgrid.

-bouncescale <N.N>Edit

  • Scales up radiosity lights by the prescribed factor.

-cheapEdit

  • 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.

-cheapgridEdit

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

-compensate <N.N>Edit

  • 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.

-cpmaEdit

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

-darkEdit

  • 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.

-debugEdit

  • Enables lightmap debugging.

-debugaxisEdit

  • Colors lightmaps based on their projection axis.

-debugclusterEdit

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

-debugoriginEdit

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

-debugunusedEdit

  • Colors unused luxels hot pink.

-deluxeEdit

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

-dirtyEdit

  • 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

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

-dirtmode <N>Edit

  • 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

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

-dumpEdit

  • Dumps radiosity lights into numbered prefabs.

-fastEdit

  • 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.

-fastbounceEdit

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

-fasterEdit

  • 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.

-fastgridEdit

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

-filterEdit

  • 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

  • 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

  • Limits the lightmap size. Default is 128.

-lomemEdit

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

-nocollapseEdit

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

-nogridEdit

  • Disables calculation of the lightgrid.

-normalmapEdit

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

-nosurfEdit

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

-notraceEdit

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

-novertexEdit

  • Disables the calculation of vertex lighting.

-patchshadowsEdit

  • Enables the casting of shadows by patch meshes.

-pointscale <N.N>Edit

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

-samples <N>Edit

  • 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

  • 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

  • Scales up all light sources by the prescribed factor.

-shadeEdit

  • Enables phong shading.

-sky <N.N>Edit

  • 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.

-sunonlyEdit

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

-super <N>Edit

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

-thresh <N.N>Edit

  • 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.

-vEdit

  • Enables verbose mode. Always use this.