Using the Point Light Component
This tutorial concentrates on the Point Light Component and serves as an introduction to its use and to some of its features. The Point Light Component emits light in all directions from the Entity and in the real world, it can be compared to a light bulb.
Before attempting this tutorial we recommend that you read the Entity Components - Components Panel (up to Engine Version 5.4) documentation. Doing so will give you a much better understanding of the concepts behind CRYENGINE's Entity Components, furthermore, the documentation can be used as a reference guide in regard to the various attributes/parameters that relate to each of the available Components.
Different methods can be used to create a new Entity, for more information see the Entity Components documentation.
First, we are going to spawn a new empty entity and add the point light component to it. To do so click on the "Empty Entity" button in the "Create Object" panel and place the entity in the level. After that select the entity and click on the "Add Component" button in the "Properties" panel and select the point light component.
Creating an empty entity and add the point light component to it.
Now the component is part of the entity and you can see all the properties. The first thing we are going to change is the light color. Click on the white color box next to the "Color" attribute of the point light component. After clicking it, a color palette will pop up and you can select any color.
Changing the light color.
You might still can't see the light changing anything, that's probably because the entity was directly spawned on the ground. The entity can be either moved up it self or we change the components transformation, which means that the entity won't be moved but the light component will be. To change the transformation of the point light component change the values in the "Transformation" attribute of the component.
Changing the transformation of the component.
The point light component now illuminates the objects around it, but the light intensity is still weak. To change that, we are going to change the "Diffuse Multiplier" and the "Attenuation Bulb Size" attributes to achieve a brighter light. The diffuse multiplier defines how much of the light color will be multiplied on the objects around it. The attenuation bulb size controls the fall off exponentially from the origin. A value of 1 means that the light is at full intensity (within a 1 meter ball) before it begins to falloff.
Changing the attributes of the point light component.
The point light component has an attribute called "Style" and can be found under the "Animations" category. You can enter integer values in that field and they will specify the animation type, for example, the value 2 will make the light pulse or 8 will make the light flicker, just play around with the styles. The "Speed" attribute will change the speed of the animation style which was selected before.
Changing the light animation style and speed.
There are more attributes in the point light component and you can play around with them and test what they do, for example, you can deactivate or activate the light or change the illumination type to ambient.