嘿伙计们,我试图将纹理正确地映射到three.js中的3d对象。我使用Cinema4D创建我的对象,然后导出到colada,然后从maya重新导出为.js对象。纹理在C4D中作为jpg烘焙。
以下是一切: https://imgur.com/a/xETIp#0
以下是我使用的代码:
var floorDiskmaterial = new THREE.MeshPhongMaterial({
map: THREE.ImageUtils.loadTexture('img/testColor.jpg'),
transparent: true,
color: 0xeaeaea,
ambient: 0x062537,
specular: 0x6a3e6d,
shading: THREE.FlatShading,
fog: false,
shininess: 50,
});
loader.load( "models/test2.js", function( geometry ) {
FloorDiskFire = new THREE.Mesh( geometry, floorDiskmaterial);
FloorDiskFire.position.set(0,0.2,0);
FloorDiskFire.castShadow = true;
FloorDiskFire.receiveShadow = true;
FloorDiskFire.scale.set(1.5,1.5,1.5);
//FloorDiskFire.rotation.y = -0.78;
} );