Blender to SketchFab Top Tips [Please share yours]

feature-request
blender

(Kage G) #1

I'm fairly new to Blender but have already realised what an awesome combination Blender and Sketchfab make. There are a lot of features in Blender which Sketchfab doesn't support. I thought it'd be a good idea to start a topic where people share how they managed to get certain features of Blender working in Sketchfab. I'll start off with a few I've discovered in the last few weeks while learning Blender and hope others will share their tips. This is not meant to be about how to do things in Blender just how to get them to Sketchfab. I know some of these may be obvious to experienced users but not to newbies so hopefully this will help people like myself. Not sure this thread should be in support so please move if needed.

Cloth simulation.
Sketchfab does not support Blender's cloth simulation modifier so you have to turn the animation into shape keys. Once you're happy with your cloth simulation, select the object then export as a Lightwave Point Cache (.mdd). To do this you need to enable Lightwave Objects and NewTek MDD format in import/export add-ons in user prefs. Now remove the cloth simulation from your object and, with it still selected, import the .mdd file you created. Animation is now in shape keys which work in Sketchfab. Example: https://skfb.ly/VNr6

Physics
Sketchfab doesn't support Blender physics simulations (as far as I know) so simply turn your simulation into keyframes which work fine in Sketchfab. Example: https://skfb.ly/VIGB

Camera Movement
Figured this out after reading various entries on the forum. At the moment Sketchfab doesn't support camera movement easily. One solution is to move the objects in Blender to simulate camera movement. I create an empty in my scene and make it the parent of all objects in the scene. Once I'm happy with my animation, I turn on keyframe recording then go through the timeline moving, rotating and scaling the parent empty to simulate camera movement. I only got this working this morning so the example is very jerky but you get the idea. Example: https://skfb.ly/VWNI

Textures with transparency
This is probably not the right way to do it but it's the only way I could get it to work. If there's a better way, please correct me. I modelled a lego man and the textures for the mouth and eyes were pngs with transparency. I opened these in photoshop and changed the transparent areas to the colour I wanted the head to be, making note of the hex colour code used. In sketchfab I made the head material the same colour code then made sure the head, mouth and eyes material all had the same metal and roughness settings. I'm sure there's a better way but this is quick and works for me. Example: https://skfb.ly/VUKC

Mirroring objects
I ran into an issue where I'd duplicated and mirrored an object in Blender but the materials were strange in Sketchfab. Shaderbytes on the forums explained what I did wrong. In mirroring I'd set the X scale to -1. When Sketchfab reset the scale the normals were reversed. Solution is to always apply scale when mirroring objects then reverse the normals. I found it's always good practice to apply scales in Blender prior to upload. As shaderbytes pointed out, always look at your models with viewport shading set to solid. This will show up any normals issues.

Flat faces
An obvious one to experienced users but maybe not to newbies like me. I think Sketchfab applies smoothing and this can sometimes make flat faces look terrible in Sketchfab especially if your mesh is triangles. I get round this by adding very small bevels to the sharp edges round the face. You could also apply the Edge Split modifier which seems to do the trick too.

That's my top tips so far. I really hope others will share theirs. Anyone managed to fade an object in an animation in Sketchfab?


What Blender animations does sketchfab support
(Keithg) #2

Object Disappear
Haven't managed to fade an object yet. Closest I've got to making something vanish is to set the scale of the object to 0 with just 1 frame gap between full size and 0. Looks great in Blender but in Sketchfab you can still see the object shrinking. There must be a better way. https://skfb.ly/VZWR


(Dark Minaz) #3

there is no real "fade" but visibility = 0 should work


(Waleguene) #4

Hi,

Thanks a lot @KageG for pointing this out and giving helpful explanations and workarounds!

Adding some infos:

Camera animation
It's not supported, but we are talking about it and it could be implemented in the near future

Textures with transparency
There are two way to use transparency texture, depending on which data stores the transparency information.
For a texture, you can choose between ALPHA (for RGBA texture, it uses alpha channel of your png) or LUMINANCE (use grayscale values of the texture)
If you try again setting ALPHA on your transparency texture and it should be ok :slight_smile:

Flat faces
You should get flat shading working on Sketchfab, like this: https://sketchfab.com/models/00256f8d35df4975b170df8c49bb7967
We only smooth models when the data is missing (no normals) on geometries. The only case where you get your mesh smoothed is when you use shape keys. Normals are not currently exported for shape keys, so we regenerate them (by smoothing)

Object Disappear
@keithg the issue you mentionned is known and will be fixed in the near future. Blender animations are baked with a given framerate, so for now, any transition that is quicker than this framerate can be lost (that's why you see the object shrinking).
It will be improved soon :slight_smile:

Intereting thread, don't hesitate to add feedbacks or requests features. If we can implement them, we will note and add them in the next Blender processing update


(Keithg) #5

dark_minaz

Sorry I've only been learning Blender for the last few weeks so am unaware of many features.

Where do I set visibility to 0. If I set visibilty off in the scene window my object disappears for the entire animation.

I can't find a visibility setting in the Transform Menu (Key N). or in the Object Tab


(Keithg) #6

@waleguene

Regarding normals I have an issue which you can see here. https://skfb.ly/Wnsn

We have a supplier who has supplied hundreds of models in STEP format. I open these in a CAD program and export as .fbx files. I import them to Blender, set shading as smooth and they render really well.

In Sketchfab you can see the issue with the normals on the domed part of the product. I know the mesh isn't great and very triangulated but obviously Blender does something to smooth these issues. I have tried re-calculating the normals in Blender prior to upload but it makes no difference in Sketchfab.

This is the same item in Blender:

I really don't want to re-model hundreds of models so my question is. Are you guys working on the way in which normals are smoothed from Blender? If so, I'll wait and see. If not, I'll look into re-modelling.

This isn't a criticism. I think Sketchfab is awesome and they way it works with Blender is fantastic. Just don't want to do loads of re-modelling work if I don't have to.


Blender - Shape Keys Smoothing Issue
(Waleguene) #7

@keithg When processing a model on Sketchfab, normals are recomputed only if there are no normal data inside the geometry (or if it's invalid, with null or missing normals)

Here, the problem comes from the fact that Blender takes the data and modifies it in some points before rendering it, but the data inside the geometry is still the same (i.e the normals you get on Sketchfab).
That's what happen with the smoothing option:

If you uncheck it, you get the same result as on Sketchfab. Our processing is not smart enough to get this option and recompute the original normals to get the same result (that could also be improved). For now we read the geometry data and use it as it is.

A way to trigger normal smoothing on Sketchfab is to upload a file where geometries have no normals data.
In Blender, you can for example export your model using .OBJ and uncheck the "Write normals" option in export settings:

Note that it can still give a result that is different of Blender, depending of the crease angle used.

Could you give a try and tell us how it goes?


(Keithg) #8

@ waleguene

Thank you. I followed your steps and indeed can reproduce the normals issue inside Blender. Blender is obviously doing something clever with the normals from my model to render it so smoothly inside Blender.

To be honest, I've always had issues getting meshes from CAD files to render well. Blender does the best job of any program I've tried so far.

The model I gave as example was a STEP file which I opened in Carrara Pro and exported as an .fbx. This gave a very smooth mesh inside Blender but problems in Sketchfab. I opened the same model in FreeCAD and exported as an .obj. The mesh that came into Blender wasn't as smooth but when I smoothed it in Blender and added an edge split modifier, it looked much better in Sketchfab: https://skfb.ly/Wn9p

This will work for me for the time being. The problem comes when I apply shape keys as Blender does not export normals for shape keys and it looks terrible in Sketchfab: https://skfb.ly/WnHo In those cases I have no choice but to re-model in Blender. Meshes made in Blender always look fantastic in Sketchfab: https://skfb.ly/WnNU