Railings

Parent element name: hill
Element name: railing

Railings are usually thin, high, and long elements usually placed on inrun sides. They can also look and behave similarly as a pillar.

TIP

This section of the documentation contains things, that can't be described using only words. The best way to test the parameters described below is to use elements from already existing hills and play with them.

Positioning railings

NameTypeAllowed valuesDescriptionOptional
y[1, 2]FloatThe position relative to the Y-axisTrue
z[1, 2]FloatThe position relative to the Z-axisTrue
refx[1, 2]?StringA built-in reference which applies for refxA reference to the X-axis, which railings are based onTrue
refyStringA built-in reference which applies for refy or your defined profile nameA reference to the Y-axis, which railings are based onTrue
refzStringA built-in reference which applies for refz or your defined profile nameA reference to the Z-axis, which railings are based onTrue
brefyStringA built-in reference which applies for refy or your defined profile nameA reference to the Y-axis from the bottom side, which railings are based onTrue
trefyStringA built-in reference which applies for refy or your defined profile nameA reference to the Y-axis from the top side, which railings are based onTrue

Sizing railings

TIP

Manipulating the length of railings in DSJ4 is based on manipulating x1 and x2 attributes.

NameTypeDescription
x1FloatThe starting point in position relative to the X-axis
x2FloatThe ending point in position relative to the X-axis
wFloatWidth
hFloatHeight
h2FloatThe second height value

Controlling sides visibility

NameTypeDescriptionOptional
bottomBooleanToggles the bottom side visibilityTrue
frontBooleanToggles the front side visibilityTrue
leftBooleanToggles the left side visibilityTrue
rearBooleanToggles the rear side visibilityTrue
rightBooleanToggles the right side visibilityTrue
topBooleanToggles the top side visibilityTrue

Texturing railings

TIP

Use normal type attribute if you are using opaque texture. When using textures with alpha channels such as grid.png, use blend type. In case of transparent textures, use glass type.

TIP

If you have two surfaces that are overlapping each other, specify the zbias attribute, so this surface will appear "above" the second surface

NameTypeAllowed valuesDescriptionOptional
[t, m, c][Texture, Material, Color]Texture, material and color of all sides
[t, m, c]1[Texture, Material, Color]Texture, material and color of the left sideTrue
[t, m, c]2[Texture, Material, Color]Texture, material and color of the right sideTrue
[t, m, c]3[Texture, Material, Color]Texture, material and color of the top sideTrue
[t, m, c]4[Texture, Material, Color]Texture, material and color of the bottom sideTrue
[t, m, c]5[Texture, Material, Color]Texture, material and color of the rear sideTrue
[t, m, c]6[Texture, Material, Color]Texture, material and color of the front sideTrue
scaleFloatTexture scaling factor
typeStringnormal, blend, glassType
zbias+IntegerZ-indexTrue

Code snippets

<hill version="DSJ4-1.7.0">
    <!-- Rest of code omitted for clearance -->
    <!-- 
        This XML outputs two railings on both inrun sides.
        They start on the inrun beginning and end on 25 meters of the inrun.
    -->
    <railing x1="0" x2="25" h="0.5" w="0.1" t="Textures\railing-glass-cut.png" m="Materials\window.xml" c="0xFFFFFFFF" y="0" z="-1" refx="inrun" />
    <railing x1="0" x2="25" h="0.5" w="0.1" t="Textures\railing-glass-cut.png" m="Materials\window.xml" c="0xFFFFFFFF" y="0" z="1" refx="inrun" />
</hill>```