Jump to content

Exporting a glTF model from 3ds Max


Josh

3,260 views

 Share

Autodesk 3ds Max now supports export of glTF models, as well as a new glTF material type. The process of setting up and exporting glTF models is pretty straightforward, but there are a couple of little details I wanted to point out to help prevent you from getting stuck. For this article, I will be working with the moss rocks 1 model pack from Polyhaven.

Getting geometry into 3ds Max is simple enough. I imported the model as an FBX file.

Untitled.thumb.jpg.b60b85c057710551be047f4bbf8b5788.jpg

To set up the material, I opened the compact material editor and set the first slot to be a glTF material.

1791106475_materialeditor.thumb.png.35f5719206ef9e12f2d764e50276b39a.png

Press the button for the base color map, and very importantly choose the General > Bitmap map type. Do not choose OSL > Bitmap Lookup or your textures won't export at all.

2124304387_materialeditor.png.b19201e2f8aedc210eb5cb2a97df606a.png

Select your base color texture, then do the same thing with the normal and roughness maps, if you have them. 3ds Max treats metal / roughness as two separate textures, although you might be able to use the same texture both if it grabs the data from the green (roughness) and blue (metal) channels. This is something I don't know yet.

1867673025_materialeditor.thumb.jpg.bfdac7b3089aa0ad50b6d33f8fc6fba7.jpg

Select the File > Export menu item to bring up the glTF export dialog. Uncheck the "Export glTF binary" option because we don't want to pack our model and textures into a single file: I don't know what the baked / original material option does because I don't see any difference when I use it.

export.png.801b5c9abbf0daed5eac65a4552e3760.png

At this point you should have a glTF file that is visible in any glTF model viewer.

export.thumb.jpg.d39d6f0d99c7b2a2100437411422f5f4.jpg

Now something slightly weird max does is it generates some new textures for some of the maps. This is probably because it is combining different channels to produce final images. In this case, none of our textures need to be combined, so it is just a small annoyance. A .log file will be saved as well, but these can be safely deleted.

export.thumb.jpg.f0b6aea9744463a8e9f931a57889b49d.jpg

You can leave the images as-is, or you can open up the glTF file in a text editor and manually change the image file names back to the original files:

  "images": [
    {
      "uri": "rock_moss_set_01_nor_gl_4k.jpg"
    },
    {
      "uri": "M_01___Defaultbasecolortexture.jpeg"
    },
    {
      "uri": "M_01___Defaultmetallicroughnesstex.jpeg"
    }
  ],

Finally, we're going to add LODs using the Mesh Editor > ProOptimizer modifier. I like these settings, but the most important thing is to make sure "Keep textures" is checked. You can press the F3 key at any time to toggle wireframe view and get a better view of what the optimizer does to your mesh.

lod.png.0a137762081528949dc22170dac2effb.png

Export the file with the same name as the full-resolution model, and add "_lod1" to the end of the file name (before the extension). Then repeat this process saving lod2 and lod3 using 25% and 12.5% for the vertex reduction value in the ProOptimizer modifier.

Here is my example model you can inspect:

mossrock1a.zip

Now it is very easy to get 3D models from 3ds max to your game engine.

  • Like 3
 Share

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...