Commit Graph

371 Commits

Author SHA1 Message Date
jimmy andrews
4d1a9e879c Move some commonly-used mesh functionality from the DynamicMesh module over to GeometryCore, including DynamicMeshEditor, mesh booleans, and some selection handling
#rb ryan.schmidt, matija.kecman

[CL 25874830 by jimmy andrews in ue5-main branch]
2023-06-08 12:40:29 -04:00
henrik karlsson
f027bfa856 [Core]
* Fixed compile errors when compiling .h files in isolation

#rb none

[CL 25865668 by henrik karlsson in ue5-main branch]
2023-06-08 02:30:27 -04:00
ryan schmidt
4514a71fea ModelingTools: pvs fix and minor const-correctness fix
#rb none
#preflight 646e32f6807b157b8b3b8f8b
#rnx

[CL 25626915 by ryan schmidt in ue5-main branch]
2023-05-25 15:34:14 -04:00
jimmy andrews
51c778d2a1 make the convex decomposition sphere covering do a better job of covering shape concavities near the border of the shape by expanding the sampling region by the sphere radius + moving the samples out to better cover the sampling region
#rb rinat.abdrashitov
#preflight 646d469a64351d76f352fdd2

[CL 25597234 by jimmy andrews in ue5-main branch]
2023-05-23 21:22:12 -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
ryan schmidt
c0c1e82b10 DynamicMesh: add TDynamicMeshVectorOverlay::EnumerateVertexElements, does triangle iteration around vertex and calls a function for each tri-vtx-element
#rb david.hill
#preflight 646cde3a2c0a5da0dc8627fa
#rnx

[CL 25592176 by ryan schmidt in ue5-main branch]
2023-05-23 18:12:36 -04:00
ryan schmidt
0ff893f0f2 Modeling Tools: minor changes in prepration for future CL. Add UE::Geometry::Lerp for TVector4 types. Refactor code MeshGroupPaintTool code for polylasso post-process to static function UPolyLassoMarqueeMechanic::ApproximateSelfClipPolyline(). Make brush flow rate configurable via overridable UMeshSculptToolBase::GetStampTemporalFlowRate().
#rb none
#preflight 646cbf4064351d76f31f6841
#rnx

[CL 25592096 by ryan schmidt in ue5-main branch]
2023-05-23 18:10:55 -04:00
ryan schmidt
c3976cd7b1 GeometryCore: fix crash copy-paste-o in FDynamicMeshAttributeSet::EnableMatchingAttributes
#rb none
#preflight skip

[CL 25539031 by ryan schmidt in ue5-main branch]
2023-05-18 23:50:53 -04:00
michael balzer
92faefe737 GeometryCore: Fix potential buffer overrun in FSmallListSet serialization
#jira UE-172874
#preflight 64650ff311205d3573d0fa57
#rb

[CL 25518662 by michael balzer in ue5-main branch]
2023-05-17 19:09:39 -04:00
Jimmy Andrews
281e28afae add precise math for exact predicates on clang, where supported
#preflight 646465044404e3cdd2c0fb87
#jira none

[CL 25509390 by Jimmy Andrews in ue5-main branch]
2023-05-17 12:25:46 -04:00
rinat abdrashitov
78b2bf36ba Add Set/GetValue methods that take templated bone weight scalar data arrays.
#rb halfdan.ingvarsson
#rnx
#preflight 64642d23c34c2e121241969e

[CL 25503080 by rinat abdrashitov in ue5-main branch]
2023-05-17 01:11:27 -04:00
marc audy
31c6de2226 [Backout] - CL25502609
#fyi Jimmy.Andrews
Original CL Desc
-----------------------------------------------------------------
set exact predicate float control for clang as well as msvc

#preflight 64643a472d446eac96856f8c
#rb rinat.abdrashitov
#jira none

[CL 25502827 by marc audy in ue5-main branch]
2023-05-17 00:05:24 -04:00
Jimmy Andrews
aedd4acd5f set exact predicate float control for clang as well as msvc
#preflight 64643a472d446eac96856f8c
#rb rinat.abdrashitov
#jira none

[CL 25502609 by Jimmy Andrews in ue5-main branch]
2023-05-16 22:59:50 -04:00
semion piskarev
c1720ded9d MeshModelingTools: Make FMeshFaceDualGraph support non-compact meshes.
#rb Jimmy.Andrews
#jira UE-184391
#preflight 645ea780cf788a25587a8b27

[CL 25496034 by semion piskarev in ue5-main branch]
2023-05-16 16:02:28 -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
e98119392a Add normal transforms and plane transforms to geometry plane types and vector util (correct normal transform is already in TTransformSRT3, but this lets us more easily do correct normal transforms without converting away from standard FTransform)
#rb tyson.brochu
#preflight 645e74ce2965f6ea8e050d6c

[CL 25458668 by jimmy andrews in ue5-main branch]
2023-05-12 16:03:30 -04:00
semion piskarev
75a68e7934 MeshModelingTools: Add the "Copy From Inputs" option in Mesh to Collision tool transfer existing simple geometry over to the target.
#rb Jimmy.Andrews
#jira UE-182342
#preflight 6447decb773f23812dab3c30

[CL 25183859 by semion piskarev in ue5-main branch]
2023-04-25 13:26:28 -04:00
jimmy andrews
97ba432b18 Prevent VoxBlend and VoxWrap adding vertices that are outside the spatial bounds as seeds, which happens for meshes that have isolated vertices that are unused by triangles.
+ do not checkSlow() on an out-of-bounds seed, as it is not really a problem (the point will just be skipped over)

#rb rinat.abdrashitov
#preflight 6446fc5827014596f3a0ec31

[CL 25175862 by jimmy andrews in ue5-main branch]
2023-04-24 23:45:03 -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
b39147f104 Add center of mass to GeometryCore MeshQueries and Geometry Script Mesh Query Functions
#preflight 64405dfab91c130758c4ee99
#rb ryan.schmidt

[CL 25120527 by jimmy andrews in ue5-main branch]
2023-04-19 20:06:52 -04:00
ryan schmidt
fd2127d075 GeometryCore: add ability to store and fetch 'debug' FDynamicMesh3 via UE::Geometry::Debug::StashDebugMesh() and FetchDebugMesh(). CVar geometry.DynamicMesh.EnableDebugMeshes controls this support, defaults to disabled. Console command geometry.DynamicMesh.ClearDebugMeshes added to allow clearing entire debug mesh set.
GeometryScript: expose above capability to Geometry Scripting
#rb none
#preflight 643fe92c090323f9a3f2a10d

[CL 25107977 by ryan schmidt in ue5-main branch]
2023-04-19 11:47:17 -04:00
ryan schmidt
896e3b7820 CombineMeshInstances: can now compute 'swept solid' approximation based on (approximate) projected silhouette of shapes, to get 2D profile curves, and then extrude along axis. This is a bit rough right now but doing polygon union + closure tends to clean up the messy bits. This method can capture parts with holes, and optionally filter out very small holes. Currently hole filtering is hardcoded-enabled, will be exposed as parameters. Triangle cost metric is somewhat broken for meshes with holes, needs to be improved.
GeometryProcessing: added FilterHoles and VtxNormalOffset functions to GeneralPolygon2
#preflight 643ea4e3b91c13075844a019
#rb none

[CL 25089626 by ryan schmidt in ue5-main branch]
2023-04-18 13:06:12 -04:00
Steve Robb
4181179a64 Fixed mismatched copy constructor/assignment operator in TQuadricError, TVolPresQuadricError and TAttrBasedQuadricError.
#rb none
#jira none
#preflight none

[CL 25084799 by Steve Robb in ue5-main branch]
2023-04-18 08:59:49 -04:00
Steve Robb
ad3ab5f79e Fixed mismatched copy constructor.assignment operator in TAxisAlignedBox2 and TAxisAlignedBox3.
#rb none
#jira none
#preflight none

[CL 25084532 by Steve Robb in ue5-main branch]
2023-04-18 08:29:37 -04:00
Steve Robb
cae159f7fe Fixed mismatched copy constructor/assignment warning in TQuaternion.
#rb none
#jira none
#preflight 643e7d6db91c13075837026e

[CL 25084316 by Steve Robb in ue5-main branch]
2023-04-18 07:57:26 -04:00