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
Jonathan
33a23a99c2
Revert "tests: update aabb_contains to account for new behaviour"
...
This reverts commit ef613a69a9 .
2022-08-05 07:01:20 -04:00
Jonathan
c611153b78
Merge branch 'brushbsp-plane3-bevel' of https://github.com/ericwa/ericw-tools into brushbsp-plane3-bevel
2022-08-05 06:59:45 -04:00
Jonathan
a1faa97f3f
fix aabb::contains
2022-08-05 06:58:29 -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
Eric Wasylishen
84cbd48777
test_qbsp: use "-tjunc rotate" on a face count sensitive test
2022-08-04 21:38:12 -06:00
Eric Wasylishen
ef613a69a9
tests: update aabb_contains to account for new behaviour
2022-08-04 21:34:11 -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
e14c2772a6
add ability for winding storages to reserve memory (for clip mainly, so it doesn't need to allocate on each addition; we know the winding will have at least the input number of points)
2022-08-02 18:10:20 -04:00
Jonathan
4c6d952841
plane hashing
2022-08-02 17:44:14 -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
dd287f30d4
Merge branch 'brushbsp-midsplit' into brushbsp
2022-08-02 06:09:28 -04:00
Jonathan
53adb9fed5
split winding_base_t into two types, so that we can switch out the backing storage
...
default winding_t for the main polylib to use heap-based, exact-memory-usage-only, winding
2022-08-02 06:09:20 -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
Eric Wasylishen
f665cd5cb6
testqbsp: rename our copy of base1.map to base1-test.map
...
for easier loading in game in Q2
2022-07-31 21:29:25 -06:00
Jonathan
d1c3b56e1d
don't jitter sun entities
2022-07-31 09:15:51 -04: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
Jonathan
360daea172
fix test failure from map parsing
2022-07-29 22:41:57 -04:00
Jonathan
d8fd13d481
use <= gating for brightness for surface and bounce lighting, since these can often be very small values (provides a moderate speed increase as well, counter-balancing the next change)
...
bounce lighting generates a grid of bounces rather than a single light, improving lighting in conditions with larger faces or where the midpoint is blocked by other geometry
2022-07-29 22:26:07 -04:00
Jonathan
91124d296f
fix mismatch in surface lighting cull calculation
2022-07-29 21:29:04 -04:00