- 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
[CL 16650666 by Ryan Schmidt in ue5-main branch]
Also made a small change to LaplacianOperators.cpp:ConstructScaledCotangentLaplacian(), which had checkSlow() that was failing on zero-elements Area matrix at boundary vertices. Code in this function does not appear to correctly handle boundary vertices (however things work out in the end because matrices are squared later?)
#rb none
#rnx
#ROBOMERGE-SOURCE: CL 13145964 via CL 13145965 via CL 13145966
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v688-13145358)
[CL 13145967 by ryan schmidt in Main branch]
Most of the code moved to /Private/Solvers/Internal, except:
- MeshElementLinearization.h split into /GeometricObjects/Util/ElementLinearization.h (not mesh-specific) and /DynamicMesh/Solvers/MeshLinearization.h for vtx/tri subclasses
- ELaplacianWeightScheme and a few util functions moved to /DynamicMesh/Solvers/MeshLaplacian.h
- IConstrainedMeshOperator renamed to IConstrainedMeshSolver and moved to /DynamicMesh/Solvers/
- MeshSolverUtilities.h API functions moved to /DynamicMesh/Solvers/MeshSmoothing.h, ConstrainedMeshDeformer.h, ConstrainedMeshSmoother.h
- Laplacian matrix assembly refactored out of LaplacianOperators.cpp and moved to /DynamicMesh/Solvers/LaplacianMatrixAssembly. LaplacianOperator functions are now wrappers around those functions.
- most of FSOAPositions refactored into TVector3Arrays<T>, which it now subclasses. The arrays are now TArray<T> and Eigen::Map is used to pass them to/from Eigen code. Moved to FSparseMatrixD.h
#rb none
#rnx
#ROBOMERGE-SOURCE: CL 13045456 via CL 13045457 via CL 13045458
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v686-13045012)
[CL 13048356 by ryan schmidt in Main branch]
#rb none
#rnx
#ROBOMERGE-SOURCE: CL 12908995 via CL 12908996 via CL 12909001
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)
[CL 12909003 by ryan schmidt in Main branch]
#rb none
#rnx
#jira UE-90205
#ROBOMERGE-SOURCE: CL 11968217 in //UE4/Release-4.25/... via CL 11968232
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v656-11643781)
[CL 11968271 by ryan schmidt in Main branch]
Fixed memory stomp related to FConstraintData symbol name collision.
- Both AnimationCore and MeshModelingTools define an FConstraintData structure
- AnimNode_Constraint.cpp(106) calls TArray<FConstraintData>::Reset which calls ResizeTo
- ResizeTo calls AllocatorInstance.CalculateSlackReserve passing in 128 bytes per element which is the correct size of the FConstraintData in AnimationCore
- When we end up in DefaultCalculateSlackReserve, BytesPerElement is 40 which is incorrect. That's the size of FConstraintData in MeshModelingTools.
- This causes the array to under-allocate space for the number of elements requested
- Then AnimNode_Constraint.cpp(130) writes beyond the allocated buffer during FConstraintData copy construction in the TArray::Add call
By renaming the FConstraintData in MeshModelingTools, the compiler no longer conflates the two different types together and emits the correct size.
[FYI] braeden.shosa
#rb none
#jira none
#ROBOMERGE-SOURCE: CL 11847554 in //UE4/Release-4.25/... via CL 11847555
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v656-11643781)
[CL 11847557 by ryan schmidt in Main branch]