Mark

The mark parameter specifies the visual mark type to use in the visualization, i.e., each data point is associated to one mark instance. In DXR, a mark consists of a Unity prefab and a mark script: a Unity prefab is a template of a game object that can be easily instantiated in a scene, and its properties can be programmatically mapped to data using Unity's scripting language described in a mark script. DXR provides a set of built-in visual mark prefabs (cube, sphere, cone) and a default generic mark script which can be extended to create custom marks and channels. To check the current list of marks that you can use, go to Assets/DxR/Resources/Marks - each folder contains a mark prefab which you can instantiate in your scene to get a preview. The mapping of the visual channels of a visual mark to data attributes is described using encodings.

At its core, DXR supports a generic type of Unity prefab that can be used as a generic visual mark. This generic prefab should have the following components:

This type of prefab is essentially a 3D model that can be instantiated and rendered in Unity. Whatever object this model represents (e.g., ball, tree, book, paperplane, etc.), DXR treats it as a "box" that is pointing towards a specified forward direction (pointed at 0,1,0 vector by default; used for marks that show direction, e.g., arrow, cone), i.e., the width, height, depth of this box are the longest dimensions along x, y, z, of the model, respectively. This simplifies the mental model for a generic visual mark. The generic visual channels that can be mapped to data are:

  • x, y, z (spatial positions)
  • width, height, depth, size (render size)
  • color, opacity (albedo of material)
  • xrotation, yrotation, zrotation (rotation along axis)
  • xdirection, ydirection, zdirection, length (direction arrow type mark points to, and length of the arrow)
  • xoffset, yoffset, zoffset, xoffsetpct, yoffsetpct, zoffsetpct (different ways to add spatial position offsets)

These channel properties are described in detail under the Encoding documentation. You can also check the default Mark script that programmatically sets these properties at runtime for in-depth information. DXR also allows custom marks and channels like the book example below.

Below are some examples showing different built-in and custom marks in DXR. You will find more examples in the Examples section.

Sphere


Cone


Text


Custom: Book

Check out the instructions on how to create custom marks and channels.