Back to contents pageHow to create a representation using Site Manager

How to create a representation using Site Manager

Summary

This article shows how to get these 3 representations using Site Manager.





Prerequisites

None. You can use this article on its own.



Example material

Save this link to get a zip file of the example material


Guide

Before you start, remember to:

Importing a previously made representation

1) Start Site Manager

Site Manager will start if you have installed and deployed services correctly into a new dataset. In the 'Representations' tab, the 'Default Tag' representation is present.





2) Import a new representation

Your Ubisense installation directory, C:\Program Files\Ubisense 2.1\ by default, contains a directory reps containing XML descriptions of the 2D and 3D representations of various common objects. To import one of these, click on the Rep > Import toolbar item:





3) Choose the 2D representation

In the 'Load 2D Representation' dialogue box, browse to your Ubisense installation's reps directory and select 'person.xml':





4) Choose the 3D representation

In the 'Load 3D Representation' dialogue box, select the same file 'person.xml', since it contains both 2D and 3D descriptions:





5) Give the representation a name

Give the representation name 'Person Rep' in the next dialogue box:





6) Look at the new representation

Now, your list of representations includes 'Person Rep'. Select it to see the 2D and 3D images on the right-hand side of the screen:





7) Assign the representation to a type

You can assign representations to types and/or objects. In this example, we assign the 'Person Rep' to the type 'Person'. Go to the 'Types' tab and double-click on the 'Rep' column in the 'Person' row to get a drop-down list of your available representations. Select 'Person Rep':



If you subsequently create objects of type 'Person', you can override this default representation by assigning a different representation to the object instance in the 'Objects' tab. Therefore, different objects of the same type can have a default representation which is only overridden in the cases you want.





Creating a new representation

1) Start the representation editor

In the 'Representations' tab, click th Rep > New menu item:



The 'Representation Editor' appears:





2) Add a new shape primitive

In this example, we add a new cylinder for a car wheel. Click on the 'New cylinder primitive' button at the top of the window:





3) Edit shape properties

The shape properties are its orientation, size and location. Open the 'Cylinder properties' dialogue for the cylinder you just added by double-clicking on it in the list on the right-hand side of the screen. Enter the following values for the scale of the shape, which are given in meters:



Your cylinder will now be a similar size to a car wheel. We set the size of the cylinder before rotating it to the required angle to make setting the size more intuitive. Now, set the 'Pitch' property to '90'.



4) Copy-paste to get new shapes

You can use the copy-paste tool to get 4 wheels with the same properties by right-clicking in the list of shapes as shown:





5) Set the position of the shapes

Set the position of each wheel using the 'offset' properties. Set the offsets of each wheel by setting the {X, Y} offsets to be {0, 0}, {2, 0}, {0, 4} and {2, 4}:





6) Add a box primitive

Add a box using the top-left button in the 'Representation Editor' with the following properties:





7) Save the representation

Save the representation named 'Car', which now looks like this:



You now have a very basic representation of a car for use in your database.

Detailed help is available starting in the Administration concepts > Representation basics section of the Site Manager help.





Importing a mesh primitive

Mesh representations are 3D solid models that are projected into 2D from directly above when used as 2D representations. Ubisense supports the Microsoft DirectX mesh file format (.X). 2 examples are provided which you can download by saving this link. (This is the same link as in the "Example material" section above.)

1) Create a new mesh primitive

Create a new representation as in the previous section. In the Representation Editor, click on the "New mesh primitive" button in the toolbar.





2) Load the mesh from a file

In the "Mesh Properties" dialogue box, click on "Load from File".



Browse to the file "Bus.x" that you downloaded from the link above.





3) Set the mesh properties

The DirectX mesh for the bus needs to be scaled, rotated and translated with the following parameters. Set the parameters and click OK.





4) Save the representation

Make sure the name of the representation is set to "Bus" and click Save.





5) Create objects and use the representation

You now have the representation of a bus available in your list.









Back to top