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
dFloatThe shift in position relative to Z-axisTrue
refx[1, 2]?StringA built-in reference which applies for refx or custom refx idA 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

TIP

d attribute works only when refz is specified.

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
n[1, 2]FloatHeight value perpendicular relative to the [t, b]refy? profile
guardBooleanToggles the vertical cut at the start of the railing

TIP

guard attribute works only when using h[2]? attribute(s).

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 the 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
pt[1 - 6]?BooleanToggles texture snapping to the railling shapeTrue
scale[1 - 6]?FloatTexture scaling factorTrue
ta[1 - 6]FloatTexture rotation and shift in position relative to Y-axisTrue
texture[1 - 6]-refy?StringA reference to the Y-axis, which textures are based onTrue
typeStringnormal, blend, glassTypeTrue
zbias+IntegerZ-indexTrue

TIP

Texture-refy attribute works only when pt="false".

TIP

The integer part of ta[1 - 6] attributes corresponds to the texture rotation, the floating part corresponds to the texture shift.

WARNING

Some of ta[1 - 6], pt[1 - 6]?, texture[1 - 6]-refy? attributes may not work or behave unpredictably. Pay close attention when using these attributes.

Code snippets

<hill version="DSJ4-1.10.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>