GLB Export

Starting with v0.68.0, the glb file can be create with UniGLTF module.

You can create a glb file with UniGLTF contained in UniVRM.vrm is for humanoids, but glb has no particular restrictions and can output any hierarchy.

The procedure is explained below.

Procedure

1: Open UniGLTF/Export UniGLTF-2.X.Y

../_images/glb_export_dialog.jpg

2: Assign a GameObject to ExportRoot

From the Hierarchy window, drag and drop a GameObject into the ExportRoot field, or you can click ◎ button on the right of the ExportRoot field and select a GameObject from the dropdown list.

  • Note that the root (topmost parent) of a GameObject you select should not be a GLTF node, but a node stored in the scene with default position, rotation and scale.

3: Click Export button

A SaveFileDialog will pop up, choose a directory and export the GameObject as GLB.

Exportable Components for GLB

  • MeshRenderer + MeshFilter (Attach them to the child other than the topmost parent)

  • SkinnedMeshRenderer (Attach it to the child other than the topmost parent)

The top node will be the glTF scene

UniGLTF processes glTF data structures as follows:Since the scene is not a node, there is no movement / rotation / scaling and mesh.

  • scene0

    • node00

    • node01

      • node010

  • Animation (Attach it to the topmost parent. For rotation, input the keyframe of Quaternion. Translation, rotation and scaling are supported. BlendShape is not supported yet)

glTF Animation is not attached to node

It is a data structure that is described in the scene without attaching to node.

Available Shader

  • Standard

default material for glTF

It will be PBR, which is the default material of glTF.

  • Unlit/Color, Unlit/Texture, Unlit/Transparent, Unlit/Transparent Cutout, UniGLTF/UniUnlit

glTF KHR_materials_unlit

Record as a glTF KHR_materials_unlit extension.


Before v0.68.0

Procedure

The procedure for creating a glb file is described as follows:

1: Create an empty scene.

2: Create an empty GameObject (topmost parent). No translation, rotation and scale.

Note that the root (topmost parent) of a GameObject you select should not be a GLTF node, but a node stored in the scene with default position, rotation and scale.

3: Select an object you want to export and add it to the created parent GameObject.

(In this example a Cube object is created. You can add arbitrary objects such as Prefab.)

../_images/root_cube.png

4: Select the topmost parent GameObject and click Export (UniGLTF-x.xx->Export).

../_images/menu_unigltf_export.png

5: Enter the file name and the selected GameObject can be exported as the glb file.

Exportable Components for GLB

  • MeshRenderer + MeshFilter (Attach them to the child other than the topmost parent)

  • SkinnedMeshRenderer (Attach it to the child other than the topmost parent)

  • Animation (Attach it to the topmost parent. For rotation, input the keyframe of Quaternion. Translation, rotation and scaling are supported. BlendShape is not supported yet)

Available Shader

  • Standard, Unlit/Color, Unlit/Texture, Unlit/Transparent, Unlit/Transparent Cutout and UniGLTF/UniUnlit