在android上加载.Obj blender文件时缺少纹理

时间:2011-07-08 07:43:47

标签: android opengl-es textures blender .obj

我在搅拌机上做了我自己的自定义3d对象, 它是一个简单的紫外线球体,以土棉为纹理。

加载后,在混合器上渲染它,对象出现时没有纹理。

这是我的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

我确保将所有内容放在res / drawble目录中的“the earth.jpg”

这是我加载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);  

伙计们请帮助什么可能是问题?

1 个答案:

答案 0 :(得分:0)

纹理的强度是2吗? (例如:1024x512而不是1000x512)

相关问题