启用材质和纹理的OGRE 3D模型jmonkeyengine? [英] Enabling materials and textures for OGre 3D model in jmonkeyengine?

查看:416
本文介绍了启用材质和纹理的OGRE 3D模型jmonkeyengine?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载的模式,从WorldForge,我可以介绍一个妖精的网格,以我的场景,但纹理和材质不会渲染:

I downloaded models from WorldForge and I can introduce the mesh of a goblin to my scene but the texture and material won't render:

我使用Eclipse和添加的文件看起来是这样的:

I use eclipse and the added files look like this:

就是我加入妖精的code是这个

The way I add the goblin in the code is this

Spatial model3 = assetManager.loadModel("objects/creatures/goblin/goblin.mesh.xml");
model3.setLocalTranslation(-30.0f, 4.5f, 0.0f);
rootNode.attachChild(model3);  

你能帮助我,我如何提高妖精?有几个纹理和文件材料的定义,但好像只有goblin.mesh.xml是我的场景加载。

Can you help me how I improve the goblin? There are several textures and materials definition in the files but it seems like only the goblin.mesh.xml is loaded by my scene.

任何帮助是极大的AP preciated。

Any help is greatly appreciated.

推荐答案

我不知道这是否会帮助,但看看这里:的 http://jmonkeyengine.org/wiki/doku.php/jme3:external:blender ,特别是在那里的士兵被添加了code样品到现场。

I am not sure if this will help, but take a look here: http://jmonkeyengine.org/wiki/doku.php/jme3:external:blender, especially at the code sample where soldier is being added to scene.

我认为你必须明确申报材料在code,然后将其安装到空间再presenting你的妖精。到目前为止,你只进口网,在我看来,你也必须以某种方式进口的材料。

I think you have to explicitly declare material in your code, and then attach it to the Spatial representing your goblin. So far you imported only mesh, it seems to me you also have to import material somehow.

这篇关于启用材质和纹理的OGRE 3D模型jmonkeyengine?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆