Commit Graph

659 Commits

Author SHA1 Message Date
Eric Wasylishen 24fc2ffc6a qbsp: refactor plane lump writing 2021-08-23 18:02:05 -06:00
Eric Wasylishen 460428d099 qbsp: refactor texinfo lump writing 2021-08-23 18:02:05 -06:00
Eric Wasylishen ff7f8a1542 qbsp: add -nothreads debug option 2021-08-23 00:12:38 -06:00
Eric Wasylishen 29652b4a7a qbsp: fix some threading issues with solidbsp.cc stats 2021-08-23 00:00:01 -06:00
Eric Wasylishen a53cf8dbbe qbsp: fix some thread safety bugs (mostly affecting stats output) 2021-08-22 23:45:42 -06:00
Eric Wasylishen 7a78e0a5b5 build: remove unused includes, fixes compat with tbb 2021.3.0 2021-07-13 21:47:52 -06:00
Eric Wasylishen c9570260fa gcc 11: pass constant to offsetof 2021-05-30 23:12:17 -06:00
Eric Wasylishen 386faa9315 qbsp: raise MAX_SUPERFACE_POINTS from 512 to 8192 2021-03-23 21:05:52 -06:00
Eric Wasylishen fcf0ebbbfe build: upgrade googletest 2021-02-07 14:42:12 -07:00
Eric Wasylishen b5fcdec19e cleanup: remove "byte" typedef 2021-02-07 14:02:35 -07:00
Eric Wasylishen 1dee7269d6 qbsp: dont't clip self-intersecting func_detail_fence and func_detail_illusionary
Makes foliage easier with _mirrorinside 1
2020-07-21 20:46:18 -06:00
Eric Wasylishen c30a0a46a9 qbsp: fix origin brushes in hexen 2. Drop _no_bbox_rotation_expansion
document origin brushes. Never expand the bbox when origin brushes are in
use.
2020-02-24 01:26:53 -07:00
Eric Wasylishen a91ee8cc7e qbsp: fix heap corruption errors on VS2019. Winding bookkeeping is wrong
now
2020-01-29 22:46:39 -07:00
Eric Wasylishen 0873b0af2c qsbp: code cleanup 2020-01-29 22:45:55 -07:00
Eric Wasylishen d083f0f87f qbsp: parallelize PartitionSurfaces 2020-01-29 21:14:55 -07:00
Eric Wasylishen 1a161b3ad5 qbsp: code cleanup 2020-01-29 20:56:29 -07:00
Eric Wasylishen f74d85c022 Revert "qbsp: parallelize solidbsp"
This reverts commit 2ebfa8d780.
2020-01-29 01:51:31 -07:00
Eric Wasylishen 2ebfa8d780 qbsp: parallelize solidbsp 2020-01-29 01:22:29 -07:00
Eric Wasylishen 1f565d7e7a qbsp: parallelize CSGFaces 2020-01-28 21:18:08 -07:00
Eric Wasylishen d6136c154d light: add _light_alpha func_group key for making faces translucent for
light
2019-12-28 21:48:33 -07:00
Eric Wasylishen a4c1ce6ff6 qbsp, light: support _lightignore on func_detail/group 2019-12-09 00:09:20 -07:00
Eric Wasylishen 5e74b4d0bb qbsp: fix external maps with no worldspawn brushes
Thanks to ZungryWare for the report
2019-11-29 21:03:54 -07:00
Eric Wasylishen cefd20c8da qbsp: fixes for -wrbrushes + rotation 2019-11-24 17:23:41 -07:00
Eric Wasylishen d7d797b898 qbsp: restore bounds expansion for rotators.
Add "_no_bbox_rotation_expansion" key for opting-out of the bounds expansion

Fixes #271
2019-10-27 23:02:05 -06:00
Eric Wasylishen 79d3aa99de qbsp: fix relative paths for .wad files
Fixes #279
2019-10-27 19:03:45 -06:00
Eric Wasylishen 4ec22ee3f9 qbsp: more logging of face line numbers for errors/warnings 2019-10-13 23:10:42 -06:00
Eric Wasylishen 1577981960 qbsp: fix clip brushes export with -wrbrushes, and various other
fixes for -wrbrushes
2019-10-03 19:59:56 -06:00
Eric Wasylishen 209d481b4c qbsp: attempted fix of -wrbrushes (ProcessEntity behaviour was changed
a while ago and copy/pasted code in BSPX_CreateBrushList wasn't updated)
2019-10-03 00:13:00 -06:00
Eric Wasylishen 04601656ff qbsp: Add support for _minlight_excludeN where N is in 2..9 2019-08-15 19:45:51 -06:00
Shpoike 89365949bc Squashed commit of the following:
commit 8ca122916d
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date:   Thu Jul 4 20:54:23 2019 -0600

    fix linker error (radlights is in 2 .cpp files)

commit 8f06fc9c8d
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date:   Thu Jul 4 20:53:57 2019 -0600

    add clarification comment

commit 038a553fb0
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date:   Thu Jul 4 20:30:27 2019 -0600

    fix tests compilation

commit 02e94ec507
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date:   Thu Jul 4 19:59:25 2019 -0600

    hlbsp: use q_snprintf

commit 669a5a7911
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date:   Thu Jul 4 19:56:21 2019 -0600

    Reformat

commit 6653760982
Merge: 347a455 ac3553c
Author: Eric Wasylishen <ewasylishen@gmail.com>
Date:   Thu Jul 4 19:28:06 2019 -0600

    Merge remote-tracking branch 'origin/master' into hlbsp

    # Conflicts:
    #	include/qbsp/qbsp.hh

commit 347a455102
Author: Shpoike <Shpoike@users.noreply.github.com>
Date:   Thu Mar 28 02:18:16 2019 +0000

    Misc HLBSP tweaks

    Added support for multiple -wadpath args.
    Added -xwadpath (for eg valve/*.wad to avoid bloat/license issues).
    Reworked hint brushes - the non-hint surfaces can use any name, just so long as they're not 'hint', for compat with zhlt.
    Support 'bevel' and 'null' textures for compat with zhlt.

commit 7fb22c7367
Author: Shpoike <Shpoike@users.noreply.github.com>
Date:   Thu Mar 28 01:59:42 2019 +0000

    Support for halflife-style .rad surface lights (probably too bright, but the basics work).

commit 2da504fb62
Author: Shpoike <Shpoike@users.noreply.github.com>
Date:   Thu Mar 28 01:56:27 2019 +0000

    Add minus-prefixed textures for halflife's randomised-textures feature, instead of getting crash-to-desktop errors when the map is loaded.

commit 6366199bdb
Author: Shpoike <Shpoike@users.noreply.github.com>
Date:   Thu Mar 21 04:51:24 2019 +0000

    First attempt at hlbsp output.
2019-07-04 21:08:17 -06:00
Eric Wasylishen ac3553cb50 brush.cc: temporary hotfix, disable bounding box tweak when rotate_offset
is set. Breaks usage of origin brush with func_train
2019-06-29 18:27:05 -06:00
Eric Wasylishen b343b9504a qbsp, light: support _minlight_exclude on func_group, detail, etc. 2019-04-05 21:14:39 -06:00
Eric Wasylishen 83d9071269 qbsp: fix tjuncs on bmodels
Fixes #232
2019-03-25 01:31:43 -06:00
Eric Wasylishen ad65449cef qbsp: add "-midsplitsurffraction n" option as an alt. to -maxnodesize
switch to midsplit if the node contains more than this fraction of the
model's total surfaces. Try 0.15 to 0.5. Works better than
maxNodeSize for maps with a 3D skybox (e.g. +-128K unit maps)
2019-02-11 00:52:38 -07:00
Eric Wasylishen 16ad2b077a qbsp: -objexport debugging: Add another point where an .obj is dumped 2019-01-26 22:22:07 -07:00
Eric Wasylishen 2df839cfc2 light: Add "_bounce" "-1" to disable bouncing for a func_detail/etc. 2019-01-22 00:02:46 -07:00
Eric Wasylishen 0ac4909396 qbsp: change outside.cc to not fill leafs that have faces that are
straddling in and out of the void.

Previously, we were just deleting these faces, leaving HOMs.
Keeping them but filling the leaf in as solid doesn't work either, because
if they are the only faces left in the leaf it messes up the content type
determination later.

Fixes test_tjunc01.map test case from Qmaster.
2019-01-19 21:56:05 -07:00
Eric Wasylishen 4a360989f3 qbsp: add -worldextent option for compiling large maps, default 65536 2018-12-24 01:53:08 -07:00
Eric Wasylishen fc72bbb935 qbsp: fix _mirrorinside on bmodels so that they have CONTENTS_SOLID
as expected
2018-08-28 21:23:08 -06:00
Eric Wasylishen 8164506d30 qbsp: read valve 220 with q2/q3 flags
Fixes #212
2018-04-12 15:07:07 -06:00
Eric Wasylishen 02e66edd5b qbsp: make "too many edges" have a clear error message, instead of
an assertion failure
2018-04-05 22:18:28 -06:00
Eric Wasylishen 4491598bdb qbsp: fix qbsp crash when worldspawn has 0 brushes 2018-03-23 14:48:20 -06:00
Eric Wasylishen 30c19ab9da qbsp: support reading Q2/Q3 detail flag 2018-03-18 19:50:35 -06:00
Eric Wasylishen f92b48a8cb qbsp: experimental _noclipfaces key 2018-03-13 12:23:41 -06:00
Eric Wasylishen c9b32214c1 qbsp: fix "_mirrorinside" on bmodels.
NOTE: This turns the contents of bmodels to CONTENTS_EMPTY if
"_mirrorinside" is used. This is not ideal (e.g. if used on a func_door,
bullets will go through the door but it blocks the player), but it's
usable for func_illusionary at least.
2018-03-12 21:15:31 -06:00
Eric Wasylishen 94dbd0a705 qbsp: _phong_angle_concave support 2018-01-30 01:20:38 -07:00
Eric Wasylishen 3b3d753cf4 qbsp: make -omitdetail affect all detail types 2018-01-30 01:10:25 -07:00
Eric Wasylishen 95e9fdcd21 qbsp: tidy up "repairing" warning message 2018-01-28 02:03:00 -07:00
Eric Wasylishen 84bf594892 qbsp: heal invalid texture projections 2018-01-28 01:55:09 -07:00
Eric Wasylishen 23b25a0a0e qbsp: add failing tests for healing invalid texture projections 2018-01-28 01:54:58 -07:00
Eric Wasylishen 57510eab0e qbsp: remove hint/skip texinfo clearing hack.
Fixes https://github.com/ericwa/ericw-tools/issues/196

This should be by stripping unreferenced texinfo at the end of compiling
2018-01-06 01:29:31 -07:00
Eric Wasylishen 84b493d7d2 qbsp: update manual 2017-10-25 14:07:25 -07:00
Eric Wasylishen ddf29d4104 qbsp: fix not being able to see between leafs within a func_illusionary_visblocker 2017-10-25 12:04:52 -07:00
Eric Wasylishen 2ea0076160 qbsp: experimental func_illusionary_visblocker 2017-10-24 22:17:10 -07:00
Eric Wasylishen b85d627c8f change branding to ericw-tools 2017-10-19 16:35:37 -06:00
Eric Wasylishen 7a7d3b843c qbsp: add bsp2 check if int16_t nodes/leafs are exceeded 2017-10-19 16:19:47 -06:00
Eric Wasylishen bcf3f2e3e3 qbsp: add _external_map_scale key for misc_external_map 2017-10-01 12:39:15 -06:00
Eric Wasylishen d4f3e5de65 qbsp: partially revert "csg: mirror faces, even for solid, to help leaf content assignment" and turn it into a flag
(comit a910dd861a)
fixes https://github.com/ericwa/tyrutils-ericw/issues/175 (swtest2.map)
2017-09-16 11:18:30 -06:00
Eric Wasylishen 1ac4bf5a6b qbsp: hack to fix slightly off grid overlapping brushes having missing the overlapping parts deleted after CSG
fixes https://github.com/ericwa/tyrutils-ericw/issues/174
2017-09-15 21:08:04 -06:00
Eric Wasylishen d195c0bd2a qbsp: add _mirrorinside key for func_water, etc. 2017-08-27 12:14:09 -06:00
Eric Wasylishen a910dd861a qbsp: csg: mirror faces, even for solid, to help leaf content assignment
Mark them as skip so they don't get saved.

This fixes csg_fail.map (in combination with -epsilon 0.1)
2017-07-24 23:12:37 -06:00
Eric Wasylishen 38a7d6a944 qbsp: expose PointInLeaf as debug helper 2017-07-24 22:57:43 -06:00
Eric Wasylishen a936686fe5 qbsp: allow empty leak lines for pathological maps (single brush) 2017-07-24 18:07:40 -06:00
Eric Wasylishen c300170752 qbsp: disable q3map stuff 2017-07-24 14:13:57 -06:00
Eric Wasylishen 9377663e3c qbsp: fix rejecting valid brushes in SplitBrush 2017-07-23 16:29:00 -06:00
Eric Wasylishen 51fa4dc056 qbsp: expose WriteBspBrushMap 2017-07-23 14:20:35 -06:00
Eric Wasylishen 8bfe9b4602 qbsp: exportobj.cc: helpers for exporting face/brush vectors 2017-07-23 14:15:10 -06:00
Eric Wasylishen 3efc9c1f3e qbsp: make Contents_Priority public 2017-07-23 14:08:34 -06:00
Eric Wasylishen 39aa7dcd0f qbsp: add FilterStructuralBrushesIntoTree 2017-07-23 13:13:09 -06:00
Eric Wasylishen b38c04b372 qbsp: clean up brush memory leaks 2017-07-23 13:12:14 -06:00
Eric Wasylishen 7c49d499c2 qbsp: tidy FreeBrushes 2017-07-23 02:48:58 -06:00
Eric Wasylishen 2ee9017879 qbsp: test brush contents are propogated by SplitBrush 2017-07-23 01:55:53 -06:00
Eric Wasylishen 120dfda49a qbsp: small test refactor 2017-07-23 01:51:46 -06:00
Eric Wasylishen 578d24951d qbsp: fix memory corruption in SplitBrush 2017-07-23 01:51:31 -06:00
Eric Wasylishen 9629134612 qbsp: fix some issues with SplitBrush 2017-07-23 01:32:04 -06:00
Eric Wasylishen 3bb22ef22b qbsp: add SplitBrush from q3map (not yet tested) 2017-07-23 00:42:09 -06:00
Eric Wasylishen d246d2a798 qbsp: add FlipWinding 2017-07-22 23:53:33 -06:00
Eric Wasylishen 1859a1c0b5 qbsp: make DivideWinding saner + const 2017-07-22 21:29:04 -06:00
Eric Wasylishen 11a7e7bc88 qbsp: refactor BrushMostlyOnSide to take separate normal/dist 2017-07-22 19:36:55 -06:00
Eric Wasylishen b8dec3ed2b qbsp: add ChopWindingInPlace from q3map 2017-07-22 19:30:51 -06:00
Eric Wasylishen 3c7ea88c37 qbsp: add CopyBrush 2017-07-22 18:20:03 -06:00
Eric Wasylishen 5158b6d296 qbsp: add BoundBrush (from q3map) 2017-07-22 17:09:03 -06:00
Eric Wasylishen 7ef5ad162d qbsp: add BrushMostlyOnSide (from q3map) 2017-07-22 17:05:09 -06:00
Eric Wasylishen 9868c7f965 qbsp: Add BrushVolume 2017-07-22 16:33:26 -06:00
Eric Wasylishen 7d1dc71069 qbsp: add Face_Plane 2017-07-22 16:31:26 -06:00
Eric Wasylishen bca6a55662 qbsp winding: add WindingArea 2017-07-22 16:31:21 -06:00
Eric Wasylishen 0ebbdac5f9 qbsp: refactor FindPlane 2017-07-17 21:24:32 -06:00
Eric Wasylishen a34f3df88d qbsp: surfaces.cc: use std::map for vertex hashing 2017-07-17 16:35:11 -06:00
Eric Wasylishen 3e9e388545 qbsp: surfaces.cc: refactor vertex hashing 2017-07-17 16:06:03 -06:00
Eric Wasylishen fc7a085893 qbsp: surfaces.cc: rewrite edge hash to use std::map
ad_test1.map compiles to a binary-identical .bsp
2017-07-17 16:05:46 -06:00
Eric Wasylishen 8b9f5ea40a qbsp: fix handling of duplicate planes
fixes spurious leak in e1m4.map
2017-07-15 13:51:26 -06:00
Eric Wasylishen ceff3bba82 qbsp: fix const warning 2017-07-15 12:37:15 -06:00
Eric Wasylishen 1a15d5f0e9 qbsp: add -leaktest option (from q2) 2017-07-15 12:23:11 -06:00
Eric Wasylishen 0263f95e59 qbsp: add -expand flag from q3map for testing hull1 expansion 2017-07-11 17:54:28 -06:00
Eric Wasylishen 2710f9b1a1 qbsp: remove/comment dead code 2017-07-11 00:07:32 -06:00
Eric Wasylishen be2799578f qbsp: remove dead code (extrafaces) 2017-07-11 00:05:57 -06:00
Eric Wasylishen 53743ddf0e qbsp: SubdivideFace: revert change to splitting logic from 1630b87
Fixes #160
2017-07-10 21:46:14 -06:00
Eric Wasylishen f54abd9a2c qbsp: WriteBSPFile: print the bsp file name to the log 2017-07-10 21:26:06 -06:00
Eric Wasylishen 240d65f788 qbsp: outside.cc rewrite
- no more recursively traversing portals, as this can overflow the stack
- better outside filling and .pts file generation, inspired by q3map
  (do a bfs from all leafs with entities, storing the number of steps
   from an occupied leaf in each leaf. Then do a dfs from the outside node
   to the first entity we hit.)
- .por file writing was dropped for now, can be re-added later
2017-07-10 12:46:22 -06:00
Eric Wasylishen bb3e296a0d qbsp: FillOutside: count portals yourself 2017-07-09 01:06:49 -06:00