Q3Map2 by ydnar

"Like mom used to make"

--------------------------------------------------------------------------------

DISCLAIMER

THIS IS NOT AN ID SOFTWARE PRODUCT. DO NOT ASK THEM FOR HELP. SEE BELOW FOR
LINKS TO RELEVANT RESOURCES. IT HAS BEEN TESTED BY HUNDREDS OF MAPPERS ON
MAPS FOR SEVERAL GAMES, COMMERCIAL AND NON COMMERCIAL. HOWEVER, THERE IS NO
WARRANTY (fill in the blank here from your favourite EULA) AND IT COULD STILL
THEORETICALLY MELT YOUR COMPUTER. ESPECIALLY IF YOU DO -light -super 8
-bounce 100 -bouncegrid -thresh 0.0001 -shadeangle 90 OR SOMETHING.

--------------------------------------------------------------------------------

BASIC INFO

Author email: ydnar@shaderlab.com - ydnar@splashdamage.com
WWW:          http://shaderlab.com
Q3Map2 home:  http://shaderlab.com/q3map2/
Manual:       http://hfds.com/m/
Mirror:       http://shaderlab.com/q3map2/manual/ (somewhat out of date)
GtkRadiant:   http://zerowing.idsoftware.com
Forums:       http://www.quake3world.com/cgi-bin/forumdisplay.cgi?action=topics&forum=Level+Editing&number=6
IRC:          irc.enterthegame.com #q3map

--------------------------------------------------------------------------------

CREDITS

Contributors: Id Software (original Q3Map)
              Loki Software (Linux port)
              TTimo (Id, GtkRadiant)
              djbob (Splash Damage)
              RR2DO2 (Splash Damage)
              Gef (GtkRadiant)
              SmallPileOfGibs (EA, GtkRadiant)
              Seaw0lf (co-author of PicoModel library)
              Plenty more...

Manual:       Jetscreamer, Shadowspawn, and everyone else with the patience
              to wade through the textual deluge. :)
              
Full credits: http://qeradiant.com/credits.html

--------------------------------------------------------------------------------

THANKS

Thanks to:    First, everyone above. They 0wn m3.

              K, MrD, AstroCreep, [AF]Haste, jer, AD5, Laerth, Vexar, Pointy,
              PJW, the entire teams of Urban Terror, WFA, Q3F, Q3TC, NSCO, RQ3,
              and finally, the truly patient testers who have all gone the
              extra mile or kilometer or fathom or whatever to make sure this
              pile of bolts does as advertised. They own me too.
              
              Huge thanks to Splash Damage, Activision, and Id software for
              sponsoring the continued development of Q3Map2.

--------------------------------------------------------------------------------

VERSION HISTORY

2.3.33 (2002-12-08)

- Added new -bouncescale argument for radiosity scaling
- Added -pointscale and -areascale for consistent naming
- Radiosity patch subdivision code enhanced
- Hint portals split the BSP first (higher priority)
- Antiportal and areaportal faces split the BSP last, to minimize errors
- Areaportals work internally like hint and antiportals, so they no longer need
  to be full brushes (the other sides can be skip)
- External lightmaps are now named "lm_NNNN.tga" in the maps/mapname dir
- Cleaned up some of -light argument processing
- Planar surfaces w/o lightmaps will no longer be tagged as MST_TRIANGLE_SOUP
  (this fixes problems with Particle Studio particles dropping out of view)


2.3.32 (2002-11-30)

- GtkRadiant (1.2.11) integration
- Added epsilon to texture plane choose code to eliminate numerical
  inconsistencies on brush faces slanted at 45 degree angles (bug 637)
- Fixed bug in lightmap export after lighting when map contains 0 BSP lightmaps
- Adjusted some light tracing constants to fix certain brush/patch seam shadows
- Tinkered with skylight code again
- Fixed bug where lightgrid would be black if level was compiled with -nogrid
- Fixed -approx code to work in floating-point space, using _minlight
- Fixed bug where vertex light code was using invalid pvs data to create
  light list for surface, leading to incorrect vertex lighting
- Fixed related bug in anti-light-leak code that was causing brush faces to go
  black (bug 694)
- New: _minlight sets _minvertexlight and (new) _mingridlight automatically
- New: _mingridlight key to set minimum grid lighting


2.3.31 (2002-11-21)

- Stitching the edges of lightmaps on patches that wrap around (cyls and cones)
  so the seam is no longer visible
- The -patchmeta switch works better now, the patches are still stored in the
  BSP for collision, but are pre-tesselated into nonplanar meta surfaces for
  more efficient rendering
- Better, more uniform lightmap sample position finding on patch meshes
- Moved q3map_tcMod and q3map_alphaMod processing to the final phase
- New: q3map_skylight AMOUNT ITERATIONS to replace surfacelight on sky surfaces
  for much faster and more uniform sky illumination


2.3.30 (Splash Damage internal release)

- Fixed bug in PicoModel ASE material parsing code
- Fixed a few seam/lightmap precision/projection errors
- Increased MAX_SHADER FILES to 1024 and fixed overrun error when more than that
  number of shaders was listed in shaderlist.txt
- Increased a few compiler maximums for larger maps
- New: -np N switch on BSP phase, works like -shadeangle, in that it forces all
  planar shaders to be nonplanar with the shading angle specified
- New: -nohint switch on BSP phase, omits hint brushes from compile for testing
- New: -debugaxis switch on light mode. Colors lightmaps based on their lightmap
  axis (which direction the lightmap was projected on)
- New: -debugorigin switch on light mode. Colors lightmaps based on the luxel
  origin relative to the raw lightmap's bounding box
- New: -debugcluster switch on light mode. Colors lightmaps based on the pvs
  cluster the luxel falls into
- New: -convert switch to convert BSP to ASE file (experimental)
- New: q3map_lightmapmergable directive to allow terrain to be mapped onto a
  single lightmap page for seamless terrain shadows


2.3.29 (2002-11-03)

- Merged with latest CVS, fixed minor issues with matrix order
- Fixed minor Sys_FPrintf/Sys_Printf substitution typo in Q3Map2
- Expanded debug colors to 12 for debugging surface meshes
- PicoModel: fixed ASE loader to support > 1 texture coordinate per-vertex,
  so more models supported correctly, also loading vertex normals
- PicoModel: md3 shader names are now cleaned. Suffixes (such as .tga or .jpg)
  are stripped, and \ path separators are changed to /
- New: Add :q3map to the end of any shader name, and it will be interpreted as
  the named shader minus :q3map. Example:
  textures/shaderlab/concrete:q3map -> textures/shaderlab/concrete
  One potential use is the -approx feature to collapse lightmapped  surfaces
  into vertexlit surfaces, saving lightmap space/memory
- New: q3map_clipModel -- does what you think it does, sort of. This code ix
  really experimental, and should *only* be used on large models such as terrain
  (not small decorative models). This code will be evolving. Note: the shader's
  surfaceparms are inherited by the magic clip brush, so if you have nonsolid
  in your model's shader that uses q3map_clipModel, then the brush will also
  be nonsolid


2.3.28 (2002-11-01)

- Bug 654 (http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=654):
  Fixed problem where brush faces, drawsurfaces, and surfaceparms weren't living
  together in perfect harmony (terrain surfaceparms now inherited by brushes)
- Nodraw fog works now, albeit when you're underneath, surfaces above don't get
  fogged properly. Could be good for foggy water where you want the above-water
  portions to only be occluded by the water surface
- Bug 656 (http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=656):
  Number of lightgrid points displayed (byte size is currently out of proportion
  due to internal storage format) when Q3Map is called with the -info switch
- Fixed wack surface merging bug where code would attempt to merge triangles not
  adjacent to the current set, causing bad lightmap projections on nonplanar
  surfaces
- Fixed tiny 1-character bug in 2d lightmap texture allocator where adjacent
  luxels were being checked for occlusion rather than the actual source luxel


2.3.27 (2002-10-31) Happy Halloween!

- Fixed minor bug in scriplib bugfix where the last character in a file wasn't
  being read.
- Fixed bug where 0-area or bogus triangles were causing crash in MapRawLightmap
  if they used a shader with a normalmap (thanks ShadowSpawn)
- Fixed bug where lightmaps were getting hosed levelwide on a prerelease version
  of 2.3.27
- Fixed bug where lightmaps were getting knackered on models and certain patches
- Merged latest PicoModel version from seaw0lf, adding support for ASE and WF OBJ
  models (preliminary)
- Increased MAX_MAP_PLANES to 0x40000 (~256k)

Known issues:
- Lightmap projection and surface merging on large ASE models sometimes flakes
- Surface to brush surfaceparm propogation doesn't work properly with large
  metasurfaces: http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=654


2.3.26 (2002-10-27)

- Now using GtkRadiant's libpng and zlib config (linked as DLLs)
- Fixed bug in script parser where repeat calls to GetToken() were causing
  memory corruption
- Fixed SOF2 -rename bug
- When using -game sof2 or -game jk2, the -flares argument is implied
- Added -noflares argument to disable the above behavior
- Added support for flares on entities. Use one of the following keys:
  "_flare" "1" -- use default flare (different for each game)
  "_flareshader" "path/to/flareshader" -- use a specific flare shader
  Note: This only matters in SOF2/JK2 now. Make a light targetted (a spotlight)
  to get it to aim the correct direction, otherwise it defaults to pointing 
  downward. You cannot have omnidirectional flares
- Lightgrid size is automatically increased to accomodate large maps. The
  MAX_MAP_LIGHTGRID error will never happen again


2.3.25 (2002-10-22)

- Go Giants!
- Fixed bug where Q3Map would crash on writing the BSP after the light stage.
  Thanks to Rap7or (#q3map) and loon8 (Q3W forums) [bug 641]
- Fixed bug where surface lights were not affecting the light grid properly.
  Thanks to Shadowspawn and djbob [bug 642]
- NEW: Added -faster support to lightgrid calculations while fixing previous bug
- NEW: Changed it so the BSP file is written to a temp file first, then renamed.
  This should prevent BSP file corruption on crashes during writes


2.3.24 (2002-10-20)

- Fixed numerous outstanding bugs and issues.
- Normal interpolation is now improved. It's slightly slower, but more 'correct'
  in cases where you have 10 triangles in one plane and 1 triangle in another
  meeting up and the 10 triangles were over-affecting the average. Only new
  identical normals are averaged now. This change affects phong shading, meta
  surfaces, and PicoModel
- PicoModel up to version 0.7.6, BSD license, better 3DS model support
- PicoModel library now fixes broken normals on MD3 and 3DS models
- Bumpmapping code is improved. The correct tangent vectors per-triangle are
  now calculated so the bumpmaps are consistent with regards to light direction
- Metasurface merging code optimized. Should be about 100x as fast on complex
  maps or maps using models with high triangle counts
- Vertexlight code tweaked a bit
- Triangle/winding orders now more consistent. Tesselated surfaces will have
  a uniform triangle ordering (thanks RR2DO2)
- NEW: "vertexDeform move" now parsed and surfaces are merged into the
  appropriate  BSP leaves they may enter into (thanks to Bart Vrijkorte)
- NEW: shader command: q3map_alphaMod. Currently takes a single form:
  q3map_alphaMod dotproduct ( NX NY NZ )
  where NX NY NZ are a unit normal (length of 1.0) specifying direction.
  An example use would be snow in a shader's 2nd pass, using alphaFunc or
  blendFunc:
  q3map_alphaMod dotproduct ( 0 0 1 ) // surfaces facing upwards have snow
  (idea contributed by RR2DO2)


2.3.23 (2002-10-18)

- In my haste to release the previous version, I neglected to give credit where
  it was due. Seaw0lf had as much (probably more) to do with the new model
  loading library (PicoModel). Because of his efforts, you can load 3DS models
  and use them in misc_model entities.
- PicoModel model library up to version 0.7. Improved 3DS support, more stable.
- Surface models still not reenabled. Soon. :)
- You can now remap a misc_model's shaders like this:
  Key "_remapNN" "the/model/shader;the/real/shader"
  This works just like TA terrain vertexRemapShader key. You can also supply a
  * glob for the source shader if you want all your model's shaders to use the
  specified shader:
  "_remap" "*;models/mapobjects/tree/bark"


2.3.22 (2002-10-16)

- Moving to sensible Linux-style versioning.
- The misc_model code has been completely rewritten, breaking surface models.
  Surface models will reappear in the next release, once the new model API has
  stablized.
- New: MD3 and 3D Studio 3DS models now natively supported.
- The misc_model "angles" key now supported. Values: "pitch yaw roll" in keeping
  with standard Quake 3 angles order.
- Models scaled with "modelscale_vec" now have proper normal scaling/rotation
  (thanks SPOG).
- Models can now be lightmapped.
- Models can now have > 1000 vertexes per surface.
- For best results for above, add the following to models' shaders:
  q3map_splotchfix
  q3map_nonplanar
- 3DS models' MATERIAL NAMES ARE THE FINAL Q3 SHADER NAMES. YOU HAVE BEEN WARNED.
- Models are generally 13373R. :)


2.3.0-a21 (2002-10-02)

- Fixed a stack of really stupid bugs in the lightgrid code. Should be faster
  and more predictable now.
- SOF2/JK2 lightgrid now compiled. This is the first version of Q3Map2 that can
  compile full, release-worthy SOF2 and JK2 maps.
- SOF2/JK2 damageshader and damagable brush faces should work correctly now.


2.3.0-a20 (2002-09-26)

- SOF2/JK2 worldspawn "fog" (and "_fog") shader key support for levelwide fog
- SOF2/JK2 light "scale" key to scale light brightness
- SOF2/JK2 -rename function for _bsp and _rmg_bsp shader renaming


2.3.0-a19 (2002-09-24)

- Shaders can now be subclassed (Q3Map relavant portions only, such as
  surfaceparms, lighting, texture projection, etc). To subclass an existing
  shader, add "q3map_baseshader X" where X is the name of the base shader.
- Preliminary auto-model distribution over surfaces. You can now have things
  like grass and tree models automatically distributed across your terrain
  or other surfaces. To wit:

  q3map_surfacemodel models/mapobjects/tree2/tree2.md3 64 0.001 0.5 4.0 0 360 1

  q3map_surfacemodel <path to md3> <density in units> <odds of appearing>
      <min scale> <max scale> <min angle> <max angle> <oriented>
  
  The last flag is 1 or 0, and sets whether the model gets fitted to the
  orientation of the surface. Not functional yet. See screenshots page for
  shots of this in action.


2.3.0-a18 (2002-09-21)

- misc_models can now be attached to any brush model entity. Just target the
  brush entity with the misc_model (select model, then entity, hit Ctrl+K)
- q3map_tcMod translate (or shift or offset) <s offset> <t offset>
- q3map_tcMod rotate <degrees> (rotates around origin, not center)
- q3map_tcMod scale <s scale> <t scale>
- Metasurface merging now much, much better. Merges into roughly rectangular or
  square areas wherever possible
- q3map_terrain no longer sets Z-axis lightmap projection. It must be set in
  the terrain layer shaders if you want previous behavior
- Worlspawn _blocksize key now supports 3 elements for setting X Y and Z splits
  independently of each other (use a value of 0 for no splits on that axis)
- Misc bugfixes


2.3.0-a1 through 2.3.0-a17 (2002-07 through 2002-09-20)

- Elite Force support (via -game ef)
- SOF2 and JK2 support (via -game sof2 or -game jk2)
- All new image handling with PNG support
- q3map_lightimage specifies image for radiosity and lighting
- External lightmaps, set using q3map_lightmapsize <width> <height>. Up to
  1024 x 1024 supported.
- q3map_lightmapGamma <value> sets the brightness scale of a lightmap
- q3map_lightmapsampleoffset <distance> to fix glitches in lightmapped terrain
- Tons more features and bugfixes. See the forum threads for details/screenshots
- Two new surfaceparms, "antiportal" and "skip," and associated shaders, for
  allowing the mapper to more cleanly set up visibility data
- Lightmaps will always have square texels now (no more stretching)
- Vertex light improvements
- Light grid improvements
- q3map_lightrgb support for RTCW
- Multiple suns, entity sun support (make a spotlight with a "_sun" "1" key)


1.0 - 2.2.0-b12

See old readme file, as there are some 90-odd versions there.

--------------------------------------------------------------------------------

ABOUT

Q3Map2 is a BSP compiler for Quake 3 engined games. It currently fully supports
Quake 3 Arena/Team Arena, Return to Castle Wolfenstien, Star Trek Elite Force,
and has partial support for Jedi Knight II and Soldier of Fortune 2.

It is designed to replace the Q3Map.exe that comes with QERadiant, GtkRadiant
and GMAX Tempest. However, there are significant enhancements that require
a little twiddling to use, such as faster lighting and enhanced surface
production.

To use, see manual, visit the forums, or join the Q3Map IRC channel.










