16 Commits

Author SHA1 Message Date
jimmy andrews
d6f2603bef fix issue where in rare cases bevel can fail to set correct matching new edges/vertices
#jira UE-202875
#rb rinat.abdrashitov

[CL 31308760 by jimmy andrews in 5.4 branch]
2024-02-08 17:48:12 -05:00
jimmy andrews
b88fe4279e fix smooth bevel of loops for cases where the loop's edges are reversed from the expected order
#rb David.Hill
#jira UE-205063

[CL 31142709 by jimmy andrews in 5.4 branch]
2024-02-02 16:58:07 -05:00
jimmy andrews
1664ef919b Fix crash on smooth bevel of some edges
#jira UE-205048
#rb tyson.brochu

[CL 31098073 by jimmy andrews in 5.4 branch]
2024-02-01 14:55:30 -05:00
ryan schmidt
2c11bfc349 Mesh Bevel: remove ensures that are getting hit in some cases in Lyra. Failure is not catastrophic, so we do not really need to ensure here.
[CL 30399602 by ryan schmidt in ue5-main branch]
2023-12-19 13:48:50 -05:00
ryan schmidt
08a4212d9b fix various issues with mesh bevel. Boundary-condition normals are now computed before any meshing. DisplaceVertices() now tries to keep terminator vertex positions on existing mesh edges (this should be improved to stay on group edges, in most cases a group edge can be selected topologically, but for now just snapping to mesh edges to handle the simple lowpoly-boxy cases). Simplify/improve computation of section planes in ApplyProfileShape_Round() - in all cases except corners, the section plane is well-defined by the two inset edge points and the original vertex position. This allowed removal of PlanarizeArcNormals function. Also now handling flipped orientation of quad patch relative to edge vertex sequence.
Added more error handling inFQuadGridPatch::InitializeFromQuadPatch. Fixed property invalidating in PolyEdit bevel activity.

[CL 30356938 by ryan schmidt in ue5-main branch]
2023-12-15 14:57:40 -05:00
ryan schmidt
58c4571ebf fix Mac-specific build issue
[CL 30281057 by ryan schmidt in ue5-main branch]
2023-12-12 18:09:03 -05:00
ryan schmidt
a86e132008 Add support for multi-segment bevels with optional round profile in MeshBevel. The new code path is completely separated from the previous code. Works OK but handling of valence-3 bevel corners (filled with a rounded triangle) could be improved.
Expose in Geometry Script and PolyEdit functions.

[CL 30280525 by ryan schmidt in ue5-main branch]
2023-12-12 17:55:33 -05:00
avudnez
f9797f7199 PR #10645: Fix extra parentheses compilation warning with clang-cl
#jira UE-190329
#rb matija.kecman

[CL 26546845 by avudnez in ue5-main branch]
2023-07-24 12:27:01 -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