Commit Graph

236 Commits

Author SHA1 Message Date
jimmy andrews
1e1f3cb672 Fix hole tool and boundary revolve tool seeing polygroup boundary edges instead of mesh boundary edges
Fix boundary revolve tool skipping last vertex on open boundaries

#jira UE-163374
#rb tyson.brochu
#preflight 632a5fdffc7f1efbdf70dd4a

[CL 22107236 by jimmy andrews in ue5-main branch]
2022-09-20 22:10:05 -04:00
jimmy andrews
0ce18de623 Fix symmetry detection for scaled-up meshes, by making error tolerances also scale
#jira UE-159448
#rb david.hill
#preflight 63291c3eb40000c8f0456d1e

[CL 22094673 by jimmy andrews in ue5-main branch]
2022-09-20 11:50:38 -04:00
jimmy andrews
1fb9676459 Make mesh symmetry detection detect more symmetry cases, more robustly, so VSculpt will recognize symmetry after using Mirror Tool
#jira UE-159448
#rb david.hill
#preflight 63237c365a44869a7d0922f8

[CL 22040790 by jimmy andrews in ue5-main branch]
2022-09-15 18:44:06 -04:00
tyson brochu
9efcc70606 ModelingComponents/Selection:
- create a new MeshTopologySelector base class. The existing GroupTopologySelector class now inherits from it, as does a new BoundarySelector class
- likewise, create a new MeshTopologySelectionMehchanic base class and have (existing) PolygonSelectionMechanic and (new) BoundarySelectionMechanic inherit from it
- the new Boundary classes use FMeshBoundary loops to define selectable loops rather than FGroupTopology

HoleFillTool:
- change to using BoundarySelectionMechanic instead of GroupTopologySelector

Misc:
- allow FMeshBoundaryLoops to fail untangling a loop with bowties but still continue processing other loops


#jira UE-144821
#rb jimmy.andrews
#preflight 63222176e93a80888cb7d3df

[CL 22013854 by tyson brochu in ue5-main branch]
2022-09-14 15:25:19 -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
semion piskarev
de9d706c9b MeshModelingTools: Fix WalkMeshPlanar occasionally picking bad paths that resulted in holes and other errors in boolean operations.
#rb Jimmy.Andrews
#jira UE-151749
#preflight 6317579c980179553e3b35bc

[CL 21817939 by semion piskarev in ue5-main branch]
2022-09-06 11:14:10 -04:00
semion piskarev
7d6ce15716 MeshModelingTools: Fix group topology not adding an edge if the boundary has a single corner.
#rb Jimmy.Andrews
#jira none
#preflight 63126fc4da1671f997d67660

[CL 21816688 by semion piskarev in ue5-main branch]
2022-09-06 10:20:04 -04:00
David Hill
fbf9f69efc Intrinsic Mesh Laplacian Construction - correctly handle case when both opposing angles are nearly 90 degrees.
This shouid improve the behaviour of the PolyDefTool when used in smooth mode.

#rb jimmy.andrews
#jira UE-152706
#preflight 631235e0e11efde08fa0c637

[CL 21764810 by David Hill in ue5-main branch]
2022-09-02 14:43:33 -04:00
Jimmy Andrews
571b3c262d Fix ConstrainedDelaunay2 Add() function being overloaded in two ways; make the new Add be more-specifically-named AddWithIntersectionResolution
#rb michael.balzer
#rb david.hill
#preflight 630fa8cc556fc14dce9c74d1
#jira UE-162641

[CL 21726042 by Jimmy Andrews in ue5-main branch]
2022-08-31 15:14:58 -04:00
Jimmy Andrews
4baf1c84e0 non-unity build fixes for polygonintersectionutils.h
#preflight 630ed0ff501b64ba335839ab

[CL 21716892 by Jimmy Andrews in ue5-main branch]
2022-08-30 23:45:44 -04:00
jimmy andrews
9cb9952297 Make Arrangment2d not fail/ensure on a degenerate input (collapsed to a single point)
#rb ryan.schmidt
#preflight 630e4d330345de4ccfb87600

[CL 21710498 by jimmy andrews in ue5-main branch]
2022-08-30 17:40:48 -04:00
Jimmy Andrews
3f0fdaddb4 When applying MeshTransforms' transform and transforminverse, generally pass bReverseOrientationIfNeeded=true
(+ for code that was passing false then manually applying the same logic, remove the extra reverse orientation logic)

#rb david.hill
#preflight 630d245fe352708d44f9e007

[CL 21706500 by Jimmy Andrews in ue5-main branch]
2022-08-30 14:40:56 -04:00
Ryan Schmidt
ce7fda8364 DynamicMesh: add function MakeUniqueGroupLayerName that will make a unique group name given a base name
ModelingTools: add support for writing to selected group layer, as well as new group layer, in ConvertToPolygonsTool (GrpGen in UI). Also add support for setting groups from existing layer, which (combined) allows copying groups between layers, duplicating existing layer, and so on.
#rb none
#preflight 630e3856e11248377555f234

[CL 21704364 by Ryan Schmidt in ue5-main branch]
2022-08-30 13:00:48 -04:00
Jimmy Andrews
c739875cc3 Add test coverage to ensure that Clipper's Union operation can also be used to resolve self-intersections via union-with-empty
#rb rinat.abdrashitov
#preflight 630d89f80345de4ccf9b59ed

[CL 21703980 by Jimmy Andrews in ue5-main branch]
2022-08-30 12:44:16 -04:00
michael balzer
b7c701b8e7 Clipper2 TPS library: Disable "Dereferencing NULL pointer" warnings
#jira UE-161452
#preflight 6309141a66150c7b753a0a28

[CL 21596120 by michael balzer in ue5-main branch]
2022-08-26 15:04:00 -04:00
Jimmy Andrews
a004e6a786 remove DLL export symbol on header-defined function ComputeNumMatrixElements
#preflight 6307a1e3fd5ea6118cdc1ce1

[CL 21570857 by Jimmy Andrews in ue5-main branch]
2022-08-25 15:49:53 -04:00
semion piskarev
c17c1bd788 MeshModelingTools: Give ability to add extra corners in PolyEd for manipulation of some common open-boundary cases (like a disconnected rectangle, for instance). Also show selectable corners by default (but smaller).
#rb Matija.Kecman
#jira none
#preflight 6307ab3859064f9d1e43c1fb

[CL 21568934 by semion piskarev in ue5-main branch]
2022-08-25 14:06:37 -04:00
rinat abdrashitov
90cd97efcc Renaming AdaptiveTessellate.h/cpp to SelectiveTessellate.h/cpp
#rb trivial
#jira none
#rnx
#preflight 63069306a45b007ea2b6cedf

[CL 21564641 by rinat abdrashitov in ue5-main branch]
2022-08-25 11:02:41 -04:00
rinat abdrashitov
70cf962f41 Renaming AdaptiveTessellate to SelectiveTessellate to better reflect its actual functionality.
#rb jimmy.andrews
#jira none
#rnx
#preflight 6306859ac85b7fef22c52811

[CL 21551697 by rinat abdrashitov in ue5-main branch]
2022-08-24 16:46:15 -04:00
Joe Kirchoff
fa80772aea Fix undefined symbols when running clang analyzer in xatlas.cpp
Add check to CollisionConvexMesh.h to supress null reference warning by request
Suppress cplusplus.NewDeleteLeaks warnings in Chaos by request

#rnx
#rb trivial
#jira UE-160884
#preflight 630676ac0061f895d04b88fe

[CL 21549010 by Joe Kirchoff in ue5-main branch]
2022-08-24 15:16:09 -04:00
rinat abdrashitov
b0f59dad0a Fixed a bug causing an error when tessellating non-compact meshes.
#rb david.hill
#jira None
#rnx
#preflight 63064dce5366f61a42c39428

[CL 21547609 by rinat abdrashitov in ue5-main branch]
2022-08-24 14:28:05 -04:00
roey borsteinas
679290bffa Water: Water LOD system. Replaces water mesh tiles at a distance with simplified, non-tessellated meshes. This allows the Water Info texture to localized and higher precision.
#rb jonathan.bard, tim.dorries

[CL 21525131 by roey borsteinas in ue5-main branch]
2022-08-23 19:25:08 -04:00
rinat abdrashitov
13c60db582 Only displace those vertices that belong to triangles affected by the tessellation.
#rb david.hill
#rb jimmy.andrews
#jira none
#rnx
#preflight 63053a840061f895d02bb5d4

[CL 21524058 by rinat abdrashitov in ue5-main branch]
2022-08-23 18:55:07 -04:00
Ryan Schmidt
2a47ed9730 GeometryScript: add InvertMeshSelection
GeometrySelectionUtil: add FindByTopologyID function, to search a Selection for selected element with matching TopologyID but ignoring GeometryID. Update FGeometryScriptMeshSelection::CombineSelectionInPlace() to use this, as it was not properly combining Polygroup selections.
#rb none
#preflight 630501435a5d4e462428af90

[CL 21516930 by Ryan Schmidt in ue5-main branch]
2022-08-23 15:23:52 -04:00
Ryan Schmidt
c55dd6a6e2 DynamicMesh: fix VertexNormals mode in FOffsetMeshRegion. It was not properly handling the case where input mesh did not have VertexNormals attribute, the FMeshNormals being computed and passed to ::ApplyOffset() were never used.
GeometryScript: add ApplyMeshOffsetFaces and ApplyMeshInsetOutsetFaces
#rb none
#preflight 6303f6440061f895d0f67450

[CL 21510656 by Ryan Schmidt in ue5-main branch]
2022-08-23 12:31:21 -04:00