Commit Graph

106 Commits

Author SHA1 Message Date
jimmy andrews
e10d52f492 Specify the ConvexDecomposition3 thicken hull after failure parameter in world space, not local space, to match other parameters on that class
#rb rinat.abdrashitov

[CL 33003082 by jimmy andrews in ue5-main branch]
2024-04-16 11:53:12 -04:00
jimmy andrews
e56817e2be convex decomposition robustness improvements -- pick good offset directions for degenerate cases where normals are not available, and do non-solid plane cuts for parts where the plane cut gave unreliable results (created holes)
#rb David.Hill, tyson.brochu

[CL 32842681 by jimmy andrews in ue5-main branch]
2024-04-09 18:27:14 -04:00
jimmy andrews
70c35cc2a7 add navigable convex decomposition method to geometry script collision functions
+ expand preprocessing options for convex decomposition algorithm
#rb David.Hill

[CL 32482079 by jimmy andrews in ue5-main branch]
2024-03-25 16:17:07 -04:00
jimmy andrews
5e5d976da3 fix unreachable implicit "++iterator" in cases where a for-loop was used to just grab the first element of a set or map
#rb lonnie.li
#lockdown michael.balzer

[CL 31880424 by jimmy andrews in ue5-main branch]
2024-02-28 14:51:06 -05:00
jimmy andrews
a645b04994 make convex decomposition negative space default behavior more consistent to the previous version
#rb jimmy.andrews

[CL 31638046 by jimmy andrews in ue5-main branch]
2024-02-19 22:48:36 -05:00
steve robb
f8d47335a4 Replaced RemoveAt(N, 1, EAllowShrinking::*) with RemoveAt(N, EAllowShrinking::*).
[CL 31626444 by steve robb in ue5-main branch]
2024-02-19 16:51:58 -05:00
jimmy andrews
4701412a75 move the convex decomposition algorithm's MergeBest function arguments into a struct, and add:
a callback to report merges,
 a callback to prevent merges, and
 a bool to control whether the error tolerance allows merges below the target number of parts requested.
#rb rinat.abdrashitov

[CL 31487645 by jimmy andrews in ue5-main branch]
2024-02-14 14:34:19 -05:00
jimmy andrews
841991ad26 Add static helper to convex hull class to compute the convex hull volume for an array of points
#rb rinat.abdrashitov

[CL 31487030 by jimmy andrews in ue5-main branch]
2024-02-14 14:22:44 -05:00
jimmy andrews
f255aca291 add more options to the negative space search of convex decomp, including better version of VoxelSearch
+ add function to set usually-better settings than the defaults (but don't change the defaults, to avoid changing the behavior of any existing usage)
#rb rinat.abdrashitov

[CL 31457317 by jimmy andrews in ue5-main branch]
2024-02-13 20:28:50 -05:00
jimmy andrews
6b33d2a738 robustness improvements for convex decomposition: continue splitting other parts after one part fails to split, add a min part size to stop splitting too-small parts, add thickening for degenerate cases where convex hull could not be constructed, add offset on-tri planes by plane tolerance to generate fewer very thin parts
+ support adding custom negative space, and parallelize negative space search
#rb rinat.abdrashitov


#changelist validated
#virtualized

[CL 31245012 by jimmy andrews in ue5-main branch]
2024-02-06 21:30:32 -05:00
jimmy andrews
653c0036aa Fix convex hull vs sphere test for convex decomposition, and track/exclude degenerate planes from the test
#rb rinat.abdrashitov

[CL 31076102 by jimmy andrews in ue5-main branch]
2024-01-31 19:56:33 -05:00
jimmy andrews
ddcc86e070 fix bug in convex decomposition proximity graph updates on split
#rb David.Hill

[CL 31032909 by jimmy andrews in ue5-main branch]
2024-01-30 20:00:30 -05:00
jimmy andrews
774c5c2400 fix convex hull failure case when tolerances are used to discard points, and the best point has a reported plane distance less than zero due to floating point error (but the exact test has reported that the point is on the correct side of the plane)
#rb David.Hill

[CL 30936782 by jimmy andrews in ue5-main branch]
2024-01-26 14:59:41 -05:00
steve robb
f029468598 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30729174 by steve robb in ue5-main branch]
2024-01-19 16:41:35 -05:00
jimmy andrews
1fb821235a make negative space sampling default to 'deterministic' mode, and make that mode sort the vertices after marching cubes has run rather than disabling parallelism during marching cubes.
also always run the point prioritization step, and don't early-stop it if we may take more samples than the minimum requested.
#rb rinat.abdrashitov

[CL 30169822 by jimmy andrews in ue5-main branch]
2023-12-06 17:30:20 -05:00
jimmy andrews
38de04a6ad remove redundant init of negative space mapping in convex decomposition on Compute(), since it is already initialized by the function which adds it
#rb tyson.brochu

[CL 30166840 by jimmy andrews in ue5-main branch]
2023-12-06 15:51:04 -05:00
jimmy andrews
bca502e8cd Fix convex decomposition's min sample spacing test to run after finding the final sample location, rather than running on the initial estimate location, so it will function as intended when the samples are placed far from their initial estimate locations.
#rb rinat.abdrashitov

[CL 30053523 by jimmy andrews in ue5-main branch]
2023-12-01 16:17:39 -05:00
marc audy
763a611985 Fix C4072 warnings
#rnx

[CL 29852844 by marc audy in ue5-main branch]
2023-11-20 17:26:53 -05:00
jimmy andrews
f55e6088b8 Add support for negative space protection in the 'splitting' part of the convex decomposition algorithm + associated initialization / support functions
#rb matija.kecman

[CL 29498286 by jimmy andrews in ue5-main branch]
2023-11-06 15:40:07 -05:00
jimmy andrews
78d8ab4884 deprecate convex decomposition's negative space compute's assumption of default-flipped triangle orientations by making the triangle orientation an explicit function parameter (rather than a settings struct member) and deprecating the old function w/out this parameter.
#rb matija.kecman

[CL 29321127 by jimmy andrews in ue5-main branch]
2023-11-01 12:20:40 -04:00
jimmy andrews
609a443699 Fix performance and memory issues when merging a large number of collision shapes:
- More aggressively prune the cache of computed merge shapes after it reaches a threshold size
 - By default compute a proximity graph based on actual proximity, not the full n^2 possible connections
 - After finding the best of a number of possilbe merges, optionally only look for local improvements to the current best rather than doing a full search for the absolute best connection.

#rb david.hill, shaun.kime

[CL 29158488 by jimmy andrews in ue5-main branch]
2023-10-26 20:24:56 -04:00
jimmy andrews
dcdd199f26 expose out convex decomposition negative space's voxel search 'min voxels per dimension' parameter to the setting structs, rather than hardcoding it as 128
#rb tyson.brochu

[CL 28877619 by jimmy andrews in ue5-main branch]
2023-10-18 11:04:33 -04:00
jimmy andrews
f0d473d3d5 expose min part thickness out to geometry script collision functions + make min part thickness apply with compact shapes (just skipping the inapplicable cutting step)
#rb shaun.kime

[CL 28829793 by jimmy andrews in ue5-main branch]
2023-10-16 23:03:12 -04:00
jimmy andrews
f3260123e2 add outer-only negative space sampling via continuation marching cubes
#rb tyson.brochu, rinat.abdrashitov

[CL 28771065 by jimmy andrews in ue5-main branch]
2023-10-13 16:45:04 -04:00
jimmy andrews
64873765ab fix crash in convex hull simplification due to not tracking polygon group IDs correctly
#rb rinat.abdrashitov

[CL 28552567 by jimmy andrews in ue5-main branch]
2023-10-06 15:11:54 -04:00