Commit Graph

36 Commits

Author SHA1 Message Date
tyson brochu
819b7b59cf If a ToolTarget's MeshComponent has no MeshDescription, return an empty but valid one. Harden various tools to not crash on empty meshes.
#jira UE-135710
#rnx
#rb jimmy.andrews
#preflight 61b24e173d544d1a435f6792

#ROBOMERGE-AUTHOR: tyson.brochu
#ROBOMERGE-SOURCE: CL 18422162 in //UE5/Release-5.0/... via CL 18423015
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18423313 by tyson brochu in ue5-release-engine-test branch]
2021-12-09 15:02:36 -05:00
rinat abdrashitov
4110be33f5 UniformTesselate.h/cpp
Added a new operator to subtriangulate a mesh. Its meant to take the input mesh and quickly generate final number of new vertices and triangles and interpoloate existing attributes to them.
This is would be used to replace the current recursive subdivision (using edge splits) in the DispalceMeshTool and PNTriangles operator.

DynamicMeshOverlay.h/cpp
Refactored the implementation of GetElementAtVertex from the child class TDynamicMeshVectorOverlay to the parent TDynamicMeshOverlay. The child now calls the parent.
Added a new method GetElementIDAtVertex and use it inside GetElementAtVertex since it replaces most of the logic.

OperationsTests.cpp/ExpectedRectangle.obj
Added unit tests for the UniformTesselate operator.

#rb jimmy.andrews
#rnx
#jira none
#preflight 619c0aa4fa0b360c40779025

#ROBOMERGE-AUTHOR: rinat.abdrashitov
#ROBOMERGE-SOURCE: CL 18284521 in //UE5/Release-5.0/... via CL 18284544
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 18284556 by rinat abdrashitov in ue5-release-engine-test branch]
2021-11-24 11:09:23 -05:00
michael balzer
b8a1c9b6cf GeometryCore: Remove ExplicitUseGeometryMathTypes.h
#ROBOMERGE-AUTHOR: michael.balzer
#ROBOMERGE-SOURCE: CL 18227685 in //UE5/Release-5.0/... via CL 18229350
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 18231457 by michael balzer in ue5-release-engine-test branch]
2021-11-17 19:02:44 -05:00
ryan schmidt
0e961a1e23 ModelingTools: add Edge Bevel operation in PolyEdit Tool. New UPolyEditBevelEdgeActivity, and operations to initialize it in PolyEdit. This bevel operation currently uses an explicit bevel-distance rather than a live viewport interaction, and as a result required adding a separate 'apply' button inside the PolyEditTool panel (via new UEditMeshPolygonsToolAcceptCancelAction). The UX here is terrible but it's not clear we can do better in 5.0 timeframe.
GeometryProcessing: add support for beveling the border ring(s) of a triangle or polygroup-face selection. Improve polygroup assignment around bevel loops, previously the entire loop received a single polygroup which is not what the user expects in polygroup-modeling. Now a new polygroup is assigned for each unique group-edge-pair. Terminator vertices now also generate a new polygroup if there are 2 or more adjacent groups, previously behavior (assigning to arbitrary nbr) was not useful during polygroup-edting.

#rb rinat.abdrashitov
#rnx
#jira none
#preflight 6193ddccb32bbfdc50d9ed07

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18208908 in //UE5/Release-5.0/... via CL 18209386
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 18209422 by ryan schmidt in ue5-release-engine-test branch]
2021-11-16 13:24:21 -05:00
david hill
0e72ee8961 Dynamic Mesh, Intrinsic Mesh - add a more efficient normal-coordinate based method for tracing a small number of intrinsic mesh edges.
#preflight 618c30c2857f725e2961a5af
#rb jimmy.andrews

#ROBOMERGE-AUTHOR: david.hill
#ROBOMERGE-SOURCE: CL 18152341 in //UE5/Release-5.0/... via CL 18152405
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v889-18060218)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 18152455 by david hill in ue5-release-engine-test branch]
2021-11-11 11:47:23 -05:00
david hill
9e0ccd3133 Geometry tools: Fix GeodesicPath compile error
#rb none

#ROBOMERGE-AUTHOR: david.hill
#ROBOMERGE-SOURCE: CL 18136061 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v889-18060218)

[CL 18136142 by david hill in ue5-release-engine-test branch]
2021-11-10 15:04:25 -05:00
david hill
6e12be9318 Dynamic Mesh, Intrinsic Mesh - more robust calculation of intrinsic edges.
-  add integer-based normal coordinates for correspondence with the surface mesh and unify code that helps track the relationship between meshes.
-  rename FIntrinsicEdgeFlipMesh  FSimpleIntrinsicEdgeFlipMesh.
-  new FIntrinsicEdgeFlipMesh that uses the interger-based normal coordinates to track location of intrinsic edges relative to the surface mesh.

#preflight 618aa6de235a78d30e416b21
#rb jimmy.andrews

#ROBOMERGE-AUTHOR: david.hill
#ROBOMERGE-SOURCE: CL 18135001 in //UE5/Release-5.0/... via CL 18135020
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v889-18060218)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 18135032 by david hill in ue5-release-engine-test branch]
2021-11-10 14:22:10 -05:00
jimmy andrews
35fa337fcd fix mesh boolean crash on trying to double-check coplanarity when the boolean only needed to process the first mesh, so there is nothing to double-check against
#jira UE-134079
#rb david.hill
#rnx
#preflight 6184a06dab0db4000126b40d

#ROBOMERGE-OWNER: jimmy.andrews
#ROBOMERGE-AUTHOR: jimmy.andrews
#ROBOMERGE-SOURCE: CL 18087581 in //UE5/Release-5.0/... via CL 18088945
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v889-18060218)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 18092720 by jimmy andrews in ue5-release-engine-test branch]
2021-11-08 16:04:43 -05:00
ryan schmidt
7bd74ffee4 GeometryProcessing: add basic UV calculation and materialID support to MeshBevel. Add PolyEditingUVUtil file for UV computation utility functions in Poly-editing. Currently only ComputeArbitraryTrianglePatchUVs() function which uses expmap to compute UVs and (approximately) scales UVs to match UV scale on surrounding border triangles.
GeometryScript: add ApplyMeshPolygroupBevel operation
#rb none
#rnx
#jira none
#preflight 618434449249220001a944df

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18065452 in //UE5/Release-5.0/... via CL 18065478
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v889-18060218)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 18065511 by ryan schmidt in ue5-release-engine-test branch]
2021-11-04 18:24:07 -04:00
ryan schmidt
8c5b55b152 GeometryProcessing: Refactor edge-loop inset calculation code from InsetMeshRegion into new utility functions in PolyEditingEdgeUtil.h. Use in FMeshBevel::DisplaceVertices() to improve edge insetting. Also add FMeshBevel::FixUpUnlinkedBevelEdges(), to repair vertex and edge ID lsits in unlinked open-span edges after unlinking vertices.
#rnx
#jira none
#preflight 61821056dd10170001f4d541

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18041664 in //UE5/Release-5.0/... via CL 18041669
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 18041673 by ryan schmidt in ue5-release-engine-test branch]
2021-11-03 17:40:43 -04:00
jimmy andrews
ee57dd4ec7 Update TriangulateSimplePolygon to by-default orient its output triangles in the most-often-desired orientation (w/ triangle winding the opposite of the polygon winding, for example this is desirable when the polygon is generated from boundary edges on a hole to be filled)
Add test coverage for polygon triangulation functions to ensure they create triangulations with the expected orientations

#jira UE-133286
#rb rinat.abdrashitov
#rnx
#preflight 6181fc82612e950001c9b4ee

#ROBOMERGE-AUTHOR: jimmy.andrews
#ROBOMERGE-SOURCE: CL 18032811 in //UE5/Release-5.0/... via CL 18032831
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 18032838 by jimmy andrews in ue5-release-engine-test branch]
2021-11-03 09:39:16 -04:00
ryan schmidt
cea638d0b0 GeometryProcessing: add initial MeshBevel operation. Still a WIP, does not handle UVs at all, or interior-region vertices, and the current solve for vertex positions produces horrible-looking bevels, but the main topological problems seem to be solved.
Various utility functions added to MeshIndexUtil.h and FIndex2i/3i.
#rb jimmy.andrews
#rnx
#jira none
#preflight 617ff8d99b238e000141ff75

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18003558 in //UE5/Release-5.0/... via CL 18003639
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 18003694 by ryan schmidt in ue5-release-engine-test branch]
2021-11-01 12:01:36 -04:00
ryan schmidt
ddc1ed4208 GeometryProcessing: handle case where boolean generates a very tiny hole, and then tries to minimal-fill it. The MinimalFill code does an initial remesh pass to create some "density" to collapse. If the hole is tiny, the remesh target edge length can become near-zero, and then the remesher explodes.
Also adds TMeshQueries::TotalEdgeLength() function which computes accumulated length of an edge set.
#rb tyson.brochu
#rnx
#jira none
#preflight 6177020e7855e8000166f273

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 17913002 in //UE5/Release-5.0/... via CL 17913076
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17913107 by ryan schmidt in ue5-release-engine-test branch]
2021-10-25 16:59:51 -04:00
jimmy andrews
6df1e3bcc4 clamp offsets/extrusions in polyedit in the tri-normal-adjust mode, that could otherwise offset infinitely at sharp corners
#jira UE-132170
#rb lonnie.li

#ROBOMERGE-AUTHOR: jimmy.andrews
#ROBOMERGE-SOURCE: CL 17893788 in //UE5/Release-5.0/... via CL 17893807
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v883-17842818)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17893813 by jimmy andrews in ue5-release-engine-test branch]
2021-10-21 22:27:29 -04:00
jimmy andrews
23f63931d4 make coplanar removal test more double-check its assumption that the coplanar pair was actually removed; fixed sliver/edge cases where from the sliver side it looks like a coplanar surface but from the other it typically does not
+ also bring skip-degenerates-in-nearest-tri-search improvement previously added to MeshBoolean into MeshSelfUnion

#rb matija.kecman

#ROBOMERGE-AUTHOR: jimmy.andrews
#ROBOMERGE-SOURCE: CL 17881409 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v883-17842818)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17881419 by jimmy andrews in ue5-release-engine-test branch]
2021-10-20 22:11:03 -04:00
david hill
2e27653ee8 Dynamic Mesh, Operations, GeodesicPath - allow geodesic path to be exported as array of surface points.
#preflight 6168c0e367b5f00001f30300
#rb jimmy.andrews


#ROBOMERGE-AUTHOR: david.hill
#ROBOMERGE-SOURCE: CL 17864587 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v883-17842818)

[CL 17864605 by david hill in ue5-release-engine-test branch]
2021-10-19 15:20:12 -04:00
rinat abdrashitov
453cf7024e GeometryProcessing:
Removed redundant code since GetTriangleEdges method was added to DynamicMesh3 class that does the same thing.
Fixed a typo ContolPnts -> ControlPoints.
Previously only per-vertex normals were set. Now normals are correclty set per-element as well.

#rb jimmy.andrews
#rnx
#jira none
#preflight 61698e649390dd0001b2dfca

#ushell-cherrypick of 17521027 by rinat.abdrashitov

#ROBOMERGE-AUTHOR: rinat.abdrashitov
#ROBOMERGE-SOURCE: CL 17829558 in //UE5/Release-5.0/... via CL 17829564
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v881-17767770)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17829567 by rinat abdrashitov in ue5-release-engine-test branch]
2021-10-15 11:23:32 -04:00
jimmy andrews
d35e160b9a fix polycut w/ degenerate rounded rect (corner ratio = 0) in three different ways:
- prevent parameter from going all the way to zero
 - extend cutting polygon a bit outside the bounding box to avoid creating coplanar cuts that stress the boolean system
 - when finding the initial nearest triangle to check for coplanarity, filter out degenerate triangles w/ zero vector normals

#jira UE-119242
#rb rinat.abdrashitov
#rb david.hill
#rnx

#ROBOMERGE-AUTHOR: jimmy.andrews
#ROBOMERGE-SOURCE: CL 17822833 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v881-17767770)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17825035 by jimmy andrews in ue5-release-engine-test branch]
2021-10-14 21:33:35 -04:00
david hill
c57f929da7 Dynamic Mesh, Operations: Intrinsic Mesh - export intrinsic mesh edges as array of surface points.
#rb jimmy.andrews
#preflight 615f199a7c973700010520c7

#ROBOMERGE-AUTHOR: david.hill
#ROBOMERGE-SOURCE: CL 17817297 in //UE5/Release-5.0/... via CL 17817318
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v881-17767770)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17817329 by david hill in ue5-release-engine-test branch]
2021-10-14 12:02:29 -04:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
david hill
58c5655c3a Dynamic Mesh Plugin: Operations - Adding first pass at code that uses edge flips of an intrinsic mesh to reduce the length of an input surface curve (defined on a FDynamicMesh)
#rb jimmy.andrews
#preflight 61573139a680bb0001ce7f51

#ROBOMERGE-AUTHOR: david.hill
#ROBOMERGE-SOURCE: CL 17693963 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v875-17642767)

[CL 17693979 by david hill in ue5-release-engine-test branch]
2021-10-01 13:18:53 -04:00
david hill
8ec4356eb0 Moving IntrinsicTriangulationMesh and related MeshGeodesicSurface tracer out of Geometry Core, and into the DynamicMesh plugin
#rb ryan.schmidt, tyson.brochu
#preflight 6154c3f2549cbf00019ac526


#ROBOMERGE-AUTHOR: david.hill
#ROBOMERGE-SOURCE: CL 17678078 in //UE5/Release-5.0/... via CL 17678080
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v875-17642767)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17678087 by david hill in ue5-release-engine-test branch]
2021-09-30 10:52:07 -04:00
ryan schmidt
6437ecc4a1 GeometryCore: replace all usage of GeometryCore FVector3<T> with TVector<T>, remove FVector3<T> and GVector4<T>
#rb none
#rnx
#jira none
#preflight 614ce33574f7e70001ea822b

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 17617027 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17617043 by ryan schmidt in ue5-release-engine-test branch]
2021-09-23 19:38:55 -04:00
jimmy andrews
328ebd2da8 Add polygroup simplifier to simplify tool + improve behavior for angle tolerance w/ smooth turns over many edges
#rb tyson.brochu
#preflight 61450fb859380f0001155c20

#ROBOMERGE-AUTHOR: jimmy.andrews
#ROBOMERGE-SOURCE: CL 17560328 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17560336 by jimmy andrews in ue5-release-engine-test branch]
2021-09-17 19:39:12 -04:00
jimmy andrews
b0aa5f3c4a Add new polygon-oriented mesh simplification button to the poly edit tool -- tries to use the constrained Delaunay triangulator to re-triangulate every polygon, skipping non-corner vertices that are on straight edges.
#preflight 6143df0d599fd80001af7023
#rb ryan.schmidt
#rnx

#ROBOMERGE-AUTHOR: jimmy.andrews
#ROBOMERGE-SOURCE: CL 17547526 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17547534 by jimmy andrews in ue5-release-engine-test branch]
2021-09-16 23:16:23 -04:00