Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I convert a ms3d model to three.js?

I'm trying to convert this model to the three.js model format:

http://tf3dm.com/3d-model/ninja-48864.html

Here's what i've tried so far:

I've imported the ms3d file in blender using the default addon. In blender, animations and mesh look correct; however, bones are only rendered as lines. Then I exported it to js using the three.js exporter. This results in a correct mesh, but the animation is not correctly exported. Only bone positions are exported (which are only rarely used in this specific model), NO rotations at all (except for a few identity quaternions).

It seems I have to modify the model in blender somehow, but since I'm a complete novice in 3d modelling, I'm kind of lost. I've also looked at other questions regarding blender+three.js but none of the tips (apply location/rotation/scale etc.) made a difference. It might also be a bug in the three.js exporter.

Can anybody help me do the conversion, one way or the other?

like image 407
morris4 Avatar asked Dec 02 '13 15:12

morris4


1 Answers

A nice Python utility is available for converting ms3d format to JSON format. The link is: https://github.com/pyalot/parse-3d-files/blob/master/ms3d/convert.py You can easily render this JSON model using THREE.JSONLoader() in three.js

Thanks.

like image 183
user2118784 Avatar answered Sep 24 '22 17:09

user2118784