Skip to content

Custom entity modelling

Peter Crew edited this page Jan 15, 2019 · 3 revisions

Equilinox uses a custom format to store in-game models, but Equilimod allows you to import OBJ files directly so you can export straight from modelling programs. For this tutorial, I will be using Blender, although the same principles apply for all modelling software.


Equilinox models cannot have textures, but they are able to have colours. These colours are loaded from an MTL file referenced by the OBJ file. In Blender, setting the diffuse colour of a material can achieve this:

Please note that Equilinox will only display one "object" at a time, so if you have a model made up of multiple parts you will need to merge them (CTRL-J in Blender). After the model has been created, it should be exported as a Wavefront (OBJ) file, as shown:

Ensure that when exporting, the following options are chosen, else there may be issues when the model is imported.

Once you export, you should end up with two files (if you've added colour): a MTL and an OBJ file. The names of the object parts are no longer important, but can be useful to help identify model parts when you are modelling. Most of the details in the material file are irrelevant - it is only the Kd (diffuse colour) that is used by Equilimod to determine the colour of model parts.

# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib present.mtl
o Stripe_4_Cube.004
v -1.027709 1.111268 0.977881
v -1.027709 0.911268 -0.962119
v -1.027709 0.911268 0.977881
v -1.027709 1.111268 -0.962119
v 1.032291 0.911268 -0.962119
v 1.032291 1.111268 -0.962119
v 1.032291 0.911268 0.977881
v 1.032291 1.111268 0.977881
v 1.000000 0.010147 1.000000
v -1.000000 0.010147 -1.000000
...
# Blender MTL File: 'None'
# Material Count: 2

newmtl Green
Ns 94.117647
Ka 1.000000 1.000000 1.000000
Kd 0.003743 0.640000 0.013712
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2

newmtl Red
...

I've imported the model into the game and you can see that the shape and colours have been successfully recreated within Equilinox. To do this, the MTL and OBJ files have been placed inside the assets/model/ folder of one of my mods and used as the model for an in-game item.


That is everything that you will need to know about modelling for now; there are some special material colours that need to be used if you would like colours in-game to be modifiable, but this will be covered in a future tutorial.

Next time, I will be showing you how to create an actual entity in the game, using the models that you created just now.

Clone this wiki locally