Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please support for .obj .dae models with cannon.js #198

Open
anothercoder2 opened this issue Apr 25, 2015 · 4 comments
Open

Please support for .obj .dae models with cannon.js #198

anothercoder2 opened this issue Apr 25, 2015 · 4 comments

Comments

@anothercoder2
Copy link

For developing any serious game with three.js or cannon.js we are going to be required to load models.
From my research so far it seems that with cannon.js we can only use three.js json models.
Converting a simple 1mb .blend file results in a 29mb .json model.
This file size is impractical for any online game.
I have opened a issue for three.js
Blender to json export file size #6455
mrdoob/three.js#6455
Not sure what the response will be but if the cannon folks can support the .obj or .dae that would help taking three.js and cannon.js forward.

@bnolan
Copy link

bnolan commented Jul 5, 2015

SceneVR uses .obj models with cannon.js. You can convert the mesh data (that is loaded using any loader) into a cannon.js 3d model.

@ioquatix
Copy link

Based on my experience, I don't think either format is worth the effort.

@ghost
Copy link

ghost commented Jun 20, 2016

@anothercoder2 @bnolan @ioquatix How do you convert the mesh data to a cannon js model. There is nothing in there docs that have a custom type http://schteppe.github.io/cannon.js/docs/ What custom types or classes are needed to make this happen? Thanks

@donmccurdy
Copy link

I've written some utilities for converting THREE.Mesh objects (loaded from any format) to CANNON.Shape objects: https://github.com/donmccurdy/three-to-cannon

It's not perfect (handling nested meshes is a bit tricky), but works well enough especially with the bounding box or convex hull options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants