GeometryProcessing: Added FMeshAttributeTransfer class, currently supports transferring triangle material IDs from one mesh to another, via nearest-point queries
GeometryFlow: Added FCompactMeshNode, FComputeMeshPerVertexOverlayNormalsNode (convenient), and FTransferMeshMaterialIDsNode that applies FMeshAttributeTransfer based on two input meshes. Graph InferConnection() now is more clever and can infer connections in cases where a potentially-ambiguous connection is resolved based on what is already connected (ie if two mesh inputs, and one is assigned, infer that second one is intended)
LODToolset: LODGraph now transfers materials and computes per-vertex normals before Simplify node, and Compacts afterwards (required for other downstream processes).
LODProcess now handles multiple materials, and can re-use input materials if they do not require a baked texture or normal map. In repeat applications, previously-auto-generated StaticMesh Materials are detected and removed from the material set. Normals and Tangents are explicitly computed for stored HiRes source and LOD0, and build settings updated appropriately.
#rb none
#rnx
#jira none
[FYI] tyson.brochu
#ROBOMERGE-SOURCE: CL 15470041 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
[CL 15470044 by ryan schmidt in ue5-main branch]
2021-02-19 01:48:21 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "MeshProcessingNodes/MeshProcessingBaseNodes.h"
|
|
|
|
|
#include "MeshProcessingNodes/MeshProcessingDataTypes.h"
|
|
|
|
|
|
|
|
|
|
namespace UE
|
|
|
|
|
{
|
|
|
|
|
namespace GeometryFlow
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* FCompactMeshNode compacts the input mesh, to remove gaps in the vertex/triangle indexing. This node can be applied in-place.
|
|
|
|
|
*/
|
|
|
|
|
class FCompactMeshNode : public FProcessMeshBaseNode
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
FCompactMeshNode()
|
|
|
|
|
{
|
|
|
|
|
// we can mutate input mesh
|
|
|
|
|
ConfigureInputFlags(InParamMesh(), FNodeInputFlags::Transformable());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void ProcessMesh(
|
|
|
|
|
const FNamedDataMap& DatasIn,
|
|
|
|
|
const FDynamicMesh3& MeshIn,
|
2021-09-23 14:24:45 -04:00
|
|
|
FDynamicMesh3& MeshOut,
|
|
|
|
|
TUniquePtr<FEvaluationInfo>& EvaluationInfo) override
|
GeometryProcessing: Added FMeshAttributeTransfer class, currently supports transferring triangle material IDs from one mesh to another, via nearest-point queries
GeometryFlow: Added FCompactMeshNode, FComputeMeshPerVertexOverlayNormalsNode (convenient), and FTransferMeshMaterialIDsNode that applies FMeshAttributeTransfer based on two input meshes. Graph InferConnection() now is more clever and can infer connections in cases where a potentially-ambiguous connection is resolved based on what is already connected (ie if two mesh inputs, and one is assigned, infer that second one is intended)
LODToolset: LODGraph now transfers materials and computes per-vertex normals before Simplify node, and Compacts afterwards (required for other downstream processes).
LODProcess now handles multiple materials, and can re-use input materials if they do not require a baked texture or normal map. In repeat applications, previously-auto-generated StaticMesh Materials are detected and removed from the material set. Normals and Tangents are explicitly computed for stored HiRes source and LOD0, and build settings updated appropriately.
#rb none
#rnx
#jira none
[FYI] tyson.brochu
#ROBOMERGE-SOURCE: CL 15470041 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
[CL 15470044 by ryan schmidt in ue5-main branch]
2021-02-19 01:48:21 -04:00
|
|
|
{
|
|
|
|
|
MeshOut.CompactCopy(MeshIn);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void ProcessMeshInPlace(
|
|
|
|
|
const FNamedDataMap& DatasIn,
|
2021-09-23 14:24:45 -04:00
|
|
|
FDynamicMesh3& MeshInOut,
|
|
|
|
|
TUniquePtr<FEvaluationInfo>& EvaluationInfo) override
|
GeometryProcessing: Added FMeshAttributeTransfer class, currently supports transferring triangle material IDs from one mesh to another, via nearest-point queries
GeometryFlow: Added FCompactMeshNode, FComputeMeshPerVertexOverlayNormalsNode (convenient), and FTransferMeshMaterialIDsNode that applies FMeshAttributeTransfer based on two input meshes. Graph InferConnection() now is more clever and can infer connections in cases where a potentially-ambiguous connection is resolved based on what is already connected (ie if two mesh inputs, and one is assigned, infer that second one is intended)
LODToolset: LODGraph now transfers materials and computes per-vertex normals before Simplify node, and Compacts afterwards (required for other downstream processes).
LODProcess now handles multiple materials, and can re-use input materials if they do not require a baked texture or normal map. In repeat applications, previously-auto-generated StaticMesh Materials are detected and removed from the material set. Normals and Tangents are explicitly computed for stored HiRes source and LOD0, and build settings updated appropriately.
#rb none
#rnx
#jira none
[FYI] tyson.brochu
#ROBOMERGE-SOURCE: CL 15470041 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
[CL 15470044 by ryan schmidt in ue5-main branch]
2021-02-19 01:48:21 -04:00
|
|
|
{
|
|
|
|
|
MeshInOut.CompactInPlace();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // end namespace GeometryFlow
|
|
|
|
|
} //
|