Commit Graph

55 Commits

Author SHA1 Message Date
jimmy andrews
ced12de0f4 Add negative space protection to the geometry script collision merging algorithm
#rb david.hill

[CL 28234875 by jimmy andrews in ue5-main branch]
2023-09-26 12:59:58 -04:00
jimmy andrews
2d32fa2e5f Add a MergeSimpleCollisionShapes function to Geometry Script, which can reduce the number of simple collision shapes by merging them. Currently works via convex hull merging, so merged shapes will always be convex hulls, but shapes that are not merged will be left with their original type.
Add a 'source ID' concept to the convex part decomposition, to enable tracking of which hulls were not merged to any other hulls when running the convex hull merging algorithm.

#rb rinat.abdrashitov

[CL 28106868 by jimmy andrews in ue5-main branch]
2023-09-21 17:12:08 -04:00
jimmy andrews
f12520cfcf Add a new k-DOP fitting algorithm to GeometryCore and swap it in to GeomFitUtils so it will be used by the Static Mesh Editor.
#rb rinat.abdrashitov
#rb richard.talbotwatkin
#jira UE-194152

[CL 28048380 by jimmy andrews in ue5-main branch]
2023-09-20 14:46:30 -04:00
jimmy andrews
ce33cacf43 Move TConvexHull3 simplification-related settings to a separate struct, to make it easier to manage these settings (inside the convex hull code and also for other classes that call into it, like convex decomposition)
Note: These settings were all introduced post-5.3, so moving them should not require deprecation

#rb rinat.abdrashitov

[CL 27715888 by jimmy andrews in ue5-main branch]
2023-09-08 12:43:50 -04:00
Jimmy Andrews
7065fe745d Add support for direct construction of a simplified convex hull in GeometryCore's ConvexHull3 via:
1. A MaxHullVertices setting. If positive, the convex hull algorithm will greedily add vertices to best expand the hull, generating a simplified hull if the exact hull would exceed the specified budget.
2. SkipAtHullDistanceAbsolute/SkipAtHullDistanceAsFraction settings. If positive, the convex hull algorithm will ignore points that are closer than the threshold value, resulting in a simpler hull.

Also stop relying on the Orient3 exact predicate to find the farthest hull points (regardless of whether PointsBudget is specified) both so that the PointsBudget and SkipAtHullDistance settings can accurately compare distances from different triangles and also to fix an issue where the Orient3 magnitude was discarded when requesting a single-precision Orient3 value.

Update convex hull unit test to also test these new settings.

Also adds a small optimization the reduces the number of duplicate points considered.

#rb rinat.abdrashitov
#jira none

[CL 27604026 by Jimmy Andrews in ue5-main branch]
2023-09-05 13:49:30 -04:00
jimmy andrews
b8887e57ed Add a new polygon-based simplification method to ConvexHull3, and a tolerance for the initial hull build, to support use cases where we do not need an exact hull and can prioritize using fewer plane + avoiding near-degenerate planes in the output. This simplification is especially effective for cases where a large number of near-coplanar faces would exist in the exact-hull output.
#rb rinat.abdrashitov

[CL 26683043 by jimmy andrews in ue5-main branch]
2023-07-28 15:02:49 -04:00
jimmy andrews
874bb70ad5 Add option to drive adding more negative space samples when the current samples don't cover the space identified by Voxel Search (and are farther apart than the target Sample Spacing), to make the negative space coverage algorithm better able to protect space in challenging cases where a smaller fixed number of samples would fail.
#rb rinat.abdrashitov

[CL 26314665 by jimmy andrews in ue5-main branch]
2023-06-29 11:28:58 -04:00
jimmy andrews
ee45f975f2 add a 'per bone' negative space compute option to the merge hulls dataflow node, which can more reasonably target negative space for small leaf bones
#rb rinat.abdrashitov

[CL 26251571 by jimmy andrews in ue5-main branch]
2023-06-26 22:35:03 -04:00
jimmy andrews
f70dd3a744 Add a convex decomposition sphere covering mode that uses vox-solidify/difference/offset operations to better place the negative space sphere sampling
[CL 26154533 by jimmy andrews in ue5-main branch]
2023-06-21 13:34:37 -04:00
henrik karlsson
5db685f97d [Engine]
* Moved dllexport from type to methods/staticvar in all Engine runtime code. This improves compile times, memory and performance in dll builds

[CL 26082269 by henrik karlsson in ue5-main branch]
2023-06-17 18:13:06 -04:00
henrik karlsson
b8482b44dd [Engine]
* Changed type dllexport to method/staticvar dll export. Various changes for code that upgrade script get wrong

[CL 26082043 by henrik karlsson in ue5-main branch]
2023-06-17 16:57:38 -04:00
jimmy andrews
7ca84cf8c5 Add a new hull merge node for reducing the hulls used on convex decompositions
+ minor cleanup/fixes of hull merging algorithms
(v2 with compile/link fixes)

[CL 25964124 by jimmy andrews in ue5-main branch]
2023-06-13 17:18:13 -04:00
jimmy andrews
98cc9bc6be [Backout] - CL25959112
[FYI] Jimmy.Andrews
Original CL Desc
-----------------------------------------------------------------
Add a new hull merge node for reducing the hulls used on convex decompositions
+ minor cleanup/fixes of hull merging algorithms

[CL 25960651 by jimmy andrews in ue5-main branch]
2023-06-13 15:37:18 -04:00
jimmy andrews
59daad6f82 Add a new hull merge node for reducing the hulls used on convex decompositions
+ minor cleanup/fixes of hull merging algorithms

[CL 25959212 by jimmy andrews in ue5-main branch]
2023-06-13 14:52:04 -04:00
jimmy andrews
a88d570315 add convex decomposition options to leaf node convex hull dataflow node
+ add a 'max hulls' option to convex decomposition, which functions like 'target num hulls' but can still cap the number of hulls when an error tolerance is specified (target num hulls is ignored when error tolerance is set)

#rb rinat.abdrashitov
#preflight 646d1033f85111e06c3a8fb7

[CL 25593250 by jimmy andrews in ue5-main branch]
2023-05-23 18:33:43 -04:00
jimmy andrews
ebda1b4a81 add FSphereCover as an optional volume representation to protect negative space in convex decomposition's merge algorithm
+ expose this to dataflow
+ make cluster-convex-from-children algorithm use depth-first node ordering, to get more consistent results

#rb cedric.caillaud
#preflight 645e73ccaa3c584c0bb0b17a

[CL 25458948 by jimmy andrews in ue5-main branch]
2023-05-12 16:15:24 -04:00
jimmy andrews
651caca424 Fix up error handling for Geometry Script polygon triangulation function
+ Add a generalized winding triangulation mode for Delaunay2 as a useful fallback for inputs where some edges failed to insert + make the blueprint general polygon triangulation use it as a fallback

#rb rinat.abdrashitov
#preflight 64462661641e2c3cb469409b

[CL 25175533 by jimmy andrews in ue5-main branch]
2023-04-24 23:29:54 -04:00
jimmy andrews
94621fd27d Expose Delaunay Triangulation to Geometry Script
#rb ryan.schmidt, rinat.abdrashitov, matija.kecman
#preflight 64064a28c13b7130d2fd04da

[CL 24531512 by jimmy andrews in ue5-main branch]
2023-03-06 17:00:31 -05:00
jimmy andrews
08cdafff34 add a merge-only api to convex decomposition
#preflight 63d9872265738ba951f5058e
#rb david.hill

[CL 23943754 by jimmy andrews in ue5-main branch]
2023-01-31 21:58:48 -05:00
Steve Robb
4d8666500d Removed remaining TIsSame usage.
#rb none
#jira none
#preflight 63c74fcb0b358b97d1cf7160

[CL 23753013 by Steve Robb in ue5-main branch]
2023-01-18 04:53:21 -05:00
steve robb
54079e3400 Removed TIsSame usage from Chaos and GeometryCore (part of a larger change to deprecate TIsSame).
#rb robert.manuszewski
#preflight 63c016d8bf54fa7b36683f8f

[CL 23664490 by steve robb in ue5-main branch]
2023-01-12 11:45:37 -05:00
Jimmy Andrews
6459e6d93f Make C-array exact predicate calls const-correct, and remove/deprecate confusing 'template VectorType' versions that were making the C-array versions difficult to call. To do the deprecation, the 'template VectorType' has been replaced with explicit inline functions that handle the existing vector types.
#rb david.hill
#preflight 637556d4953c19d4352a7bee

[CL 23184198 by Jimmy Andrews in ue5-main branch]
2022-11-17 16:46:44 -05:00
Jimmy Andrews
941db20dc4 fix incorrect direct assignments to TFunctionRef
#rb rex.hill
#preflight 63769b2cf514e1ded961caed

[CL 23183068 by Jimmy Andrews in ue5-main branch]
2022-11-17 15:52:12 -05:00
Jimmy Andrews
0a7d11eeb3 fix broken tet mesh test by making tets consistently generate by default in the UE orientation (orient3d gives negative sign), and switching the Validate function back to expecting that orientation
#rb tyson.brochu
#preflight 636d86315368a3230a6629e2

[CL 23090187 by Jimmy Andrews in ue5-main branch]
2022-11-10 18:45:07 -05:00
Jimmy Andrews
48486e8cb5 Add 3D Delaunay + tests
#rb david.hill
#preflight 636d3d0db839cb7ec554f864

[CL 23086658 by Jimmy Andrews in ue5-main branch]
2022-11-10 15:20:34 -05:00