How do you add gauges to an automation car

Discussion in 'Content Creation' started by GreenSeven, Jul 2, 2020.

  1. GreenSeven

    GreenSeven
    Expand Collapse

    Joined:
    Feb 6, 2016
    Messages:
    36
    I have an automation car with an interior and I want to add gauges how do I do that
     
  2. Vehicular Bonanza!?

    Vehicular Bonanza!?
    Expand Collapse

    Joined:
    Sep 28, 2019
    Messages:
    230
    Go to the most relevant jbeam of your car, for example body jbeam. Add a section called "props" if there isn't such section yet.

    "props": [
    ["func", "mesh", "idRef:", "idX:", "idY:", "baseRotation", "rotation", "translation", "min", "max", "offset", "multiplier"],

    Now the lines that follow describe each moving prop that you can possibly like to have. Most common are "wheelspeed" (speedometer function), "rpm" (self-explanatory), "fuel", "watertemp" etc.

    Example from my car:

    ["wheelspeed", "S1203_needle_speedo", "dsh","dshl","dsh2", {"x":-75.7, "y":179.731, "z":184.28}, {"x":0, "y":0, "z":-4.15}, {"x":0, "y":0, "z":0}, 0, 53, -22.0, 1.05],

    So the first keyword is what the prop reacts to, if you want examples, go look in vanilla cars or good mods. Second thing is how the prop is called in Blender (you gotta create a speedometer needle, call it something reasonable, and export the whole thing again into dae. Don't forget to KEEP THE ORIGIN of the needle on its axis of rotation and ideally make the local Z axis of the prop to be the axis around which it's supposed to rotate).

    For fine tuning there's baseRotation. Experiment with min, max, offset and multiplier, they basically set the bounds and how fast the prop gets from one to another with respect to the "wheelspeed" variable.

    "idRef" are reference nodes. For positioning, https://wiki.beamng.com/Spotlight_Positioning this seems to be a fine resource.

    The whole thing happens with "rotation" and "translation". The game takes these values and applies the transformations depending on the value of the variable (wheelspeed in this example), so if you set "rotation" z to some degree, and leave everything at zero, the prop should rotate on its local z axis (which you properly set in Blender beforehand) with regards to the speed of the car.

    For gauges that don't move but light up, read up on glowMaps (put them in some reasonable jbeam as well). Example:

    "glowMap":{
    "S1203_dash_gauges": {"simpleFunction":{"lowhighbeam":0.49}, "off":"S1203_gauges", "on":"S1203_gauges_on", "on_intense":"S1203_gauges_on"},
    "S1203_dash_headlights": {"simpleFunction":{"lowbeam":0.49, "highbeam":0.51}, "off":"glass_int", "on":"S1203_gauges_on", "on_intense":"S1203_gauges_on_intense"},
    "S1203_dash_signal_L": {"simpleFunction":{"signal_L":0.51}, "off":"glass_int", "on":"glass_int", "on_intense":"S1203_gauges_on"},
    "S1203_dash_signal_R": {"simpleFunction":{"signal_R":0.51}, "off":"glass_int", "on":"glass_int", "on_intense":"S1203_gauges_on"},
    },

    Here the first entry is actually the MATERIAL it applies to. In this case, I have some materials that are reasonably named in Blender and they are switched around based on state of the lights. For example, lowhighbeam triggers the variable when either low or high beam is activated. Read the details here: https://wiki.beamng.com/GlowMap

    Hope this helps.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice