Note: It is advised that you read the configuration documentation before this page in order to familiarise yourself with relevant terms and concepts.
Objects in AftGangAglay are managed graphical elements consisting of a model and a texture. Objects are described by a config file similar to aga.sgml which describes how they should be rendered, as well as any additional user-specified configuration which can be retrieved using objconf.
Models are tagged with extra "bounding volume" information which is used by inobj.
A sample object might look like this:
<root>
<item name="Model" type="String">
model.obj.raw
</item>
<item name="Texture" type="String">
texture.tiff.raw
</item>
<item name="Position">
<item name="X" type="Float">0.0</item>
<item name="Y" type="Float">0.0</item>
<item name="Z" type="Float">0.0</item>
</item>
<item name="Rotation">
<item name="X" type="Float">0.0</item>
<item name="Y" type="Float">0.0</item>
<item name="Z" type="Float">0.0</item>
</item>
<item name="Scale">
<item name="X" type="Float">1.0</item>
<item name="Y" type="Float">1.0</item>
<item name="Z" type="Float">1.0</item>
</item>
</root>
There are several options which AftGangAglay directly references from this file, detailed below.
The XYZ Type field represents an item of type None with three Float
children with the keys X Y and Z, representing a 3D vector.
Key | Type | Default | Description |
Model | String | N/A | The path to the vertex data in the resource pack |
Texture | String | N/A | The path to the texture data in the resource pack |
Position | XYZ | [ 0.0, 0.0, 0.0 ] | The initial position for the object |
Rotation | XYZ | [ 0.0, 0.0, 0.0 ] | The initial rotation for the object |
Scale | XYZ | [ 1.0, 1.0, 1.0 ] | The initial scale of the object |
New in 2.3.0 | |||
Light | None | No light attached to object | Item containing information for a light to be attached to the object. The accepted parameters are documented below |
New in 2.3.0
The RGB Type field represents an item of type None with three Float children with the keys R G and B, representing an RGB color value.
Key | Type | Default | Description |
Ambient | RGB | [ 1.0, 1.0, 1.0 ] | The color of the light's ambient emission |
Diffuse | RGB | [ 1.0, 1.0, 1.0 ] | The color of the light's diffuse emission |
Specular | RGB | [ 1.0, 1.0, 1.0 ] | The color of the light's specular emission |
Attenuation | None | [ 0.0, 0.0, 0.0 ] | The attenuation of the light source. Fields are documented below |
Direction | XYZ | [ 0.0, 0.0, 0.0 ] | The direction of the light source, if the source is directional/spot |
Angle | float | 0.0 | The light's angle of emission. Between 0.0 and 90.0 for directional/spot sources, or the special value 180.0 for point sources |
Directional | int | 0 | Whether the light should be a directional or spot source if Angle is not 180.0. Nonzero represents a directional source |
Index | int | 0 | The light index the light should occupy. Each concurrently used light source should use a unique index value. Accepted values lie in the range from 0 to 7 |
New in 2.3.0
Key | Type | Description |
Constant | Float | The constant attenuation of the source |
Linear | Float | The linear attenuation of the source |
Quadratic | Float | The quadratic attenuation of the source |