Introduction to Light

Introduction to Light

Topic Progress:

It is important to understand the differences of these lights.

By default, A-Frame scenes always shows a default lighting, a mixture of ambient and a directional light. Of course, it is possible to deactivate the default light. When we add any lights by code, A-Frame removes automatically the default lights from the scene.

Disable default lighting

The attribute

in the a-scene tag disables the standard light:

Default lights

A-Frame uses the following standard light:

Tags for the light

The lights can be defined with with the <a-light> or the <a-entity> Tag:

Preparation

It is recommended to prepare the scene before placing the light:

The red box with the standard dimensions of 1 is placed at the origin, it is rotated by 45 degrees in the Y axis. The horizontal yellow plane is below the box and has a dimension of 2.

The first picture shows the standard lights, the second picture uses the attribute light=”defaultLightsEnabled: false”.

Important points to remember

  • A-Frame supports different kind of lights: ambient, directional, hemisphere, point and spot.
  • When we add any lights by code, A-Frame removes automatically the default lights from the scene.
  • The lights can be defined with with the <a-light> or the <a-entity> Tag.

 


Comments are closed.