Last update: 11.11.2023

Description: This addon allows to import/export *.gltf and *.glb files into/from Softimage. It based on tinygltf library. The addon supports the following items for import from gltf/glb scenes:

The addon does not supports gltf extensions. It recognize only default gltf nodes and attributes.

For export the addon supports the following scene items:

Download: Softimage GLTF R.5. There are sources of the addon on the GitHub.

How to use: Install as usual addon for Softimage.

Import files

Select File - Import - Import GLTF/GLB...

Select input file and scene items to import. If you would like to import animation from the file, then activate the Animations parameter and setup the frames in seconds value. In GLTF/GLB files animation is stored in seconds.

Press Ok

Materials import

GTF/GLB format supports only one standard PBR material. This material quite simple and can contains the following textures:

If the GLTF/GLB file contains materials and import materials is activated, then importer create the library with the same name as imported file and add all materials to this library. All materials have the same structure. The main shader node is a special pbtMetallicRoughness node. It does not rendered by any render engine. If imported material reference to textures, then it copies to the folder [Project]\Pictures\gltf_io\[File name] and connected to the input ports of the main shader node.

Animations import remarks

In GLTF/GLB animation of rotation is stored in quaternions, but in Softimage rotation is animated by axis angles. In some cases the conversation may produce wrong result. Consider the following simple animation: plane, rotating in 360 degrees.

This animation is imported in the following way

Quaternion that encode the rotation from 0.0 to 180.0 degrees converted to the positive angle, but if the quaternion encode degree from 180.0 to 360.0, then it converted to negative angle. This is the natural behavior, because the same quaternion correspond to the infinite number of angles (with period 360.0). It's recommended to bake animation at every frame and use the same frame rate in the import process.

Export the scene

Select File - Export - Export GLTF/GLB...

Set the output file name, select items to export and press OK.

The export window has following parameters:

Materials export

The addon can export materials to the GLTF/GLB format, but this material should satisfy several conditions. For each material the exporter takes the first shader node, connected to the Surface port of the root material node. If this node is not pbrMetallicRoughness node, then the material is skipped. In other case the exporter write all parameters of this node and try to get textures, connected to this node. It check each input port (there are five ports for textures). If the image node is connected to the port, then the exporter save the texture of this node, in all other cases the texture is skipped.

Animations export

The exporter allows to export transform animations of scene objects. For each object the exporter check transform parameters. If one of them is animated, then the exporter save the value of this parameter at each frame from the selected interval in the linear interpolation mode.

Skins export

If a mesh has envelope deformer, then it exports as skinned object. There are two important differences with respect to other objects. At first, the transform of the skinned object is ignored. At second, all deformer (null or bone) transforms exported with values from Static Kine State, i.e. it export transforms at the moment when the envelope deformer is applied. So, in GLTF/GLB scene the skinned object stored in neutral pose. If you need other pose, then save actual deformer transforms as animated parameters.

The recommended hierarchy for the skinned object is the following

Armature is a root null for the skined object. As sub-objects it should contains geometry mesh objects and deformers. Geometry (Cesium_Man in the example) is a separate object, and it shouldn't contains as sub-objects any deformer. The hierarchy of deformers are separate from geometry. In the example it starts from the object Skeleton_torso_joint_1. If any deformer is sub-object of the skined geometry, then it may contains invalid pose transform.

Import/Export API

Addon introduce two command, which can be used in scripting.

Command for import: Application.GLTFImport(file path, [import_normals], [import_uvs], [import_colors], [import_shapes], [import_skin], [import_materials], [import_cameras], [import_lights], [import_animations], [animation_frames_per_second]) All arguments, except the first one, are optional

Command for export: Application.GLTFExport(objects, file_path, [embed_images], [embed_buffers], [export_uvs], [export_colors], [export_shapes], [export_skin], [export_meshes], [export_lights], [export_materials], [export_cameras], [export_animations], [animation_frames_per_second], [animation_start], [animation_end], [export_hide]) All arguments, except the first and the second, are optional