【发布时间】:2011-10-01 01:51:19
【问题描述】:
我在搅拌机上做了我自己的自定义 3d 对象, 它是一个以地球贴图为纹理的简单 UV Sphere。
加载它并在搅拌机上渲染后,对象看起来没有纹理。
这是我的 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);
请大家帮忙看看有什么问题??
【问题讨论】:
标签: android opengl-es textures blender .obj