rmx / collada-converter

A library for converting COLLADA files to a format suitable for WebGL
22 stars 9 forks source link

Options #8

Closed Hamabama closed 9 years ago

Hamabama commented 9 years ago

Hi there! Stumbled upon your converter and very excited about it. Thanks for doing a great job. In my project of displaying buildings I'm using collada models, but they are usually 5-10 Mb themselves and textures around the same. I'm looking for ways to reduce the size as well as the parsing time and performance. I've tried your converter, but it seems doesn't pick up the textures. I've tried to output THREE.js json format and upload it to THREE.js web editor. No textures were showed up. Could you please clarify if it is supported and is there anything I should do for it? Sorry for writing here, but not quiet sure how to reach you otherwise. Big thanks!

crobi commented 9 years ago

The converter should support textures. Did you try to have a look at the log? If you don't find any hints there, could you share your collada file so that I can have a look?

Hamabama commented 9 years ago

I have a feeling that Three.js web editor doesn't handle textures because collada models don't have textures in the editor as well. I will set up today a basic code to load json models and will report here the results! Thanks!

Hamabama commented 9 years ago

Hey guys! It works! The only issue for me is that three.js json format doesn't support hierarchy, and makes the model as one whole piece of geometry. In my project we need to manipulate objects in the model. For example, we are highlighting each floor of the building to show availability. Was looking at GLTF format, but it's not really clear how to use it with Three.js . Anyways thank you!

crobi commented 9 years ago

this exporter produces also a custom model format (not a scene format). There's the following design concepts:

There's no three.js loader for this custom format (other than an ugly hack buried somewhere in some branch), but it shouldn't be difficult to write one. You can instantiate different three.js meshes from individual chunks, but if you need hierarchy or relative transformations, you should use a different loader/converter. I've seen a GLTF loader for three.js somewhere, so try to look for that.

Hamabama commented 9 years ago

Ok, thanks you!