1

After making a house model in blender I've exported it to three.js json format as a single object, but when adding it to scene I got half textures displayed and another half are just grey meshes.

JSON URL (with absolute texture images links): http://pobegushki.meetroll.net/inn1.js Screenshot of what I get in blender and what I get in production: http://touhou.ru/upload/78c7239c8306d7ee6d6ad6304935b3e1.jpg

Also there are two instances of a barrel model which both has a perfectly mapped material. I tried setting barrel image as a material to floor (simple scaled box mesh), but nothing changed, it still remained grey.

Any ideas?

2 Answers 2

0

I think there's a bug in the file loaders/Loader.js (Rev56). At line 332, try to replace:

if ( m.mapDiffuse && texturePath ) {

by

if ( m.mapDiffuse && texturePath != null ) {

(same bug for all types of textures of course)

I stumbled upon this bug this week-end, where my textures were not displayed because texturePath = "".

1
  • nope, paths are okay, got the same result. Half of textures work, half - not. Mar 4, 2013 at 14:07
0

TATATATAAAM! I've solved the problem (the stupid way tbh, but I got fully textured model).

Behold: http://touhou.ru/upload/56e75518ab580497358741bec62491ff.png

Blender three.js export was creating empty textures for all untextured meshes I got, and I tried copy-pasting non-empty materials to empties. After thousands of page refreshes I got right materials assigned to right meshes.

It took pretty much time, I think I should submit a bugreport :(

UPDATE: Here's why those materials were empty on export:

http://touhou.ru/upload/9f9d879cbf4964f8343e610d6930fe1a.jpg

On the first picture I've selected a mesh which had texture in production and on the second is one which didn't.

Thanks for your attention!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.