Commit Graph

216 Commits

Author SHA1 Message Date
Jimmy Andrews
bd91583516 add a ClipConvex method for polygon2 and curveutil, to clip polygons to given bounds.
Uses the Sutherland–Hodgman algorithm of progressively clipping each side, so may leave folded overlaps directly on the boundaries if applied to non-convex polygons (but otherwise should still work)

#rb tyson.brochu
#preflight 62acfb162c6f089ea8ecbd5a

[CL 20717357 by Jimmy Andrews in ue5-main branch]
2022-06-18 08:52:11 -04:00
David Hill
857a3acd3e GeometryCore: Fixing unsafe typecast warnings in preparation for enabling such warnings for GeometryCore
#preflight 62acc6d2c0449d3dccc9b1d5
#rb Jimmy.Andrews

[CL 20710188 by David Hill in ue5-main branch]
2022-06-17 17:23:52 -04:00
Jimmy Andrews
e6a1ec147c Rule-of-5-or-0 fixes for some geometry types:
- remove TGeneralPolygon2 and IntBoxTypes.h copy constructors, to allow everything to be autogenerated (especially so that a proper move should be generated for TGeneralPolygon2)
 - add explicit moves + delete copies for TSparseGrid3 and FProgressCancel::ProgressScope, as these have custom destructors and the default move/copy behavior would cause bugs
 - make voro++ move assignment protect vs self-move

#rb ryan.schmidt
#preflight 62a8acbb1a6b7dcd549b3239

[CL 20709684 by Jimmy Andrews in ue5-main branch]
2022-06-17 16:58:10 -04:00
Jimmy Andrews
f075aba840 Refactor some Polygon2 functionality to be more broadly available via CurveUtil (e.g., functions for curve area, normals, length, winding)
+ add test coverage of these

#rb rinat.abdrashitov
#preflight 62aaa543634e82e5d126ccc4

[CL 20694865 by Jimmy Andrews in ue5-main branch]
2022-06-16 16:46:39 -04:00
David Hill
9fd3733c4d GeometryCore: DiTOrientedBox - fix bug that resulted in fallback to AABB in some cases.
#preflight 62ab406de9031caf98ab0ba4
#rb Tyson.Brochu

[CL 20691650 by David Hill in ue5-main branch]
2022-06-16 14:44:58 -04:00
lonnie li
c6e4d88423 GeometryCore: Add wrap tiling method support to TImageBuilder sampling.
#rb michael.balzer
#jira UE-156731
#preflight 62aa5e0af878f9423efa38de

#ROBOMERGE-AUTHOR: lonnie.li
#ROBOMERGE-SOURCE: CL 20678497 via CL 20678689 via CL 20678741
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20679836 by lonnie li in ue5-main branch]
2022-06-15 21:13:47 -04:00
Jimmy Andrews
bee14bcc2e deprecate timestamp on TDynamicPointSet3
#rb ryan.schmidt
#preflight 62a8d4eecf54a658ee26d9ba

[CL 20679346 by Jimmy Andrews in ue5-main branch]
2022-06-15 19:54:30 -04:00
lonnie li
c6c5051f14 GeometryCore: Fix BilinearSample to sample from the bounding pixel centers.
#rb ryan.schmidt
#preflight 62a94332054bb5c04e1b9f5d

#ROBOMERGE-AUTHOR: lonnie.li
#ROBOMERGE-SOURCE: CL 20665069 via CL 20665079 via CL 20665080
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20665350 by lonnie li in ue5-main branch]
2022-06-15 00:00:20 -04:00
Jimmy Andrews
44bb08921c Deprecate unused Timestamp and GetTimestamp function on TPolygon2 and TPolyline3
#rb matija.kecman
#rb ryan.schmidt
#preflight 62a896a3a43e20b293433722

[CL 20651996 by Jimmy Andrews in ue5-main branch]
2022-06-14 12:53:25 -04:00
matija kecman
c128de6a9a Fix Editor Mac which broke in Horde Issue #180297: Compile errors in Module.ModelingComponents.cpp and SceneCapturePhotoSet.cpp
#rnx
#rb jimmy.andrews
#jira none
#preflight 62a7511aaf7ad033effcec61
#preflight 62a7511aaf7ad033effcec61

[CL 20627748 by matija kecman in ue5-main branch]
2022-06-13 11:19:07 -04:00
matija kecman
6f80932e2b Render Capture Baking: Add messages warning users about missing tangents or UVs
#rnx
#rb lonnie.li
#jira none
#preflight 62a72d695a44fbc402908e21

[CL 20626847 by matija kecman in ue5-main branch]
2022-06-13 10:27:34 -04:00
Ryan Schmidt
c6c930536b GeometryProcessing: add FMeshResolveTJunctions, tries to fix cases where a boundary vertex lies on the interior of some other boundary edge, via edge splits, so that a Weld will work on the new set of boundary edges.
ModelingTools: Add option to Weld Tool to try to resolve T-junctions. Add feedback to report back the initial and final number of open boundary edges.
#rb jimmy.andrews
#preflight 62a260e48b67b148f2600dd8

[CL 20585253 by Ryan Schmidt in ue5-main branch]
2022-06-09 17:40:10 -04:00
Ryan Schmidt
39ea0b82bb Improve WeightMap support in Modeling Mode. Duplicate Tool now preserves WeightMaps, conversion between Dynamic and Static meshes properly preserves weight maps and names.
GeometryCore: Add bClearExisting option to FDynamicMeshAttributeSet::EnableMatchingAttributes(). Default true is old behavior. New behavior, when false, is to preserve existing attribute set counts/values. Also now copying group and weight layer names if not set.
ModelingTools: CombineMeshesTool now uses EnableMatchingAttributes instead of only explicitly matching UV layers, so group and weight layers are copied properly to duplicates
MeshConversion: DynamicMeshToMeshDescription now generates unique names in ConvertPolygroupLayers and ConvertWeightLayers. Previously if multiple attribs had the same name (eg NAME_None), output MeshDescription would only have a single attrib w/ that name
#rb david.hill
#preflight 62a116439a3e81e904dde76f

[CL 20570919 by Ryan Schmidt in ue5-main branch]
2022-06-08 23:37:03 -04:00
Jimmy Andrews
b69ed195e9 fix convex hull's 'extreme points' algorithm not catching exactly collinear points as having dimension==1
#rb rinat.abdrashitov
#preflight 629a21fb9526040c3dea2d51

[CL 20537443 by Jimmy Andrews in ue5-main branch]
2022-06-07 10:09:45 -04:00
Christina TempelaarL
550965082f Implemented gizmo box element line trace.
#jira UE-152983
#rb jimmy.andrews
#preflight 629e39ab116e8078e3c8f143

[CL 20524125 by Christina TempelaarL in ue5-main branch]
2022-06-06 14:05:13 -04:00
Jimmy Andrews
1541b0eb2f Add progress tracking to FProgressCancel, with nested scopes and messages
Add FAsyncTaskExecuterWithProgressCancel to allow the progress to be reported back to the calling thread

Implement initial usage in Voronoi fracture, using an FSlowTask to handle the progress bar and cancel button UI

#rb semion.piskarev
#preflight 629a68d8d204bca667d2e578

[CL 20516367 by Jimmy Andrews in ue5-main branch]
2022-06-05 21:25:04 -04:00
tyson brochu
30c0327d63 DynamicMesh3: Add comments to AppendTriangle functions saying the vertices must exist and the indices must be distinct
#rb michael.balzer
#preflight 629a42579019199ebc8ed71e

[CL 20489098 by tyson brochu in ue5-main branch]
2022-06-03 13:33:31 -04:00
Christina TempelaarL
68e41e393c Implemented gizmo element circle and rectangle line trace methods.
#jira UE-153004, UE-153008
#rb jimmy.andrews
#preflight 62990e975143e4aacd8a8020

[CL 20474678 by Christina TempelaarL in ue5-main branch]
2022-06-02 15:44:09 -04:00
David Hill
224db7df48 GeometryCore: Morphology.h, Update to use sparse SDF due to memory savings over the dense SDF. The AutoLOD tool and the Morphology tool use this class - but the behavior shouldn't change.
#preflight 629672e188749bbb83a2b9d0
#rb Jimmy.Andrews

[CL 20452805 by David Hill in ue5-main branch]
2022-06-01 11:06:32 -04:00
tyson brochu
178838db35 ContainmentTests: use full level set grid transform, not just translation
#jira UE-155269
#rb jimmy.andrews
#preflight 62967f5b9d75300f41bdee51

[CL 20444082 by tyson brochu in ue5-main branch]
2022-05-31 18:55:26 -04:00
David Hill
6de27c1a94 GeometryCore: SparseNarrowBandMeshSDF. Update the way distance sign is computed for a block far from the narrow band to make it consistent with the existing dense grid version (SweepingMeshSDF.h)
all the voxels in a block far from the mesh surface should share the same state (inside or outside) for water-tight meshes,  but the counting method used for sign assignment may produce odd results for non water-tight meshes where the block may have both inside and outside elements.  this change accounts for that behavior.

#preflight 629528bc91004dd61c9d6b00
#rb Tyson.Brochu

[CL 20438913 by David Hill in ue5-main branch]
2022-05-31 13:07:58 -04:00
tyson brochu
e78697a2c1 SetCollisionGeometryTool: add Mesh to Level Set / SDF conversion
#rb jimmy.andrews
#preflight 62952aa7e61254772f6b4b5e

[CL 20432875 by tyson brochu in ue5-main branch]
2022-05-30 16:48:48 -04:00
Jimmy Andrews
d20f4f4012 Fixes to FPriorityOrderPoints:
1. Actually use the SpatialLevels argument
2. Only allow early stopping at level boundaries, so the priority ordering can properly sort points at the same spatial level. Fixes points being spatially clumped when early stopping is enabled.
3. Stop referring to some of the importance weights as "curvature" (we often weight by things other than curvature)
4. Expose OffsetResFactor to allow more control of how clumpy the distribution is (value was hardcoded at 4, but I think 1 or 2 tends to space things better)

#rb david.hill
#preflight 628fb6d48c23e52ef0fbec28

[CL 20381323 by Jimmy Andrews in ue5-main branch]
2022-05-26 13:37:41 -04:00
Jimmy Andrews
4688af8512 Fix constrained delaunay triangulation failing on cavity fill by switching to a different (simpler) cavity fill algorithm
Should be faster in most practical cases, though can be slower if an inserted edge must cross a lot of existing edges.

#rb rinat.abdrashitov
#preflight 62845c74ac1a933d478fcc0b

[CL 20261922 by Jimmy Andrews in ue5-main branch]
2022-05-18 11:50:40 -04:00
Jimmy Andrews
ac6d4e5e8e automatically fix mesh orientation when geometry script functions transform meshes with negative scale
#jira UE-151319
#rb semion.piskarev
#rb ryan.schmidt
#preflight 6282a2f3734d0657703f17b7

[CL 20232088 by Jimmy Andrews in ue5-main branch]
2022-05-16 17:07:25 -04:00