Lights

lights-in-onirix

Lights are invisible elements that can reproduce the real world illumination and its effects onto the Augmented Reality scene. This includes generating the shadows that your 3D objects and other elements would cast if they were real objects.

lights%20options

Thanks to these elements you will be able to simulate the lighting present in the location where your experience is supposed to be played. If it’s outside, you can simulate the sun with a directional light. If it’s inside a room, you can represent a window using a rectangular area light or a simple lightbulb with a point light.

Just like labels and widgets, lights are static elements in Studio and thus you won’t need to upload or configure anything to start adding them to your scenes. They are available and ready to drag onto the scene in the Ligths section of the asset library.

Types of lights in Onirix

Currently in Studio there are five types of lights available.

Ambient light

This global light illuminates all objects in the scene equally. Only one of this type can be placed in a scene and thus it is already present in every one of them and can be configured through the Scene Environments settings. You can customise its colour and intensity. This light will not cast shadows.

ambient-%20

Directional light

Emits light in a specific direction to the center of the scene while simulating being infinitely far away from it. This behaviour is used to simulate the sun due to it being far away and all its rays being parallel. You can customise its colour, intensity and position. This light will cast shadows (same properties as the Ambient light)

Point light

This type simulates the light emitted by a standard lightbulb. It shines from a single point in all directions. It will cast shadows. You can customise its colour, intensity and position (same properties as the Ambient and Directional lights).

Spot light

This light emits from a single point in one direction, along a cone that increases in size the further from the origin it gets. This behaviour is useful to simulate elements like flashlights or the headlights of a vehicle. This light will cast shadows.

Its customisable properties are:

  • Colour
  • Intensity
  • Distance: how long will the cone be.
  • Angle: the maximum angle in which the light will disperse.
  • Penumbra: percentage of the light that will be attenuated due to penumbra.
  • Position
  • Rotation

spot%20light

Rect Area light

The Rectangular Area light emits its rays uniformly across the face of a rectangular plane so it can be used to simulate windows or LED strip lights. You can customise the colour, intensity and also its size through the height and width parameters. This light will not cast shadows.

react%20area

Enabling shadows

To enable shadows in a project, open it in the editor and click the settings wheel in the right side of the topbar. In the third from last segment “Visual properties” you will be able to switch the shadow on and off. Note that the more lights you add, the more processing will be required to calculate the shadows and thus the performance could be affected.

shadows_

Shadow properties for scene elements

In Onirix, in addition to adding the ability to generate shadows to your project as we have seen in the previous configuration, you can also define which of the elements in your scene can both generate and receive shadows - the shadows can also be used to cast shadows.

shadows-settings

In order to do this we simply select the scene element we want to configure and select in its display properties list, the behaviour we want with respect to shadows.

By default, elements such as videos or labels have these properties not active, and images or 3D elements have them active.

Results