Primitives
Primitives are a type of element found within the Onirix object library. They are generic shapes that you can use both to include in your AR scenes, and to perform other interesting actions and effects such as occlusion properties, or action points.
The basic shapes you can find in this section are:
- Box
- Plane
- Sphere
- Circle
You can deform them, modify their scales and positions, obviously, as well as their colour, their amount of metallic appearance and roughness.
Using primitives as occlusion planes
As explained in the section on occlusion planes, one way to use occlusive elements within Onirix is by activating the Occlusion property within the primitives.
By activating this property, the element in question will no longer be visible in the AR scene, i.e. it will be a transparent element, but it will act as an occlusion plane, thus generating a transparency effect in the scene itself, and affecting the objects behind it that are visible.
With this you can play and create different ways to set up your occlusive scenes as portals or other effects.
Using primitives as action points
Such elements also have the property of becoming what we call ‘action points’. This means that we can use the primitives as invisible elements in the scene, which act as activators and triggers for click events.
Imagine that you want to mark areas of an experience where the user can perform actions, but that do not necessarily have a visible element or a Label, for example, the stick of a football goal. You could create an element with a Box primitive that occupies the same width and height as the stick, and set the action point property as active in order to capture clicks in that specific area.