Skip to content
oznogon edited this page Jun 19, 2016 · 14 revisions

EmptyEpsilon can use OBJ models. To make new OBJ models available for use:

  1. Place the OBJ files and any textures in the EmptyEpsilon/resources directory.

  2. Add a ModelData() entry to EmptyEpsilon/scripts/model_data.lua. For example, this adds a model named gentest from OBJ file gentest.obj:

model = ModelData() model:setName("gentest") model:setMesh("gentest.obj") model:setTexture("gentest.png") model:setSpecular("gentest_diffuse.png") model:setIllumination("gentest_illumination.png") model:setScale(24) model:setRadius(120)

model:addEngineEmitter(-13, -2.1500, 0.3, 0.2, 0.2, 1.0, 3.0) model:addEngineEmitter(-13, 2.1500, 0.3, 0.2, 0.2, 1.0, 3.0) ```

  1. Adjust the ModelData properties appropriately.

Tips

  • If you're exporting OBJ files from Blender, use the following settings:

    Blender settings

  • If you need to rotate a model, do so from a 3D modeling program. Some example programs include:

Since model_data.lua is a Lua script file, you can use scripting tools (such as loops) to easily add many similar models.

Clone this wiki locally