Mirrors

Mirrors is a section in Jbeam that adds additional cameras and renders their views on specific mesh surfaces in order to create mirror-like reflections. Straight mirrors are supported, as well as convex ones when modelled as such, up to a certain field of view limit which will change in the future.

This system is subject to change in future updates. Please don’t treat the information here as final, and expect this page to be updated in the future.

Mirrors are not enabled by default due to being performance intensive. They require the user to turn on the “Detailed Mirrors” option in the graphics settings. Turning it on unlocks additional options related to the view quality. With this option turned off, they are replaced with reflective surfaces which do not reflect the vehicle they are part of.

Mirrors can be adjusted by the user in the Tuning menu, but should be well adjusted for the default sitting position from the start.

Required arguments

string
type
The mesh the view from the mirror camera will be rendered on

The mirror view will be generated on a part of this mesh which has the “mirror” material assigned. It is normally a reflective material with curved edge normals.

Since 0.32, you can use material names that start with mirror_ so you can apply a custom normal map.

string
type
ID of a node to be used as reference for the starting mirror camera position
string
type
ID of a first additional node to be used as reference for the starting camera rotation
string
type
ID of a second additional node to be used as reference for the starting camera rotation

Optional arguments

dictionary
type
{“x”:0, “y”:0, “z”:0}
default
Offset of the camera position from idRef in absolute coordinates (m)
You can visualize this position via the mirror debug app in the Live Editor tab of the Vehicle Editor (Shift+F11).
dictionary
type
{“x”:0, “y”:0, “z”:0}
default
Rotation of the camera in absolute coordinates (degrees)
Uses the intrinsic Euler +Y +Z +X rotation system.
dictionary
type
{“x”:0, “y”:0, “z”:0}
default
Rotation of the mirror view relative to the mesh rotation in absolute coordinates (degrees)

Uses the intrinsic Euler +Y +Z +X rotation system.

Deprecated since 0.32, will be removed.

Do not define this option, it will be overwritten if user adjusts the values.

You need to fix the normal on the mesh, or use a custom normal map with your own material named like mirror_*.

string
type
the mesh name
default
Name of the mirror in UI adjustment screen
New in 0.32
number
type
0
default
Row position used in UI adjustment screen

New in 0.32

0 is the topmost value, 1 is a row below.

If there is no item above, even with row at 1, it will be at the top

string
type
mid
default
Column position in the UI adjustment screen

New in 0.32

If undefined, it will automatically guess using the mesh name. If the mesh name ends with _L or contains _L_ then left will be used. Same logic with right. It will default to mid if neither condition are met.

Possible values: left, mid, right

string
type
mirrorInteriorMiddle
default
Name of the icon used in UI adjustment screen

New in 0.32

If left empty, it uses the same logic as UiColumn.

Possible values:

  • mirrorLeftDefault
  • mirrorInteriorMiddle
  • mirrorRightDefault
  • mirrorLeftBig
  • mirrorLeftBigBottomWideAngle
  • mirrorLeftBigTop
  • mirrorLeftBonnet
  • mirrorRightBig
  • mirrorRightBigBottomWideAngle
  • mirrorRightBigTop
  • mirrorRightBonnet
  • mirrorRoundWideAngle
  • mirrorTopWideAngle

Simple Example

Standard vehicle mirror with no rotation offset

"mirrors": [
    ["mesh", "idRef:", "id1:", "id2:"],
    ["car_mirror_L","mi4l","mi3l","mi1l",{"refBaseTranslation":{"x":-0.110,"y":0.017,"z":0.156},"baseRotationGlobal":{"x":0,"y":0,"z":-10}}],
],

Advanced Example

Double truck mirror, utilizing rotation offset

"mirrors": [
    ["mesh", "idRef:", "id1:", "id2:"],
    ["longnose_mirror_R","mi2r","mi2rr","mi1r",{"refBaseTranslation":{"x":-0.085,"y":0.015,"z":0.18},"baseRotationGlobal":{"x":0,"y":0,"z":34},"offsetRotationGlobal":{"x":0,"y":0,"z":11.5}}],
    ["longnose_mirror_R_spot","mi3r","mi2r","mi2rr",{"refBaseTranslation":{"x":0.0,"y":0.015,"z":0.085},"baseRotationGlobal":{"x":1,"y":0,"z":21.7}}]
],
Last modified: 18/4/2024 17:04

Any further questions?

Join our discord