MarcinKwiatkowski
MarcinKwiatkowski

Reputation: 247

ThreeJs and Blender model without texture

I'm new to both Blender and ThreeJs and searched a lot before asking. I created a model with Blender and esported it as .dae so I can load it in the html canvas. The problem is that only the model is loaded and not the textures. I'm doing something wrong or it's the loader that somehow causes the problem?

Here is the sample: http://provasitimek.herobo.com/firstImport2.html

and the code: https://github.com/MarcinKwiatkowski1988/learningThreeJs/tree/master/ThreeJs_and_blender

PS. the blender version is 2.70 (so maybe the problem lays here?)

PS2: So, after many attempts, these are my conclusions:

  1. to get the color of the object, you have to choose the Blender renderer and not Cycles renderer
  2. the export to the file .dae is not realy significant, should working with all options (or at least I didn't find any differences between files exported with different options)
  3. if you use Blender renderer and any basic materials (Basic, Lambert, Phong) you get only the color on the object rendered in threeJs: so, for example, if you apply a trasparency to you object on blender, you will not see it on the rendered object on threeJs

with my current level (i just started to learn threeJs and blender 2 weeks ago) this is as far as I can help. Hope someone with higher skills like @mrdoob would figure out what the problem is

Upvotes: 0

Views: 384

Answers (1)

Weavermount
Weavermount

Reputation: 746

THREE.js does not pair models and textures until you actually make a mesh. Export The model and texture separately, load them separately and call

new THREE.Mesh(blenderGeometry,blenderTexure)

Upvotes: 0

Related Questions