Process
Python API functions
Read time 2 minutesLast updated 8 hours ago
decimateTargetBake
Automatically decimates a selection of meshes, using as a target a triangle count or a ratio (reduction percentage), and bakes Normals information into a texture (plus other textures).
process.decimateTargetBake(occurrences, decimationTargetType, bakingOptions, overrideExistingUV=True)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Occurrences to process. |
| DecimateOptionsSelector | decimationTargetType | |
| BakeOptions | bakingOptions | Option maps baking. |
| Boolean | overrideExistingUV | Override the original UV or not. |
generateLODChain
Automatically generates LODs for the current selection.
process.generateLODChain(occurrences, decimationStrategy)
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Scene paths of components to process. |
| DecimationStrategy | decimationStrategy | The decimation strategy. |
generateLODChainQuality
Automatically generates LODs for the current selection.
process.generateLODChainQuality(occurrences, decimateParametersList=[DecimateParameters(1., 0.1, 5.), DecimateParameters(3., 1., 10.)])
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Scene paths of components to process. |
| DecimateParametersList | decimateParametersList | The list of all LOD decimate parameters. |
generateLODChainTarget
Automatically generates LODs for the current selection, using the decimate to target algorithm.
process.generateLODChainTarget(occurrences, UVImportance=0, ProtectTopology=False, LODLevels=[algo.DecimationRatio(50), algo.DecimationRatio(25)])
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Scene paths of components to process. |
| UVImportanceEnum | UVImportance | |
| Boolean | ProtectTopology | |
| DecimationRatioList | LODLevels | The list of all LOD decimate parameters. |
generatePhantomMesh
Automatically generates one unique optimized mesh out of the models in the scene, with material(s).
process.generatePhantomMesh(occurrences, generateDiffuseMap=["Yes", BakeDiffuseOptions(1024, 1)])
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Occurrences to process. |
| GenerateDiffuseMap | generateDiffuseMap |
proxyFromMeshes
Automatically generates a Proxy Mesh out of a selection of meshes, with optional automatic textures generation.
process.proxyFromMeshes(occurrences, gridResolution=50, generateTextures, transferAnimations=True, keepOriginalMesh=True) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Occurrences to process. |
| Int | gridResolution | Resolution of the voxel grid used to generated the proxy. |
| BakeOptionSelector | generateTextures | Option maps baking. |
| Bool | transferAnimations | If false, skinned animations will be lost. |
| Bool | keepOriginalMesh | If true, does not delete original mesh at the end of the process. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | proxyMesh | The generated proxy mesh. |
proxyFromPointCloud
Automatically generates a Proxy Mesh out of a selection of Point Cloud, with optional automatic diffuse texture generation.
process.proxyFromPointCloud(occurrences, gridResolution=50, generateDiffuseTexture, keepOriginalPointCloud=True) -> scene.Occurrence
Parameters
Type | Name | Description |
|---|---|---|
| OccurrenceList | occurrences | Occurrences to process. |
| Int | gridResolution | Resolution of the voxel grid used to generated the proxy. |
| GenerateDiffuseMap | generateDiffuseTexture | Baking options. |
| Bool | keepOriginalPointCloud | If true, does not delete original point cloud at the end of the process. |
Returns
Type | Name | Description |
|---|---|---|
| Occurrence | proxyMesh | The generated proxy mesh. |