# Migrate from Simplygon 8 to Simplygon 9

The Simplygon Max plug-in exports various commands and flags that exposes Simplygon functionality through Max. Since Simplygon 8 there's been breaking changes to core features as well as the Simplygon API in general. While developing Simplygon 9 we decided to strip away layers that we felt were no longer necessary and that required lots of maintenance, such as the standalone Simplygon UI and the fundamentals it was built upon, as well as Simplygon Processing Language (SPL) and the Simplygon Scene Format (SSF). These changes resulted in us rebuilding the Simplygon Max plug-in to work directly against the API instead of another layers. While trying to keep compatibility with previous versions of the plug-in there are some fundamental things that has changed, as well as some improvements.

This guide will focus on how to migrate from Simplygon 8 to Simplygon 9.

# Installation

Pre-9 install scripts will no longer work with Simplygon 9. Simplygon 9 relies on environment variables to find certain components compared to previous solution of registry and configuration files, most Simplygon files have also been renamed. We recommend the Simplygon installer as it not only sets everything up correctly, but also installs all necessary prerequisites. We also provide a Simplygon 9 archive for manual installation. See the Simplygon 9 plug-in installation for further instructions.

# Simplygon UI

The standalone Simplygon UI has been replaced by a lightweight UI in the form of a Max plug-in. The UI plug-in is bundled with the installer and will show up in the plug-in manager after installation. See the Simplygon 9 plug-in installation for further instructions on how to enable plug-ins in Max.

# Settings system

The settings system has been completely revamped which means that old settings of the SPL- and Preset format is no longer compatible with Simplygon 9. The successor of SPL is Pipeline objects. Pipelines are made to make the life easier for users by encapsulating functionality in Pipeline objects. At the time of release we will have four Pipelines available: Reduction, Aggregation, Remeshing and LegacyRemeshing, which will reflect functionality offered in previous versions of Simplygon. These initial Pipelines will have a 1-to-1 mapping to the Simplygon API and should feel quite familiar to existing users. Pipelines are saved as text-based files with JSON extension. The job distribution system (that was previously part of Simplygon Grid) is now part of Pipelines.

Note that some settings have been added, removed, renamed and / or moved to a different settings group, see the SPL-to-Pipeline documentation for information of how to migrate SPL to Pipelines.

# New Remesher

A new Remesher gets introduced in Simplygon 9 and takes the name of the old remesher. The old (legacy) remesher is still accessible but through a new "Legacy" name. The new remesher introduces features such as intelligent hole-filling, cavity removal as well as some performance increases when generating large OnScreenSize meshes.

The old remesher becomes the legacy remesher:

  • RemeshingPipeline -> RemeshingLegacyPipeline
  • RemeshingProcessor -> RemeshingLegacyProcessor
  • RemeshingSettings -> RemeshingLegacySettings

New remesher:

  • RemeshingPipeline
  • RemeshingProcessor
  • RemeshingSettings

For more information, see the Remeshing Pipeline example and Remeshing Pipeline API documentation.

# Script migration

The following sections contain details of how to migrate specific parts from Simplygon 8 to Simplygon 9.

# General Simplygon functions

Previously Status Replacement Note
sgsdk_SetLoginInfo Removed User system has been removed
sgsdk_SetBatchMode Removed Standalone UI has been removed
sgsdk_GetBatchMode Removed Standalone UI has been removed
sgsdk_ProcessSelectedGeometries Replaced
(deprecated)
sgsdk_RunPipelineOnSelection Now takes a Pipeline-object or Pipeline-path as input
sgsdk_SetSettingsPath Replaced sgsdk_SetPipeline Now takes a Pipeline-object or Pipeline-path as input
sgsdk_UseSPL Replaced sgsdk_SetPipeline Now takes a Pipeline-object or Pipeline-path as input
sgsdk_MaterialTexture Updated Now takes sRGB flag as last argument
sgsdk_CustomShaderChannelOverride Removed
sgsdk_SetUseColorChannelAsWeights Removed Moved to Pipeline settings
sgsdk_SetWeightsMultiplier Removed Moved to Pipeline settings
sgsdk_SetWeightsInterpreter Removed Moved to Pipeline settings
sgsdk_SetLockOnBone Removed Moved to Pipeline settings (selection-set)

See Simplygon functions for more details.

# SPL- to Pipeline functions

Previously Status Replacement Note
spl_Save Replaced sgsdk_SavePipeline Saves Pipeline-object to file.
spl_Load Replaced sgsdk_LoadPipeline Loads Pipeline-object from file.
spl_Create Replaced sgsdk_CreatePipeline Use to create Pipeline-object.
spl_Set Replaced sgsdk_SetSetting Specify setting path and value to set
spl_SetString Replaced sgsdk_SetSetting Specify setting path and value to set
spl_Get Replaced sgsdk_GetSetting Specify setting path from where to fetch the setting value
spl_Add Removed
spl_Remove Removed
spl_GetChild Removed
spl_ClearList Removed
spl_GetParameter Removed
spl_Clear Replaced sgsdk_ClearPipelines Clears all Pipelines that resides in memory (created and loaded)

See Simplygon Pipeline functions for more details.

# Shading network functions

Previously Status Replacement Note
sgsdk_ConnectOutputToMaterialMetadata Replaced sgsdk_ConnectOutputToDirectXMaterial Now takes target shader (effect) file path, source material channel (the one with baked texture) and target texture slot

See Simplygon Shading Network functions for more details.

# Load and save settings

Loading a SPL-file was previously done using the spl_Load function followed by the file path and the name of the handle the SPL object. The spl_Save function takes the file path and the SPL object handle.

    For Pipelines the loading of files translates to the sgsdk_LoadPipeline function followed by the file path. The function returns the Pipeline handle as soon as the load has completed. Saving works in a similar fashion; sgsdk_SavePipeline followed by the file path and the Pipeline handle.

      # Get and set settings

      The SPL settings system in Simplygon 8 has been replaced by the Pipeline settings system which are focusing more on ease-of-use. To set a setting in a Pipeline, simply specify the setting path and value, or just setting path for queries. There is no longer any need to manually traverse the SPL graph to be able to set and get settings, no more containers or write nodes are necessary.

      Note that some settings have been added, removed, renamed and / or moved to a different settings group, see the SPL-to-Pipeline documentation for information of how to migrate SPL to Pipelines.

      Previously these lines were required to create a "simple" 50% reduction:

        The new Pipeline settings system reduces the lines above to:

          As you can see there is no direct translation for the get and set flags as Pipeline settings can be set through a settings path and does not require the individual objects.

          Here's how to get and set the triangle ratio for a reduction processor:

            How to setup material baking settings for a reduction Pipeline:

              # Material channel mapping

              Previously we were mapping Max's standard materials (Blinn, Phong etc) to Simplygon materials by redirecting material channels to a pre-defined structure (that was required by the standalone Simplygon UI). As the standalone UI is no longer a part of Simplygon 9 we decided to use Max's material channels through and through, making it easier for users by removing extra layers of complexity.

              If you wish to bake standard materials in Max, see the updated channel names in the table below.

              Previous channel New channel
              Ambient Ambient_Color
              Diffuse Diffuse_Color
              Specular Specular_Color
              Opacity Opacity
              Normals Bump

              # Selection sets

              Selection sets are read automatically from Max's built in selection-sets. Some common features that require a selection-set are Bone Lock, Bone Removal, Processing- and Clipping-sets. To assign a selection-set to a Pipeline, as a processing selection-set or clipping selection-set, see Clipping geometry example, for more information about Pipelines, see Simplygon Pipeline functions.

              # Vertex colors to vertex weights

              The "vertex colors to vertex weights" functionality has been moved from the Simplygon Max plug-in (sgsdk_SetUseColorChannelAsWeights, sgsdk_SetWeightsMultiplier, sgsdk_SetWeightsInterpreter) to Pipelines and is now a part of the Pipeline weights settings. An additional setting has been added to allow users to specify which color component of the vertex colors to use as weights.

              Previous method of specifying which mapping channel to use as vertex weights:

                New method of specifying which color-set to use as vertex weights:

                  For more information about vertex colors as vertex weights, see Colors as vertex weights.