Start Page » Game Development with the Drag[en]gine » Skin File Format
The skin file format is recognized by the Drag[en]gine Skin XML Module. The file is an XML file with a simple structure to define a skin.
Tag | Description | Occurance | Default |
---|---|---|---|
mapped | Define named mapping. Attributes:
| 0..N | - |
texture | Define named texture. Attributes:
| 0..N | - |
Tag | Description | Occurance | Default | |
---|---|---|---|---|
curve | Mapping curve. | 0..1 | - | |
inputType | Input type. Valid values:
| no | once | time |
inputLower | Lower input value mapped to 0 curve input value. | 0..1 | 0 | |
inputUpper | Upper input value mapped to 1 curve input value. | 0..1 | 1 | |
inputClamped | Clamp input value to range from 0 to 1. Boolean value. | 0..1 | false | |
outputLower | Value to map curve output 0 value to. | 0..1 | 0 | |
outputUpper | Value to map curve output 1 value to. | 0..1 | 1 | |
bone | Name of bone to use if inputType is bone* . | 0..1 | empty string | |
renderable | Name of the renderable to use if input type is renderable . | 0..1 | empty string | |
renderableComponent | Component to use if renderable is of color type. Valid values:
| no | once | red |
Tag | Description | Occurance | Default |
---|---|---|---|
interpolation | Curve interpolation. Valid values:
| 0..1 | - |
point | Curve points. | 0..N | - |
Tag | Description | Occurance | Default |
---|---|---|---|
coordinates | Curve point coordinate. Attributes:
| 1 | - |
handle1 |
First curve handle (to the left side). If not specified
| 0..1 | - |
handle2 |
Second curve handle (to the right). If not specified
| 0..1 | - |
Tag | Description | Occurance | Default |
---|---|---|---|
value | Define property with value type. Value is the text content of the tag. Attributes:
| 0..N | 0 |
color | Define property with color type. Attributes:
| 0..N | Depends on texture property type |
image | Define property with image type. Image file path is the text content of the tag. Path can be absolute or relative to the skin file directory. Attributes:
| 0..N | |
video | Define property with video type. Video file path is the text content of the tag. Path can be absolute or relative to the skin file directory. Attributes:
| 0..N | |
mapped | Define property with mapped type. Attributes:
| 0..N | 0 |
Tag | Description | Occurance | Default |
---|---|---|---|
mappedRed | Name of mapped to use for red component. Not used if empty string. | 0..1 | empty string |
mappedGreen | Name of mapped to use for green component. Not used if empty string. | 0..1 | empty string |
mappedBlue | Name of mapped to use for blue component. Not used if empty string. | 0..1 | empty string |
mappedAlpha | Name of mapped to use for alpha component. Not used if empty string. | 0..1 | empty string |
A simple, tintable skin file.
<?xml version='1.0' encoding='ISO-8859-1'?> <skin> <texture name='material'> <image property='color'>color.png</image> <renderable property='color.tint'>tint</renderable> <image property='normal'>normal.png</image> <color property='reflectivity' r='0.17' g='0.17' b='0.17'/> <image property='roughness'>roughness.png</image> <value property='roughness.remap.lower'>0.1</value> <value property='roughness.remap.upper'>0.2</value> </texture> </skin>
A complex skin file with animated texture parts using mapping and construction.
<?xml version='1.0' encoding='UTF-8'?> <skin> <mapped name='shift y'> <curve> <interpolation>linear</interpolation> <point> <coordinates x='0' y='0'/> <handle1 x='-0.25' y='0'/> <handle2 x='0.25' y='0'/> </point> <point> <coordinates x='1' y='1'/> <handle1 x='0.75' y='1'/> <handle2 x='1.25' y='1'/> </point> </curve> <inputUpper>5</inputUpper> <outputLower>-256</outputLower> <outputUpper>0</outputUpper> </mapped> <texture name='material'> <constructed property='color'> <size x='256' y='256'/> <image> <position x='0' y='-256'/> <size x='256' y='512'/> <brightness>0.2</brightness> <contrast>1.25</contrast> <mapped name='positionY'>shift y</mapped> <path>color_wave.webp</path> <repeat y='2'/> </image> <image> <size x='256' y='256'/> <path>color_center.png</path> </image> </constructed> <value property='reflectivity'>0</value> <value property='roughness'>1</value> <value property='reflected'>0</value> <value property='shadow.none'>1</value> <image property='solidity'>solidity.png</image> <value property='solidity.masked'>0</value> <value property='solidity.multiplier' renderable='fade'>1</value> <value property='sound.none'>1</value> <value property='texcoord.clamp'>1</value> <value property='emissivity.intensity'>0.025</value> <constructed property='emissivity'> <size x='256' y='256'/> <image> <position x='0' y='-256'/> <size x='256' y='512'/> <brightness>0.2</brightness> <contrast>1.25</contrast> <mapped name='positionY'>shift y</mapped> <path>color_wave.webp</path> <repeat y='2'/> </image> <image> <size x='256' y='256'/> <path>color_center.png</path> </image> <image> <size x='256' y='256'/> <rotation>-180</rotation> <path>color_center.png</path> </image> </constructed> </texture> </skin>