mrdoob / three.js

JavaScript 3D Library.
https://threejs.org/
MIT License
100.38k stars 35.2k forks source link

Texture on Collada file not showing? #1422

Closed davidsoderstrom closed 12 years ago

davidsoderstrom commented 12 years ago

Here's another question about textures on collada not showing up.

My try in this is a mix from the webgl_loader_collada.html and webgl_trackballcamera_earth.html examples.

Html running this is on: http://ida.davidsoderstrom.se/3DViewer/lookat.html

And the collada file with texture is: http://ida.davidsoderstrom.se/3DViewer/runsten.dae http://ida.davidsoderstrom.se/3DViewer/runsten_tex_0.jpg

What am I doing wrong (other than that the files are quite large and detailed at the moment!)? The monster.dae works just fine, and I've tried replicating the following with no luck. Everything should be in the same folder for now.

./monster.jpg Any advice?
alteredq commented 12 years ago

I don't know much about Collada, but from checking network traffic in Chrome JS console, this page doesn't even attempt to load any texture.

It's possible your model specifies texture / material in some way which ColladaLoader doesn't understand.

6ert commented 12 years ago

several issues:

greets

davidsoderstrom commented 12 years ago

What i want is to use a 3d model from Autodesks program 123D Catch (very cool program if you're into 3D! You get a 3d model from several 2d photos). This is where i get the unnused camera nodes you found. They arent used, but shouldnt cause my problem either right?

From that program i can only get to use the FBX exporter for several reasons of mine. After that I use Autodesk free FBX converter to get a Collada file. This is the file you looked at.

I've tried importing the same file into Maya2012, where I can see that it has a material correctly set up. I've also tried using Mayas exporter, with the same result.

I still can't get my files to work however. Arent my .dae file pointing to a texture in the correct fassion? Can't I use Autodesks colladad expoerts at all?

//Edit: I've switched to "runsten.jpg" as a texture now. In the same place as everything else. And to clarify. I get the model viewing just fine. It's just the texture thats a problem. It's a rather large file, so it just takes a while to load.

davidsoderstrom commented 12 years ago

Now i tried to convert it to a .js with convert_obj_three.py (even though i dont want that in my final pipeline), but it doesnt even show the model? Is it simply to large?

Its http://ida.davidsoderstrom.se/3DViewer/runsten.js

davidsoderstrom commented 12 years ago

Sorry for the multiple posts. But it worked with exporting collada from Blender after setting up my own material. That big of difference between exporters eh?