Updated 3DS Max to Sketchfab exporter

Back to overview

The Sketchfab exporter for 3DS Max enables you to publish your 3D models straight from 3DS Max to Sketchfab with one click. Models are exported and uploaded to your Sketchfab account. We are excited to release a new improved version, with a big new feature: the ability to lightbake your model, while publishing it.

Just select the objects you want to publish, enable the automatic lightbaking and press “Publish”. It’s that easy!

And here is the result:

Here’s a step by step guide for the updated 3DS Max exporter :

image

An overview of the main functions of the tool.

Break down of the features :

Publishing a model

To publish a model, you need to enter a title, select some objects and press the “Publish” button. The plugin will take care of the rest.

Please note that the fileformat used for the export is wavefront obj. If something’s not supported by this format, this publisher can’t send it to sketchfab.

image

Basic workflow to publish a model.

image

Open the published model on Sketchfab.

Lightbaking

The script can publish to Sketchfab with or without lightbaking. You can enable or disable lightbaking in the “Light, bake, uvw” rollout. If you disable the “Bake lighting” option, all other bake options will be disabled. If you enable lightbaking, other options become available.

The script handles a few tasks for you, besides the lightbaking. It can unwrap the model for you, it determines how big the lightbaked textures should be and it sets up the lighting for you.

Only V-Ray is supported for lightbaking for now. The script uses the rendersettings of the current scene. You can make the baked textures as smooth or as grainy as you like by adjusting the rendersettings yourself.

Currently there are three render engines supported for lightbaking: scanline, mentalray and vray

image

The lighting options

image

Switching the bake on or off

Texture size

The lightbaker has to determine the size of the rendered textures. It looks at the surface area of your model related to the surface area of the bounding box of your model. It also uses a maximum size per texture file of 2048 x 2048 pixels. Finally, you can influence the final sizes by adjusting a “Density” value. This value multiplies the calculated texture pixel per surface area ratio. Leave it at 1.0 to go with the default.

The results of the calculation differs between using the auto-unwrap and manual unwrap option. When using the auto-unwrap, the model is merged into one object and sliced into chunks which fill the textures optimally (as far as automatic unwrapping in 3dsMax goes). In that case the script tries to fill a texture of 2k. If it’s full, it starts with a new texture until all geometry has found it’s place.

If you skip the automatic unwrap and provide your own uvw coordinates, the meshes are not touched. In that case, the texture size of each object is calculated based on the surface area with a maximum of 2k per texture.

You can get a feel for the amount of textures being rendered by selecting your objects and pressing the “Calculate sizes” button. It will either show you how many textures or how many megapixels will be rendered, depending on the picked unwrap option.

Notes

  • Currently there’s no limit on the amount of allowed textures. If you set the density value too high, you might cause the script to crash trying to render too many texture. Keep in mind that the textures also need to be actually rendered on your own computer.
  • There’s a limit of 2k per texture. When using the auto-unwrap large objects are split into multiple chunks. Each chunk gets it’s own texture. When using your own uvw coordinates however, the meshes aren’t touched. A large object which needs a larger texture to keep the specified pixel density might be capped at 2k. If you want a more even texel distribution, you can split the mesh yourself into separate chunks.
  • When using your own uvw coordinates, make sure that there are no overlaps in your unwrap. Overlaps in the unwrap result in artefacts in the lightbake.
  • When using your own uvw coordinates, make sure to split your object if it has multiple material ID’s.

image

Setting the amount of pixels to be rendered

Lighting

To bake textures, you need light. You can use the automatic lighting which ships with the script. This is a smooth, omnidirectional lighting setup. You can also use your own lighting. Set the “Lighting type” option to “Manual” for that. In that case the script will use the lighting which is present in the scene. If you have multiple cameras with different exposure values, pick the camera you want to use for the bake.

All exposure values including color balance are taken into account when using a vray camera with exposure enabled.

Notes

  • Objects which have been mirrored or have any kind of negative scaling will turn out black. Perform a reset xform on the object and make sure the normals in the object aren’t flipped.
  • When using the vray frame buffer you can enable a gamma color correction inside of this framebuffer. This property is not taken into account when baking and uploading a model. If you want to have reliable gamma results, use the default rendered frame window and set your gamma settings in the max preferences.

image

Two lighting types available

Changes to the model

When texturebaking with “Auto unwrap objects” enabled, the script edits your model. Don’t worry, this is done in a copy of the scene. The meshes are grouped into objects which correspond to the amount of textures which are going to be rendered. If you’re rendering 6 textures, you’ll get 6 objects.

Sketchfab settings

Once uploaded, you get the best results if you set the rendering option to “Shadeless”. This brings out the best in the baked texture.

tip: when using “original” shading, set the texture emissive value to max. After that you can use the other things like specular and transparency

Installation

Install the script by either dragging the .mzp file into a viewport or by using the menu: Maxscript > Run script…

After that a dialog appears. Press the “Install Sketchfab [version number]” button. A dialog appears to ask you if you’re sure. If the installation has been successful, another dialog appears which tells you how to add the script to a toolbar, quad, shortcut or menu. Close the installation dialog.

image

The installation dialog

image

This dialog shows the location where the script is installed.

image

The success message with an instruction on how to add the script to the gui

Add a button on a toolbar

To add the script to a toolbar, use the menu: Customize > Customize User Interface… Go to the “Toolbar” tab and in the “Category” list pick the “Klaas tools” item. A list of scripts in that category appears. Pick the “Sketchfab [version number]” item and drag that to an existing toolbar or make a new toolbar for it. Save the ui layout if you want to keep it.

You can also put the script in a menu, quad, under a keyboard shortcut or a combination of these.

image

The customize user interface dialog

image

Add the script to a toolbar

Updating

The script checks for an update on a server every time it starts up. If there’s an update available, the script will notify you with a button. Press it to download the update and start the installer. Follow the instructions under the “Installation” chapter. However, you don’t need to customize the gui again. Just close the installer and script and reopen the script. It’s been updated now.

image

An update is available, go get it

First run and authentication

To do stuff with the script, you need to authenticate the script. Do that by entering your token into the script. You only need to do that once, the script will remember this the next time you run the script.

image

On first run, the script asks you to authenticate

How to publish 3DsMax models online with Sketchfab from Sketchfab

About the author

Sketchfab Team


Leave a Reply

Your email address will not be published. Required fields are marked *

  • marschlabb says:

    Hi,
    uploading a model on Sketchfab using .obj didn’t work for the textures so i was told to use your 3dsMax Exporter. But it seems it exports directly to your site; what happens if the computer i use to do my 3D work isn’t connected to the web? Mine is not and hasn’t been for years. How can i use your site?
    Thank you for your time

  • Slawek says:

    Can I reload existing scene using this exporter? Plugin very good import scene to Sketchfab but if I want change some detail I must use reload option via web and FBX file. Then all materials break down 🙁

  • Livy says:

    hi
    I’ve tried to install the “3dsmax2sketchfab.mzp” just the way it says to do it. I have autodesk 3ds amx 2010 x64 wich it’s supposed to not have a problem ..I can do it right till the step where i can set the sketchfab 8 .09 button at a tool bar, but then i just can’t have that “publish to sketchfab” dialog but an error dialog that says: “–runtime error: dotnet runtime exception: colud not load file or assembly ‘system, version= 4.0.0.0, culture=neutral, plubickeytoken=b77a5c561934e089’ or one of its dependencies. system can’t find the specific archive”

    I’ve also tried to do it over and over again from cero, step by step with no success
    help please 🙁

  • 3dsmax says:

    uploading a model on Sketchfab using .obj didn’t work for the textures…help please

    • Bart Veldhuizen says:

      Make sure you upload the .obj, the textures and also the .mtl file. Without the .mtl it won’t work.

  • GDNM says:

    Hi, i couldnt publish my project via the 3dsMax exporter by Klaas because i cant authorize my Project (401).

  • Rob Neal says:

    I am getting a
    “There’s a bad request. Runtime error DotNet…”
    (I can’t read the rest.)

    Any suggestions?

    • Hi Rob, this could be caused by many reasons. Let’s try to narrow it down. Could you send me what’s in the maxscript listener (press F11 to open it)? And could you tell me if the scene is very big and if you’re on a free account? Finally you could try to publish a box without texture baking.

      • Rob Neal says:

        Hi Klaas.
        I was doing this as a test render of a fairly basic test sphere using MAX2014, VRay and a PRB set of maps. (Diffuse, Glossiness, Height, IOR, Reflection, AO, Normal and Metallic) I have tried both with and without the baking and both instances failed.
        I am on a free version of Sketchfab.

        *********************************************

        There’s a bad request.
        — Runtime error: dotNet runtime exception: The remote server returned an error: (400) Bad Request.
        , 0.0 of 1
        “There’s a bad request.
        — Runtime error: dotNet runtime exception: The remote server returned an error: (400) Bad Request.

        Sending scene to sketchfab
        685725 ms
        memory 1893552L
        *****************************************************

        I hope this helps.
        You can email me directly if you wish,
        Regards,
        Rob

      • DatTest says:

        Exact same issue here on my side. Solution?

  • DatTest, this issue was caused by uploading a huge model which took over 10 minutes to upload. If this is the same in your case I suggest to check the model and textures for opportunities to optimize. It might also be caused is you’re trying to upload a private model on a free plan or if your number of private upload per month has been spent already.

    • DatTest says:

      Wow, thank you for the very fast reply! I tested it with smaller stuff and I’m getting the hang of it. Thank you! By the way – an automatic unwrapping option would be nice, decoupled from light baking. 🙂 I like the exporter and the possibilities on the website very much though!

  • izzi says:

    While I really do like the script. It’s really fantastic, but I always have an issue to authorize. Every time there is message that pops up “Couldn’t authorize. The request was aborted: Could not create SSL/TLS secure channel.” After some time it works, like I click on it many times. Is there any solution on this? Because it’s a bit frustrating.

  • Sean Toomey says:

    Hi.

    Any idea why when publish the model it seems work for a while…. Says merging objects etc but then Max closes. I don’t get a crash box or anything. It just disappears

    • Hi Sean, that’s hard to say. You could make a post on the forum and provide more specifics, what’s the size of the model, are you texturebaking or not, that sort of thing.

Related articles