2016-12-05 2 views
0

내가 파면 형식의 AFRAME 객체를 로딩하고 있지만, 질감이 보이지 않는 남아있는 모든 검은 나타납니다텍스처 AFRAME 객체를 의미 객체

<!doctype html> 
    <head> 
    <meta charset="utf-8"> 
    <script src="https://aframe.io/releases/0.3.2/aframe.min.js"></script> 
    </head> 
    <body> 
    <a-scene> 
     <a-assets> 
     <a-asset-item id="test-obj" src="test.obj"></a-asset-item> 
     <a-asset-item id="test-mtl" src="test.mtl"></a-asset-item> 
     </a-assets> 
     <a-entity position="1.75 0 1.2" rotation="0 28 0"> 
     <a-camera near="0.1" user-height="0"></a-camera> 
     </a-entity> 
     <a-obj-model src="#test-obj" mtl="#test-mtl" scale="0.1 0.1 0.1"></a-obj-model> 
     <a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane> 
     <a-sky color="#ECECEC"></a-sky> 
    </a-scene> 
    </body> 
</html> 

가 어떻게이 모델의 텍스처를 볼 수 있는가?

답변

1

다음은 Magica Voxel 또는 이와 유사한 편집기에서 개체를 만든 경우 사용할 수있는 해결책입니다.

.mtl 파일을 텍스트 편집기에서 열고 map_Kd으로 시작하는 줄을 찾으십시오. 그 직후에 "test.png"와 같은 다른 파일의 이름입니다.

해당 파일은 .mtl 및 .obj 파일과 동일한 디렉토리에 있어야하므로 포함해야합니다. 객체의 색상을 색상에 매핑하는 텍스처 맵입니다.

는 파면 .mtl 파일 형식에 대한

자세한 내용은 여기에서 찾을 수 있습니다 : https://people.cs.clemson.edu/~dhouse/courses/405/docs/brief-mtl-file-format.html