官术网_书友最值得收藏!

Importing a model

Let's start off with a pretty basic scenario. We have this model, which we've exported from a 3D modeling package, and we would like to use it for our game. The first thing we need to do is convert it to the format that jMonkeyEngine 3 uses internally (.j3o). The recommended format to use is .blend coming from the open source modeling package Blender for which the SDK has extensive support. Another common format is .obj for static models and Ogre-mesh XML files.

How to do it…

We can import a model by performing the following steps:

  1. Go to the File menu and select Import Model.
  2. Next, we need to choose the project we would like to import.
  3. After selecting the actual model to be imported, we get to preview the model and can make sure that all the assets are properly used.
  4. Finally, we select where to place it in the Project Assets folder structure.

How it works…

The importer converts the model to the internal .j3o format. This is a binary format, which means it becomes nonreadable (compare it with a .obj file, which can be edited in Notepad). The compactness of a binary file is necessary to keep memory consumption low. It becomes impossible to edit externally, though, so keeping the original files organized is a good idea!

主站蜘蛛池模板: 沈阳市| 光山县| 延川县| 贺州市| 长治县| 星子县| 青川县| 宕昌县| 精河县| 资讯 | 永春县| 高密市| 砀山县| 庄河市| 乌拉特前旗| 洛隆县| 福贡县| 六盘水市| 紫金县| 华安县| 新乐市| 裕民县| 黄梅县| 邵武市| 龙陵县| 册亨县| 玛纳斯县| 自治县| 舞钢市| 泽州县| 乐平市| 綦江县| 鄂温| 武冈市| 城步| 彩票| 玉环县| 来凤县| 武鸣县| 玛多县| 新巴尔虎左旗|