DAE files image texture doesn't show up in Aframe when exported from Maya

后端 未结 2 1917
北荒
北荒 2020-12-02 01:31

I\'ve exported an .dae file with an image texture from Maya. But when that .dae file is used with Aframe, the image texture does not appear, and you can only see the base ma

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-02 01:58

    I presume You added Your collada ( dae ) model like presented on the aframe docs:

    
      
        
      
      
    
    

    To texture the model, You either need to:
    1. Make a reference to the texture in the material of the entity. In make an img reference: then in Your entity declare the material:

    
    


    2. upload Your model with the texture to clara.io, convert it to a json(threejs) model, and make sure the references in the json file are correct, then load the model on the . I did it by placing a script in a registered component:

    var objectLoader = new THREE.ObjectLoader();
                objectLoader.load("untitled-scene.json", function ( obj ) {
                    sceneEl.object3D.add( obj );
                    obj.scale.set(10,1,010);
                    obj.rotation.set(0,179,0);
                    obj.position.set(0,0,10);
                } );
    

    If the issue still happens, please provide more information about Your code.
    NOTE: i often received .tga textures, make sure its a .png or .jpg, .tga's won't work if You won't use a tga loader as kevinngo explained here. Nonetheless if it's a tga issue, the head would be black as noted in the link.

提交回复
热议问题