# class FSimplygonDataConverter

An adapter to convert from SimplygonAPI types to Engine Types.

# Methods (public)

Method Description
AddDefaultDiffuseToMaterial Add default diffuse samples
AddSimplygonMaterials Add Simplygon materials to a simplygon scene by converting from flattened materials.
AddToScene Add UStaticMesh to a Simplygon scene.
Note: This should be unique per Simplygon scene, see FLODRecipeManager::Build for an example usage.
AddToScene Add USkeletalMesh to a Simplygon scene.
Note: This should be unique per Simplygon scene, see FLODRecipeManager::Build for an example usage.
AddToScene Add UStaticMeshComponent to a Simplygon scene.
Note: This should be unique per Simplygon scene, see FLODRecipeManager::Build for an example usage.
AddToScene Add materials to a Simplygon scene.
NOTE: This is a slow running task due to flatten material.
Note: This should be unique per Simplygon scene, see FLODRecipeManager::Build for an example usage.
AddToScene Add clipping planes to Simplygon scene.
AddToScene Add visibility samples to Simplygon scene.
Ex: NavMesh visibility culling
AddToScene Add culling geometry to Simplygon scene.
Ex: Landscape and other arbitrary tagged clipping geometry
AddToScene Add GeometryData to Simplygon scene
ConvertFromColorToWeights Converts colors to weights.
CreateFlattenMaterial Create Flatten material by converting from Simplygon materials contained in the scene.
CreateGeometryData Create Simplygon GeometryData from FMeshDescription.
Internally used by AddToScene methods.
CreateGeometryData Create Simplygon GeometryData from USkeletalMesh.
Internally used by AddToScene methods.
CreateGeometryData Create Simplygon GeometryData from USkeletalMesh.
Internally used by AddToScene methods.
CreateGeometryFromMeshDescription Created Simplygon::spGeometryData from MeshDescription.
CreateGeometryFromSkeletalLODModel Creates Simplygon::spGeometryData from FSkeletalMeshLODmodel
CreateGeometryFromSkeletalLODModel Creates Simplygon::spGeometryData from FSkeletalMeshLODmodel
CreateMaterialCasters Create material casters in the given pipeline based on properties in the input materials.
CreateMeshDescriptionFromGeometry Create MeshDescription from Simplygon::spGeometryData.
CreateMorphFieldsFromSkeletalMesh No description available.
CreateMorphTargetsFromGeometry No description available.
CreateSkeletalHierarchy Create hierarchy of bones from the
CreateSkeletalLODModelFromGeometry Creates a FSkeletalMeshLODmodel from Simplygon::spGeometryData
DisableClippingPlaneInPipeline No description available.
FindOrCreateSelectionSet Get selection set from scene. The selection set will be created if it does not exist.
GenerateTextureCoordinates No description available.
GetMaterialMaps Gets material mappings.
GetPipelineBakedMaterialBaseTemplatePath No description available.
IsClippingPlaneEnabledInPipeline No description available.
OutputDebugGeometry Writes out scene to disk.
OutputDebugGeometry Writes out scene to disk.
PackChartsUsingChartAggregator No description available.
PopulateLandscapeCullingGeometry No description available.
SaveSimplygonPipelineToIntermediate Writes out pipeline
SaveSimplygonSceneToIntermediate Writes out scene to disk.
UpdateVectorsInPipeline No description available.
VectorFromSimplygon Swizzle vector from Simplygon -> UE coordinate system (axis swap Y/Z)
VectorToSimplygon Swizzle vector from UE -> Simplygon coordinate system (axis swap Y/Z)

# AddDefaultDiffuseToMaterial

# Syntax

void AddDefaultDiffuseToMaterial(FFlattenMaterial &);

# Parameters

Type Name Description
FFlattenMaterial OutMaterial - Output material.

Return Type: void

# AddSimplygonMaterials

# Syntax

bool AddSimplygonMaterials(Simplygon::ISimplygon *, Simplygon::spScene, const TArray<struct FFlattenMaterial> &, bool);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK - Simplygon API which you can get from the Simplygon module.
Simplygon::spScene Scene - The scene where you want to add materials.
TArray< FFlattenMaterial> InputMaterials - Source flattened materials which will be converted to Simplygon materials and added to Scene.
bool bReleaseInputMaterials - If true, will remove InputMaterials color data to free memory.

Return Type: bool

# AddToScene

# Syntax

void AddToScene(Simplygon::ISimplygon *, Simplygon::spScene, const FSimplygonFlattenMaterialSettings &, UStaticMesh *, FSimplygonMeshMaterialInfo &);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK Pointer to Simplygon API.
Simplygon::spScene Scene Target scene where the UStaticMesh should be added.
FSimplygonFlattenMaterialSettings FlattenMaterialSettings Input material flattening settings.
UStaticMesh StaticMesh Mesh that should be added to the Scene.
FSimplygonMeshMaterialInfo OutMeshMaterialInfo Output mesh and material information used by material flattening.

Return Type: void

# AddToScene

# Syntax

void AddToScene(Simplygon::ISimplygon *, Simplygon::spScene, const FSimplygonFlattenMaterialSettings &, USkeletalMesh *, FSimplygonMeshMaterialInfo &);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK Pointer to Simplygon API.
Simplygon::spScene Scene Target scene where the USkeletalMesh should be added.
FSimplygonFlattenMaterialSettings FlattenMaterialSettings Input material flattening settings.
USkeletalMesh SkeletalMesh Mesh that should be added to the Scene.
FSimplygonMeshMaterialInfo OutMeshMaterialInfo Output mesh and material information used by material flattening.

Return Type: void

# AddToScene

# Syntax

void AddToScene(Simplygon::ISimplygon *, Simplygon::spScene, const FSimplygonFlattenMaterialSettings &, UStaticMeshComponent *, FSimplygonMeshMaterialInfo &);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK Pointer to Simplygon API.
Simplygon::spScene Scene Target scene where the UStaticMeshComponent should be added.
FSimplygonFlattenMaterialSettings FlattenMaterialSettings Input material flattening settings.
UStaticMeshComponent StaticMeshComponent Mesh component that should be added to the Scene.
FSimplygonMeshMaterialInfo OutMeshMaterialInfo Output mesh and material information used by material flattening.

Return Type: void

# AddToScene

# Syntax

void AddToScene(Simplygon::ISimplygon *, Simplygon::spScene, FSimplygonMeshMaterialInfo &);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK Pointer to Simplygon API.
Simplygon::spScene Scene Target scene where the MeshMaterialInfo should be added.
FSimplygonMeshMaterialInfo MeshMaterialInfo Input mesh and material information used by material flattening.

Return Type: void

# AddToScene

# Syntax

void AddToScene(Simplygon::ISimplygon *, Simplygon::spScene, Simplygon::spPipeline, const TArray<FPlane> &);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK Pointer to Simplygon API.
Simplygon::spScene Scene Target scene to where the clipping planes will be added.
Simplygon::spPipeline Pipeline Input pipeline for settings validation.
TArray<FPlane> ClippingPlanes Desired clipping planes that should be added to the scene.

Return Type: void

# AddToScene

# Syntax

void AddToScene(Simplygon::ISimplygon *, Simplygon::spScene, Simplygon::spPipeline, const TArray<FVector> &);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK Pointer to Simplygon API.
Simplygon::spScene Scene Target scene to where the clipping planes will be added.
Simplygon::spPipeline Pipeline Input pipeline for settings validation.
TArray<FVector> VisibilitySamples Desired visibility samples that should be added to the scene.

Return Type: void

# AddToScene

# Syntax

void AddToScene(Simplygon::ISimplygon *, Simplygon::spScene, Simplygon::spPipeline, const FMeshDescription *);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK Pointer to Simplygon API.
Simplygon::spScene Scene Target scene to where the clipping planes will be added.
Simplygon::spPipeline Pipeline Input pipeline for settings validation.
FMeshDescription CullingGeometry Desired geometry should be added to the scene as culling geometry.

Return Type: void

# AddToScene

# Syntax

void AddToScene(Simplygon::ISimplygon *, Simplygon::spScene, Simplygon::spGeometryData, const FString &);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK Pointer to Simplygon API.
Simplygon::spScene Scene Target scene to where the clipping planes will be added.
Simplygon::spGeometryData GeometryData Input geometry that should be added to the Simplygon scene.
FString NodeName Specify a name for the new scene node. Default: MeshNode.

Return Type: void

# ConvertFromColorToWeights

# Syntax

float ConvertFromColorToWeights(float, float);

# Parameters

Type Name Description
float ColorIntensity Color intensity to convert.
float Multiplier color multiplier.

Return Type: float

# CreateFlattenMaterial

# Syntax

bool CreateFlattenMaterial(Simplygon::spScene, struct FFlattenMaterial &, int32);

# Parameters

Type Name Description
Simplygon::spScene Scene - The scene which contains materials.
FFlattenMaterial OutMaterial - Output material.
int32 OutputMaterialIndex - Default 0, from what material output to convert from.

Return Type: bool

# CreateGeometryData

# Syntax

Simplygon::spGeometryData CreateGeometryData(Simplygon::ISimplygon *, const FSimplygonFlattenMaterialSettings &, const FMeshDescription *, const FString &, const TArray<FSectionInfo> &, FSimplygonMeshMaterialInfo &);

# Parameters

Type Name Description
Simplygon::ISimplygon API Pointer to Simplygon API.
FSimplygonFlattenMaterialSettings FlattenMaterialSettings Input flatten material settings.
FMeshDescription MeshDescription Input mesh to convert.
FString MeshDescriptionId A unique input mesh description id.
TArray<FSectionInfo> Sections Input mesh sections.
FSimplygonMeshMaterialInfo OutMeshMaterialInfo Output mesh and material information used by material flattening.

Return Type: Simplygon::spGeometryData

# CreateGeometryData

# Syntax

Simplygon::spGeometryData CreateGeometryData(Simplygon::ISimplygon *, Simplygon::spScene, const FSimplygonFlattenMaterialSettings &, USkeletalMesh *, const TArray<FSectionInfo> &, FSimplygonMeshMaterialInfo &);

# Parameters

Type Name Description
Simplygon::ISimplygon API Pointer to Simplygon API.
Simplygon::spScene Scene Target scene to where bones will be added.
FSimplygonFlattenMaterialSettings FlattenMaterialSettings Input flatten material settings.
USkeletalMesh SkeletalMesh Input mesh to convert.
TArray<FSectionInfo> Sections Input mesh sections.
FSimplygonMeshMaterialInfo OutMeshMaterialInfo Output mesh and material information used by material flattening.

Return Type: Simplygon::spGeometryData

# CreateGeometryData

# Syntax

Simplygon::spGeometryData CreateGeometryData(Simplygon::ISimplygon *, Simplygon::spScene, const FSimplygonFlattenMaterialSettings &, USkeletalMesh *, FSimplygonMeshMaterialInfo &);

# Parameters

Type Name Description
Simplygon::ISimplygon API Pointer to Simplygon API.
Simplygon::spScene Scene Target scene to where bones will be added.
FSimplygonFlattenMaterialSettings FlattenMaterialSettings Input flatten material settings.
USkeletalMesh SkeletalMesh Input mesh to convert.
FSimplygonMeshMaterialInfo OutMeshMaterialInfo Output mesh and material information used by material flattening.

Return Type: Simplygon::spGeometryData

# CreateGeometryFromMeshDescription

# Syntax

Simplygon::spGeometryData CreateGeometryFromMeshDescription(Simplygon::ISimplygon *, const FMeshDescription &, const TMap<FName, int32> &, const TArray<FBox2D> &, const TArray<FVector2D> &, bool);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK Pointer to ISimplygon factory.
FMeshDescription Mesh MeshDecription to convert.
TMap<FName, int32> MaterialMap Material mapping.
TArray<FBox2D> TextureBounds UV bounds.
TArray<FVector2D> InTexCoords UV Coords.
bool SetVertexWeights If true will set vertex weights.

Return Type: Simplygon::spGeometryData

# CreateGeometryFromSkeletalLODModel

# Syntax

Simplygon::spGeometryData CreateGeometryFromSkeletalLODModel(Simplygon::ISimplygon *, Simplygon::spScene, const FSkeletalMeshLODModel &, const TArray<Simplygon::rid> &, const TArray<FMatrix> &, const int32);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK Pointer to ISimplygon factory.
Simplygon::spScene Scene The Simplygon::spScene where data will be setup.
FSkeletalMeshLODModel LODModel FSkeletalMeshLODModel to use.
TArray<Simplygon::rid> BoneIDs List of bone indices.
TArray<FMatrix> BoneMatrices List of bone transforms.
int32 LODIndex LOD index.

Return Type: Simplygon::spGeometryData

# CreateGeometryFromSkeletalLODModel

# Syntax

Simplygon::spGeometryData CreateGeometryFromSkeletalLODModel(Simplygon::ISimplygon *, const FSkeletalMeshLODModel &, const TArray<Simplygon::rid> &, const TArray<FMatrix> &, const TMap<int32, int32>, const TArray<FBox2D> &, const TArray<FVector2D> &);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK Pointer to ISimplygon factory.
FSkeletalMeshLODModel LODModel FSkeletalMeshLODModel to use.
TArray<Simplygon::rid> BoneIDs List of bone indices.
TArray<FMatrix> BoneMatrices List of bone transforms.
TMap<int32, int32> SectionIndexToMaterialIndex
TArray<FBox2D> TextureBounds UV bounds.
TArray<FVector2D> InTexCoords UV Coordinates.

Return Type: Simplygon::spGeometryData

# CreateMaterialCasters

# Syntax

void CreateMaterialCasters(Simplygon::ISimplygon *, Simplygon::IPipeline *, const TArray<FFlattenMaterial> &);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK Pointer to ISimplygon factory.
Simplygon::IPipeline Pipeline Pipeline to use.
TArray<FFlattenMaterial> InputMaterials The input materials.

Return Type: void

# CreateMeshDescriptionFromGeometry

# Syntax

void CreateMeshDescriptionFromGeometry(const Simplygon::spGeometryData &, const TMap<int32, FName> &, FMeshDescription &, bool);

# Parameters

Type Name Description
Simplygon::spGeometryData GeometryData The Simplygon::spGeometryData to convert to MeshDescription.
TMap<int32, FName> MaterialMap Material mapping.
FMeshDescription OutMesh The converted MeshDescription.
bool bHasBakedMaterials If true will check for material lods on Simplygon::spGeometryData and perform required operations.

Return Type: void

# CreateMorphFieldsFromSkeletalMesh

# Syntax

void CreateMorphFieldsFromSkeletalMesh(Simplygon::spGeometryData &, const USkeletalMesh *, int32);

# Parameters

Type Name Description
Simplygon::spGeometryData GeometryData
USkeletalMesh SkeletalMesh
int32 BaseLODModel

Return Type: void

# CreateMorphTargetsFromGeometry

# Syntax

void CreateMorphTargetsFromGeometry(TArray<class UMorphTarget *> &, const Simplygon::spGeometryData, const int32, const FSkeletalMeshLODModel *, const TArray<int32>, const TSet<TSoftObjectPtr<UMorphTarget> > *);

# Parameters

Type Name Description
TArray< UMorphTarget > MorphTargets
Simplygon::spGeometryData GeometryData
int32 LODIndex
FSkeletalMeshLODModel LODModel
TArray<int32> VerticesToSkip
TSet<TSoftObjectPtr<UMorphTarget>> MorphTargetsToRemove

Return Type: void

# CreateSkeletalHierarchy

# Syntax

void CreateSkeletalHierarchy(Simplygon::ISimplygon *, Simplygon::spScene &, const struct FReferenceSkeleton &, TArray<Simplygon::rid> &);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK Pointer to ISimplygon factory.
Simplygon::spScene Scene Simplygon::spScene use to setup bone hierarchy.
FReferenceSkeleton Skeleton The reference skeleton.
TArray<Simplygon::rid> OutBoneTableIDs List of bone indices.

Return Type: void

# CreateSkeletalLODModelFromGeometry

# Syntax

void CreateSkeletalLODModelFromGeometry(FSkeletalMeshLODModel *, const Simplygon::spGeometryData &, USkeletalMesh *, const int32, const bool, const bool, const TSet<TSoftObjectPtr<class UMorphTarget> > *);

# Parameters

Type Name Description
FSkeletalMeshLODModel NewModel The newly created FSkeletalMeshLODModel to populate.
Simplygon::spGeometryData GeometryData Simplygon::spGeometryData to convert from.
USkeletalMesh SkeletalMesh The owning skeletal mesh.
int32 LODIndex Index to the LOD we are creating.
bool bHasBakedMaterials If true will do necessary step to handle material lods from Simplygon::spGeometryData.
bool bCreateMorphTargets If true, will create morph targets for the LOD if the data exists in GeometryData.
TSet<TSoftObjectPtr< UMorphTarget>> MorphTargetsToRemove Morph targets that should be removed for this LOD.

Return Type: void

# DisableClippingPlaneInPipeline

# Syntax

void DisableClippingPlaneInPipeline(Simplygon::spPipeline);

# Parameters

Type Name Description
Simplygon::spPipeline InPipeline

Return Type: void

# FindOrCreateSelectionSet

# Syntax

Simplygon::spSelectionSet FindOrCreateSelectionSet(Simplygon::ISimplygon *, Simplygon::spScene, const char *);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK Pointer to Simplygon API.
Simplygon::spScene Scene where to find or create the selection set.
char SelectionSetName Name of the selection set to find or create.

Return Type: Simplygon::spSelectionSet

# GenerateTextureCoordinates

# Syntax

void GenerateTextureCoordinates(Simplygon::ISimplygon *, Simplygon::spGeometryData, uint32, Simplygon::spObject, TArray<FVector2D> &);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK
Simplygon::spGeometryData GeometryData
uint32 TexCoordIndex
Simplygon::spObject TextureCoordinateGenerator
TArray<FVector2D> OutTexCoords

Return Type: void

# GetMaterialMaps

# Syntax

void GetMaterialMaps(Simplygon::ISimplygon *, const FMeshDescription &, TMap<FName, int32> &, TMap<int32, FName> &, TArray<int32>);

# Parameters

Type Name Description
Simplygon::ISimplygon sdk
FMeshDescription Mesh The MeshDescription to extract material mapping from.
TMap<FName, int32> OutMaterialNameToIndex A mapping between material name to index.
TMap<int32, FName> OutMaterialIndexToName A mapping between material index to name.
TArray<int32> MaterialIdRemap

Return Type: void

# GetPipelineBakedMaterialBaseTemplatePath

# Syntax

FString GetPipelineBakedMaterialBaseTemplatePath(const Simplygon::spPipeline, uint32);

# Parameters

Type Name Description
Simplygon::spPipeline InPipeline
uint32 InIndex

Return Type: FString

# IsClippingPlaneEnabledInPipeline

# Syntax

bool IsClippingPlaneEnabledInPipeline(Simplygon::spPipeline);

# Parameters

Type Name Description
Simplygon::spPipeline InPipeline

Return Type: bool

# OutputDebugGeometry

# Syntax

void OutputDebugGeometry(Simplygon::ISimplygon *, Simplygon::spScene &, const FString &);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK Pointer to ISimplygon factory.
Simplygon::spScene Scene The Simplygon::spScene to export.
FString OutputFileName

Return Type: void

# OutputDebugGeometry

# Syntax

void OutputDebugGeometry(Simplygon::ISimplygon *, Simplygon::spGeometryData &, const FString &);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK Pointer to ISimplygon factory.
Simplygon::spGeometryData Geometry The Simplygon::spGeoemtryData to export.
FString OutputFileName

Return Type: void

# PackChartsUsingChartAggregator

# Syntax

void PackChartsUsingChartAggregator(Simplygon::ISimplygon *, Simplygon::spGeometryData, const FSimplygonFlattenMaterialSettings &, uint32, FAddMeshMaterialInfoResult &, TArray<FVector2D> &);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK
Simplygon::spGeometryData GeometryData
FSimplygonFlattenMaterialSettings FlattenMaterialSettings
uint32 TexCoordIndex
FAddMeshMaterialInfoResult MaterialInfo
TArray<FVector2D> OutTexCoords

Return Type: void

# PopulateLandscapeCullingGeometry

# Syntax

void PopulateLandscapeCullingGeometry(Simplygon::ISimplygon *, Simplygon::spScene, Simplygon::spPipeline, UWorld *, const FBoxSphereBounds &);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK
Simplygon::spScene Scene
Simplygon::spPipeline InPipeline
UWorld World
FBoxSphereBounds EstimatedBounds

Return Type: void

# SaveSimplygonPipelineToIntermediate

# Syntax

void SaveSimplygonPipelineToIntermediate(Simplygon::ISimplygon *, Simplygon::IPipeline *, const FString &, FGuid);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK Pointer to ISimplygon factory.
Simplygon::IPipeline Pipeline
FString Prefix
FGuid Id

Return Type: void

# SaveSimplygonSceneToIntermediate

# Syntax

void SaveSimplygonSceneToIntermediate(Simplygon::ISimplygon *, Simplygon::spScene, const FString &, FGuid);

# Parameters

Type Name Description
Simplygon::ISimplygon SDK Pointer to ISimplygon factory.
Simplygon::spScene Scene The Simplygon::spScene to export.
FString Prefix
FGuid Id

Return Type: void

# UpdateVectorsInPipeline

# Syntax

void UpdateVectorsInPipeline(Simplygon::spPipeline);

# Parameters

Type Name Description
Simplygon::spPipeline InPipeline

Return Type: void

# VectorFromSimplygon

# Syntax

FVector VectorFromSimplygon(const FVector &);

# Parameters

Type Name Description
FVector vec

Return Type: FVector

# VectorToSimplygon

# Syntax

FVector VectorToSimplygon(const FVector &);

# Parameters

Type Name Description
FVector vec

Return Type: FVector