# Importing a Rigged Model into ThreeJS

**URL:** <https://discourse.threejs.org/t/importing-a-rigged-model-into-threejs/484>\
**Category:** Questions\
**Tags:** skinned-mesh, armature, rigging, blender, blender-exporter\
**Created:** [June 12, 2017, 9:44pm UTC](https://discourse.threejs.org/t/importing-a-rigged-model-into-threejs/484 "2017-06-12T21:44:46Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![rodrix](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@rodrix](https://discourse.threejs.org/u/rodrix)\
**Post date:** [June 12, 2017, 9:44pm UTC](https://discourse.threejs.org/t/importing-a-rigged-model-into-threejs/484/1 "2017-06-12T21:44:46Z")

</div>

I searched every possible stackoverflow questions, forums, demos and examples all across the web without luck.

Can anyone tell me how to export a Rigged model into ThreeJS? I tried both with Blender and 3d Studio Max without luck. With Blender I get “Armature is not a valid mesh object”.

Please help. Thank you so much in advance.

---

<div class="post-metadata">

**Author:** ![looeee](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/looeee/32/59_2.png) [@looeee](https://discourse.threejs.org/u/looeee)\
**Post date:** [June 13, 2017, 3:12am UTC](https://discourse.threejs.org/t/importing-a-rigged-model-into-threejs/484/2 "2017-06-13T03:12:21Z")

</div>

Have you seen this github issue?

[https://github.com/mrdoob/three.js/issues/9492](https://github.com/mrdoob/three.js/issues/9492)

---

<div class="post-metadata">

**Author:** ![rodrix](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@rodrix](https://discourse.threejs.org/u/rodrix)\
**Post date:** [June 13, 2017, 3:24am UTC](https://discourse.threejs.org/t/importing-a-rigged-model-into-threejs/484/3 "2017-06-13T03:24:54Z")

</div>

Thanks for the reply.

Yes, I have seen it unfortunately 😕  
It didn’t help.

> I believe we exported a rigged object by removing the armature in the “modifier” tab and exporting the mesh and the armature by selecting them both and exporting them (or as @Jeremboo mentioned, not select anything). Of course select the Geometry you need in the exporter.

He doesn’t explain what he did to fix it, or I am not understanding it. If I select just the mesh and not the armature then the object is exported without bones…

> My problem was exporting a spline from Blender to JSON. This gave the same error because, well, a spline is not a mesh. Some python magic did the trick. I’m not a developer myself so I cant explain how kit was done. But with a little bit of Python knowledge, this shouldn’t be to hard.

Python magic? What is he talking about…

This git issue thread didn’t make any sense for me. Maybe someone can explain it but I don’t see the solution there.

Thank you so much everyone in advance! 🙂

---

<div class="post-metadata">

**Author:** ![looeee](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/looeee/32/59_2.png) [@looeee](https://discourse.threejs.org/u/looeee)\
**Post date:** [June 13, 2017, 12:08pm UTC](https://discourse.threejs.org/t/importing-a-rigged-model-into-threejs/484/4 "2017-06-13T12:08:09Z")

</div>

Sounds very much like somebody else solved the problem for him 😁

I’d say try exporting in a different format such as FBX, I’ve found the blender exporter to be buggy before.

---

<div class="post-metadata">

**Author:** ![rodrix](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@rodrix](https://discourse.threejs.org/u/rodrix)\
**Post date:** [June 13, 2017, 8:18pm UTC](https://discourse.threejs.org/t/importing-a-rigged-model-into-threejs/484/5 "2017-06-13T20:18:41Z")

</div>

Thanks so much for your help @looeee, but that still doesn’t resolve the issue. 😕

---

<div class="post-metadata">

**Author:** ![CasualKyle](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@CasualKyle](https://discourse.threejs.org/u/CasualKyle)\
**Post date:** [June 14, 2017, 2:02am UTC](https://discourse.threejs.org/t/importing-a-rigged-model-into-threejs/484/6 "2017-06-14T02:02:42Z")

</div>

Before you export the model in Blender make sure only the mesh object is selected, not the armature. And check the bones option to export the bones, I believe that should work.

---

<div class="post-metadata">

**Author:** ![rodrix](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@rodrix](https://discourse.threejs.org/u/rodrix)\
**Post date:** [June 14, 2017, 5:24am UTC](https://discourse.threejs.org/t/importing-a-rigged-model-into-threejs/484/7 "2017-06-14T05:24:51Z")

</div>

Hi @CasualKyle, thanks so much for the reply.  
I really hope you can help me end this nightmare!

Good news: I managed to export the model now and load it in a skinned mesh.  
However:

1. Textures and materials are not loading properly
2. I get only one mesh, when on the scene I have two meshes sharing a single armature (and yes, I did select both meshes with the mouse… but still I get only one mesh exported at time).

This is my blender file:

> **[Hand\_v.5\_for\_export.blend](https://www.dropbox.com/s/b3p8ho6rodc73wr/Hand_v.5_for_export.blend?dl=0)**
>
> Shared with Dropbox

If you can teach me how to export this correctly, I would be incredibly grateful.  
This is my attempt 17 of just the last three hours. I have made over a hundreds of attempts with different configurations over the last three weeks without success…

This is what I get:

> **[Hand\_v.5\_for\_export17.json](https://www.dropbox.com/s/t3ym7x5tsstst3g/Hand_v.5_for_export17.json?dl=0)**
>
> Shared with Dropbox

PLEASE help me.  
Thanks  
(I know it sounds desperate… I am 😕 )

P.S: These are the texture images:

> **[hand-textures.zip](https://www.dropbox.com/s/jzln2d19i4q198z/hand-textures.zip?dl=0)**
>
> Shared with Dropbox

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [June 15, 2017, 3:35am UTC](https://discourse.threejs.org/t/importing-a-rigged-model-into-threejs/484/8 "2017-06-15T03:35:35Z")

</div>

Hi @rodrix — It might be worth trying the [glTF blender exporter](https://github.com/KhronosGroup/glTF-Blender-Exporter/). I tested that out, and it is at least loading a THREE.SkinnedMesh with THREE.GLTF2Loader.

The materials did not come through on export quite right, but I think that could probably be fixed by looking through the docs and/or github issues on the exporter (or manually adding materials in JS if necessary…).

---

<div class="post-metadata">

**Author:** ![rodrix](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@rodrix](https://discourse.threejs.org/u/rodrix)\
**Post date:** [June 15, 2017, 5:38am UTC](https://discourse.threejs.org/t/importing-a-rigged-model-into-threejs/484/9 "2017-06-15T05:38:43Z")

</div>

Hi @donmccurdy. Thanks so much for the reply.  
Did you test it out with the model I provided and got better results than I did?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [June 16, 2017, 3:00am UTC](https://discourse.threejs.org/t/importing-a-rigged-model-into-threejs/484/10 "2017-06-16T03:00:33Z")

</div>

it looks consistent with your Blender model to me ¯\_(ツ)\_/¯

I exported with a Phong shader: [https://expirebox.com/download/e276add89345fcd5fa4888e214ea66ba.html](https://expirebox.com/download/e276add89345fcd5fa4888e214ea66ba.html)

![](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex035/uploads/threejs/original/1X/f1d93202de6c5aabcabb5637c5059cee319684b2.jpg)

But you will need this fix to GLTF2Loader: [https://github.com/mrdoob/three.js/pull/11524](https://github.com/mrdoob/three.js/pull/11524)
