2011-07-08 62 views
0

我在攪拌器上做了我自己的自定義3d對象,其中有一個簡單的UV球體,其中地球上的mape作爲紋理。加載.Obj攪拌器文件時丟失紋理android

加載它後在混合器上渲染它的對象出現沒有紋理。

這是我的MTL文件:

newmtl Material.001 
Ns 96.078431 
d 1.000000 
illum 2 
map_Kd earth.jpg 
Ka 0.000000 0.000000 0.000000 
Kd 0.640000 0.640000 0.640000 
Ks 0.500000 0.500000 0.500000 
Ni 1.000000 

我確信把一切都到位「的earth.jpg」在res/drawble目錄

這是我的代碼加載OBJ

IParser myParser = Parser.createParser(Parser.Type.OBJ, getResources(), "com.min3dtest:raw/earth_obj",true); 
    myParser.parse(); 
    faceObject3D = myParser.getParsedObject(); 
    faceObject3D.position().x = faceObject3D.position().y = faceObject3D.position().z = 0; 
    faceObject3D.scale().x = faceObject3D.scale().y = faceObject3D.scale().z = 0.009f; // Depending on the model you will need to change the scale   
    scene.addChild(faceObject3D); 

夥計們請幫助什麼可能是probelm?

+0

這是[你早先關於同一事物的問題]的重複(http://stackoverflow.com/questions/6585203/missing-texture-in-obj-model-on -min3d-framwork-機器人)? – nil

回答

0

您的紋理是否具有2的冪次? (例如:1024x512而不是1000x512)