Closed yagiz closed 12 years ago
Are you calling renderer.render();
inside of a render loop (using setTimeout or requestAnimationFrame)? Three.js will show the model even as the material for it is being downloaded. During that time the model will appear black. The next call to render()
after the texture is loaded will update the model.
Yep.. BTW If I don't use any lights model couldn't be seen. You see it in action: http://yagiz.me/model/
var texture = THREE.ImageUtils.loadTexture( "models/zombi/zombi.png" );
var material = new THREE.MeshBasicMaterial( { map : texture } );
var mesh = new THREE.Mesh( geometry, material );
@yagiz what version of three are you running? Most recent (r46) now uses scene.add
instead of scene.addObject
. Using addObject
can yield some interesting & non-desired results.
@alteredq yay! It works now. But it doesn't seem to load the texture on local.
Hi all,
This is my model: http://yagiz.me/model/zombi.js This is its texture: http://yagiz.me/model/zombi.png
And this is how I load it:
Model has a UV data but I can't see the texture. It's all black? What do you think?