Show your 3d models on Sketchfab

Sketchfab exporter

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 built the exporter for 3ds Max and have been maintaining it. Recently it’s been updated with a built-in lightbaker.

This is a model hosted on sketchfab, embedded in this blog.

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 has been developed on 3ds Max 2014 and tested on 3ds Max 2010 – 2015

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


24 comments

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

seanshimboyle

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

seanshimboyle

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: http://www.klaasnienhuis.nl/Maxscripts/SketchfabPublisher.mzp.
Hopelijk helpt dit,
Klaas

pasha

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

Toni

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

Diego

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.

Lzar

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.

Laki

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.

Alex Teusch

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!

Klaas Nienhuis

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.

Alejandro Caceres

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

Klaas Nienhuis

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

Foppe

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?

Klaas Nienhuis

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.

Leave a Reply

* Will not be published