11 Commits

Author SHA1 Message Date
nathan mitchell
6353a138e5 GeometryProcessing: Improve the UV generation scheme PatchBuilder via a change to the polygroup generation stage, providing area aware sampling of the mesh surface and reducing the overcompensation effects that small, disconnected regions in the mesh were having on the overall segmentation.
Also provides a new CVar, modeling.DisableAutoUVAreaDensitySampling, which when set, returns the behavior to the original algorithm, in case there are legacy reasons to maintain that behavior.

#rb Jimmy.Andrews
#jira UE-144730

[CL 31581296 by nathan mitchell in 5.4 branch]
2024-02-16 16:41:15 -05:00
jimmy andrews
edc21b808e Add a normal-based clustering algorithm which groups connected triangle groups based on the current average normal of the group.
Use this algorithm in the polygroups generator tool, so we get more useful groups on smooth surfaces (like a cylinder)

Also add a helper to the FSizedDisjointSet class to easily get the number of groups in the set and a mapping between compact group indices and sparse group IDs

#rb david.hill

[CL 28433389 by jimmy andrews in ue5-main branch]
2023-10-03 17:20:18 -04:00
ryan schmidt
177f9e073c ModelingTools: add support for Mesh Selection to Generate Polygroups / Convert To Polygons Tool.
Base class is changed to USingleTargetWithSelectionTool.
When selection is provided, a UPreviewMesh for the unselected area is created and used.
A FSharedConstDynamicMesh3 is used to wrap either the original mesh or the selected submesh, and passed to the Operator (which also now takes a FSharedConstDynamicMesh3)
On shutdown, modified submesh is re-integrated into original mesh (in this case a trivial group copy suffices) and a new selection is emitted
#rb david.hill
#preflight 644036d1090323f9a31509d4
#jira UE-181651

[CL 25149588 by ryan schmidt in ue5-main branch]
2023-04-21 14:07:01 -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
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
nathan mitchell
cc0b68299f UVEditor: Enable support for polygroups and UDIMS in the AutoUV tool.
#rb semion.piskarev
#preflight 62685f23dd35c0d6cacdd455

[CL 20161755 by nathan mitchell in ue5-main branch]
2022-05-12 04:02:48 -04:00
Ryan Schmidt
9c4ded183d GeometryProcessing:
- add FDynamicMeshUVEditor::CopyUVLayer()
- Move Polygroup topology checks from SubdividePolyTool to FSubdividePoly::ValidateTopology()
#rb none
#rnx
#jira none
#preflight 61440d3fb5a4fa0001811535

[CL 17547788 by Ryan Schmidt in ue5-main branch]
2021-09-17 00:33:33 -04:00
Ryan Schmidt
08c899c7ca GeometryProcessing: add FPolygroupsGenerator::CopyPolygroupsToPolygroupSet(), to copy to arbitrary polygroup set (instead of only to default mesh polygroups)
#rb none
#rnx
#jira none
#preflight 6143c0d34778fa0001792712

[CL 17546420 by Ryan Schmidt in ue5-main branch]
2021-09-16 20:16:30 -04:00
Ryan Schmidt
1572d28a63 GeometryProcessing:
- add FPolygroupLayer struct which is basically an identifier for a Polygroup layer, ie either the default mesh layer or one of the extended attribute layers
- add FPolygroupsGenerator::FindPolygroupsFromHardNormalSeams()
- add option to FPolygroupsGenerator::FindPolygroupsFromFurthestPointSampling() to constrain generation relative to an input polygroup set, ie only subdivide existing polygroups
- FMeshRegionGraph::BuildFromComponents now takes optional are-triangles-connected predicate, to allow links in graph to be disabled
- FPatchBasedMeshUVGenerator can now optionally generate new UV islands relative to an input Polygoup set, via new GroupConstraint input

#rb david.hill
#rnx
#jira none
#preflight 6142106e568b3a0001dbc2d0

[CL 17522255 by Ryan Schmidt in ue5-main branch]
2021-09-15 12:50:27 -04:00
Ryan Schmidt
38da8be0cb GeometryProcessing: Move FFindPolygonsAlgorithm from ModelingTools to GeometryProcessing, rename to FPolygroupsGenerator. Replace usages of 'Polygon' with 'Polygroup' and update usage in ConvertToPolygonsTool.
#rb none
#rnx
#jira none
#preflight 611e7e97e7a307000164764c

[CL 17240134 by Ryan Schmidt in ue5-main branch]
2021-08-19 17:30:12 -04:00
michael balzer
9b4922340e GeometryProcessing: Move plugin from Experimental to Runtime
#jira UETOOL-3823
#rb ryan.schmidt

[CL 16958628 by michael balzer in ue5-main branch]
2021-07-26 14:06:18 -04:00