GeometryProcessing: make PolygroupSet take a const mesh, and require caller to provide writable mesh when calling SetGroup()
#rb none
#rnx
#jira none
#preflight 60d4ed571a88600001270256
#ROBOMERGE-SOURCE: CL 16781671 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)
[CL 16781675 by ryan schmidt in ue5-release-engine-test branch]
- Refactor recompute-UVs-for-groups/islands out of ParameterizeMeshOp/Tool into RecomputeUVsOp/Tool. RecomputeUVsTool supports selection of active PolygroupLayer when applicable. Add support for auto-repacking.
- Clean up ParameterizeMeshOp/Tool, remove functionality related to recomputation that was moved to Recompute tool, add separate property sets for UVAtlas and XAtlas
- Add FDynamicMeshUVEditor::QuickPack() function to compute UV layout
- Add support for Polygroup Layer selection in SetCollisionGeometryTool, if only one source object is in use
#rb none
#rnx
#jira none
#preflight 60ced4b0be81e800012cc135
#ROBOMERGE-SOURCE: CL 16724375 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)
[CL 16724383 by ryan schmidt in ue5-release-engine-test branch]
UMeshElementsVisualizer::SetMeshAccessFunction() now takes a TFunction with a TFunctionRef argument, instead of with a FDynamicMesh3* argument. This allows the UMeshElementsVisualizer to access the target mesh via the ProcessMesh()-style call on a UPreviewMesh, UDynamicMesh, etc, rather than receiving direct pointer access. See UWeldMeshEdgesTool::Setup() for example usage.
Add UMeshOpPreviewWithBackgroundCompute::ProcessCurrentMesh(), which forwards to the embedded UPreviewMesh::ProcessMesh() (which can be used with the above)
Add UE::ToolTarget::GetMeshDescriptionCopy() to ModelingToolTargetUtil, similar to existing DynamicMesh variant that will auto-compute tangents if necessary.
#rb none
#rnx
#jira none
#preflight 60c8def586ce760001d8de51
[FYI] semion.piskarev
#ROBOMERGE-SOURCE: CL 16679472 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)
[CL 16679476 by ryan schmidt in ue5-release-engine-test branch]
- Add UE::ToolTarget::CommitMaterialSetUpdate() and ::CommitDynamicMeshUpdate(). ::GetDynamicMeshCopy() can now return tangents if requested.
- Add IMeshDescriptionProvider::CalculateAutoGeneratedAttributes(). Default implementation does nothing, UStaticMeshComponentToolTarget implementation initializes auto-generated MeshDescription attributes. Used in ::GetDynamicMeshCopy() to get tangents (but requires a MeshDescription copy).
- Clean up handling of Tangents in Simple/OctreeDynamicMeshComponent. Add local MakeTangentsFunc() to generate the Tangents lambda, handle different cases and no-tangents fallbacks consistently.
- UDynamicMesh: add optional info arguments to EditMesh() and ChangeInfo struct. Add support for deferring change events from Edit funcs.
- Remove UBaseDynamicMeshComponent::InitializeMesh(), ::Bake() APIs, and add ::SetMesh(). Implement in Simple/Octree implementations, update all Tools that used those APIs.
- Add USimpleDynamicMeshComponent::ProcessMesh(), EditMesh(). These are now the preferred ways to read/write mesh.
- Update USimpleDynamicMeshComponent tangents handling. Externally-computed tangents are now taken directly from the FDynamicMesh3 attribute set. Autogenerated tangents are still computed and stored in an internal FMeshTangentsf, but this is no longer exposed for external updates.
- Remove UPreviewMesh pass-through functions for Tangents access, InitializeMesh() and Bake(). Add ProcessMesh()
- Update all affected Tools. In most cases these Tools have also been converted to use ModelingToolTargetUtil functions, instead of direct ToolTarget interface casting.
#rb none
#rnx
#jira none
#preflight 60c3e71d3e1b3c00015668af
#ROBOMERGE-SOURCE: CL 16650666 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v833-16641396)
[CL 16650707 by ryan schmidt in ue5-release-engine-test branch]
- Move ToolTarget implementations, DynamicMeshToVolume to ModelingComponentsEditorOnly module
- move VolumeToDynamicMesh, DynamicMeshProvider/Commiter interfaces to ModelingComponents module
- Add UCreateMeshObjectTypeProperties property set to expose mesh/volume options
- Add FCreateMeshObjectParams::TypeHintClass to allow AVolume type (or other UClass hints) to be passed to creation APIs
- Add UE::ToolTarget::ConfigureCreateMeshObjectParams() util function in ModelingToolTargetUtil, tries to determine output type in a FCreateMeshObjectParams based on input ToolTarget
- Add UEditorModelingObjectsCreationAPI::CreateVolume() implementation
- Add UEditorModelingObjectsCreationAPI::FilterMaterials() that strips out any internal materials and replaces with WorldGridMaterial. This occurs when (eg) subtracting a Volume from a StaticMesh, because the temporary volume mesh gets assigned internal materials, but the Tools don't know this. Use in EditorModelingObjectsCreationAPI when creating new objects. UStaticMeshComponentToolTarget also does this filtering in ::CommitMaterialSetUpdate().
- Add ::ComponentTypeSupportsCollision() function to ComponentCollisionUtil, use to avoid checks/ensures for Volume targets
- Add support for automatic mesh simplification in DynamicMeshToVolume. Add CVar to VolumeDynamicMeshToolTarget.h to control max triangle count (default 500). Apply auto-simplify when creating or updating an AVolume. This prevents the Editor from blocking for long periods on meshes that are too high-res for volumes (even 500 is quite high).
- DynamicMeshToVolume now emits polygroup-faces that contain holes (ie multiple boundary loops) as a set of triangles, rather than emitting separate overlapping faces for each boundary loop
#rb none
#rnx
#jira none
#preflight 60ba50632c42ea0001cb54c5
[CL 16561742 by Ryan Schmidt in ue5-main branch]
- add new UModelingObjectsCreationAPI and associated data structures, provides abstract API for creating mesh and texture objects from Tools that is not specifically tied to StaticMesh Actors/Assets
- new helper functions in UE::Modeling:: namespace to simplify usage of an implementation of this API registered in a ContextObjectStore
- add new UEditorModelingObjectsCreationAPI implementation of above, supports hooks for higher level to provide custom paths
- add ModelingModeAssetUtils.h, provides several functions in UE::Modeling:: namespace to be used to implement those hooks (various existing path-determination code is moved here)
- ModelingToolsEditorMode now registers an instance of UEditorModelingObjectsCreationAPI in ContextObjectStore and connects up callbacks to these path functions
- AssetGenerationUtil functions and ModelingModeAssetAPI deleted
- All Tools that previously used IToolsContextAssetAPI updated to use this new system
#rb jimmy.andrews
#rnx
#jira none
#preflight 60b7c2ddae46a1000162729b
[CL 16538450 by Ryan Schmidt in ue5-main branch]
Always clear the cached mesh descriptor for now. If we do undo after the commit, the cached descriptor is out-of-date w.r.t the actual skelmesh. Deal with it better once skelmeshes actually store their data as mesh descripors.
#trivial
#rnx
[CL 16329029 by halfdan ingvarsson in ue5-main branch]
MeshModelingToolset: expose new option in SimplifyMeshOp and SimplifyMeshTool
#rb david.hill
#rnx
#jira none
#preflight 6099fb752032ee00016bee43
[CL 16274273 by Ryan Schmidt in ue5-main branch]
Change color of UV seams to match the color used in the mesh inspector.
Also update the option name to "Show UV Seams" from "Show Constraints"
#jira none
#rb jimmy.andrews
#preflight 609414f2dfc63600019b3e05
[CL 16223526 by David Hill in ue5-main branch]
- Changed triangulation of volume polygons to Delaunay to avoid degenerate tris when possible.
- Added ability to set degenerate tri normals to neighbor normal to avoid creating nonplanar volume polygons if degenerate tris do appear.
- Created a path to use FPolys instead of bsp nodes to convert from volumes, as nodes get broken up arbitrarily.
- Gave volume conversion the ability to preserve group boundary edges.
- Changed PlanarFlipsOptimization to correctly deal with degenerate tris, and to respect group boundaries.
- Added legacy cleanup code that Ryan ported to make volume faces convex.
- Changed our version of the convexity code to avoid arbitrary precision cutoff, and to remove one of the places we were arbitrarily throwing away colinear verts.
- Changed on-the-fly conversion options to not try to fill cracks, as this seems to worsen any problems further.
#rb Jimmy.Andrews, Ryan.Schmidt
#lockdown simon.tourangeau
#rnx
#jira UE-107140
#ROBOMERGE-OWNER: semion.piskarev
#ROBOMERGE-AUTHOR: semion.piskarev
#ROBOMERGE-SOURCE: CL 15953732 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v787-15839533)
#ROBOMERGE-CONFLICT from-shelf
[CL 15971476 by semion piskarev in ue5-main branch]