Pinned [Tutorial] Hose connections between vehicles

    • [Tutorial] Hose connections between vehicles

      Hose connection between two points, either within one vehicle oder between two vehicles, with a rope geometry that's aligned to the path.

      The connection can go both from implement to vehicle, from implement to implement and from vehicle to implement. The connections are handled by the attacher and attachable controllers. Both Attachable → Attacher and Attacher → Attachable are supported.

      Both hose and the receiving connector contain settings via Properties (Hose Output and Hose Input, resp.), among others "Keys" for identification at which connector the hose can be connected. For example a hose with the key hyd- will only be connected to the next free hyd- connector, or won't be connected when no hyd- connector exists, or all existing ones are in use. A vehicle can have an infinite amount of connectors, both with identical and with different keys.

      Hoses et al. (Hose Output) and connectors (Hose Input) are initialised by Attacher and Attachable controllers, meaning the corresponding controller(s) have to connect to the hoses/connectors. There is no need for any setting within the controller interface, though. If there are multiple Attacher/Attachable controllers that are relevant for the connectors, each of them have to connect to the connectors.

      Within Hose Outputs a plug mesh can be defined optionally that will be attached to the receiving connector. In addition a position within that plug can be defined to set the end position of the hose. If no plug is defined, the hose will be attached directly onto the connector position.

      Within Hose Inputs a cover mesh can be defined optionally that will be hidden or rotated upon attaching the hose, and shown or rotated back upon detaching the hose.

      Within both Hose Outputs and Hose Inputs a controller can be activated/deactivated upon attaching/detaching, that can be used for further animations or anything else (e.g. a Script controller).

      Example setup
      • Implement
        • Path with rope
          • Property Hose Output with key hyd+
          • connected to a plug mesh and position marker (defined in "End connector" / "End position connector")
        • Plug mesh
          • Child: hose position marker within that plug mesh
        • Attachable: connected to the path
      • Vehicle
        • Connector marker
          • Property Hose Input with key hyd+
          • connected to a cover mesh (defined in "Cap Node connector")
          • Cap Mode setting: Rotate X, -90 degrees
        • Cover mesh (will be rotated on X axis)
        • Attacher: connected to the connector marker


      ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

      Property: Hose Output
      Defines the hose settings as well as its connection settings.
      • Hose key: defines the connector type to which the hose can be connected. While it is freely defineable, there standard keys that should be used for compliance with compatibility with other vehicles:
        • Hydraulic +: hyd+
        • Hydraulic -: hyd-
        • Hydraulic cutter bar: cutt
        • Electrics: elec
        • Air red: airr
        • Air yellow: airy
        • Air black: airb
        • Seeds: seed
        • Fertilizer: fert
        • Slurry: slur
      • Static connector: [optional] defines the connector to a mesh that will be hidden when the hose is connected, and shown when the hose is detached. Example: static mesh for hanging hoses in transport position
      • End connector: [optional] defines the connector to a mesh that is attached to the connector (`Hose Input`) at its pivot. The exact transform data (position and rotation) is applied to the mesh. Example: plug
      • End position connector: [optional] defines the connector to a Locator Marker that defines the end position of the hose within the End mesh (e.g. hose end inside a plug)
      • Call Controller: [optional] If activated, a controller can be added to the path which will be activated upon attaching the hose, and deactivated when detaching the hose. Example: Script controller that shows/hides other meshes


      ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

      Property: Hose Input
      Defines a hose connection point for ropes, as well as optional cover meshes can be hidden/shown or rotated.
      • Hose key: defines the connector type. While it is freely defineable, there standard keys that should be used for compliance with compatibility with other vehicles:
        • Hydraulic +: hyd+
        • Hydraulic -: hyd-
        • Hydraulic cutter bar: cutt
        • Electrics: elec
        • Air red: airr
        • Air yellow: airy
        • Air black: airb
        • Seeds: seed
        • Fertilizer: fert
        • Slurry: slur
      • Cap node connector: [optional] defines the connector to a cover mesh that can be hidden or rotated when attaching, and shown or rotated back when detaching the hose
      • Cap mode: [optional] defines if the cover is to be hidden/shown or rotated/rotated back The axis in the the "Rotate _" name is the local rotation axis of the mesh
      • Cap rotation angle (deg): [optional] Angle to rotate the cover when attaching
      • Call Controller: [optional] If activated, a controller can be added to the marker which will be activated upon attaching the hose, and deactivated when detaching the hose. Example: Script controller that shows/hides other meshes


      ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

      Controller: Rope Path
      Is added automatically to a rope geometry that is created from a path
      • Path connector: defines the connector to the path that sets the rope form. Is added automatically upon creation, but can be changed after the fact.
      • Use distance based path sampling: changes the calculation mode of the rope's x subdivisions using the actual path distance. Useful for paths with more than two points


      ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

      Controller: Hose
      Defines an internal path within a vehicle. Does not have to be connected to an Attacher or Attachable controller.
      • Input connector: defines the connector to the target node (with Hose Input Property)
    • Connection between two vehicles

      Source vehicle
      1. Create the path, making sure to go in the x axis direction

      2. Select path → Draw rope (1× click into the 2D viewport suffices), set visual settings


        • The size's y component defines the radius. The x component is calculated automatically.
        • If more than 2 path points exist: activated "Distance based" in the Rope Path Controller
        • In the Geometry tab, set the subdivisions best fitting the size

        • Set the rope's max view distance
      3. (optional: if a static hose mesh exists): add connector to static hose mesh in the Path node and connect to mesh. The static hose will be hidden when attaching, and shown when detaching.
      4. (optional: if a plug mesh exists): add connector to plug mesh in the Path node and connect to mesh. The plug mhes will be attached to the target position and is aligned to the connector node's orientation.
      5. (optional: if a plug mesh exists): add connector to hose position node within plug mesh in the path node and connect to marker. Position node should be a marker that needs to be a child of the plug mesh. Marker's x axis defines the hose direction. Info: if hose position node (End position) is not defined, the hose will be attached directly to the target position (Hose Input).
      6. Add Property Hose Output to the path

        1. Define hose key (see: Property description)
        2. If static mesh exists: add connector name to Static connector
        3. If plug mesh exists: add connector name to End connector
        4. If position marker exists: add connector name to End position connector
      7. Attachable/Attacher Controller: Connect path (doesn't have to be defined any further in the controller)



      ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

      Target vehicle
      1. Add target position marker (hose will be attached in the marker's x axis orientation)

      2. (optional: if cover/lid mesh exists): add connector to cover mesh in the marker and connect to mesh

      3. Add Property Hose Input to the marker
      4. Define Hose key (see: Property description)
      5. If cover mesh exists: add connector name to Cap node connector
        • Set animation mode to Cap mode (Hide or show, Rotate)
        • If "rotate" is used: set rotation angle to Cap rotation angle
      6. Attacher/Attachable Controller: connect to marker (doesn't have to be defined any further in the controller). The connector order defines the order the hoses will be connected if there are multiple Hose Input receivers with the same key.

    • Connection within a vehicle

      Just like the rope system, a rope path can be created between two points within a vehicle. The resulting rope runs along the path, which can be both linear and curvy or be using beziers, or a mixture of the three. Keep in mind, though, the points' positions are not interpolated. Meaning: within the path, they're fixed.

      1. Create the path, making sure to go in the x axis direction

      2. Select path → Draw rope (1× click into the 2D viewport suffices), set visual settings


        • The size's y component defines the radius. The x component is calculated automatically.
        • If more than 2 path points exist: activate "Distance based" in the Rope Path Controller
        • In the Geometry tab, set the subdivisions best fitting the size

        • Set the rope's max view distance
      3. Add Hose Controller to the path setzen, add connector to the target

      4. Add property Hose Output to the path. It is not necessary to define a Hose key, as the hose will be attached directly to its connected target.

      5. Add target position marker and move to its hierarchical position. Hose will be attached in the marker's x axis direction. Connect path to target marker

      6. Add Property Hose Input to the target marker. It is not necessary to define a Hose key, as the hose will be attached directly to its connected target.

        • If necessary, set Cap node connector, Cap Mode, Cap Rotation Angle
      7. In the path's Hose Controller settings, add the target connector name