Props

Props

From BeamNG
Props

Props

Props are meshes that don't flex, but can be animated. They are very useful for things like steering wheels, shifters, gauge needles, pedals, or other parts that are better animated than simulated. They can also be used to create spotlights that are tied to the glowMap/electrics system, to make working lights.


Arguments

Arguments

Name Type Optional Default Value Description
func string NOk n/a Defines the electric that will drive this prop
mesh string NOk n/a The name of the object to use for this prop
idRef string NOk n/a The reference node for this prop
idX string NOk n/a The X axis reference node
idY string NOk n/a The Y axis reference node
baseRotation float3 Ok 0,0,0 The initial rotation
rotation float3 NOk n/a Specifies the amount of degrees on each axis to rotate the prop by
translation float3 NOk n/a Specifies how many meters on each axis the prop will move
min float Ok 0.0 Minimum value cap for (func * multiplier)
max float Ok 100 Maximum value cap for (func * multiplier)
offset float Ok 0.0 Offset of the output value
multiplier float Ok 1.0 Multiplier of the input value
baseTranslation float3 Ok n/a Additional initial position adjustment
deformGroup string Ok n/a deformGroup used to break lights
breakGroup string Ok n/a breakGroup used to hide the prop

Prop Placement

In the 3D modeling software a prop should be placed at it's proper location and have it's pivot placed where it should rotate around. The procedure for setting the pivot will vary between modeling packages. For example see "Adjusting Pivots" for 3ds Max or "Object Origin" for Blender. Pick 3 reference nodes on the node/beam structure that form a perfect right triangle, in the correct order (reference node, a node directly to the left, and a node directly behind).

BaseRotation is necessary to give a prop an initial offset, like a steering wheel on an angled steering column or a needle in an angled gauge cluster. The mesh can be angled in the 3D modeling program and the angle copied into the props section, but unlike the position, it's not automatically gotten from the mesh file.


Simple Example

Simple Example

	
 "props": [
		["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"]	
		//needles
		["wheelspeed", "fullsize_needle_speedo", "f7r","f7l","f8r", {"x":5, "y":0, "z":0}, {"x":0, "y":0, "z":-4}     , {"x":0, "y":0, "z":0}, 0, 54, -27, 1],
		["rpm",         "fullsize_needle_tacho", "f7r","f7l","f8r", {"x":5, "y":0, "z":0}, {"x":0, "y":0, "z":-0.038}     , {"x":0, "y":0, "z":0}, 0, 6000, -2900, 1],
	 ],


Example with additional properties

Example with additional properties

    "props": [
        ["func",     "mesh",      "idRef:", "idX:", "idY:", "baseRotation",            "rotation",            "translation",         "min", "max", "offset", "multiplier"]
        //steering wheel
        ["steering", "steer_04a", "f1l","f1r","f6l",        {"x":-78, "y":0, "z":180}, {"x":0, "y":0, "z":1}, {"x":0, "y":0, "z":0}, -1000, 1000, 0, 1, {"baseTranslation":{"x":-0.070,"y":0.605,"z":-0.56}, "breakGroup":"steeringWheelBreak"}],

     ],

Lights

Props can also be used to create and animate spotlights. In order to use a light instead of a mesh, we must use "SPOTLIGHT" as the mesh name.


Lights are also positioned in a different way. The difference with the placement is that it uses a polar coordinates system. Translating on the X axis is moving the prop along a line relative to the two nodes (ref and idX). The same goes for the Y axis. Z axis is absolute (in meters) offset.The Wiki page Spotlight Positioning explains how to aim and position a spotlight.


"func" will turn on the light, and also be used for it's animation properties. The light will turn on so long as "func" is greater than zero.


Lights Example

Lights Example

	
	"props": [
		["func"      , "mesh"              , "idRef:", "idX:", "idY:"            , "baseRotation"        , "rotation"                 , "translation"        , "min", "max", "offset", "multiplier"]
		{
			"lightInnerAngle":65
			"lightOuterAngle":120
			"lightBrightness":0.4
			"lightRange":30
			"lightColor":{"r":255, "g":255, "b":200, "a":255}
			"lightAttenuation":{"x":0, "y":1, "z":1}
			"lightCastShadows":true
		}
		//low beams angled right slightly to avoid blinding oncoming traffic
		["lowhighbeam"    , "SPOTLIGHT"        , "fa2rr", "fa2r", "fa1rr", {"x":20, "y":-45, "z":-20} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.2, "y":0, "z":0.05},"deformGroup":"hatch_headlightglass_R_break"},],
		["lowhighbeam"    , "SPOTLIGHT"        , "fa2ll", "fa2l", "fa1ll", {"x":160, "y":-25, "z":25} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.2, "y":0, "z":-0.05},"lightOuterAngle":75,"deformGroup":"hatch_headlightglass_L_break"},],
		//high beams
		["highbeam" , 		"SPOTLIGHT"        , "fa2rr", "fa2r", "fa1rr", {"x":20, "y":-45, "z":-20} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.4, "y":0, "z":0.05},"lightRange":50,"deformGroup":"hatch_headlightglass_R_break"}],
		["highbeam" , 		"SPOTLIGHT"        , "fa2ll", "fa2l", "fa1ll", {"x":160, "y":-45, "z":20} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.4, "y":0, "z":-0.05},"lightRange":50,"deformGroup":"hatch_headlightglass_L_break"}],
		//dim parking lights
		["parking" , 		"SPOTLIGHT"        , "fa2rr", "fa2r", "fa1rr", {"x":20, "y":-45, "z":-20} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.4, "y":0, "z":0.05},"lightRange":50,"lightBrightness":0.2,"deformGroup":"hatch_headlightglass_R_break"}],
		["parking" , 		"SPOTLIGHT"        , "fa2ll", "fa2l", "fa1ll", {"x":160, "y":-45, "z":20} , {"x":0, "y":0, "z":0}    , {"x":0, "y":0, "z":0}, 0, 0, 0, 1, {"baseTranslation":{"x":0.4, "y":0, "z":-0.05},"lightRange":50,"lightBrightness":0.2,"deformGroup":"hatch_headlightglass_L_break"}],
	 ],