16 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
steve robb
f029468598 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30729174 by steve robb in ue5-main branch]
2024-01-19 16:41:35 -05:00
steve robb
3b6462b7e7 Fixed TArrays of C arrays.
#rb devin.doucette

[CL 29127238 by steve robb in ue5-main branch]
2023-10-26 05:10:20 -04: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
semion piskarev
c1720ded9d MeshModelingTools: Make FMeshFaceDualGraph support non-compact meshes.
#rb Jimmy.Andrews
#jira UE-184391
#preflight 645ea780cf788a25587a8b27

[CL 25496034 by semion piskarev in ue5-main branch]
2023-05-16 16:02:28 -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
David Hill
963664ce11 Geometry: Updates to fix type conversion warnings in PolygroupsGenerator.cpp
#preflight none
#rnx

[CL 21187808 by David Hill in ue5-main branch]
2022-07-20 15:59:31 -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
michael balzer
b8a1c9b6cf GeometryCore: Remove ExplicitUseGeometryMathTypes.h
#ROBOMERGE-AUTHOR: michael.balzer
#ROBOMERGE-SOURCE: CL 18227685 in //UE5/Release-5.0/... via CL 18229350
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 18231457 by michael balzer in ue5-release-engine-test branch]
2021-11-17 19:02:44 -05:00
ryan schmidt
c647fcbcdb DynamicMesh: fix trivial bug in PolygroupsGenerator, was using wrong array size variable
#rb none
#rnx
#jira none

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 17724028 in //UE5/Release-5.0/... via CL 17724055
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v879-17706426)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17724063 by ryan schmidt in ue5-release-engine-test branch]
2021-10-05 13:17:12 -04:00
ryan schmidt
2efe9023a9 GeometryProcessing: add FPolygroupsGenerator::CopyPolygroupsToPolygroupSet(), to copy to arbitrary polygroup set (instead of only to default mesh polygroups)
#rb none
#rnx
#jira none
#preflight 6143c0d34778fa0001792712

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 17546420 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17546423 by ryan schmidt in ue5-release-engine-test branch]
2021-09-16 20:16:52 -04:00
ryan schmidt
1c7d18c5f4 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

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 17522255 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17522278 by ryan schmidt in ue5-release-engine-test branch]
2021-09-15 12:51:55 -04:00
ryan schmidt
597b4ec3e9 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

#ROBOMERGE-SOURCE: CL 17240134 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17240135 by ryan schmidt in ue5-release-engine-test branch]
2021-08-19 17:30:43 -04:00
michael balzer
ba195473cd GeometryProcessing: Move plugin from Experimental to Runtime
#jira UETOOL-3823
#rb ryan.schmidt

#ROBOMERGE-SOURCE: CL 16958628 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16958640 by michael balzer in ue5-release-engine-test branch]
2021-07-26 14:07:13 -04:00