User Tools

Site Tools


formats:modules:deskinxml:xml_skin_file_.skin.xml

Skin File Format (*.deskin)

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.

Structure

skinmappedtexturemappedcurveinputType  enuminputLower  floatinputUpper  floatinputClamped  booloutputLower  floatoutputUpper  floatbone  stringrenderable  stringrenderableComponent  enumcurveinterpolation  enumpointpointcoordinates  vector2handle1  vector2handle2  vector2texturevaluecolorimagevideomappedconstructedmappedmappedRed  stringmappedGreen  stringmappedBlue  stringmappedAlpha  stringconstructedcolor  color4size  vector2tileX  booltileY  boolbitCount  intgroup  Nodeimage  Nodeshape  Nodetext  Nodegroup(Node)group  Nodeimage  Nodeshape  Nodetext  Nodeimage(Node)path  stringrepeat  point2position  point3size  point3rotation  floatshear  floatbrightness  floatcontrast  floatgamma  floatcolorize  color3transparency  floatcombineMode  enummask  Nodemaskgroup  Nodeimage  Nodeshape  Nodetext  Nodeshape(Node)type  enumfillColor  color4lineColor  color4thickness  floatshapeMapped  stringposition  point3size  point3rotation  floatshear  floatbrightness  floatcontrast  floatgamma  floatcolorize  color3transparency  floatcombineMode  enummask  Nodetext(Node)path  stringfontSize  floattext  stringcolor  color4textMapped  enumposition  point3size  point3rotation  floatshear  floatbrightness  floatcontrast  floatgamma  floatcolorize  color3transparency  floatcombineMode  enummask  Node

Tags

skin

TagDescriptionOccuranceDefault
mapped

Define named mapping. Attributes:

  • name: Unique name of mapping. Required.
0..N-
texture

Define named texture. Attributes:

  • name: Unique name of texture. Required.
0..N-

mapped

TagDescriptionOccuranceDefault
curveMapping curve.0..1-
inputType

Input type. Valid values:

  • time: Time in seconds.
  • bonePositionX: Local bone position X coordinate.
  • bonePositionY: Local bone position Y coordinate.
  • bonePositionZ: Local bone position Z coordinate.
  • boneRotationX: Local bone rotation X coordinate mapped to the range 0..1 (full rotation).
  • boneRotationY: Local bone rotation Y coordinate mapped to the range 0..1 (full rotation).
  • boneRotationZ: Local bone rotation Z coordinate mapped to the range 0..1 (full rotation).
  • boneScaleX: Local bone scaling X coordinate.
  • boneScaleY: Local bone scaling Y coordinate.
  • boneScaleZ: Local bone scaling X coordinate.
  • renderable: Value of renderable. Supports only single value and color renderables.
nooncetime
inputLowerLower input value mapped to 0 curve input value.0..10
inputUpperUpper input value mapped to 1 curve input value.0..11
inputClampedClamp input value to range from 0 to 1. Boolean value.0..1false
outputLowerValue to map curve output 0 value to.0..10
outputUpperValue to map curve output 1 value to.0..11
boneName of bone to use if inputType is bone*.0..1empty string
renderableName of the renderable to use if input type is renderable.0..1empty string
renderableComponent

Component to use if renderable is of color type. Valid values:

  • red: Red color component.
  • green: Green color component.
  • blue: Blue color component.
  • alpha: Alpha color component.
nooncered

curve

TagDescriptionOccuranceDefault
interpolation

Curve interpolation. Valid values:

  • constant: Constant interpolation.
  • linear: Linear interpolation.
  • bezier: Bezier interpolation.
0..1-
pointCurve points.0..N-

point

TagDescriptionOccuranceDefault
coordinates

Curve point coordinate. Attributes:

  • x: X coordinate. Optional. Default is 0.
  • y: Y coordinate. Optional. Default is 0.
1-
handle1

First curve handle (to the left side). If not specified coordinates is used. Attributes:

  • x: X coordinate. Optional. Default is 0.
  • y: Y coordinate. Optional. Default is 0.
0..1-
handle2

Second curve handle (to the right). If not specified coordinates is used. Attributes:

  • x: X coordinate. Optional. Default is 0.
  • y: Y coordinate. Optional. Default is 0.
0..1-

texture

TagDescriptionOccuranceDefault
value

Define property with value type. Value is the text content of the tag. Attributes:

  • property: Name of texture property. Required.
  • renderable: Name of renderable to override value if present. Optional. Default is empty string.
  • bone: Bone name. Some texture properties can use this. Optional. Default is empty string.
0..N0
color

Define property with color type. Attributes:

  • property: Name of texture property. Required.
  • r: Red component value. Optional. Default is 0.
  • g: Green component value. Optional. Default is 0.
  • b: Blue component value. Optional. Default is 0.
  • a: Alpha component value. Optional. Default is 1.
  • renderable: Name of renderable to override value if present. Optional. Default is empty string.
  • bone: Bone name. Some texture properties can use this. Optional. Default is empty string.
0..NDepends 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:

  • property: Name of texture property.
  • renderable: Name of renderable to override value if present. Optional. Default is empty string.
  • bone: Bone name. Some texture properties can use this. Optional. Default is empty string.
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:

  • property: Name of texture property.
  • sharedTime: Use the same play position for all components sharing this skin. Boolean value. Optional. Default is false.
  • renderable: Name of renderable to override value if present. Optional. Default is empty string.
  • bone: Bone name. Some texture properties can use this. Optional. Default is empty string.
0..N
mapped

Define property with mapped type. Attributes:

  • property: Name of texture property. Required.
  • renderable: Name of renderable to override value if present. Optional. Default is empty string.
  • bone: Bone name. Some texture properties can use this. Optional. Default is empty string.
0..N0

mapped

TagDescriptionOccuranceDefault
mappedRedName of mapped to use for red component. Not used if empty string.0..1empty string
mappedGreenName of mapped to use for green component. Not used if empty string.0..1empty string
mappedBlueName of mapped to use for blue component. Not used if empty string.0..1empty string
mappedAlphaName of mapped to use for alpha component. Not used if empty string.0..1empty string

Examples

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>
You could leave a comment if you were logged in.
formats/modules/deskinxml/xml_skin_file_.skin.xml.txt · Last modified: 2025/03/10 16:59 by dragonlord