Commit Graph

118 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Ryan Schmidt
fe17133b36 GeometryScript: add ExpandContractMeshSelection. Add option to fallback to full mesh processing for FGeometryScriptMeshSelection::ProcessByTriangleID() and ProcessByVertexID(), to simplify handling "empty selection is full mesh" cases
GeometryProcessing: add basic implementation of FMeshVertexSelection::ContractByBorderVertices()
#rb none
#preflight 6303d587a45b007ea248b387

[CL 21489854 by Ryan Schmidt in ue5-main branch]
2022-08-22 15:21:45 -04:00
rinat abdrashitov
6606166965 Adding selective tessellation option to the Displace mesh tool to allow for tessellating triangles that belong to a certain material.
#rb lonnie.li
#rb ryan.schmidt
#rnx
#preflight 62fd1ce387319bacfb1457c3
#jira none

[CL 21427033 by rinat abdrashitov in ue5-main branch]
2022-08-17 12:59:12 -04:00
Ryan Schmidt
5390a93054 GeometryScript: add types and functions for creating mesh "Selections", ie subsets defined by a list of element IDs
GeometryScriptSelectionTypes.h:
New type FGeometryScriptMeshSelection stores Vertex, Triangle, and Polygroup selections. Currently internally represented as a TSharedPtr<FGeometrySelection>, however this is not exposed to BP at all. FGeometryScriptMeshSelection is an opaque object w/ no exposed properties, and it's contents cannot be serialized, ie it is only usable as temporary data during active GeometryScript computations.

MeshSelectionFunctions.h: library of functions for creating/manipulating mesh selections
CreateSelectAllMeshSelection - create a Mesh Selection for all elements of Mesh
ConvertMeshSelection - convert a Mesh Selection to a different type
CombineMeshSelections - combine two Mesh Selections using set operations (union, difference, intersection)
ConvertIndexArrayToMeshSelection / ConvertIndexSetToMeshSelection - convert TArray<int> / TSet<int> to a Mesh Selection
ConvertIndexSetToMeshSelection - convert a Mesh Selection to TArray<int>
ConvertIndexListToMeshSelection / ConvertMeshSelectionToIndexList - convert between an Index List and a Mesh Selection
SelectMeshElementsInBox, SelectMeshElementsInSphere, SelectMeshElementsWithPlane - create a Mesh Selection of all elements "inside" a geometric element
SelectMeshElementsByNormalAngle  - create a Mesh Selection of all elements based on normal vector direction
SelectMeshElementsInsideMesh - create a Mesh Selection of all elements inside another mesh (with optional extra shell thickness)
ExpandMeshSelectionToConnected - expand a Mesh Selection to Connected regions (various connectivity criteria)
GetMeshSelectionInfo - get the type and size of a Mesh Selection
DebugPrintMeshSelection - print a Mesh Selection to the output log

MeshSelectionQueryFunctions.h: library of functions for doing mesh queries based on a selection
GetMeshSelectionBoundingBox - get the bounding box of a Mesh Selection
GetMeshSelectionBoundaryLoops - get the boundary loops (indices and 3D polylines) of a Mesh Selection

#rb none
#preflight 62d9b3f33122bf80ae0f9950

[CL 21210151 by Ryan Schmidt in ue5-main branch]
2022-07-21 17:16:52 -04:00
Ryan Schmidt
535ef989c1 ModelingTools: add 'Find Quads' mode to GrpGen Tool. Implementation is in FPolygroupsGenerator::FindSourceMeshPolygonPolygroups. Add uv-seam-constraint and hard-normal-constraint options for both this new mode, and the existing normal-deviation mode.
#rb none
#preflight 62d5d30ec0180d80715825f1

[CL 21153635 by Ryan Schmidt in ue5-main branch]
2022-07-18 18:06:28 -04:00
matija kecman
f4900ae7a1 Render Capture Baking: Use depth capture to eliminate occlusion artefacts which can appear when baking non-convex shapes and look like weird sihouettes/blotches in the base color channel
Also removed artefacts that became visible after the ones fixible with a depth test were resolved. These were related to linearly interpolating data on the photosets, this was fixed since the baking framework is where texture filtering should take place

#rnx
#rb lonnie.li, ryan.schmidt
#jira none
#preflight 62d473b0dc4397d384a06bc8

[CL 21148985 by matija kecman in ue5-main branch]
2022-07-18 11:21:15 -04:00
Ryan Schmidt
b0490ac3d4 remove export on enum types
#rb none
#preflight 62d24e992e3e5993c36f1c5d

[CL 21121626 by Ryan Schmidt in ue5-main branch]
2022-07-16 01:46:08 -04:00
Ryan Schmidt
986547914e Move GeometrySelection.h and GeometrySelectionUtil.h to GeometryProcessing plugin. Move types in GeometrySelection.h into UE::Geometry:: namespace. Fix up usage sites.
#rb none
#preflight 62d1c7222e3e5993c351a126

[CL 21117964 by Ryan Schmidt in ue5-main branch]
2022-07-15 17:53:52 -04:00
nathan mitchell
aa9d919cd1 GeometryProcessing: Add additional vertex based connected component discovery methods to the MeshConnectedComponents class. When used, the resulting component indices are representing mesh vertices instead of mesh triangles.
#rb Jimmy.Andrews
#preflight 62b9cbc55d29d0d10abcc073

[CL 21057663 by nathan mitchell in ue5-main branch]
2022-07-12 12:15:55 -04:00
David Lesage
a4378546e5 Fix comment: FMeshMergeCoincidentEdges => FMergeCoincidentMeshEdges
#fyi ryan.schmidt
#preflight 62c75d608558075f425ea868

[CL 20994952 by David Lesage in ue5-main branch]
2022-07-07 18:41:12 -04:00
Ryan Schmidt
f9b9a5c264 GeometryProcessing: add FMeshPlanarSymmetry for detecting and applying planar symmetry to mesh vertices
#rb jimmy.andrews, david.hill
#preflight 62c5c2c02823f28cf2aaccea

[CL 20969099 by Ryan Schmidt in ue5-main branch]
2022-07-06 13:32:30 -04:00
David Hill
9bac4e3bd2 GeometryProcessing: ShapeApproximation, fixing implicit type conversion warnings.
#preflight 62bb2c053771c5710db4f04e
#rb Jimmy.Andrews

[CL 20901025 by David Hill in ue5-main branch]
2022-06-30 14:54:23 -04:00
Nickolas Drake
55a66e16e0 Add Group Edge Welding: Add group edge welding by adding extra vertices to edge that doesn't have enough, then welding edge sequences
#rb Semion.Piskarev
#jira none
#preflight 62a8efbadb45e64426a03d12

[CL 20811431 by Nickolas Drake in ue5-main branch]
2022-06-24 12:52:47 -04:00
Ryan Schmidt
2e3f49e8bd GeometryCore: add FMeshEdgeTriID struct that identifies an edge in a mesh by a 30-bit triangle ID and a 2-bit edge-index. This allows an edge to be represented on meshes that do not have explicit edge IDs, or on a FDynamicMesh3 after add/remove changes (as edge IDs are currently not stable across such operations).
GeometryProcessing: add functions to FGroupTopology to query some information by FMeshEdgeTriID

#rb davd.hill, jimmy.andrews
#preflight 62b0dec89c1686e7e7eecbe2

[CL 20745548 by Ryan Schmidt in ue5-main branch]
2022-06-20 17:41:52 -04:00