OBJ export options in Blender


(Gilles38) #1

Hi all,
I used to export from Blender as COLLADA and I am switching to OBJ format now which seems to be more stable in my case.
Is anybody using this format to export from Blender to Skecthfab ? What export options in Blender would you recommend ?
Thank you all

(Simon Kratz) #2

Hey there!
I regularly use FBX for non-animated models. Imo they have the best overall support for different UV sets, vertex colors, custom normals and other fancy things like the visibility tag :slight_smile:
I do have problems with blender animations and fbx though.
For all animated models that were done in Blender I fallback to Collada as well.

(Shaderbytes) #3

I use the blender addon for exporting in most cases .. its pretty robust. If I dont use that for some reason it would be FBX as the next option. I almost never export OBJ in regards to uploading to sketchfab at least.

(Gilles38) #4

Hi essimoon & shaderbytes,

Tell me if I am wrong but from what you both say, it looks to me that you have no animations in your Blender file. I guess this is why Essimoon is talking about COLLADA when he deals with animations
My problem is also that I have animations but I want to export single frames at once.
If I use either FBX or the add-on then the whole animation is imported to Sketchfab and I don't want that.
That's why I stick to COLLADA or OBJ formats. COLLADA is nice because Blender is exporting textures but I have problems with mesh locations, especially on duplicated objects (may be related to interpolation mode in my case?). Just the reverse for OBJ: locations are fine but I have to manually add the textures since Blender doesn't export them.
I have never tried FBX seriously though.
Essimoon and Shaderbytes, would you recommend some "key" options in the FBX Blender export panel for both animated and non-animated models?

(Shaderbytes) #5

There is currently no way to tell the blender exporter to only include a single animation, you either include all of them or you include none. This is a sad limitation in the blender fbx exporter. Using the sketchfab exporter has no control over ignoring animations , if they are there it will upload them. Of coarse you can delete them in the sketchfab editor afterwards.

From what you are describing it sounds like you have a blend file that has animation and you want to export static models based on the frame position? I have never tested doing that myself since I had no reason to do it. So perhaps someone else knows more about it ,perhaps you can apply default poses etc..

(Gilles38) #6

Hi Shaderbytes,
yep ! exactly what I'd like : Export 1 frame from a large Blender file. And I came to the same conclusion than you that it is not possible to do that with the add-on or the .blend.
That's why I am dealing with COLLADA or OBJ export.
Also I just want to share a difference bewteen these two formats exported from Blender and viewed under SKetchfab:
See my 3 images attached: in the OBJ format there are holes that I don't have in the original blender file nor in the Collada version. So that's one good point for Collada.
In Blender:

In Sketchfab, OBJ format:

In Sketchfab, COLLADA format:

Soon or later I will have to deal with animations in Sketchfab. So far it doesn't work properly either with the add-on or the blend file but I have to work more on this. I'll comme back to you guys for advices.

(Gilles38) #7

Hi Essimoon,
I have a question about exporting animations using the COLLADA exporter from Blender.
In my hands, it works OK for non-rigged objects but not for rigged meshes. Do you agree with that or did I missed something ? In my case I have both rigged and non-rigged objects in the same COLLADA file and under Sketchfab none of them are animated, (which is what I want actually, hope Sketchfab won't change that !)

Is there a possibility to export a single frame of an animation in Blender in COLLADA ? It does'nt look like.

So I am trying to summarize here what I understand when exporting as COLLADA from Blender:

  • Non-rigged meshes are animated (at least under Sketchfab (Essimoon))
  • Rigged meshes are not animated (at least under Sketchfab (Gilles))
  • Non-rigged meshes + rigged meshes are not animated (at least under Sketchfab (Gilles))

Hope this is correct. Tell me if you don't agree.

(Mrchlblng) #8

We do not support collada animation on sketchfab (at the moment). There is no plan to add support soon but it might come someday. So I'm not sure to understand the "non-rigged meshes are animated"; if that's the case, this is a bug on our side.

Regarding the differences in your 3 snapshots, did you make sure that you have the same rendering e.g. in meshlab (or even by reimporting in blender)? I'm quite surprised by the OBJ version.

(Gilles38) #9

Sorry , I wasn't clear enough about this COLLADA story.
You are right, non-rigged meshes are NOT animated under sketchfab but are animated under other viewers (such as the basic viewer under Mac).
Rigged meshes are never animated, under Sketchfab or other viewers I tried (that's why I am thinking Blender COLLADA exporter is not supporting rigs).
My concern is that if Sketchfab is supporting Collada animation in the future, I am just afraid that my current models would crash. Or it would be nice to give the possibility to uncheck animation data in a new Collada Skecthfab viewer that might come one day

I have to look for the OBJ file I used and try to re-import it in Blender.
I will tell you.
Thank you for mentionning my mistake

(Gilles38) #10

Hi again mrchlblng,

Didn't find the exact same OBJ file, but here is another example.
When re-uploaded in Blender, everything is fine while in Sketchfab there is a hole in the mesh (several Shape keys are used in that area, could be the problem?).
OBJ is nice since it is only half the size of the Collada files, but I have this problem sometimes under Skecthfab.
Now it didn't try all options in the OBJ export menu in Blender.
Tell me what you think.


(Mrchlblng) #11

@gilles38 thanks for the sample. When opening in meshlab, I have the same result as in sketchfab. Looking at the OBJ, I'd say that it's probably due to the presence of polygons in your model that we do not support so well. I think that Blender polygon tessellation is quite good so we might use it in the future.
In the meantime, could you try to remesh it (e.g. by running the triangulate modifier)?

Note that:

  • if we add support for collada animation, it will not change your existing models. We currently do not automatically reprocess all models so once it's on sketchfab, your data doesn't change (except your materials if you edit them).
  • you can delete animation tracks in the editor (but you could not revert it so re-using deleted animations would require that you reupload your model)

(Gilles38) #12

Yes, that solves the problem in Sketchfab. Face number is also now the same as in Collada.
Thanks. So what do you advice to export best from Blender : COLLADA or OBJ with triangulation (at least in my case for single frame export from a Blender file with animation)?
I used the Triangulate modifier but I see that there is "Triangulate faces" in the OBJ export menu. So I don't if this gives the same result
Also is checking "Animation" working well in OBJ in Sketchfab?
Thank you. It's nice to talk about these issues that I am often dealing with.

(Mrchlblng) #13

Glad it solved one problem!
I guess that the "triangulate faces" in the obj export menu would simply apply the triangulate modifier but that's a guess.

I would say that the best format out of blender is... a blend file. We may still have bugs in our blender pipeline that we would love to be aware of and fix!
Googling a bit, it looks like it is possible to export a still model out of an animation. I'm no blender expert so I don't know how good the proposed solutions would be in your case.

The OBJ format is quite simple and does not support animation. You could recreate a "stop motion" animation using our timeframe feature and a sequence of OBJ files but it might be tedious.
We otherwise support animation from blend and fbx files only.