AutoLOD: make mesh computation type configurable using new GeometryFlow Switch node, and expose Normals calculation settings in Graph/Process/Tool
GeometryFlow:
Add TSwitchNode node, uses internal integer to select one of N inputs (N is currently defined in template type, so number of inputs is fixed). Add custom util function UpdateSwitchNodeInputIndex() to simplify changing switch integer.
Add FMeshMakeCleanGeometryNode/Settings, strips out undesired attribute sets and fills small holes, to create better input mesh for simplification
Add FSimpleInPlaceProcessMeshBaseNode, just runs some basic geometry operation, makes it easier to make new nodes. Converted FComputeMeshPerVertexOverlayNormalsNode to this base class and added FComputeMeshPerVertexNormalsNode.
Fixed attribute set handling issue in FSimplifyMeshNode
MeshLODToolset:
Added ECoreMeshGeneratorMode enum to FGenerateMeshLODGraph. This setting drives a Switch node that picks between Vox, Vox+Closure, and Simplify-only mesh generation paths.
Added SourceMeshHint to BuildGraph, allows for variable graph construction. Use to skip MaterialID transfer in single-material case.
Change default collision type to aligned boxes (fast and low visual complexity)
Exposed top-level Mesh Generation type, Normals settings in Graph/Process/Tool, minor UI and default changes
#rb tyson.brochu
#rnx
#jira none
#preflight 61391fa89c40ec00012ddec0
[CL 17466797 by Ryan Schmidt in ue5-main branch]
2021-09-08 21:44:50 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "MeshProcessingNodes/MeshProcessingBaseNodes.h"
|
|
|
|
|
#include "MeshProcessingNodes/MeshProcessingDataTypes.h"
|
|
|
|
|
|
|
|
|
|
namespace UE
|
|
|
|
|
{
|
|
|
|
|
namespace GeometryFlow
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
struct GEOMETRYFLOWMESHPROCESSING_API FMeshMakeCleanGeometrySettings
|
|
|
|
|
{
|
|
|
|
|
DECLARE_GEOMETRYFLOW_DATA_TYPE_IDENTIFIER(EMeshProcessingDataTypes::MakeCleanGeometrySettings);
|
|
|
|
|
|
|
|
|
|
int FillHolesEdgeCountThresh = 8;
|
|
|
|
|
double FillHolesEstimatedAreaFraction = 0.001;
|
|
|
|
|
|
|
|
|
|
bool bDiscardAllAttributes = false;
|
|
|
|
|
bool bClearUVs = true;
|
|
|
|
|
bool bClearNormals = true;
|
|
|
|
|
bool bClearTangents = true;
|
|
|
|
|
bool bClearVertexColors = true;
|
|
|
|
|
bool bClearMaterialIDs = false;
|
|
|
|
|
|
|
|
|
|
bool bOutputMeshVertexNormals = true;
|
|
|
|
|
bool bOutputOverlayVertexNormals = true;
|
|
|
|
|
};
|
|
|
|
|
GEOMETRYFLOW_DECLARE_SETTINGS_TYPES(FMeshMakeCleanGeometrySettings, MeshMakeCleanGeometry);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class GEOMETRYFLOWMESHPROCESSING_API FMeshMakeCleanGeometryNode : public TProcessMeshWithSettingsBaseNode<FMeshMakeCleanGeometrySettings>
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
void ProcessMesh(
|
|
|
|
|
const FNamedDataMap& DatasIn,
|
|
|
|
|
const FMeshMakeCleanGeometrySettings& SettingsIn,
|
|
|
|
|
const FDynamicMesh3& MeshIn,
|
2021-09-23 14:24:45 -04:00
|
|
|
FDynamicMesh3& MeshOut,
|
|
|
|
|
TUniquePtr<FEvaluationInfo>& EvaluationInfo) override;
|
AutoLOD: make mesh computation type configurable using new GeometryFlow Switch node, and expose Normals calculation settings in Graph/Process/Tool
GeometryFlow:
Add TSwitchNode node, uses internal integer to select one of N inputs (N is currently defined in template type, so number of inputs is fixed). Add custom util function UpdateSwitchNodeInputIndex() to simplify changing switch integer.
Add FMeshMakeCleanGeometryNode/Settings, strips out undesired attribute sets and fills small holes, to create better input mesh for simplification
Add FSimpleInPlaceProcessMeshBaseNode, just runs some basic geometry operation, makes it easier to make new nodes. Converted FComputeMeshPerVertexOverlayNormalsNode to this base class and added FComputeMeshPerVertexNormalsNode.
Fixed attribute set handling issue in FSimplifyMeshNode
MeshLODToolset:
Added ECoreMeshGeneratorMode enum to FGenerateMeshLODGraph. This setting drives a Switch node that picks between Vox, Vox+Closure, and Simplify-only mesh generation paths.
Added SourceMeshHint to BuildGraph, allows for variable graph construction. Use to skip MaterialID transfer in single-material case.
Change default collision type to aligned boxes (fast and low visual complexity)
Exposed top-level Mesh Generation type, Normals settings in Graph/Process/Tool, minor UI and default changes
#rb tyson.brochu
#rnx
#jira none
#preflight 61391fa89c40ec00012ddec0
[CL 17466797 by Ryan Schmidt in ue5-main branch]
2021-09-08 21:44:50 -04:00
|
|
|
|
|
|
|
|
void ProcessMeshInPlace(
|
|
|
|
|
const FNamedDataMap& DatasIn,
|
|
|
|
|
const FMeshMakeCleanGeometrySettings& Settings,
|
2021-09-23 14:24:45 -04:00
|
|
|
FDynamicMesh3& MeshInOut,
|
|
|
|
|
TUniquePtr<FEvaluationInfo>& EvaluationInfo) override;
|
AutoLOD: make mesh computation type configurable using new GeometryFlow Switch node, and expose Normals calculation settings in Graph/Process/Tool
GeometryFlow:
Add TSwitchNode node, uses internal integer to select one of N inputs (N is currently defined in template type, so number of inputs is fixed). Add custom util function UpdateSwitchNodeInputIndex() to simplify changing switch integer.
Add FMeshMakeCleanGeometryNode/Settings, strips out undesired attribute sets and fills small holes, to create better input mesh for simplification
Add FSimpleInPlaceProcessMeshBaseNode, just runs some basic geometry operation, makes it easier to make new nodes. Converted FComputeMeshPerVertexOverlayNormalsNode to this base class and added FComputeMeshPerVertexNormalsNode.
Fixed attribute set handling issue in FSimplifyMeshNode
MeshLODToolset:
Added ECoreMeshGeneratorMode enum to FGenerateMeshLODGraph. This setting drives a Switch node that picks between Vox, Vox+Closure, and Simplify-only mesh generation paths.
Added SourceMeshHint to BuildGraph, allows for variable graph construction. Use to skip MaterialID transfer in single-material case.
Change default collision type to aligned boxes (fast and low visual complexity)
Exposed top-level Mesh Generation type, Normals settings in Graph/Process/Tool, minor UI and default changes
#rb tyson.brochu
#rnx
#jira none
#preflight 61391fa89c40ec00012ddec0
[CL 17466797 by Ryan Schmidt in ue5-main branch]
2021-09-08 21:44:50 -04:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
void ApplyMakeCleanGeometry(FDynamicMesh3& MeshInOut, const FMeshMakeCleanGeometrySettings& Settings);
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // end namespace GeometryFlow
|
|
|
|
|
} // end namespace UE
|