.b3d and .x objects

The .b3d files and .x files are alternative formats for objects.

Overview

The .b3d object is similar to the .csv format in commands, and the format and syntax differs slightly.

The .x format is a different format that is derived from the DirectX object format.

.b3d syntax

Each command resides on a new line. A command contains of a command name, followed by arguments, seperated by commas. Arguments may be omitted by leaving the argument space empty.

CommandName Argument1, Argument2, Argument3, ..., ArgumentN

Notice the lack of a comma after the command name when compared to the .csv format.

Command names are case-insensitive. White space around the name, arguments, and beginning and end of each line is ignored.


Comments can be used anywhere, and must be preceded by a semicolon.

;This is a comment on its on its own line.
AddVertex, 1, 1, 1 ;This is a comment at the end of a line.

All comments are stripped prior to processing.

.b3d commands

The following table maps all .b3d command names to its .csv equivalent. The functions and arguments are the same, and only differs in syntax.

.b3d command.csv command
[MeshBuilder]CreateMeshBuilder
VertexAddVertex
FaceAddFace
CubeAddFace2
CylinderCube
TranslateCylinder
TranslateAllTranslate
ScaleTranslateAll
ScaleAllScale
RotateScaleAll
RotateAllRotate
ShearRotateAll
ShearAllShearShearAll
ColorSetColor
EmissiveColorSetEmissiveColor
BlendModeSetBlendMode
LoadLoadTexture
TransparentSetDecalTransparentColor
CoordinatesSetCoordinates

.x objects

We are unable to provide information for .x objects. If you are knowledable about the .x format, please contact the author via the link in the footer.

The following is a mirror of the information from the original openBVE documentation.


The X object format is a very narrow subset of the DirectX file format. Every X object validates as a DirectX file, but not necessarily the other way round.

Generally speaking, you will be unable to use 3D editing applications that export to the DirectX file format because openBVE will be unable to import the format.

Documentation of the X object format is not yet available, but the following is an overview of the supported templates, unstructured.

  • Mesh
  • Vector
  • MeshFace
  • MeshMaterialList
  • Material
  • ColorRGBA
  • ColorRGB
  • TextureFilename
  • MeshTextureCoords
  • Coords2d
  • MeshNormals