9 Commits

Author SHA1 Message Date
avudnez
2d99473b92 PR #10645: Fix extra parentheses compilation warning with clang-cl
#jira UE-190329
#rb matija.kecman

[CL 26544922 by avudnez in 5.3 branch]
2023-07-24 11:55:36 -04:00
ryan schmidt
b64039ce19 DynamicMesh: handle some failure cases in MeshBevel. These two fixes resolve many bevel failure cases, particularly those introduced by repeat bevels.
In some edge configurations two 'terminator' vertices (at the end of open bevel edge paths) are directly connected by a non-bevel edge that we will "open", and this creates a quad-shaped hole instead of a triangle-shaped hole (which was already handled). Detecting this case will arise is simpler before we change the topology, so it is done in BuildVertexSets(), stored in FBevelVertex::ConnectedBevelVertex, and used during mesh generation to call new AppendTerminatorVertexPairQuad function.

In BuildTerminatorVertex(), the search for a terminator split-edge may fail if the filtered triangle list ends up non-contiguous, preventing the vertex from being beveled (ie it is "stuck"). Code was added to both handle that case, and also try to force the list to stay contiguous.

#rb jimmy.andrews
#preflight 6319fbe3304480f8f8565048
#jira UE-160073

[CL 21908190 by ryan schmidt in ue5-main branch]
2022-09-08 20:09:26 -04:00
Ryan Schmidt
73d7350fa2 GeometryProcessing: handle an unexpected case in MeshBevel where edges that should be disconnected, aren't. Change the way that checkSlow/ensure is used so that they are not hit w/o changing the code, as they are problematic for geometry script bevel usage.
#rb jimmy.andrews
#preflight 62b5bc7fff7f5dd87eead43e

[CL 20808582 by Ryan Schmidt in ue5-main branch]
2022-06-24 09:42:08 -04:00
ryan schmidt
ff1adaf1b4 GeometryProcessing: fix handling of single-edge case in MeshBevel. Need to properly compute Wedge border edge information so that the edge-pairs can later be found and added to the edge-correspondence map.
#rb rinat.abdrashitov
#rnx
#jira UE-137451
#preflight 61ba4380e46e46b53e58f757

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18477500 in //UE5/Release-5.0/... via CL 18481396
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18481488 by ryan schmidt in ue5-release-engine-test branch]
2021-12-16 19:34:36 -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
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