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 :
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.
Basic workflow to publish a model.
Open the published model on Sketchfab.
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
The lighting options
Switching the bake on or off
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.
- 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.
Setting the amount of pixels to be rendered
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.
- 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.
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.
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
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.
The installation dialog
This dialog shows the location where the script is installed.
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.
The customize user interface dialog
Add the script to a toolbar
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.
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.
On first run, the script asks you to authenticate