glTF Files
This section provides additional information on the use of glTF files.files in Scene Composer.
Animations
ThereScene isComposer provides a working sample availablethat showingshows thehow usageto ofuse glTF animations. For this, please refer toSee Physically Based Rendering Solution for details.
InterpolationScene animationComposer issupports available,interpolation howeveranimation; Morphinghowever, andmorphing or the channel path "weights" are not available.supported.
AnimationThe of:following animation types are supported:
- translation
- rotation
scale is available.scale.
Also, theThe following Interpolationinterpolation strategies are available:supported:
- linear
- step
- cubicspline
InglTF glTFspecifies rotation angles are specified in quaternions,quaternions. forCGIStudio usage in CGIStudio,converts the values are converted to Euler-Euler angles.
For a more detailedinformation descriptionabout onanimations, animationssee please refer to the Khronos website: animations. For a more detailed description onabout interpolation types please refer tosee the Khronos website: animation sampler.
SDKThe Software Development Kit (SDK) version
The glTF importer uses the Microsoft glTF-SDK in version v1.9.1.0. ItDownload canthe beMicrosoft downloadedglTF-SDK from GithubMicrosoft gtTF-SDK GitHub repository.
Reference models
AScene Composer uses the boombox as a reference modelmodel. thatThe isfolder beingcgi_studio_content/3D/glTF/ contains the used isboombox. The glTF filefile. is available at the folder cgi_studio_content/3D/glTF/. Available reference models can be found at:Visit The Khronos website: glTF Sample Models. to find more available reference models.


Supported glTF Extensions and Multi UV
Scene Composer’s glTF import supports the following glTF 2.0 extensions as well as multiple UV sets (Multi UV).
KHR_materials_specular
Supports materials that independently control the intensity and color of specular reflection. KHR_materials_unlitSupports “unlit” materials that are not affected by lighting calculations.
KHR_texture_transform
Interprets UV transforms such as offset, scale, and rotation per texture.
KHR_materials_emissive_strength
This extension scales the emissive color or texture by a scalar emissiveStrength factor, allowing materials to represent much brighter emission, especially in HDRhigh dynamic range (HDR) rendering environments.
KHR_materials_sheen
This extension adds a sheen layer on top of an existing PBRphysically based rendening (PBR) material to simulate soft, fabric-like highlights caused by fine microfibers such as cloth or velvet.
Even when UV sets other than `uv0`uv0 are specified in these extensions, Scene Composer imports multiple UV sets (Multi UV) and assigns them to the corresponding textures.
Limitations
-
InLimitationsESin OpenGL Embedded Systems (ES) 2.0environments,mightdue to the limitations of ES 2.0, importingprevent some sample glTF files that use these extensionsmayfromnot produceproducing the expected visualresults.results in ES 2.0 environments. -
Some extensions, such as KHR_materials_anisotropy, KHR_materials_iridescence, KHR_materials_specular, KHR_materials_ior, KHR_materials_emissive_strength and KHR_materials_sheen cannot be used together with KHR_materials_unlit by design.
- Meshes that use KHR_materials_anisotropy must have normal and tangent attributes, or the base material must have a normal map. If these conditions are not met, the anisotropy effect may not be rendered correctly.
For details on the properties and parameters of each extension, refer to the glTF 2.0 extension specifications provided by Khronos.
PyhsicallyPhysically Based Shading (PBS)
OnThe importer applies the metal-roughness material model to the imported 3d modelmodel. If the metalglTF roughnessfile materialdoes modelnot isdefine applied.image-based Iflightning no(IBL) IBLtextures, texturesthe areimporter definedapplies a default materialmaterial. isScene applied.Composer Theprovides shaders are provided for OpenGL ES 2.0 and 3.0.
InThe property names used in SceneComposer the properties are called differentlydiffer from the glTF standard:
The followingimporter propertiesautomatically ofsets the following appearance and shader are automatically set by the Importer,properties, but you can also beconfigure configuredthem manually:
Uniforms:
u_MetallicRoughnessValues holds the metallic factor in
HAS_NORMALMAP.
optional
u_OcclusionStrength
is a factor for the linear interpolation between the color and the color times ambient occlusion. This uniform is available only HAS_OCLUSIONMAP.
HAS_EMISSIVEMAP


Textures:
(Optional)OptionalTheTexture Name Channels Texture Level Description
HAS_BASECOLORMAP must be defined in the fragment shader.
HAS_METALROUGHNESSMAP must be defined in the fragment shader. The metallic values must be stored in the blue channel. The roughness HAS_NORMALMAP must be defined in the fragment shader and vertex shader.
HAS_OCCLUSIONMAP must be defined in the fragment shader and vertex shader. The occlusion values are stored in the red channel of the texture.
HAS_EMISSIVEMAP must be defined in the fragment shader and the vertex shader.
optional
Image-based lighting (Provide the following textures must be present for IBL to work correctly.correctly:
Thediffusediffuse/irradianceradiance cubemap (RGB)seemustbelow)
Set at texture unit 5, and define USE_IBL in the fragment shader.must be defined
Set at texture unit 6, and define USE_IBL must be defined in the fragment shader. TheBuild the specular pre-convolved environment must be built into the mipmaps. The importer automatically sets the number of mipmapsmipmaps, (excluding level 0) is set0, in the shader uniform "u_MipmapCount"u_MipmapCount. automaticallyIf byyou the importer, or must be configured manually ifset this cubemap ismanually, setconfigure this value manually.
Set at texture unit 7, and define USE_IBL in the fragment shader.must be defined
DetailsThe Scene Tree shows details of the imported appearance are shown in the scene tree:appearance:


Mesh:
position Provide the
HAS_NORMALS must be defined in the fragment shader and vertex shader.
HAS_TANGENTS must be defined in the fragment shader and vertex shader.
HAS_UV must be defined in the fragment shader and vertex shader.
Uniform Setter:
normal model matrix Provide the normal model matrix, which is mandatory if the shader defines
HAS_NORMALS and HAS_TANGENTS.
shader.
Optimization tips:Tips:
- Use one texture for occlusion, roughness, and metallic values, stored as an RGB texture.
- Providing tangents in the mesh avoids calculating the tangent space matrix on a per pixel basis.
For a more detailedinformation descriptionabout onphysically Pysicallybased Basedrendering, Rendering please refer tosee the Khronos website: metallic roughness.
Useful links
Khronos Referencesreferences include the following resources:
- glTF Overview (https://www.khronos.org/gltf/)
- glTF 2.0 Specification (https://github.com/KhronosGroup/glTF/tree/master/specification/2.0)
- glTF 2.0 Sample Models (https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0)
The Khronos Specificationspecification is available here:
- Specification (https://github.com/KhronosGroup/glTF)
ViewersThe following viewers are available:
- BabylonJS Sandbox (https://sandbox.babylonjs.com/)
- donmccurdy glTF viewer (https://gltf-viewer.donmccurdy.com/)
- Khronos glTF Sample Viewer (https://github.khronos.org/glTF-Sample-Viewer-Release/)

