glTF Exporter for 3ds Max

Introduction

Alin glTF / glb exporter is a native 3ds Max plugin that can export gltf / glb files: an open standard runtime format maintained by the Khronos Group. This format stores scenes information (nodes hierarchy, materials, meshes, animations) in JSON format with some binary buffer (.bin) with it.

The latest specification for glTF 2.0 was announced in 2017 by Khronos, it included a PBR shading model based on the metallic roughness workflow. The .gltf file can easily be edited with any text editor to make changes while the binary resources (.bin/.glb) can be loaded directly into GPU buffers with no additional parsing or processing. In the early years glTF and glb format is commonly used with WebGL but now developers can import glTF files into many projects and game engines such as Three.js, Babylon.js, Unity and Unreal Engine. If you have any questions, please don't hesitate to contact me.

Download

3ds Max VersionPlugin File
2024 Age_max2024.zip
2023 Age_max2023.zip
  • Current Version: 1.0.0
  • Last Updated: 08-11-2023

What’s new

  • Draco Compress
  • Vertex Color
  • Key Frames option for both CAT and Biped animation
  • Camera or active perspective / orthographic viewport (Left, Front, Top, Bottom) are supported!
  • Physical and glTF material export from the latest 3ds Max
  • Multiple uv sets
  • Multi-subobject materials
  • Binary glTF: .bin and single .glb file
  • Single glTF: BASE64 encoded embedded .bin data

Installation

  • Download the ZIP file and copy the .dle file to the plugins folder of 3ds Max.
    e.g.:   C:\Program Files\Autodesk\3ds Max 2024\plugins
  • Restart 3ds Max.
  • If you are encountering a runtime error when start 3ds Max you need to install Visual C++ Redistributable Latest.

Usage

  • Run 3ds Max and then choose Export or Export Selected from the File menu.
  • Click the 'Save as type' dropdown list where you will find Alin GLTF Exporter, then Choose GLTF / GLB file to export:
    GLTF: generate a gltf with a bin file. The .gltf file is a human readable json file. The .bin file is a binary buffer referenced by the gltf file.
    GLB: generate a single binary file that contains all the mesh data, inverseBindMatrices, and other information.
  • Names within JSON objects must be unique, duplicate names are not allowed.
  • "No .bin": check this option if you want the binary .bin data embedded to gltf as BASE64 string.
  • For more information about exporter, please see the tutorial.

Batch export glb / glTF files using Maxscript

Sometimes if you want to batch export glb files from 3ds Max without showing configuration dialog, you can use a maxscript to export geometries as their own separate glb files in your current export folder. This can be done by saving the following script to a .ms script file, then choose the main menu item in 3ds max: Scripting -> Run Script… If you are a pro version user, please change the class name from AlinGLTFExporterFree to AlinGLTFExporterPro

fn BatchExport =
(
    for geo in geometry do
    (
        select geo		
        filePathName = (pathConfig.GetDir #export) + "\" + geo.name + ".glb"
        exportFile filePathName #noPrompt selectedOnly:true using:AlinGLTFExporterFree
    )
)
BatchExport()

Notes and Recommendations

  • You can use a new built-in physical material called glTF Material in 3ds Max 2023 and later. Note that all maps are optional. If you use separate files for metalness map and roughness map then exporter will merge them into a single pbrMetallicRoughness texture where the B channel comes from metalness map and G channel comes from roughness map. The best way is make the metalness map slot and roughness map slot connect the same texture to avoid merging textures.
  • glTF uses a right-handed coordinate system which defines +Y as up. 3ds Max's coordinate system defines +Z as up. Exporter will automatically convert the coordinate system and keep your model in the same orientation as it was authored in 3ds Max. You can still use "X-Rot" or "Z-Rot" to adjust the orientation.
  • Note that uv coordinates convention is not the same as OpenGL: glTF defines +v as down: the origin of the uv coordinates (0, 0) corresponds to the upper left corner of a texture image.
  • In 3ds Max Bone Affect Limit is set to 20 by default in Skin modifier, You may change it because the maximum number of joints influences per vertex is 4 in glTF 2.0 format. If you use Physique modifier, on the Physique --> Reinitialize --> Vertex-Link Assignment rollout the default number of links is set to N Links, you can change it to 4. The future version of glTF should support more influences because cloth and facial animation may use more than 8 joints per vertex.
  • The units in glTF are meters, the same as in Unity. Unreal Engine and FBX uses centimeters as it's default units. You may check the units settings in 3ds Max: "Customize -> Units Setup -> System Unit Setup". If none of them are what you expect you can still use the "Scale" option in exporter dialog to adjust the final size.
  • The unit of time and angle in gltf format is seconds and radians

glTF Importer and Viewer

  • 3D Viewer: a free glTF viewer on Windows 10, you can also download it from Windows Store.
  • tiny glTF: a C++ header-only loader and serializer
  • GLTFLoader: a javascript loader in three.js
  • glb importer for 3ds Max: the goal of this plugin is to import glb / glTF in 3ds Max. This project is still under development.