Eric Wasylishen
e7b20733d3
qbsp: write .prt files in text mode for TB compatibility
2022-12-09 22:54:56 -07:00
Eric Wasylishen
3e673d2119
qbsp/light: restore TRANS33/TRANS66 faces casting translucent shadows by default
2022-12-06 23:38:43 -07:00
Eric Wasylishen
7ce14a376f
qbsp/light: make liquids not cast shadows by default
...
previously opaque Q2 liquids (e.g. lava, opaque water) were casting shadows / dirt
2022-12-06 17:03:39 -07:00
Jonathan
15b9a78fd1
fix gate being incorrect
...
add surflight grouping
fix minlight on color'd _surface lights
2022-12-05 20:35:44 -05:00
Eric Wasylishen
41de747a9a
qbsp: for "Q2 phong (value set, LIGHT unset) used on a mirrored face." warning, don't set value to 0
...
- setting value to 0 was not a robust way to disable phong
- it could actually have the reverse effect if "value 1" was
being used to change a smoothing group, setting value back to 0
could reintroduce unwanted smoothing
- that hack should be less useful with the phong system improvements
in the previous commits
2022-12-01 01:23:28 -07:00
Eric Wasylishen
f66e4790a4
qbsp/light: add no_phong texinfo flag (currently not used/exposed)
2022-12-01 01:16:17 -07:00
Eric Wasylishen
1065adecc6
qbsp/light: implement _phong_group key, equivalent to Q2 "value" field
2022-12-01 00:25:05 -07:00
Eric Wasylishen
abb92d4b0f
qbsp: fix crash when using -omitdetail and an all-detail bmodel
2022-11-21 01:13:31 -07:00
Eric Wasylishen
04adb17b1b
qbsp: fix -nodetail in q2 mode
2022-11-21 00:10:26 -07:00
Eric Wasylishen
12d82db8b1
qbsp: implement -omitdetail for q2
2022-11-20 23:58:30 -07:00
Eric Wasylishen
efac0c5a31
qbsp: make -noallowupgrade also disallow the extended-limits (int16_t -> uint16_t) subformats
2022-11-20 12:13:06 -07:00
Eric Wasylishen
c9111b2a6c
Merge pull request #337 from TTimo/colorcodes
...
Enable support for ANSI color codes on Windows 10 and newer, without …
2022-11-19 09:10:24 -08:00
Eric Wasylishen
9ab4ea8176
Move SetConsoleMode() call to logging::preinitialize(); helper
...
Don't do ENABLE_VIRTUAL_TERMINAL_INPUT as it breaks arrow key history
navigation in Windows Terminal after running one of the ericw-tools exe's.
2022-11-19 10:05:14 -07:00
Eric Wasylishen
9c3a807391
qbsp: warn and disable q2-style phong if used on a mirrored face
2022-11-17 23:51:00 -07:00
Jonathan
328fa6ade6
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-11-17 13:55:37 -05:00
Jonathan
670347e64e
fix infinite loop if map has uppercase animated textures
2022-11-17 13:55:31 -05:00
ttimo
fb459253fe
Enable support for ANSI color codes on Windows 10 and newer, without needing to enable system wide. Good for CreateProcess CREATE_NEW_CONSOLE situations.
2022-11-15 11:09:19 -06:00
Eric Wasylishen
959fe32e18
portals.cc: add -verbose logging for missing portal sides
2022-11-14 21:49:01 -07:00
Eric Wasylishen
d7acd046c3
light/qbsp: add _surflight_rescale key
2022-11-12 17:07:02 -07:00
Eric Wasylishen
b81b52da5a
qbsp: fix nonsolid bmodels in hul1/2
2022-11-11 15:04:53 -07:00
Eric Wasylishen
93d059058f
testqbsp: fix mirrorinside + bmodels in Q1 mode
2022-11-11 12:33:47 -07:00
Jonathan
8b524cf324
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-11-02 17:59:12 -04:00
Jonathan
b89b71455b
fix condition running in Q2 mode that isn't supported yet
2022-11-02 17:59:07 -04:00
Eric Wasylishen
2bd2515792
all: cleanup unused includes (Clion - detect not directly used)
2022-10-31 21:37:34 -06:00
Eric Wasylishen
0924423c20
light: header -> source move
2022-10-31 21:21:28 -06:00
Eric Wasylishen
35ffc00462
all: add LIGHT_/QBSP_/VIS_ prefixes to epsilons where necessary
2022-10-30 15:08:10 -06:00
Jonathan
5ea786702b
always include NODRAW + LIGHT
2022-10-30 15:29:42 -04:00
Eric Wasylishen
34f32f851c
common, qbsp: more functions moved from header -> source
2022-10-26 23:29:54 -06:00
Eric Wasylishen
ba3befca9b
qbsp: exportobj: re-add bspbrush_t::container version
2022-10-23 19:20:19 -06:00
Eric Wasylishen
9ff0752ad1
testqbsp: clean up clearing of data between tests
2022-10-23 19:20:19 -06:00
Eric Wasylishen
a950d2fcb7
qbsp: add exportobj.hh header
2022-10-23 19:20:19 -06:00
Eric Wasylishen
87ae7d63fa
qbsp: restore a variation on CSGFaces
2022-10-23 19:20:10 -06:00
Eric Wasylishen
501ced4bfe
qbsp: restore func_detail_wall support
2022-10-21 18:33:38 -06:00
Eric Wasylishen
636b376577
squash brushbsp-compilation-speedup branch
...
move function implementations out of headers
2022-10-21 18:00:58 -06:00
Eric Wasylishen
2a9393cc54
bspbrush_t: add contains_point() query
2022-10-05 23:49:34 -06:00
Jonathan
f51ab9b75e
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-09-30 18:30:50 -04:00
Jonathan
09447178f5
error on -onlyents in Q2 mode
2022-09-30 18:30:46 -04:00
Eric Wasylishen
1160352a24
qbsp: make -debugleafvolumes only write out solid leafs
2022-09-28 19:23:57 -06:00
Eric Wasylishen
7a014819f0
qbsp: keep bspbrushes around if -debugbspbrushes is used
2022-09-27 09:55:02 -06:00
Eric Wasylishen
8d5d3233b7
qbsp: call CountLeafs at the end of hull processing
2022-09-19 21:00:36 -06:00
Eric Wasylishen
ed4e4d1327
qbsp: use tree_split_t::PRECISE on second BrushBSP for hulls
2022-09-18 18:05:28 -06:00
Eric Wasylishen
acf334daee
cleanup: rename surfflags_t::is_skip to is_nodraw
...
This is a break to the .json format
2022-09-18 15:47:14 -06:00
Eric Wasylishen
09f0e2a0c5
qbsp: preserve brush side texinfo in collision hulls
...
17k -> 9.8k clipnodes on testmaps\retrojam1_ericw.map
setting the texinfo to 0 was defeating the bsp heuristic, because
texinfo 0 was marked as is_skip, which makes side_t::is_visible()
return false (which makes us not care about splitting those brush sides)
2022-09-17 21:46:02 -06:00
Eric Wasylishen
04df42f8e0
qbsp: CreateSingleHull: remove unnecessary side.visible clearing (now done in CreateBrushWindings)
2022-09-17 21:00:01 -06:00
Eric Wasylishen
cea123f955
qbsp: Brush_LoadEntity: print source brush side stats (visible/invisible)
2022-09-17 20:27:21 -06:00
Eric Wasylishen
8ee39cf874
qbsp: CountLeafs: also measure avg/max bsp height
2022-09-17 19:53:49 -06:00
Eric Wasylishen
9c46699b60
qbsp: experiment with fixing micro-leaks
2022-09-12 02:10:04 -06:00
Eric Wasylishen
b17fc3eab1
qbsp: address missing "faceCopy.tested = false"
2022-09-12 00:56:10 -06:00
Eric Wasylishen
c90c16ee45
qbsp: add -debugleafvolumes
2022-09-12 00:36:33 -06:00
Eric Wasylishen
a926e5c397
qbsp: add -debugbspbrushes
2022-09-12 00:18:32 -06:00
Eric Wasylishen
4567f9b4b9
qbsp: add -debugleak for saving more info about leaks
2022-09-11 23:56:29 -06:00
Eric Wasylishen
ae37a4e667
qbsp: write .leak.prt files in addition to .pts to aid leak debugging
2022-09-11 20:35:51 -06:00
Jonathan
6713fedcbc
allow changing a brushes' lightmap color scale with `lightcolorscale`
2022-09-10 19:04:17 -04:00
Eric Wasylishen
68e2f97fbf
qbsp: sync FindAreas to Quake-2-Tools version
...
fixes area portals in cases when area has no point entities in it
2022-09-10 15:49:17 -06:00
Eric Wasylishen
b19527c3fd
qbsp: don't use brush sides to texture a portal if they're not coplanar
2022-09-08 21:20:49 -06:00
Jonathan
d4dde8350c
always mark leaked maps' nodes/leaves areas
2022-09-06 14:44:44 -04:00
Jonathan
b77dfbc7f9
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-08-31 12:58:56 -04:00
Jonathan
075481a36f
add -nocolor for TB, etc
...
fix crashes on vis and light for invalid options
fix TB and others not receiving output
2022-08-31 12:58:04 -04:00
Eric Wasylishen
88a88882a9
qbsp: initialize 'visible' in CreateBrushWindings
2022-08-28 23:15:49 -06:00
Eric Wasylishen
3856dffc0a
qbsp: compilation speedup: isolate pareto in map.cc
2022-08-28 18:10:01 -06:00
Eric Wasylishen
c8c526ab57
qbsp: fix mist-clip intersection chopping up the faces
...
note it makes the simple_worldspawn_detail clipnodes count
test fail. Clipnode counts are way too high in general so this isn't
a huge issue yet.
2022-08-28 14:13:14 -06:00
Eric Wasylishen
7df6310d32
qbsp: init brush sides to visible
...
improves the quality of the first BSP build
2022-08-27 23:36:58 -06:00
Eric Wasylishen
1ab6cc1e65
qbsp: fix iterator debug assertion in ChopBrushes
...
"cannot decrement begin list iterator"
2022-08-27 14:54:36 -06:00
Jonathan
34a7079b64
reverse the portals for leak lines in inside filling
2022-08-27 03:28:57 -04:00
Jonathan
b305ddaed9
port over the visible = true setting for hint sides
2022-08-25 21:45:33 -04:00
Jonathan
f27f16cebf
fix cherry pick error
2022-08-25 15:48:52 -04:00
Jonathan
5fb0d56da7
maxlight
...
# Conflicts:
# include/common/bspfile.hh
2022-08-24 21:50:11 -04:00
Jonathan
1ce5c5a7b1
combine flood + emit areaportals into a single step, since they won't ever be run not together
...
add stats for edges and faces
2022-08-24 12:02:56 -04:00
Jonathan
e14f42caba
emit edges and faces together instead of in two passes
2022-08-22 13:40:47 -04:00
Jonathan
e7ae158a10
split up BrushBSP and CountLeafs stat prints
2022-08-21 21:54:16 -04:00
Jonathan
4eebbd0bdd
re-introduce qbsp3's "don't use clip brush sides as splitters"
2022-08-21 17:36:19 -04:00
Jonathan
fe41b1ae1b
fix format error for Q1 contents
...
re-introduce chop since it may be a key to the puzzle for hullnums
allow caller to do full fragmentation, add option to force it
fix BrushGE causing liquids, etc to be cut up
2022-08-21 16:16:09 -04:00
Jonathan
2d8827e031
Revert "Q3 didn't need chop, we don't either!"
...
This reverts commit f57ecaf599 .
# Conflicts:
# include/qbsp/brushbsp.hh
2022-08-21 15:04:26 -04:00
Jonathan
282c5ec69f
stat printing adjustments
2022-08-21 15:01:45 -04:00
Jonathan
1aaa513368
collapse certain map face issues into loggable warning stats to lessen maps spamming warnings on things that legacy compilers allow
...
adjust the wording of certain warning messages
don't display face crunching on bmodels/hulls by default
2022-08-20 20:13:27 -04:00
Jonathan
7fad0019c2
set omit properly
2022-08-20 15:09:47 -04:00
Jonathan
7422776f38
move _omitbrushes to the loading phase; this will greatly improve performance of loading a map with a ton of brushes that has most of them omitted.
2022-08-20 09:53:23 -04:00
Jonathan
bfe56b0663
fix the Q1 bevel code for testing later
2022-08-20 08:19:46 -04:00
Jonathan
39bbd643d5
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-08-20 08:14:43 -04:00
Jonathan
8a5ad5bc4d
simplify Brush_LoadEntity a bit by moving some of the contents setting to mapbrush loading; note that this causes a bit of issue with mirror_inside & clipsametype currently because of Q1 contents code. needs adjusting
2022-08-20 08:14:36 -04:00
Eric Wasylishen
08e3254dae
brushbsp: track tree level for debugging
2022-08-20 00:52:24 -06:00
Eric Wasylishen
6b07e0c5f4
brushbsp: return split planes as side_t* for better debuggability
2022-08-20 00:51:52 -06:00
Jonathan
e020cd6be6
comment out the hintskip face removal; this seems to break later processes. qbsp3 doesn't do this..
2022-08-19 16:09:37 -04:00
Jonathan
84870cf366
since tree_t only exists as a type that only allocates heap memory, we don't need to wrap it in a unique_ptr; this also allows the vectors to keep their memory on the next pass, which may improve performance for huge maps
...
removed tree_t parameter from functions that don't need it
pass reference to tree_t instead of ptr
use an enum instead of std::optional<bool> for the ternary value to store split type, since it's more explicit and obvious now what the three values do
2022-08-19 15:15:53 -04:00
Jonathan
69aad26097
move & document bevel boolean
...
don't report invalid winding more than once
ceil the extents, so we don't get weird values like "world extents calculated to 5082.29327318318"
2022-08-19 13:46:37 -04:00
Jonathan
057ae544c4
use references in places where we know it's non-null
2022-08-19 12:11:35 -04:00
Jonathan
39475e3213
use on_epsilon instead of 0.1, to match Q1
2022-08-19 09:44:11 -04:00
Jonathan
0c4888d5d1
remove leftover debug code
2022-08-19 09:42:11 -04:00
Jonathan
9596855c62
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-08-19 07:15:51 -04:00
Jonathan
a5557bc87d
Revert "remove the Q1 bevel stuff"
...
This reverts commit f5f80479a3 .
# Conflicts:
# qbsp/map.cc
2022-08-19 07:15:39 -04:00
Eric Wasylishen
6eab754ca3
qbsp: reset onnode at the beginning of BrushBSP
2022-08-18 22:26:33 -06:00
Jonathan
f57ecaf599
Q3 didn't need chop, we don't either!
2022-08-18 19:47:34 -04:00
Jonathan
424e3ee110
remove unused portal_t::face, unused
...
rename and re-type a few things to use twosided
2022-08-17 09:10:58 -04:00
Jonathan
9e764d8035
document some stuff
...
remove mapface_t::value and mapface_t::flags; they are duplicated by texinfo
add mapface_t::get_texinfo and face_t::get_texinfo so that you can fetch them easier
2022-08-17 07:30:31 -04:00
Jonathan
a2d6b63533
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
...
# Conflicts:
# qbsp/brush.cc
# qbsp/map.cc
2022-08-17 03:50:52 -04:00
Jonathan
f5f80479a3
remove the Q1 bevel stuff
2022-08-17 03:49:42 -04:00
Eric Wasylishen
fe43928802
fix build (unwanted static on TestExpandBrushes)
2022-08-17 01:18:11 -06:00
Eric Wasylishen
a2a7b987bc
revert last commit, q1 code is still producing better results with q1_rocks.map
2022-08-17 01:17:19 -06:00
Eric Wasylishen
688a033288
qbsp: switch back to qbsp3 brush bevels in q1 mode
...
now that the bug in the previous commit is fixed
2022-08-16 23:15:09 -06:00
Eric Wasylishen
6b1720e095
qbsp: fix bug from qbsp3's AddBrushBevels where edge bevels are wrongly rejected
...
fixes bad result in q1_hull_expansion_lip.map
2022-08-16 23:11:43 -06:00
Jonathan
95c728a5b6
fix legacy bevel bug
...
pushing up changes for Q1 hulls just in case we ever want these back
2022-08-16 13:52:30 -04:00
Jonathan
0c90a33f28
enable Q1-style hull expansion; these expanded brushes seem to look better. hopefully we can figure out a way to backport & optimize this code for mapbrush_t, but for now it's only used in Q1 hull expansions
2022-08-16 05:33:38 -04:00
Eric Wasylishen
f62136e04d
qbsp: wip fixing -expand feature
2022-08-16 01:36:09 -06:00
Eric Wasylishen
83cf63e77f
revert using detail on hull1/2 for now as it's breaking tests
2022-08-15 21:17:17 -06:00
Jonathan
92fdff1222
FreeTreePortals call missing
...
allow decompiling hulls (not hooked up to console yet)
2022-08-15 12:23:09 -04:00
Jonathan
027c45d608
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-08-15 06:13:38 -04:00
Jonathan
f7b8f85ece
use an optional<uint8_t> to store hull number, which gets rid of special -1 collision hull number.
...
fixed no-hull always chopping even with chop off
2022-08-15 06:13:30 -04:00
Jonathan
20f5d73a3c
always use inside filling for auto
...
allow details in hulls
use std::optional for an optional-esque value
2022-08-15 04:53:36 -04:00
Jonathan
97665d15a9
fix slight mistype in Brush_LoadEntity
...
make ~settings_container virtual so light_t can be freed properly
reset visible to false on all brush sides
2022-08-15 03:37:38 -04:00
Eric Wasylishen
c2be045f65
qbsp: add WriteDebugTreePortalFile
2022-08-15 00:34:18 -06:00
Eric Wasylishen
854e1f48f5
qbsp: rewrite/fix hull and bmodel logging with new -loghulls and -logbmodels flags
2022-08-14 12:40:42 -06:00
Jonathan
2fe8ef2182
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-08-14 07:33:49 -04:00
Jonathan
781a772d8a
move immediately instead of splicing after construction (probably compiles to the same code but whatever)
...
don't add all of the `result_portals_onnode` one at a time; just directly copy-elision the result.
2022-08-14 07:33:41 -04:00
Eric Wasylishen
e7adc1108a
qbsp: reset more settings between test cases
2022-08-13 20:38:57 -06:00
Jonathan
40b04b9518
use alloca instead of thread-local static
2022-08-13 20:30:51 -04:00
Jonathan
da5b40ce73
since buildportal_t is small and being stored in an std::list (which already stores them in nodes that require allocation & non-moving locations) we don't need to wrap them in unique_ptr; this saves a malloc/free per buildportal_t
2022-08-13 08:24:13 -04:00
Jonathan
2059835a47
use a more optimized version of SplitBrush for CheckPlaneAgainstVolume that doesn't require allocating/freeing a lot of memory
2022-08-13 06:39:30 -04:00
Jonathan
6d66e6d5cf
group together # of clipped faces, to reduce console spam of Q1 maps
...
always allow midplane split for hulls
2022-08-12 21:38:41 -04:00
Eric Wasylishen
06a116670b
winding_t: make non-copyable
2022-08-12 02:06:23 -06:00
Jonathan
ea38e5eeb7
fix missing move
...
fix clip_back causing extra copies
2022-08-12 02:03:00 -04:00
Jonathan
bf162c7a86
allow explicit calling of percent_clock so it can be simplified a bit
...
add more timers in a few spots
by default, display percent timers but don't display elapsed for non-verbose stuff (bmodels); this is so it still shows that it's "working" instead of just showing blank for large maps, give user an idea on progress for certain stuff
merge all "side not found"s into a single line
time `FillOutside`
time `ProcessMapBrushes`
time `Brush_LoadEntity`
2022-08-12 01:30:04 -04:00
Jonathan
4bf2ab338c
allowing logging::percent to handle indeterminate values
...
fix logging::percent getting stomped in multi-threaded operations
add new stats facility to make creating lists of single-use stats easier to manage
fix SplitBrush storing a bunch of extra stats for ChopBrushes
2022-08-11 20:33:12 -04:00
Jonathan
f851fac655
speed up compilation - we don't need to make a copy of node->volume going into SplitBrush now
2022-08-11 02:58:49 -04:00
Jonathan
f17ce185f6
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-08-11 00:27:36 -04:00
Jonathan
0db1e0fc01
add chop control to settings
...
only chop if desired or if hull is -1 or > 0 since those can be chopped without affecting visuals
farewell, shared_lock
fix brush contents issue
2022-08-11 00:27:28 -04:00
Eric Wasylishen
1f3bf6edbc
qbsp: log BrushBSP function name
2022-08-10 21:45:08 -06:00
Jonathan
129dedb268
reset onnode between BrushBSP passes
2022-08-10 23:28:16 -04:00
Jonathan
4b4a1738fd
more partial revert
2022-08-10 23:06:37 -04:00
Jonathan
02e80645e6
partial revert of 097b564cc6
2022-08-10 22:43:42 -04:00
Jonathan
eb7c65362c
fix typo
...
assume non-sourced sides are non-visible
2022-08-10 22:27:40 -04:00
Jonathan
6ab037b03a
implement ChopBrushes
2022-08-10 22:12:23 -04:00
Jonathan
097b564cc6
remove bspbrush_t::original; it is no longer required since mapbrush_t is what the output is being written to
...
use some explicit types (bspbrush_t::ptr for pointer, bspbrush_t::container for container of pointers, and bspbrush_t::make_ptr to create one) so that we can swap it out with different pointers easier later
swap out bspbrush_t::ptr from unique_ptr to shared_ptr; it's not important yet, but it does not increase compilation time and will allow us to pass things to functions like SplitBrush without destroying the original as long as we still have a reference to it somewhere (important for ChopBrushes)
add get_positive_plane to mapface_t
instead of creating a whole copy of the bspbrush_t list, BrushBSP now just creates copies of the shared_ptrs which are then filtered down the tree; the originals are never modified by SplitBrushList and friends, only split into new brushes, so this is safe from what I can tell
portals now directly reference the mapface_ts
original_brushes now directly reference the mapbrush_ts
early exit in `BrushBSP` if brush list is empty (moved to top)
2022-08-10 16:02:16 -04:00
Jonathan
faf9173f10
remove file_order; we can infer this from the pointers now
...
remove unnecessary early microbrush check, use microbrush option value on later one
2022-08-10 02:22:32 -04:00
Jonathan
bca6bda7c3
move `visible` to mapface_t since we only need to store one boolean for it
2022-08-10 01:29:34 -04:00
Jonathan
f8f0e903a2
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-08-10 01:14:59 -04:00
Eric Wasylishen
c9a1d9f096
qbsp: don't store leafnode->volume once the leaf is created
2022-08-09 23:14:20 -06:00
Jonathan
74dcb1454e
remove mapface_t::visible, it's unused
2022-08-10 00:55:10 -04:00
Jonathan
834838ed72
move lmshift to mapface_t
...
store original mapface_t that a face_t was generated from
2022-08-10 00:53:58 -04:00
Jonathan
70f015a36c
move func_areaportal and lmshift from bspbrush_t to mapbrush_t
2022-08-10 00:48:55 -04:00
Jonathan
c0cec4e1ba
Rewrite of 697e3325f8
2022-08-10 00:11:17 -04:00
Jonathan
44eff2d7b1
throw in percent logging for MakeTreePortals
...
when node_t converts to leaf, destroy anything on it by re-initializing it
2022-08-09 20:33:49 -04:00
Jonathan
d6411cef01
remove AssertNoPortals - it's impossible for it to ever hit, and it's kind of expensive (~150ms for 60k portals)
2022-08-09 19:22:42 -04:00
Jonathan
ffeecd550f
clear tree when it's no longer required
2022-08-09 17:02:59 -04:00
Jonathan
697e3325f8
go back to vector for brush lists
2022-08-09 16:00:51 -04:00
Jonathan
b37917c9ca
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-08-09 14:57:46 -04:00
Jonathan
5e6dc9d274
parallelize free
2022-08-09 14:57:42 -04:00
Eric Wasylishen
67a376ad18
qbsp: BuildTree_r: avoid copying node->volume
2022-08-09 00:51:18 -06:00
Eric Wasylishen
f3b9de57c6
build: add tbbmalloc
2022-08-09 00:19:39 -06:00
Eric Wasylishen
30b529b70f
qbsp: keep a pool of node_t's in tree_t in a tbb::concurrent_vector
...
rather than using std::unique_ptr recursively in nodes
2022-08-08 23:43:36 -06:00
Jonathan
189f70ca30
add in-place versions of union and expand to help with inlining
2022-08-08 22:43:10 -04:00
Jonathan
426668701e
clip_back/clip_front to match ChopWindingInPlace
...
simplify constructors for winding heap
use std::vector again for mapentity_t since it's being copied because of the std::list
2022-08-08 21:08:27 -04:00
Jonathan
5b56ecfb28
remove extraneous warnings when they don't matter
2022-08-08 16:01:16 -04:00
Jonathan
b3fbf8841d
allow update_bounds to tell the caller that a brush may have been destroyed
2022-08-08 15:50:23 -04:00
Jonathan
a9b1fa2461
speed up SplitBrush a tiny bit by reserving side count
2022-08-08 01:29:56 -04:00
Jonathan
2abdeb2616
remove Face_Plane since we can directly access the real plane now
...
speed up CreateBrushWindings slightly since we know where the inverted plane is stored
2022-08-08 01:06:50 -04:00
Jonathan
d2cfc0d025
use planenum in SplitBrush and friends
2022-08-08 01:01:49 -04:00
Jonathan
f490878e97
remove old plane lock stuff
...
use spatial hash for planes
2022-08-08 00:58:56 -04:00
Jonathan
f5ef0f90f4
spatial hash using pareto for vertex positions
2022-08-08 00:39:53 -04:00
Jonathan
d9a3abfba7
remove blocksize now that midplane is working
...
don't re-fetch plane being exported since we know its id already
2022-08-07 21:48:22 -04:00
Jonathan
f64dc82ce2
Merge branch 'brushbsp-plane3-bevel' of https://github.com/ericwa/ericw-tools into brushbsp-plane3-bevel
2022-08-07 19:39:35 -04:00
Jonathan
7593834e06
fix map.planes being stomped on export
2022-08-07 19:39:29 -04:00
Jonathan
eb355c1d21
adjust errors
...
remove unnecessary line in debug code
2022-08-07 19:12:37 -04:00
Eric Wasylishen
0357db911c
qbsp: remove unnecessary copy in SplitBrushList
2022-08-07 15:42:43 -06:00
Eric Wasylishen
cf653b5b56
qbsp: MakeNodePortal: don't crash if w is empty
...
for consistency with qbsp3
2022-08-07 01:42:09 -06:00
Jonathan
4ec30e02a2
remove "brushes" from mapentity_t - it is now local to the ProcessEntity process
...
"node_t::original_brushes" is now only used during construction and cleared on Prune; original_mapbrushes is used to track the map brushes on nodes post-construction
calculate and cache contents on mapbrush_t
2022-08-06 19:28:17 -04:00
Jonathan
4c15e6f717
don't bother displaying "processing hull" for q2
2022-08-06 17:42:38 -04:00
Jonathan
335db1c0e4
move map_source_location to parser as parser_source_location since the locations actually come from there rather than from the map; now the parser keeps track of the location, so it's a bit easier to follow
2022-08-05 23:17:15 -04:00
Jonathan
c6fabb290d
clean up stat printing a bit
2022-08-05 09:08:33 -04:00
Eric Wasylishen
c1e52b0d62
qbsp: fix FindPortalSide generating unwanted mirrored inside faces
...
due to the `// see how close the match is` block being uncommented
2022-08-05 01:45:42 -06:00
Jonathan
2a90995c6f
remove const on external_worldspawn so it can be moved
2022-08-04 15:39:57 -04:00
Jonathan
627428756c
track a shared pointer for `map_source_location` instead of memory pointer, so that we can allocate it as we go
...
use it for brushes and faces
2022-08-04 15:37:37 -04:00
Jonathan
9af74ce083
store linenum on mapbrush_t; add new location type, but not using it yet, for later so we can track more complex locations (external/-add maps, etc)
...
add extra sanity checking to polylib
adjust some warnings to be clearer and not indicate that the world will break
add sanity check to update_bounds, and don't add empty windings to the bounds
2022-08-04 12:05:04 -04:00
Jonathan
8d5f837197
fix new degenerate edge warnings
2022-08-03 20:29:33 -04:00
Jonathan
61f5088347
use closer to original code check (doesn't really matter since plane sidedness just inverts the distance, and it's being fabs'd anyways)
2022-08-03 20:20:46 -04:00
Jonathan
c9eab719bc
remove old code
...
add visible on mapface_t although it's unused
2022-08-03 13:26:04 -04:00
Jonathan
ec62a0e8d0
move in the rest of the missing code back into LoadBrush
...
fix bug with c_brushesremoved brushes
move & CreateBrushWindings use where required
store the source face we made a bspbrush_t side from
fix test issue
2022-08-03 12:35:47 -04:00
Jonathan
5da88122a5
fix size_t misuse
2022-08-03 05:14:21 -04:00
Jonathan
98610982c9
export the final dbrush_t right in ExportBrushList_r instead of doing it ahead of time
2022-08-03 05:09:39 -04:00
Jonathan
58d1e5230e
remove hullbrush_t; just directly work via the bspbrush_t since we have the bevels pre-calculated in mapbrush_t
...
track the mapbrush we were created from in bspbrush_t; we use this later for outputting the collision brush for q2bsp. bevels are busted though..
2022-08-03 04:47:50 -04:00
Jonathan
24168c8e40
clang pass
2022-08-02 21:57:33 -04:00
Jonathan
5f35575c02
remove map.faces and map.brushes; now, brushes are stored inline in mapentity_t, and faces are stored inline in mapbrush_t
...
calculate brush bounds (and winding) and add bevels after all of the rest of the map has loaded, so that it has proper world extents
calculate world extents right after the map is loaded
2022-08-02 20:59:08 -04:00
Jonathan
9ca28dff61
bevel
2022-08-02 19:48:17 -04:00
Jonathan
a75f4239e3
node_t planenum
2022-08-02 16:04:48 -04:00
Jonathan
46a643c3f0
face_t using planenum
2022-08-02 15:45:06 -04:00
Jonathan
e57aa36e2e
use stats rather than logging every time these specific instances occur
...
restore the "how close the match is" block
2022-08-02 15:18:53 -04:00
Jonathan
1d729ba573
side_t using planenums
2022-08-02 14:55:38 -04:00
Jonathan
1ad0eb530d
going back to using planenums, but going for the qbsp3-esque system
2022-08-02 14:17:59 -04:00
Jonathan
93655913c0
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
...
# Conflicts:
# include/qbsp/qbsp.hh
2022-08-02 06:24:46 -04:00
Jonathan
8476e2861c
this all matches release now
2022-08-02 04:29:36 -04:00
Eric Wasylishen
e05a2bdf75
qbsp: "-add additional.map" feature
2022-08-01 19:13:10 -06:00
Jonathan
cc9dd986c6
adopt parent node bounds if a leaf is unbounded now too
...
move midsplitbrushes into same group as blocksize
always return a split rather than erroring
list out which method is used of the three
2022-08-01 15:51:57 -04:00
Eric Wasylishen
52dff47a86
fix linux build
2022-08-01 12:47:20 -06:00
Eric Wasylishen
1751733ddc
qbsp: add experimental MidSplit re-implementation, enabled by default
2022-08-01 12:30:04 -06:00
Eric Wasylishen
da4c45d62f
qbsp: fix crash on DM6
2022-08-01 12:13:21 -06:00
Jonathan
755a9e65ca
use std::set instead of vector for original_brushes since we need them implicitly sorted and no dupes
...
parallelize PruneNodes_R and CalcTreeBounds_r
2022-08-01 13:19:50 -04:00
Jonathan
26a18d5cc3
add logging::header/funcheader to easily and consistently print function or "active routine" headers
...
add OOP percent_clock wrapper to make printing percents easier, not used yet
2022-08-01 09:35:21 -04:00
Eric Wasylishen
aac9513417
qbsp: parallelize MakeTreePortals
2022-07-31 21:39:47 -06:00
Jonathan
6a3e971a11
Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp
2022-07-30 06:39:20 -04:00
Jonathan
e60babdb9c
add q3map2-style -blocksize option, using the same algorithm from it. it's optional and disabled by default.
...
pass through the "use mid split" boolean again
remove node_t::side; appeared to be unused in our current code, and needs to be removed anyways to support the other plane splitters
re-introduce ChooseMidPlaneFromList, but comment it out as it currently fails on a lot of BSPs.
2022-07-30 06:39:14 -04:00
Eric Wasylishen
e1b6aba014
portals.cc: log number of tree portals
2022-07-30 00:29:54 -06:00