NameOfTheCommand Argument1, Argument2, Argument3, ..., Argumentn |
[MeshBuilder] |
Vertex vX, vY, vZ, nX, nY, nZ |
vX: The x-coordinate for the vertex in meters. Negative values are left, positive ones right. The default value is 0. vY: The y-coordinate for the vertex in meters. Negative values are down, positive ones up. The default value is 0. vZ: The z-coordinate for the vertex in meters. Negative values are backward, positive ones forward. The default value is 0. nX: The x-coordinate for the normal of this vertex. The default value is 0. nY: The y-coordinate for the normal of this vertex. The default value is 0. nZ: The z-coordinate for the normal of this vertex. The default value is 0. |
Face v1, v2, v3, ..., vmax |
vi: The vertex index to include in this face. Allowed values are 0 through n-1, where n is the number of Vertex commands used. |
Face2 v1, v2, v3, ..., vmax |
vi: The vertex index to include in this face. Allowed values are 0 through n-1, where n is the number of Vertex commands used. |
Cube HalfWidth, HalfHeight, HalfDepth |
HalfWidth: A floating-point number representing half the width of the cube in meters. HalfHeight: A floating-point number representing half the height of the cube in meters. HalfDepth: A floating-point number representing half the depth of the cube in meters. |
ⓘ Cube representation |
The Cube command is equivalent to a series of Vertex and Face commands, which you need to account for when using other commands in the same [MeshBuilder] section. The details on what the Cube command does are available here. |
Cylinder n, UpperRadius, LowerRadius, Height |
n: An integer representing the number of vertices to be used for the base of the frustum. UpperRadius: A floating-point number representing the radius for the upper base of the frustum in meters. Can be negative to indicate that the top cap is to be omitted. LowerRadius: A floating-point number representing the radius for the lower base of the frustum in meters. Can be negative to indicate that the bottom cap is to be omitted. Height: A floating-point number representing the height of the prism in meters. Can be negative, which will flip the frustum vertically and display it inside-out. |
ⓘ Cylinder representation |
The Cylinder command is equivalent to a series of Vertex and Face commands, which you need to account for when using other commands in the same [MeshBuilder] section. The details on what the Cylinder command does are available here. |
[Texture] |
This command is ignored by OpenBVE. |
Translate X, Y, Z TranslateAll X, Y, Z |
X: A floating-point number representing the translation on the x-coordinate in meters. Negative values translate to the left, positive ones right. The default value is 0. Y: A floating-point number representing the translation on the y-coordinate in meters. Negative values translate down, positive ones up. The default value is 0. Z: A floating-point number representing the translation on the z-coordinate in meters. Negative values translate backward, positive ones forward. The default value is 0. |
Scale X, Y, Z ScaleAll X, Y, Z |
X: A non-zero floating-point number representing the scale factor on the x-coordinate. The default value is 1. Y: A non-zero floating-point number representing the scale factor on the y-coordinate. The default value is 1. Z: non-zero A floating-point number representing the scale factor on the z-coordinate. The default value is 1. |
Rotate X, Y, Z, Angle RotateAll X, Y, Z, Angle |
X: The x-direction of the rotational axis. Negative values point to the left, positive ones to the right. The default value is 0. Y: The y-direction of the rotational axis. Negative values point down, positive ones up. The default value is 0. Z: The z-direction of the rotational axis. Negative values point backward, positive ones forward. The default value is 0. Angle: The angle to rotate in degrees. Negative values rotate counter-clockwise, positive ones clock-wise. The default value is 0. |
Shear dX, dY, dZ, sX, sY, sZ, Ratio ShearAll dX, dY, dZ, sX, sY, sZ, Ratio |
dX: The x-coordinate of the vector D. The default value is 0. dY: The y-coordinate of the vector D. The default value is 0. dZ: The z-coordinate of the vector D. The default value is 0. sX: The x-coordinate of the vector S. The default value is 0. sY: The y-coordinate of the vector S. The default value is 0. sZ: The z-coordinate of the vector S. The default value is 0. r: The ratio that indicates how much to displace vectors. The default value is 0. |
Mirror, X, Y, Z MirrorAll, X, Y, Z |
X: Whether the x-axis should be mirrored. The default value is 0 (false). Y: Whether the y-axis should be mirrored. The default value is 0 (false). Z: Whether the z-axis should be mirrored. The default value is 0 (false). |
Color Red, Green, Blue, Alpha |
Red: The red component of the color. Measured from 0 (black) to 255 (red). The default value is 255. Green: The green component of the color. Measured from 0 (black) to 255 (green). The default value is 255. Blue: The blue component of the color. Measured from 0 (black) to 255 (blue). The default value is 255. Alpha: The alpha component of the color. Measured from 0 (transparent) to 255 (opaque). The default value is 255. |
EmissiveColor Red, Green, Blue |
Red: The red component of the color. Measured from 0 (black) to 255 (red). The default value is 0. Green: The green component of the color. Measured from 0 (black) to 255 (green). The default value is 0. Blue: The blue component of the color. Measured from 0 (black) to 255 (blue). The default value is 0. |
BlendMode BlendMode, GlowHalfDistance, GlowAttenuationMode |
BlendMode: The blend mode to use. The default is Normal. GlowHalfDistance: The distance at which the glow is at 50% of its intensity, measured in meters. The value must be an integer in the range from 1 to 4095, or 0 to disable glow attenuation. The default value is 0. GlowAttenuationMode: The glow attenuation mode to use. The default is DivideExponent4. |
▸ Available options for BlendMode: |
Normal: The faces are rendered normally. Additive: The faces are rendered additively. |
▸ Available options for GlowAttenuationMode: |
DivideExponent2: The glow intensity is determined via the function x2 / (x2 + GlowHalfDistance2), where x is the distance from the camera to the object in meters. DivideExponent4: The glow intensity is determined via the function x4 / (x4 + GlowHalfDistance4), where x is the distance from the camera to the object in meters. |
⚠ | OpenBVE 2 compatibility note: In OpenBVE 2, only additive glow will be supported and the GlowAttenuationMode parameter is likely going to be dropped. Please avoid using normal blending in conjunction with using glow. |
Load DaytimeTexture, NighttimeTexture |
DaytimeTexture: The file name of the daytime version of the texture to load, relative to the directory the object file is stored in. NighttimeTexture: The file name of the daytime version of the texture to load, relative to the directory the object file is stored in. |
Transparent Red, Green, Blue |
Red: The red component of the color. Measured from 0 (black) to 255 (red). The default value is 0. Green: The green component of the color. Measured from 0 (black) to 255 (green). The default value is 0. Blue: The blue component of the color. Measured from 0 (black) to 255 (blue). The default value is 0. |
Coordinates VertexIndex, X, Y |
VertexIndex: The vertex index the coordinate is referring to. Allowed values are 0 through n-1, where n is the number of Vertex commands used. X: The x-coordinate of the texture. Integer values correspond to the left/right edge of the texture. If only values between 0 and 1 are to be considered, 0 corresponds to the left and 1 to the right. Y: The y-coordinate of the texture. Integer values correspond to the top/bottom edge of the texture. If only values between 0 and 1 are to be considered, 0 corresponds to the top and 1 to the bottom. |