- 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]
- Avoid launching level-4 subdivision initially, which currently happens before subdivision level is clamped, and will compute at least one subdivision before cancelling (which can take a long time on a mesh with millions of triangles)
- support ProgressCancel inside SubdivideMesh() function, which can take significant compute/memory resources for a single call
- Pass VertexID through various weightmap functions, so we can directly sample displacement at vertex when it is known
- store weightmap values in per-vertex UVs before subdivision. These are linearly interpolated during subdivision, so output mesh has weightmap value stored in VertexUV.X, and can be directly sampled, instead of using AABBTree nearest-point query
- due to above, need to invalidate subdivision if weightmap changes.
- If weight map is "None", set null ActiveWeightMap, this is cleanly handled and avoids potentially-costly weightmap sampling if it is not needed
- fix issue with subdivision-steps clamping message being shown at Tool startup, only show after the user has explicitly change the value
#rb tyson.brochu
#rnx
#jira none
[CL 15133805 by Ryan Schmidt in ue5-main branch]
- new correspondence-finding strategy in FMeshImageBakingCache. Added a global Thickness parameter, and now preferentially uses the ray-hit found by casting inwards from Point+Thickness*Normal. This handles the cases where a greeble/etc is just layered on top of base mesh. These kind of mesh elements are only intended to show up in the normal map, so they aren't stitched in.
- expose Thickness and World-Space options in BakeMeshAttributeMapsTool
- initialize image in Normal and ResampleImage Bakers, otherwise initial value is garbage
- add TSampledScalarField2::BilinearSampleGradientClamped and fix typo in BilinearSampleClamped() that resulted in incorrect interpolation
- add Texture2DUtil, contains functions for reading a TImageBuilder from a UTexture2D. Can read from source data if available.
- ColorConstants now returns white for group 0
- add double version of FMeshDescriptionToDynamicMesh::CopyTangents()
- add support for computing on subset of vertiecs in FMeshConvexHull
- fix up template export in TMeshTangents
- make mesh const in TImplicitMorphology, TImplicitSolidify
- accessor/etc additions in TDenseGrid2, TImageBuilder, TSampledScalarField2, TIndexedWeightMap
- add source UStaticMesh reference in FPhysicsDataCollection, function to initialize from a UStaticMesh
- update Tools affected by above changes
- add TSampleSetStatisticBuilder::ComputeMultiPass() helper function to compute stats for iterable collections in one line
- remove dead code in UVLayoutOp.cpp
#rb tyson.brochu
#rnx
#jira none
[CL 14769759 by Ryan Schmidt in ue5-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-84211
#ROBOMERGE-SOURCE: CL 12026998 in //UE4/Release-4.25/... via CL 12027009
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v656-11643781)
[CL 12049347 by ryan schmidt in Main branch]
#jira UE-90165
#rb none
#rnx
#ROBOMERGE-SOURCE: CL 12019172 in //UE4/Release-4.25/... via CL 12019188
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v656-11643781)
[CL 12019227 by michael daum in Main branch]