Smart Eye [03]: The World Model

5 minute read

Published:

The World Model is used to visualize which real world objects the user’s gaze intersects with. The World Model is constructed out of simple object such as planes, spheres, boxes, etc that describe the real world.

The World Models are defined in a text file with the ending .sew. Any text editing software can be used to create and edit the world files but they need to be saved in the .sew format.

All distances in the World Model (and elsewhere in Smart Eye Pro) are expressed in meters.

The objects will be positioned and oriented relative to the coordinate system of its parent. The root parent in the World Model is always the WCS, which is defined inside Smart Eye Pro. Object specific coordinate systems can be defined using LocalCS.

A World Model can be built using any of the following objects:

LocalCS

The LocalCS is a right-handed local coordinate system used to move and rotate a group of objects. A LocalCS can be placed directly in the WCS or inside another LocalCS. It is defined by an origin and - and -axes in its parent coordinate system.

LocalCS : {
    name = "localCS"
    origin = 0.1, 0.1, 0
    xAxis = 1, 0, 0
    yAxis = 0, 0.8, 0.2
}

Plane

Plane is a bounded 2D-surface in a 3D-space. The Plane needs an anchor point that acts as the origin for the plane. The anchor points can be defined by any combination of - and -position of the words described in the tables below (case sensitive). The -position word must be first followed by the -position, for example middleLeft or lowerRight.

Y PositionX Position
lowerLeft
middleMiddle
upperRight

The orientation of the plane is defined by the xAxis and the yAxis. This is an optional setting since the xAxis is (1,0,0) and yAxis is (0,1,0) per default, giving the plane the same orientation as the parent coordinate system.

A Plane can act as a container for other objects such as rectangular, circular zones and calibration points. If the gaze falls within a zone when intersecting the Plane the intersection object name in the data output will be extended by “.zone name”.

Below is a Plane with anchor point lowerMiddle.

Plane : {
    name = "MyPlane"
    lowerMiddle = 0.0, -0.05, -0.3
    xAxis = 1, 0, 0     // optional, if undefined it will be 1, 0 ,0
    yAxis = 0, 0.5, 0.2 // optional, if undefined it will be 0, 1, 0
    size = 1, 0.5

    RectangularZone : {
        name = "rectangular zone"
        lowerLeft = 0.1, 0.15
        width = 0.25
        height = 0.1
    }

    CircularZone : {
        name = "circular zone"
        center = 0.75, 0.25
        radius = 0.1
    }

    CalibrationPoint2D : {
        name = "c1"
        center = 0.25, 0.15
    }

    CalibrationPoint2D : {
        name = "c2"
        center = 0.75, 0.15
    }

    CalibrationPoint2D : {
        name = "c3"
        center = 0.25, 0.35
    }

    CalibrationPoint2D : {
        name = "c4"
        center = 0.75, 0.35
    }
}

Screen

The Screen object is very similar to the Plane, but the coordinates for objects within the Screen are defined in pixels instead of meters. An additional parameter resolution is needed which represents the real resolution of the screen.

Screen : {
    name = "MyScreen"
    lowerMiddle = 0.0, -0.015, 0.02
    xAxis = 1, 0, 0 // optional
    yAxis = 0, .25, 0.04 // optional
    size = 0.34, 0.271
    resolution = 1280, 1024
    calibrationPoints = 4

    RectangularZone : {
        name = "rectangular zone"
        lowerLeft = 20, 20
        width = 250
        height = 200
    }

    CircularZone : {
        name = "circular zone"
        center = 600, 400
        radius = 100
    }

    CalibrationPoint2D : {
        name = "c1"
        center = 145, 120
    }

    CalibrationPoint2D : {
        name = "c2"
        center = 500, 200
    }

    CalibrationPoint2D : {
        name = "c3"
        center = 600, 500
    }

    CalibrationPoint2D : {
        name = "c4"
        center = 700, 750
    }
}

Calibration Points

A CalibrationPoint that is placed within a Screen or Plane object is a CalibrationPoint2D. When placed free in the WCS or inside a localCS it is a CalibrationPoint3D. A CalibrationPoint is only used for the gaze calibration phase and can never be intersected by the gaze vector.

CalibrationPoint2D : {
    name = "c1"
    center = 145, 120
}

CalibrationPoint3D : {
    name = "CP_1"
    center = 0,0,0.4
}   

Sphere

Sphere : {
    name = "a sphere"
    center = 0,0.15,0.3
    radius = 0.1
}

Box

Box : {
    name = "MyBox"
    0,0,0
    .1,0,0
    .1,.1,0
    0,.1,0
    0,0,.1
    .1,0,.1
    .1,.1,.1
    0,.1,.1
}

Cylinder

Cylinder : {
    name = "MyCylinder"
    bottomCenter = 0,0,0
    centerAxis = 0,1,0
    zeroAngleAxis = 1,0,0
    radius = 2.0
    height = 1.5
    startAngle = 45
    endAngle = 135
}

The -axis of the object coordinate system is parallel to the centerAxis and is equal to 0.0 at the bottom of the cylinder and 1.0 at the top of the cylinder.

The -value of the object coordinates is 0.0 at the startAngle and increases to 1.0 at the endAngle.

The Laser Chessboard Tool (LCT) is an optional module that is of great help when building a complex World Model. It provides the exact location of a point in space relative to the WCS origin just by pointing with the laser on that position.

Comments