Prim XML description

Andres Baez

The following document describes the XML file generated when using the export tool from within the TestClient.exe in opensim. The XML file roughly describes each of the properties available when creating any prim with an avatar using the gui tools from within the SL client.

Any value marked as “unknown” in this document is a value for which I was not able to find such property within the SL client prim creator.

The ranges of values for each of the prim properties are not stated as certain properties can change the shape of the object, so the range is dependent on the primitive.

General, simplified XML layout

<llsd>

<map>

<key> PROPERTY NAME </key>

<DATA TYPE> VALUE</DATA TYPE>

[each ‘key” is a property i.e. name, physical, position, scale, volume, color, texture, etc.]

[each “map” separates a section or group of properties]

….

</map>

</llsd>

Prim’s Shared properties

This section lists all prim properties that are defined in the XML file. It contains a short description of each property if it is available.

All XML files contain a number to identify the prim(s) it describes. ex. “720013”. At the moment I don’t know how this number is assigned; although, it seems like it is handled by the server.

When a complex prim is exported (a prim composed by two or more prims), each prim composing the complex prim has its own identification number and a section describing the parent prim is also present in the XML file. In this case, the parent prim’s properties are at the top of the XML file and immediately following the child’s properties.

Name / Description / Default value / Type
Name / User assignable / Primitive / String
Description / User assignable / Blank / String
Phantom / Causes object not to collide with other objects/avatars / 0 / Boolean
Physical / Allows object to be pushed and affected by gravity / 0 / Boolean
Position / Object position (x,y,z) / N/A / Meters
Rotation / Object rotation (x,y,z) / N/A / Degrees
Scale / Object Size (x,y,z) / N/A / meters
Material / 0-stone, 1-metal, 2-glass, 3-wood, 4-flesh, 5-plastic, 6-rubber / 3 (wood) / integer
Shadows / N/A / 0 / boolean
Textures
colors / CYMK?? / (1,1,1,1) / Float (real*)
scales / N/A / 1 / Float (real)
scalet / N/A / 1 / Float (real)
offsets / N/A / 0 / Float (real)
offsett / N/A / 0 / Float (real)
imagerot / N/A / 0 / Degrees
bump / 0-None, 1-brightness, 2-darkness, 3-woodgrain, 4-bark, 5-bricks, 6-checker … / 0 / Integer
shiny / 0-None, 1-low, 2-medium, 3-high / 0 / Integer
fullbright / N/A / 0 / Boolean
media_flags / N/A / 0 / Integer
mapping / Default, planar / 0 / integer
glow / N/A / 0 / Float (real)
imageid / Object’s UUID / Auto-assigned? / UUID
Volume / Values, propertiesare enabled/disabled depending on the object type
Path
begin / This allows you take a wedge out of the object / Object dependent / Float (real)
curve / Unknown / Object dependent / Integer
end / N/A / Object dependent / Float (real)
radius-offset / N/A / Object dependent / Float (real)
revolutions / N/A / Object dependent / Float (real)
scale_x / N/A / Object dependent / Float (real)
scale_y / N/A / Object dependent / Float (real)
shear_x / N/A / Object dependent / Float (real)
shear_y / N/A / Object dependent / Float (real)
skew / N/A / Object dependent / Float (real)
taper_x / N/A / Object dependent / Float (real)
taper_y / N/A / Object dependent / Float (real)
twist / N/A / Object dependent / Float (real)
twist_begin / N/A / Object dependent / Float (real)
Profile
begin / N/A / Object dependent / Float (real)
curve / N/A / Object dependent / Integer
hole / N/A / Object dependent / Integer
end / N/A / Object dependent / Float (real)
hollow / N/A / Object dependent / Float (real)
Light / Causes object to emit light
Color / CMYK? / (0,0,0,0) / Float (real)
Intensity / N/A / 0 / Float (real)
Radius / N/A / 0 / Float (real)
cutoff / N/A / 0 / Float (real)
falloff / N/A / 0 / Float (real)
Flex / Allows object to flex about the z-axis
simulate_lod / N/A / 0 / Integer
gravity / N/A / 0 / Float (real)
Air_friction / N/A / 0 / Float (real)
Wind_sensitivity / N/A / 0 / Float (real)
tension / N/A / 0 / Float (real)
User_force / x,y,z / (0,0,0)
Sculpt
texture / N/A / 00000000-0000-0000-0000-000000000000 / UUID
type / N/A / 0 / Integer

*The “real” datatype seems to be equivalent to float.

Prim’s Specific Properties

As described above, the properties under the category “volume” define which type of object it is i.e. Torus, box, pyramid, sphere…

The taper_x and taper_y values seem to be dependent on scale_x and scale_y. The relation seems to be that if scale_x and scale_y are set to 1, it won’t matter the value of taper_x and taper_y. For example, consider a prim with all values set to 0 (except for the ones marked with one or two asterisks) andhaving scale_x and scale_y = 1. Such prim is a box. If we set taper_x and taper_y = 1, itshould give us a pyramid shape; although, this is only true if scale_x and scale_y are both 0. Otherwise the prim will stay as a box.

taper_x - shrinks the diameter of the object along the x axis, positive values are the top of the object, negative shrink the bottom
taper_y - shrinks along the y axis, a x value of 1.0 and a y value of 1.0 give you a cone.

twist - this is the end of the twist, values range from -180 to 180
twist_begin - begin of the twist, range from -180 to 180.

for a sphere, in the profile section:
begin - for a sphere only these are equal to dimple values, begin cuts from the bottom, a value of 1.0 is full, .5 is a hemisphere
end - this goes with begin, except cuts from the top, again 1.0 is full, .5 is a hemisphere

Below is the list of properties for the main building block types: Box, Cylinder, Prism, Sphere, Torus, Tube and Ring.

All other primitives: Pyramid, Tetrahedron, Hemicylinder, Cone, Hemicone and Hemisphere are variants of the basic building block types.

Box
Name / Description / Default value / Type
Volume / Contains all properties that describe each type of prim
Path
Begin / N/A / 0 / Float (real)
Curve / Unknown / 16 / Integer
End* / N/A / 1 / Float (real)
radius_offset / N/A / 0 / Float (real)
Revolutions* / N/A / 1 / Float (real)
scale_x / Unknown / 1 / Float (real)
scale_y / Unknown / 1 / Float (real)
shear_x / N/A / 0 / Float (real)
shear_y / N/A / 0 / Float (real)
Skew / N/A / 0 / Float (real)
taper_x / N/A / 0 / Float (real)
taper_y / N/A / 0 / Float (real)
twist / N/A / 0 / Float (real)
twist_begin / N/A / 0 / Float (real)
Profile
begin / N/A / 0 / Float (real)
curve** / unknown / 1 / Integer
hole*** / Hollow shape? 0-default, 1-circle, 2-square, 3-triangle / 0 / Integer
End* / N/A / 1 / Float (real)
hollow / N/A / 0 / Float (real)

* These values are always set to one whether or not they are defined for the prim.

**This value varies among prims though it is not present within the SL agent.

***Only enabled if hollow > 0

Cylinder
Name / Description / Default value / Type
Volume / Contains all properties that describe each type of prim
Path
Begin / N/A / 0 / Float (real)
Curve / Unknown / 16 / Integer
End* / N/A / 1 / Float (real)
radius_offset / N/A / 0 / Float (real)
Revolutions* / N/A / 1 / Float (real)
scale_x / Unknown / 0 / Float (real)
scale_y / Unknown / 1 / Float (real)
shear_x / N/A / 0 / Float (real)
shear_y / N/A / 0 / Float (real)
Skew / N/A / 0 / Float (real)
taper_x / N/A / 0 / Float (real)
taper_y / N/A / 0 / Float (real)
twist / N/A / 0 / Float (real)
twist_begin / N/A / 0 / Float (real)
Profile
begin / N/A / 0 / Float (real)
curve** / unknown / 0 / Integer
hole*** / Hollow shape? 0-default, 1-circle, 2-square, 3-triangle / 0 / Integer
End* / N/A / 1 / Float (real)
hollow / N/A / 0 / Float (real)

* These values are always set to one whether or not they are defined for the prim.

** This value varies among prims though it is not present within the SL agent.

*** Only enabled if hollow > 0

Prism
Name / Description / Default value / Type
Volume / Contains all properties that describe each type of prim
Path
Begin / N/A / 0 / Float (real)
Curve / Unknown / 16 / Integer
End* / N/A / 1 / Float (real)
radius_offset / N/A / 0 / Float (real)
Revolutions* / N/A / 1 / Float (real)
scale_x / Unknown / 0 / Float (real)
scale_y / Unknown / 1 / Float (real)
shear_x / N/A / -0.5 / Float (real)
shear_y / N/A / 0 / Float (real)
Skew / N/A / 0 / Float (real)
taper_x / N/A / 0 / Float (real)
taper_y / N/A / 0 / Float (real)
twist / N/A / 0 / Float (real)
twist_begin / N/A / 0 / Float (real)
Profile
begin / N/A / 0 / Float (real)
curve / unknown / 1 / Integer
hole*** / Hollow shape? 0-default, 1-circle, 2-square, 3-triangle / 0 / Integer
End* / N/A / 1 / Float (real)
hollow / N/A / 0 / Float (real)

* These values are always set to one whether or not they are defined for the prim.

** This value varies among prims though it is not present within the SL agent.

*** Only enabled if hollow > 0

Sphere
Name / Description / Default value / Type
Volume / Contains all properties that describe each type of prim
Path
Begin / N/A / 0 / Float (real)
Curve / Unknown / 32 / Integer
End* / N/A / 1 / Float (real)
radius_offset / N/A / 0 / Float (real)
Revolutions* / N/A / 1 / Float (real)
scale_x / Unknown / 1 / Float (real)
scale_y / Unknown / 1 / Float (real)
shear_x / N/A / 0 / Float (real)
shear_y / N/A / 0 / Float (real)
Skew / N/A / 0 / Float (real)
taper_x / N/A / 0 / Float (real)
taper_y / N/A / 0 / Float (real)
twist / N/A / 0 / Float (real)
twist_begin / N/A / 0 / Float (real)
Profile
begin / N/A / 0 / Float (real)
curve / unknown / 5 / Integer
hole*** / Hollow shape? 0-default, 1-circle, 2-square, 3-triangle / 0 / Integer
End* / N/A / 1 / Float (real)
hollow / N/A / 0 / Float (real)

* These values are always set to one whether or not they are defined for the prim.

** This value varies among prims though it is not present within the SL agent.

*** Only enabled if hollow > 0

Torus
Name / Description / Default value / Type
Volume / Contains all properties that describe each type of prim
Path
Begin / N/A / 0 / Float (real)
Curve / Unknown / 32 / Integer
End* / N/A / 1 / Float (real)
radius_offset / N/A / 0 / Float (real)
Revolutions* / N/A / 1 / Float (real)
scale_x / Unknown / 1 / Float (real)
scale_y / Unknown / 0.5 / Float (real)
shear_x / N/A / 0 / Float (real)
shear_y / N/A / 0 / Float (real)
Skew / N/A / 0 / Float (real)
taper_x / N/A / 0 / Float (real)
taper_y / N/A / 0 / Float (real)
twist / N/A / 0 / Float (real)
twist_begin / N/A / 0 / Float (real)
Profile
begin / N/A / 0 / Float (real)
curve / unknown / 0 / Integer
hole*** / Hollow shape? 0-default, 1-circle, 2-square, 3-triangle / 0 / Integer
End* / N/A / 1 / Float (real)
hollow / N/A / 0 / Float (real)

* These values are always set to one whether or not they are defined for the prim.

** This value varies among prims though it is not present within the SL agent.

*** Only enabled if hollow > 0

Tube
Name / Description / Default value / Type
Volume / Contains all properties that describe each type of prim
Path
Begin / N/A / 0 / Float (real)
Curve / Unknown / 32 / Integer
End* / N/A / 1 / Float (real)
radius_offset / N/A / 0 / Float (real)
Revolutions* / N/A / 1 / Float (real)
scale_x / Unknown / 0.0499999970197678 / Float (real)
scale_y / Unknown / 0.5 / Float (real)
shear_x / N/A / 0 / Float (real)
shear_y / N/A / 0 / Float (real)
Skew / N/A / 0 / Float (real)
taper_x / N/A / 0 / Float (real)
taper_y / N/A / 0 / Float (real)
twist / N/A / 0 / Float (real)
twist_begin / N/A / 0 / Float (real)
Profile
begin / N/A / 0 / Float (real)
curve / unknown / 1 / Integer
hole*** / Hollow shape? 0-default, 1-circle, 2-square, 3-triangle / 0 / Integer
End* / N/A / 1 / Float (real)
hollow / N/A / 0 / Float (real)

* These values are always set to one whether or not they are defined for the prim.

** This value varies among prims though it is not present within the SL agent.

*** Only enabled if hollow > 0

Ring
Name / Description / Default value / Type
Volume / Contains all properties that describe each type of prim
Path
Begin / N/A / 0 / Float (real)
Curve / Unknown / 32 / Integer
End* / N/A / 1 / Float (real)
radius_offset / N/A / 0 / Float (real)
Revolutions* / N/A / 1 / Float (real)
scale_x / Unknown / 1 / Float (real)
scale_y / Unknown / 0.5 / Float (real)
shear_x / N/A / 0 / Float (real)
shear_y / N/A / 0 / Float (real)
Skew / N/A / 0 / Float (real)
taper_x / N/A / 0 / Float (real)
taper_y / N/A / 0 / Float (real)
twist / N/A / 0 / Float (real)
twist_begin / N/A / 0 / Float (real)
Profile
begin / N/A / 0 / Float (real)
curve / unknown / 3 / Integer
hole*** / Hollow shape? 0-default, 1-circle, 2-square, 3-triangle / 0 / Integer
End* / N/A / 1 / Float (real)
hollow / N/A / 0 / Float (real)

* These values are always set to one whether or not they are defined for the prim.

** This value varies among prims though it is not present within the SL agent.

*** Only enabled if hollow > 0

Example Layout – Simple Box

I do not know how the UUID for the object is assigned; although, for every export I made, it remained constant for every prim.

<llsd>

<map>

<key>720013</key>

<map>

<key>name</key>

<string>Primitive</string>

<key>description</key>

<string />

<key>phantom</key>

<boolean>0</boolean>

<key>physical</key>

<boolean>0</boolean>

<key>position</key>

<array>

<real>129.855346679688</real>

<real>132.081909179688</real>

<real>25.1374397277832</real>

</array>

<key>rotation</key>

<array>

<real>0</real>

<real>0</real>

<real>0</real>

<real>0</real>

</array>

<key>scale</key>

<array>

<real>0.5</real>

<real>0.5</real>

<real>0.5</real>

</array>

<key>material</key>

<integer>3</integer>

<key>shadows</key>

<boolean>0</boolean>

<key>textures</key>

<array>

<map>

<key>colors</key>

<array>

<real>1</real>

<real>1</real>

<real>1</real>

<real>1</real>

</array>

<key>scales</key>

<real>1</real>

<key>scalet</key>

<real>1</real>

<key>offsets</key>

<real>0</real>

<key>offsett</key>

<real>0</real>

<key>imagerot</key>

<real>0</real>

<key>bump</key>

<integer>0</integer>

<key>shiny</key>

<integer>0</integer>

<key>fullbright</key>

<boolean>0</boolean>

<key>media_flags</key>

<integer>0</integer>

<key>mapping</key>

<integer>0</integer>

<key>glow</key>

<real>0</real>

<key>imageid</key>

<uuid>89556747-24cb-43ed-920b-47caed15465f</uuid>

</map>

</array>

<key>volume</key>

<map>

<key>path</key>

<map>

<key>begin</key>

<real>0</real>

<key>curve</key>

<integer>16</integer>

<key>end</key>

<real>1</real>

<key>radius_offset</key>

<real>0</real>

<key>revolutions</key>

<real>1</real>

<key>scale_x</key>

<real>1</real>

<key>scale_y</key>

<real>1</real>

<key>shear_x</key>

<real>0</real>

<key>shear_y</key>

<real>0</real>

<key>skew</key>

<real>0</real>

<key>taper_x</key>

<real>0</real>

<key>taper_y</key>

<real>0</real>

<key>twist</key>

<real>0</real>

<key>twist_begin</key>

<real>0</real>

</map>

<key>profile</key>

<map>

<key>begin</key>

<real>0</real>

<key>curve</key>

<integer>1</integer>

<key>hole</key>

<integer>0</integer>

<key>end</key>

<real>1</real>

<key>hollow</key>

<real>0</real>

</map>

</map>

<key>light</key>

<map>

<key>color</key>

<array>

<real>0</real>

<real>0</real>

<real>0</real>

<real>0</real>

</array>

<key>intensity</key>

<real>0</real>

<key>radius</key>

<real>0</real>

<key>cutoff</key>

<real>0</real>

<key>falloff</key>

<real>0</real>

</map>

<key>flex</key>

<map>

<key>simulate_lod</key>

<integer>0</integer>

<key>gravity</key>

<real>0</real>

<key>air_friction</key>

<real>0</real>

<key>wind_sensitivity</key>

<real>0</real>

<key>tension</key>

<real>0</real>

<key>user_force</key>

<array>

<real>0</real>

<real>0</real>

<real>0</real>

</array>

</map>

<key>sculpt</key>

<map>

<key>texture</key>

<uuid>00000000-0000-0000-0000-000000000000</uuid>

<key>type</key>

<integer>0</integer>

</map>

</map>

</map>

</llsd>