Creating Debug Files

VG Debug Settings.
VG debug settings.

We can enable creation of a set of debug files (see Debug Files Content below) which is saved in a vg_tmp subdirectory in your project’s Asset folder.

There are two ways to create them

  1. Enabling Export Scene in Runtime allows you to create debug files after launching the scene in the Editor. The benefit of this is to be able to include objects you spawn in runtime or those you add by loading another scene during runtime into the debug files. Note the full debug files process is only in effect in development mode (i.e. using the Unity Editor), but not in builds.

  2. Pressing Export Scene in Editor will simulate a launch of the VG plugin from the Unity Editor, thus without the need of launching the scene. This option is provided for convenience, but objects that are not in your scene yet will not be included.


Baking Pipeline.
Baking Pipeline.

Debug Files Content

  • One .obj file for each interactable object in the scene, i.e. raw 3D mesh data in uniform scale.
  • One .bin file for each avatar (containing one or a pair of hands of this avatar).
  • One .log file with VG log data (the same that also appears on the Console) for the scene that you are running, will be filled while you are running the scene.
  • One .db file carrying data filled with VG_GraspEditor or VG_BakingClient.
  • One .scn and one .scn.objrig file for each scene, including scene configuration data (see section Debugging Interaction Issues to learn about these VG scene files).

How To Use The Debug Files

Object Baking

A .zip file of all the content in vg_tmp folder is the input that is needed for object baking.

Debugging Interaction Issues

When you stop the scene, two scene configuration files for each Unity or Unreal scene will be saved:

  • .scn: Is a JSON representation of the current state of the scene including VG interaction setup and all interactable objects’ status at the moment of saving.
  • .scn.objrig completely corresponds to the .scn file, but uses indentation to represent object hierarchy.

These scene files reveals how VG sees the status of your current scene in your VR application. Because of this, they are very useful for you to debug any VG-related interaction issues that you experience. For example:

  • object hierarchy: you thought you placed antenna as the child of radio. To see if it is really that way in VG, you can check the .scn file.
  • selection weight: you thought you have changed the selection weight on the antenna to 0, but it is actually not when checking the .scn file.
  • affordance: you thought you have set the radio to be pushable (FINGER_PUSHABLE), but it is actually only graspable (ONLY_GRASPABLE).
Since .scn files are written at the moment when you stop playing the scene, the saved information reflects your scene configuration at that moment. So if you in runtime, for example, changed an object’s joint type or selection weight, then the resulting .scn files will reflect the effective values after your runtime changes.
Example of an .scn file representing a simple scene with just two objects - "radio" and "antenna".

units_in_meters: 1
sensor_setup {
  wrist_pos_sensor: LEAP
  wrist_rot_sensor: LEAP
  finger_pose_sensor: LEAP
  finger_control_type: BY_SENSOR_FULL_DOFS
  sensor_origin_position {
    x: 13.0999994
    y: -19.6
    z: -3.7
  }
  sensor_origin_rotation {
    w: 1
  }
}
control_setup {
  gesture_duration: 0.1
  form_push_gesture: true
  mode_interpolation_duration {
    grasp: 0.2
    hold: 0.1
    release: 0.2
    empty: 0.1
  }
  grasp_selection_pos_thresh: 1
  grasp_selection_rot_thresh: 0.5
  grasp_selection_pos_weight: 0.5
  grasp_selection_rot_weight: 0.5
  push_angle_thresh: 2.61799383
}
avatar {
  scale: 1
  instance_id: 1
  avatar_hash: 1269503502
  hand_hash: 1949468064
  hand_hash: 3674342058
}
object {
  joint {
    id: 17908
    name: "radio"
    hash: 4092480540
    parent_id: 17888
    joint_type: floating
    joint_center {
      x: -2.13999987
      y: -0.807300091
      z: 1.40440011
    }
    axis {
      y: 1
    }
    position {
      x: -36.7001877
      y: 2.9882288
      z: 5.93024588
    }
    rotation {
      x: -0.498288751
      y: -0.498305738
      z: -0.501694202
      w: 0.501699686
    }
    push_axis {
      y: 1
    }
    grasp_constraint_axis {
      y: 1
    }
  }
  selection_weight: 1
  interactable: true
  affordance: ONLY_GRASPABLE
  synthesis_method: DYNAMIC_GRASP
  physical: true
}
object {
  joint {
    id: 17958
    name: "antenna"
    hash: 1617809614
    parent_id: 17908
    joint_type: universal
    joint_center {
      z: -0.299999863
    }
    axis {
      z: 1
    }
    range_min: -0.52359879
    position {
      x: -29.2235985
      y: 8.81296
      z: 0.696459293
    }
    rotation {
      x: -0.49828881
      y: -0.498305798
      z: -0.501694262
      w: 0.501699746
    }
    user_specified_joint_center: true
    push_axis {
      z: 1
    }
    grasp_constraint_axis {
      z: 1
    }
  }
  selection_weight: 1
  interactable: true
  affordance: ONLY_GRASPABLE
  synthesis_method: DYNAMIC_GRASP
}