Sketchfab exporter for 3ds Max
Putting your 3D models on Sketchfab is a great way to share your work with the world. Sketchfab has made this easy for you by offering exporters for several 3D programs. This is very convenient for e.g. portfolios, communication with clients or presentations. I’ve written the sketchfab exporter script for 3ds Max and have been maintaining it ever since.
This model has been uploaded to sketchfab with the click of a button
Documentation
Embedding
You probably want to show your model off on a forum or blog. The best way to do that is to embed the model as an iframe. At the top of this article you see a description. I’ve also written another article which shows some examples of the possibilities with the iframe. There are many platforms and forums which natively support Sketchfab embeds.
Thanks
Thanks to the team at sketchfab for helping me out with all my questions and for creating such a cool product: Cedric Pinson and Alban Denoyel
Mini disclaimer
This script is provided as-is. If there are any bugs or problems, you can leave a comment here or contact sketchfab. This script is generally supported in 3dsMax 2012 and up. though I actively work in the latest version of max and three versions back.
version 9.05
- re-upload models
version 9.01
Read more about it here
- Added support for Corona and VRay Next
- Add options to keep material separate
- Retain original UV channels
version 7.68
- New lightbaking feature
- New user documentation
Version 007
- implements sketchfab API V2
- faster and more stable uploads
- doesn’t create a thumbnail anymore, sketchfab does this for you
Version 005
- streamed upload
- progressbar
- improved compatibility with older max-versions
29 Comments
Join the discussion and tell us your opinion.
Fantastic script!
This is by far the easiest way to get models onto the web, thanks for your work on this one.
The script has been updated to version 5
hey klaas!
thanks so much for doing this.
i’m having a hell of a time getting my lights out of 3dsmax into Sketchfab. how do you recommend this?
thanks!
Hi Sean, I can imagine you’re not getting your lights onto sketchfab. This exporter works with the OBJ fileformat which doesn’t support lights at all. Sketchfab uses default lights in that case.
You can however use the collada format (opencollada recommended http://opencollada.org/). That one does support lights. If you don’t export lights with opencollada your scene will turn out black.
Last time I checked the collada support from 3dsMax regarding shaders was pretty limited. Only diffuse textures if I remember well.
Klaas
many thanks~!
Hallo klaas
Wanneer ik 3dsmax2sketcfab.mzp in 3dsmax proberen openen, krijg ik een foutmelding 193 (failed to inititalize. Not a valid Win32 application).
Ik ben erg dom met het goed, wat doe ik verkeerd?
Groeten.
Rikus
Hoi Rikus,
je kan het mzp-bestand installeren door het in een viewport te slepen of door het te runnen (menu > maxscript > run script…). Je kan het mzp-bestand niet openen alsof het een gewoon max-bestand is. gebruik in ieder geval de laatste versie: https://www.klaasnienhuis.nl/wp/Maxscripts/SketchfabPublisher.mzp.
Hopelijk helpt dit,
Klaas
i have error (i use 3dmax2009): in debuger i see
— Control: dotNetObject:CSharpUtilities.SynchronizingBackgroundWorker
>> MAXScript dotNet event handler Exception: — Unable to convert: undefined to type: Integer <<
Sending scene to sketchfab
320 ms
memory 69656L
Script stop in line
100 local theEnd = (ftell theBinStream ) as integer –get the last position of the file
in sketchfab_htmlpost.ms
….
do you have any suggestions?
Hi Pasha, the script hasn’t been tested on max 2009. Could you try it in max 2010 or up?
Klaas
Hi Klaas,
Great script and I love the blog.
What i’m missing in this script is a simple option to bake the (GI) lighting into the textures. Like you did with the Augment Plugin. Naturally suitable for Vray and in combination with LWF.
Any chance to see this option in the future?
Thanks and kind regards,
Toni
Hi Toni,
thanks for the kind words.
Yes, I’d love to add that to the publisher. However, adding a lightbaker takes a considerable amount of time. If you ask the guys at Sketchfab real nice, they might consider paying me to do so! BTW, “simple option”?? that doesn’t really reflect reality!!
Klaas
How did you make this model with lights and shadows?
I tried exporting fbx ,obj and etc.
Can you please tell me how I export my lights with shadows?
I work with Softimage.
Hi Diego, the lights and shadows have been “baked” into the textures. It’s a process where the lighting in the scene is rendered into the textures. These rendered textures then replace the original textures. In 3dsMax this is called “Render to texture” or RTT. You can also search for lightbaking or texturebaking. I’m not familiar with softimage, but I’m sure it can also perform this task.
The export format is actually unrelated to this.
Hi,
I installed Sketchfab script in 3ds max 2010 and it works very well. But I haven’t found out yet how to export light and shadows along with a model.
Any advice about this?
Many thanks.
Hi Lzar,
if you mean texturebaked lights and shadows: that’s not included in this script yet. I’m actually working on an update which does the texturebaking for you. It will be out shortly.
Hello Klaas,
I’d like to ask for an advice or explanation about exporting 3D models from Max to Sketchfab.
Can I export light source from Max (i.e Omni light)? Or how to get a light source in Sketchfab? I haven’t realized how to get light and shadows on Sketchfab such as shown in the video above.
Hi Laki, when using the exporter you can’t export light sources. The obj format which is used, doesn’t support this kind of object. If you export manually from 3dsMax with collada (opencollada is a good one) you can export light sources.
[…] Read more about the script here […]
Hi Klaas,
Top script voor SketchFab. Gebruik het elke dag!
Ik heb alleen een vraag. Ik gebruik Vray HDRI maps in het environment slot om het model van alle kanten te belichten. Alleen het script voegt een skylight toe bij het bake and export en dit produceert een schaduw op de textures als ik het later in SketchFab bekijk. Ook is de onderkant vrij donker vergeleken bij de rest. Is het mogelijk om dit extra skylight permanent uit te zetten?
Bedankt!
Hoi Alex, dat is tof om te horen.
Je kan kiezen tussen twee soorten belichting: automatic (dat is die skylight) en manual. Als je hem op manual zet, voegt het script zelf geen lampen meer toe en gebruikt hij de belichting die in je scene zit. Je zou dat kunnen proberen.
Mocht het met de hdri in de environment slot nou niet werken, kan je ook de hdri in een photometric light doen.
Hi Klaas ,
Greetings from Peru agradesco all information and free support you brindas and surely this will be one more to say thanks but still thanks for the support and apologizes for borrowed time tell me with all your experience what is the best format to export a 3d model to the web sorry for my English
Hi Alejandro, thanks for getting in touch.
You have actually two choices: which platform will you use (e.g. sketchfab, verold, clara.io) and which 3d file format will you use to upload? Depending on what you’d like to do you can make your choice. Sketchfab for instance doesn’t support object animation, it has a great shader editor and allows you to push your models on facebook as well. Verold supports animation, has a solid shader editor and allows you to easily program user interactivity. Clara.io has the most capable 3D editor of them all (it’s basically 3D software in your browser), supports vray materials and allows you to either embed a webgl iframe (like most others) or a live vray rendered iframe.
With Sketchfab the fileformat you choose doesn’t really matter since you’ll recreate the shader online anyway. obj, dae or fbx all work great. With Verold, if you want to preserve animation, you should use collada (dae). With clara.io I’m not so sure what’s best to use. But clara.io supports an impressive list of fileformats. So I’d say: try it out!
Good luck,
Klaas
Hoi Klaas,
Ik gebruik de exporter al een tijd (versie 8.0 inmiddels), en superfijn is het. Ik om er alleen niet achter hoe ik het voor elkaar krijg om materials zo in te stellen dat ik ze in Sketchfab (3d settings> materials > bovenaan “Object001_mtl”) aan kan passen. Ik heb het ooit wel eens voor elkaar gekregen dat ik dan ook voor “Object002_mtl” of “Object003_mtl” kon kiezen en dus de verschillende materials apart van elkaar nog eens kon tweaken. Wat doe ik nu verkeerd?
Hoi, het script voegt objecten inderdaad samen tot 1 klont, om het daarna zo efficient mogelijk te unwrappen en baken. Als jet het script laat unwrappen, dan kan je de density verhogen. Jet krijgt dan meer textures die over verschillende objecten worden verdeeld. Maar dat is nog steeds vrij random en niet waar je naar op zoek bent.
Als je zelf jouw objecten unwrapt en “Auto unwrap objects” uitzet, dan heb je meer controle over hoe de objecten worden gesplitst.
I have an error with the script. SSL/TLS error. I uninstalled everything and deleted the connection in my connected accounts. But now, it even get connected when I install the script again! Please help.
Hi Izzi, I’ve been contacted by Sketchfab about this as well. It appears it’s a backend security setting they’ve changed. They’ve changed it back right now. I’ll have to update the script though to deal with this update at some point. thanks for reporting this. Your current script should work now.
Thanks you very much for sharing your work, looks great but I’ve not been able to use it. I know my Max is a bit old but I get an error on Max 2016 I hope you can give me a clue!
When I try to run it, ot gives a MaxScript rollout Handler exception:
— Error occurred in fn_authorize(); filename: C:\3ds Max 2016\Scripts\KlaasTools\Sketchfab\scriptfiles\main\api_auth.mse; position: 693; line: 24
— called in btnOauth2Authorize.MouseClick(); filename: C:\3ds Max 2016\Scripts\KlaasTools\Sketchfab\scriptfiles\gui\gui_rollout_authorize.mse; position: 4983; line: 142
— Runtime error: dotNet runtime exception: Object reference not set to an instance of an object.
when I hit the button in the authorize section it says
— Runtime error: dotNet runtime exception: You must provide a request body if you set ContentLength>0 or SendChunked==true. Do this by calling [Begin]GetRequestStream before [Begin]GetResponse. <> MAXScript Callback script Exception:
— Unknown property: “height” in dotNetControl:btnReupload:(null) <<
I hope this helps!!
Hi eNano, I’m afraid I won’t be able to provide support for 3dsmax 2016
Hello, Klaas!
There is a problem with 3ds Max Exporter.
The installation was successful.
I dragged the icon on the toolbar.
When I click on the icon, a message pops up:
”
–Runtime error: .NET runtime exception: Object reference not set to an instance of object
–File name: ..\scriptfiles\main\api_user.mse
–Line number: 24
”
When I click on the button on the authorization tab, an error appears again indicating the same problematic line in the same file.
3ds Max 2024, exporter v.9.07
Please tell me how to solve this problem. Thank you in advance!