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

Add ability to import existing 3D objects. #21

Open
brianpeiris opened this issue Oct 7, 2014 · 2 comments
Open

Add ability to import existing 3D objects. #21

brianpeiris opened this issue Oct 7, 2014 · 2 comments

Comments

@brianpeiris
Copy link
Owner

No description provided.

@capnmidnight
Copy link
Contributor

Three.js has a fair few number of model importers. They all work in subtly different ways.

I currently use the Collada loader to import an entire scene, that had been exported out of Blender, as a "level file". There are some problems with it, though, I think mostly stemming from Blender's Collada exporter being buggy and incomplete.

First, it maintains Blender's axes, which aren't the same as the Three.js default. Blender has Y as up, Three uses Z as up. You can change the up vector in Three.js, but there are a lot of plugins (like the Mirror material) that make bad assumptions about what "up" means.

Second, I've also noticed that some light colors have a swapped red and green value. No, not a swapped red and blue value, which would make some sort of sense, to have BGR instead of RGB. Lights seem to be GRB, but flat-colored materials are still RGB.

Third, there's no support for extended attributes. I personally would like to use attributes to support different types of interaction data. Collada does have metadata capabilities, but Blender doesn't implement it in the exporter.

I wish I had skipped Collada and stuck to Three.js' own JSON format, for which they have a Blender plugin available. I'm having some trouble converting over right now, thanks to all of the axes issues. But it does have options to be able to export scenes or single models, as well as an option to translate the axes. I'd suspect it's easier to extend, as well, as I hope to do to support placing 3D audio elements.

@brianpeiris
Copy link
Owner Author

Oh man. Thanks for all the valuable comments! I'll try to respond to them in detail soon.

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

No branches or pull requests

2 participants