UX3D is a trademark of UX3D GmbH
glTF and the glTF logo are trademarks of the Khronos Group Inc.
Introducing the glTF Scene Toolkit by UX3D
The glTF format, short for GL Transmission Format, is a 3D interchange format created by the Khronos Group as, essentially, a “3D JPEG,” as the JPEG format is ubiquitous and supported by a majority of computer media applications. glTF files can be opened in Microsoft products, Adobe products, Autodesk products, and so many others.
The glTF format was updated in 2017 to use “physically-based materials” AKA PBR materials and the format primarily supports materials of this type (although non-photorealistic rendering, AKA NPR, is possible in glTF as well — the “unlit” material channel is used for this).
The glTF format is royalty-free and open source format, and joins FBX and OBJ as very popular interchange formats, but with a depth of functionality not available in the other formats. It supports skinned, animated characters and scenes.
The glTF Scene Toolkit is a visual glTF editor that allows you to view, inspect, edit, optimize and compose glTF content. It is the first visual glTF editor that allows you to natively work on the glTF and glb file formats.
glTF Scene Toolkit Interface
About this Guide
This overview discusses version 2022.2.3 of the glTF Scene Toolkit and is intended to supplement the documentation that accompanies the glTF Scene Toolkit, which you can access via Help > Documentation… in the main menu bar. You can also click on this link: https://docs.gestaltor.io/
Minimum System Requirements for glTF Scene Toolkit
- OS: Windows 10, Ubuntu 20.04, MacOS 10.15
- Architecture: 64-bit only
- CPU: 2.0 Ghz Dual Core
- GPU: GeForce 600 series, Radeon HD 7000 series, Intel HD 500 series
- GPU Memory: 1.0 GB VRAM
- System Memory: 8.0 GB RAM
- Storage: 200 MB free disk space
- Display: Resolution of 1366 x 768
Download and install glTF Scene Toolkit
Go to otoy.com and click the downloads link in the red navbar at the top. From there it will have you sign in to your account if you aren’t already, and then take you to the downloads page.
Choose the option for your operating system (Windows, MacOS and linux are supported) to download the application.
Place the application in the location of your choice. Follow the specific installation instructions for your operating system.
Licensing
Once you have installed the application, you will need to authenticate your license. glTF Scene Toolkit uses your Otoy credentials to do so.
Start the application. If you have not entered in your Otoy credentials before, yYou will see the following dialog appear (this dialog will not appear if you have previously logged in with valid credentials):
Enter your Otoy username and password. This will activate the Login button, which will turn green in color. Press the Login button to activate the application. Once activated, the dialog will change to look like this:
You can now click on the Close button and then proceed onto using the application. If you click on the red Log out button, you will be logged out of the application. You will need to log back in to use the application again.
Note — you can still use the application without supplying your Otoy credentials, but your files will be limited to 2MB and the application will run in “community mode.” If you encounter this, just exit the application and restart it. The credentials login within will then appear, allowing you to proceed from that point.
User Interface Tour
The GUI consists of a central widget - the viewport - and several other widgets for editing and optimizing glTF assets. The widgets can be hidden, rearranged and detached depending on the user’s needs. The widgets can be easily restored from the View menu in the main menu bar. The interface presents six of these widgets at startup (each serving a different purpose) and a seventh discussed below:
Viewport Widget
The viewport widget shows both the live editing context and the rendered output of the currently loaded glTF file and active scene. If a glTF does contain more scenes, only the active scene is shown. The initial active scene is the glTF default scene. This is quite important, if e.g. two glTF scenes are merged. The merged and/or imported content is always in an additional scene, available from the Content Widget, via the Scenes item.
Property changes are updated automatically in the viewport widget, regardless of the mode. The visual output is aligned with the official glTF Sample Viewer from Khronos. Hence, the viewport does allow a WYSIWYG editing of the glTF asset. For navigation, a viewing cube is located at the upper right corner of the viewport frame.
The viewport has several widgets that offer different functions:
- Edit Mode/Render Mode — This menu lets you switch between the two modes. Render Mode hides the viewport grid and control widgets, so that you can get a clean rendered frame output.
- Selection/Translation/Rotation/Scale tools
- World coordinates/Local Coordinates toggle
- Animation Controls
- Animation Configuration
- Stop
- Play
- Go to End
- Show/Hide Grid toggle
- Perspective/Orthographic toggle
Shading Level Selector
The shading level selector determines what material channels are shaded in the Viewport. All objects will be shaded with the same level, regardless of the assigned material. If an object’s material is missing a particular component, it will be shaded with magenta zebra stripes.
- Default Shaded (Ctrl+Alt+1)
- Wireframe (Ctrl+Alt+2)
- Texture Coordinates 0
- Texture Coordinates 1
- Normal Texture
- Geometry Normal
- Geometry Tangent
- Geometry Bitangent
- Shading Normal
- Alpha
- Occlusion
- Emissive
- Metallic Roughness
- Base Color
- Roughness
- Metallic
- Clearcoat
- Clearcoat Factor
- Clearcoat Roughness
- Clearcoat Normal
- Sheen
- Sheen Color
- Sheen Roughness
- Specular
- Specular Factor
- Specular Color
- Transmission/Volume
- Transmission Factor
- Volume Thickness
- Iridescence
- Iridescence Factor
- Iridescence Thickness
Hierarchy View
The Hierarchy view widget presents the scene in hierarchical form. The default scene of the glTF Scene Toolkit is resolved in the hierarchy. The hierarchy tree consists of the scene as the root element and the linked nodes as the child elements. It is visualized, if a node contains a mesh, light or does contain similar glTF objects. It is possible to toggle the rendering mode of the mesh and to completely hide and unhide a selected node. By right clicking a node, several operations like adding a node are possible.
Content Widget
All available glTF scenes, objects and imported assets like images are listed in the content widget. You can create new or duplicate existing elements in this widget as well by using the Create or Import menus in the Content Widget menu bar, or by right-clicking in the category list. Listed elements in this widget are all stored in glTF. Unused objects can be deleted in this widget.
To change to a different scene, double-click the desired scene from the Scenes list and the viewport widget will then update to that scene.
Inspector Widget
For any selected scene element, either in the viewport, hierarchy or content widget, the Inspector displays the glTF properties. All property values can be modified and edited in this widget on the fly. The changes are immediately updated in the viewport widget.
A bread crumb trail will appear when you dive into a particular node, allowing you to return to various levels immediately.
Viewport Settings Widget
These settings are editor specific properties which are not stored inside glTF - as it is not possible - but that do have an impact on the visual output. For instance, most glTF web viewers do have similar predefined settings. These parameters do help to adapt to e.g. change the environment light by defining a custom .hdr file.
Environment Tab
Controls the basic environment illumination available in the glTF Scene Toolkit. At present, the environment illumination contribution cannot be changed. There are several options:
- Show Background — This toggle will enable the display of the HDR image selected in the HDR Images dropdown list. If this option is disabled, the background color will be used instead.
- Background Color — Choose the background color here.
- HDR Images — This dropdown menu contains a list of all of the loaded HDR images available.
- Blur — Controls the focus of the HDR
- Intensity — Controls the intensity of the HDR background, which will also affect the HDR contribution to overall scene lighting.
- Front Face — This option determines one of four directions to orient the background HDR. As you move the camera, you will note how the different axes chosen will result in seeing different portions of the HDR background.
- Add/Delete HDR File — Adds or removes HDR background images.
Light Tab
The Light Tab controls the basic lighting solution of the scene.
- Environmental Lighting — This toggle enables/disables the HDR contribution to the scene.
- Punctual Lights — This toggle enables/disables all other light type contributions to the scene.
Post Processing Tab
This tab contains exposure and Tone Mapping controls for the scene, along with an Exposure slider. The exposure slider will darken or lighten the scene, depending on its value. Three ACES-based tone mapping options are available, which will also react to the Exposure slider.
Extensions Tab
This tab lists all of the KHR Material Extensions available in the glTF Scene Toolkit, and allows you to enable/disable each extension separately. These extensions go beyond the glTF specification and allow for more realistic or toon-style material options.
Variants Tab
The glTF Scene Toolkit allows you to create variants of materials in the scene. This can be an involved topic, and is covered here: https://docs.gestaltor.io/tutorials/howto/createVariants.html
Logger Widget
The logger reports additional information about active commands. You can filter the alerts and clear the log at any time.
Statistics Widget
This widget is not visible by default and can be enabled by the menu view item. The Statistics widget will display information about the current glTF file. The information in the statistics widget is not “live,” therefore you will need to update the information via the Refresh button in the widget menu bar.
Importing Objects
glTF Scene Toolkit cannot import objects in the Cinema 4D, 3ds max, and other application-specific formats; it will be necessary to save those objects from your DCC application into one of the following formats:
- 3ds
- blnd
- dxf
- fbx
- obj
- ply
- stl
- X3d
Some DCC applications such as Cinema 4D and Blender allow you to save scenes directly in the glTF format. Maya does not directly support glTF file export; however, https://github.com/matiascodesal/maya-glTF is a plugin which adds the capability to Maya. For 3ds max, a script called Babylon.js will enable 3ds max to save glTF files. It is available here: https://doc.babylonjs.com/extensions/Exporters/3DSMax#features
Materials
The glTF Scene Toolkit uses PBR and glTF materials, consisting of the shading attributes with numeric control options and texture controls to attenuate these attributes. The Base Color attribute will use the texture as the color of the material. The glTF Scene Toolkit supports textures in PNG, JPG, KTX 2.0, TGA and BMP image formats. The following attributes are available:
- Alpha Mode with cutoff
- Emission — can be texture-controlled
- Normal Map
- Occlusion Map
- Metallic Roughness — Base Color; Texture for Color and Roughness
- Specular Glossiness — Diffuse Color & Texture; Specular Color & Texture
- Unlit — Shadeless or Constant, not PBR (cell shading, for example)
- Clearcoat — Texture; Normal; Roughness Texture
- Transmission — Factor; Texture (this attribute controls transparency)
- Sheen — Roughness factor & texture; Color factor & texture
- Specular — Factor, color, texture and color texture
- IOR — Index of refraction (note that transparent refraction is not available)
- Volume — Thickness factor, thickness texture; attenuation distance; attenuation color (also connects to Transmission)
- Iridescence — Factor, texture, IOR, thickness min, thickness max; thickness texture
- Emissive Strength
Transparent Materials
Transparent, glass like materials can be achieved by the use of the Transmission channel, which offers a numeric factor as well as a transmission texture, which is multiplied by the Transmission factor. Transmission determines the amount of light that is passed through the material. If the channel is not enabled, the objects using the material will render as opaque.
More realistic transparent materials require enabling the Specular channel (for surface reflections and the Volume channel (which enable refractions, more visible with higher values in the Volume thickness factor.
It is possible to “tint” transparent materials by the base color of the material, and to use a transmission texture to define aspects of the material that are opaque and clear, via the R channel of an RGB texture.
Loading Materials
To load materials into glTF Scene Toolkit, choose File > Import Materials (Ctrl+Shift+M). Navigate to the directory containing the PBR or glTF material and choose Select. The material components will then be loaded into the scene. This may take a few minutes.
Assigning Materials
Materials must be loaded into the scene in order to assign them to objects. (See the previous section for that information.) Follow the steps below:
- Double-click the desired object to receive the material in the Hierarchy.This will open the node in the Inspector.
- Scroll to the Mesh item and select the icon. This will open the attributes for the mesh itself.
- Click on the Primitive item.
- In the Material slot, choose one of the loaded materials in the drop down menu.
More information about assigning materials can be found here: https://docs.gestaltor.io/tutorials/howto/assignMaterial.html
Working with Textures
Textures (either PNG or JPG) can be used to attenuate effects or add color (Base Color attribute), depending upon where the texture is applied. To load a texture, select the Textures item in the Content widget and choose the appropriate option from the Create or Import menus. The texture will then be listed in the Texture list in the Content widget and will also be available in the Texture list of the Reference item.
To use a texture in a given material channel, open the channel via the turndown icon and click on the icon next to the Texture label. Several controls will then be presented:
- Reference — Choose the desired texture from the Texture list. If none are present, make sure you have loaded valid textures.
- TexCoord — This dropdown is a list of the valid UV spaces to choose from. This option is mapped to the UVs contained in the object.
- Texture Transform — Use the controls below to position the texture on the object.
- Offset
- Rotation
- Scale
- Apply to all KHR_texture_transform — apply the current transform to all of the textures in the material.
Convert C4D Octane Materials into PBR glTF Materials
If your DCC application does not convert/export glTF/PBR materials, you will have to rebuild your materials in the glTF Scene Toolkit. glTF textures require well-made UVs.
If you need to convert Octane materials into glTF materials with PBR textures, there are a couple of different methods you can try — one is just opening the scene in Standalone, and saving out an FBX file. This will automatically convert the materials into Cinema 4D materials when you import the file back into that application. The results will not be perfect, and you will likely want to do some tweaking to the resulting C4D materials before exporting to the glTF format.
The other method involves baking down the scene into PBR textures with built in lighting and shadows (to a point). This method, discussed below, uses Cinema 4D; the options in other DCC applications will be different, but the basic concepts should apply. As Octane is a photorealistic spectral render engine, materials cannot match completely — the underlying imaging technologies are too different. Once converted, you can make adjustments to the materials within the glTF Scene Toolkit as desired.
This technique will use the Baking camera, Octane Object tags and Octane standalone to generate the PBR textures required for glTF materials.
The steps for this method are as follows:
- Generate the PBR Textures — Use the Baking Camera and Octane Object tags to generate the PBR textures required by the glTF materials
- Update the textures in the material to use the PBR textures
- Export to Standalone to generate an FBX scene with the new materials and textures
- Open the resulting FBX file in Cinema 4D and export the scene in glTF format
Generate the PBR Textures
Add Octane Object Tags to each Object in the Scene
- Select the object in the Object Manager
- Right-click and choose C4D Octane Tags > Octane Object tag. The tag will appear in the Object Manager next to the assigned object.
Set the Bake ID Layer
- Select the Octane Object tag
- To to Object Layer tab > Bake ID
- Set a unique Bake ID for each object. Avoid repeats.
Set up the Baking Camera
- Add an Octane Camera to the scene. For more information, see https://docs.otoy.com/cinema4d/BakingCamera.html
- Select the Octane Camera tag, go to the Thinlens tab and change the Camera type to Baking. The tab name will change to Baking.
- Set the scene length to match the amount of Bake IDs (let’s say 5 for this example).
- Set a Keyframe on the Baking Group ID, and set the Baking Group ID to match the current frame number (1-5, in this example).
- Set the Baking Camera as the output camera.
Configure the OctaneRender Settings
- Go to Render Settings > Octane Renderer > Render AOV Group tab.
- Toggle Enable to ON
- Name the Render Pass file and choose a directory location.
- Set the Format to JPG.
Set up the AOV Output to create the PBR Textures
- Go to Render Settings > Octane Renderer > Render AOV Group tab, Render AOVs turndown.
- Click on the Add Render AOV button, and choose from the desired AOV type from the list. Typical PBR AOVs are: Emitters; Reflection Filter; AO; Diffuse Filter (Info); IOR Filter; Normal (tangent); Refraction Filter (info); Roughness filter
Render the PBR Textures
Click Render to Picture Viewer or choose Render > Add to Render Queue and render the PBR Textures.
The textures will be rendered and placed in the directory chosen. For higher quality textures, increase the Max Samples value.
NOTE: If the texture output looks odd, make sure that the UVs assigned to each object are well-made.
Update the Textures with PBR Textures
It may be necessary to add additional modes to get the desired effect at this point. This conversion process is not perfect — it is a case of balancing the results.
Set the Object Materials to Universal/Update the Textures
- Go to the Basic tab of the target material
- Change the Material Type to Universal
- Change the BRDF Model to GGX
- Replace any textures in the materials with the baked textures generated in the previous section.
Export to Octane Standalone/Generate FBX
This series of steps is used to simplify the Octane materials to be suitable for glTF. First you will export the scene to Octane Standalone, and then, in Standalone, export the scene into the FBX format.
Use Live Viewer to Export
- Export your scene to Octane Standalone: Live Viewer > File > Export to Package (orbx)… option.
- When the dialog asking if you want to open Standalone, click OK
- Review the Nodegraph in Octane Standalone
Generate the FBX
- In the nodegraph, locate the Main Group node or the Geometry Group node.
- Right-click in an empty area of the nodegraph and choose Other > Geometry Exporter from the menu
- Connect the output of the Main Group/Geometry Group node to the Geometry input pin on the Geometry Exporter node.
- In the Node Inspector, select the Output file slot and choose the destination for the resulting FBX output.
- Enable the Export Materials toggle. Do not miss this step.
- Locate the Green Trigger icon at the top of the Node Inspector and select it. This will generate the FBX output.
Use Cinema 4D to export the glTF file
These steps will result in simpler Cinema 4D materials once the FBX file is imported, which can then be migrated to glTF materials by the export process.
Open the FBX Output
- Open the FBX output generated in the previous step in Cinema 4D
- Export the scene as glTF: File > Export > glTF to a desired location.
You can now open this file in the glTF Scene Toolkit and check the result.
Adding Lights
To add a light to the scene, click on the Create dropdown in the Content Widget and choose Light (Ctrl+Alt+L). In order to position and orient the light, you will need to add it to the Hierarchy Widget and associate it to a scene node.
Add the Light to the Hierarchy Widget
Right-click and choose Create Node from the dropdown menu. This will create an unnamed node in the Hierarchy Widget. You will need to associate the node with the desired light.
Associate the Light Node
Select the Unnamed node in the Hierarchy Widget; this will display the node information in the Inspector Widget. Scroll down to the Light Item in the list, and in the dropdown menu, choose the name of the light you have selected. The light can now be fully manipulated in the scene.
Adding Cameras
Scene cameras are available when the Viewport Widget is set to Render Mode (these cameras will correspond to cameras that you have set in your DCC application, within the constraints of the glTF specification). In Edit mode, you can move around the world freely. This same capability is available when you set the Camera to RenderView Camera, available in the Camera list menu to the right of the Edit/Render mode menu toggle. Any cameras that you add or create will be listed in this menu when Render Mode is active.
To add a camera to the scene, click on the Create dropdown in the Content Widget and choose Camera (Ctrl+Alt+C). In order to position and orient the camera, you will need to add it to the Hierarchy Widget and associate it to a scene node.
Add the Camera to the Hierarchy Widget
Right-click and choose Create Node from the dropdown menu. This will create an unnamed node in the Hierarchy Widget. You will need to associate the node with the desired camera.
Associate the Camera Node
Select the Unnamed node in the Hierarchy Widget; this will display the node information in the Inspector Widget. Scroll down to the Camera item in the list, and in the dropdown menu, choose the name of the camera you have selected. The camera can now be fully manipulated in the scene.
Animation
Creating Animation
Very basic animation can be created with the glTF Scene Toolkit, limited to Translation and Rotation. Keyframe animation is NOT supported. Essentially, the animation tools in the glTF Scene Toolkit are best for turntable animation.
For more information, see here: https://docs.gestaltor.io/tutorials/howto/createAnimation.html
glTF Files containing Animation
The glTF format supports PLA animation (where the individual vertices have animation applied to them, much like the old .mdd format from LightWave 3D) and morph target animation. The scene will automatically scale to the animation duration found in the glTF file.
Scenes containing animation objects should import and animate. The timeline will automatically be set by the information contained in the glTF file. If a glTF asset contains animation, the animation controls will activate. Press the Play button to see the animation.
Your DCC determines what portions or types of animation will be available. In Cinema 4D, for example, skinned animation (characters with joints) will not export to the glTF format, nor will any cloner animation. Position, Scale and Rotation animation will, depending on the export settings enabled. Animation should be “baked” as keyframes as there are no keyframes in the glTF Scene Toolkit. Some DCC exporters may do this for you — in other cases, you may find it necessary to export animated assets (such as Cinema 4D cloners) into the Almebic format before exporting the scene into glTF.
Wrapping Things Up
For more information, please refer to the https://docs.gestaltor.io/index.html documentation.