Light -- Lumière.
| Liste des variables |
| - Ambient light animation | Selection d'un type d'animation à partir d'un fichier |
| - Ambient light animation file | Fichier contenant l'animation. |
| - Background | Fait-elle parti du decors de l'environement |
| - Clip Far | Distance maximale de depart de la lumiere (depuis le centre de l entité) |
| - Clip near | Distance minimale de depart de la lumiere (depuis le cente de l entité) |
| - Color | Couleur et intensité de la lumiere |
| - Dark light | lumiere noire |
| - Diffusion | Effet d'atténuation naturelle de la lumiere avec la distance |
| - Directional ambient | couleur de la lumiere ambiente pour 'directional light' |
| - Dynamic | Lumiere dynamique ou non |
| -Fall-off | Distance de l'éclairage |
| - Hot-spot | Distance de luminosité maximale |
| - Lens flare | Ajoute un effet de halo |
| - Lens flare only | Uniquement un halo |
| - Light animation | Selectionne une animation de lumiere |
| - light animation file | fichier contenant l'animation |
| - Light animation offset | vitesse d execution de l animation |
| - Name | |
| - Parent | |
| - Polygon illumination | effet d'illumination |
| - Render as small | Reduit la taille de l'entité représentant la source de lumiere |
| - SpawnFlags | |
| - Substract sector ambient | prend le pas sur la lumiere ambiente |
| - Targetable | defini si la lumiere peut etre une cible (pouvoir inter-agir sur elle) |
| - Type | Type de lumiere |
| Info + |
Light (Davor Hunski)
Source of light. Serious Engine's light engine supports these light types: directional lights (sun, parallel beams, casts shadows), shadow gradients (controlled via gradient markers) and point lights. Point lights can either cast shadows (normal point light) or ambient light (doesn't cast shadows). All lights can be set to be dark, which means that they will subtract light instead of adding it (inverse color logic: white color will extract all light). So, if you want to darken the corner of a room, you can add dark light in that corner. Point lights have two ranges: fall-off and hot-spot. Inside hot-spot range light has maximum influence, influence that falls to 0 at fall-off. Real-life lights can't be realistically simulated using linear interpolation. That's why diffusion light distribution is used by default. Light can be animated and can be assigned to hold lens flare and/or lens reflections.
Ambient light animation
-enumerated animations. You can browse one of animations from animation file browsed under 'Ambient light animation file'. Lights can animate both ambient and diffuse component. This animation can be changed later using animation changer.
Ambient light animation file
-animation file. You browse animation file here. When you do so, you can select
one of file's animations under 'Ambient light animation' property. Light animation
file can be edited and manipulated with light animation editor from within Serious
Editor.
![]()
Une fois à l'interieur de l éditeur vous voyez ceci:
Premiere étape, cliquez sur 'ADD' pour créer une nouvelle animation.
Puis dans name, donnez un nom à votre animation.
Sélectionnez ensuite le nombre de 'frames' pour cette animation (qui
se repetera en boucle). dans la barre B, vous allez voir apparaitre les
frames. Sélectionnez par exemple la frame C et appliquez lui une
couleur différente du blanc. Dans la case A vous allez voir apparaitre
l'animation lumineuse. Les Points verts D sont les clés de graduation.
L'editeur va automatiquement calculer le passage d'une couleur à l'autre
entre 2 clés. Pour ajouter une clé il suffit de cliquer sur une
frame et de modifier sa couleur. Pour supprimer cette clé, sélectionnez
la frame et cliquez sur le bouton 'Delete Key'.
Vous pouvez faire varier la vitesse d'animation sur la ligne 'Speed'.
Une fois votre animation au point, il vous suffit de sélectionner 'Save
As' , de donner un nom reconnaissable au fichier '*.ani' et de le sauvegarder.
Vous pouvez également enregistrer plusieurs animations dans un meme fichier,
il suffit de cliquer sur 'Add' pour chaque nouvelle animation.
Vous pouvez sortir de l'editeur d'animation et retourner dans les propriétés
de l'entité 'light'.
Commencez par sélectionner light animation file, pour récuperer
le fichier '*.ani' contenant votre animation.
Puis dans Light animation, sélectionnez l'animation que vous voulez.
Clip far
-float number property. Serious Engine does not use ray-casting algorithms for shadow mass calculation. Instead, it uses the much faster in-game scene rendering ASER algorithm that is used when rendering normal frame. That's why you can move point lights and have shadows updated in real-time. Clip near and clip far properties hold values that define distance of near and far clip planes that are used for scene rendering. Usually, you don't have to change these numbers. Only change this when you experience strange artifacts in shadow rendering when light is placed near wall or a model. Adjust and recalculate shadows until shadow are ok.
Clip near
-float number property. Explained under 'Clip far' section.
Color
-color property. Defines color of light. Color's alpha value has no meaning. When light casts light to a polygon, light's intensity is interpolated from color given through this property (from hot spot distance) down to no influence at all (at hot spot distance). The influence of all lights that have impact on a polygon are calculated into a special texture called a shadow map. When a polygon is rendered on the screen, this shadow map texture is mixed with polygon's basic texture(s) and then rendered. This is the way the engine displays shadows. If we now take a close look at what happens at just one rendered pixel, where one texture's pixel and one shadow map's pixel are combined, we could observe the following: if shadow map's pixel color is gray (R=128, G=128, B=128), then texture pixels isn't changed at all. For shadow map pixel values below gray, texture is darkened. For values above gray, texture is brightened. Brightening gives impression of strong light influence. One can experiment with wide range of light colors and get interesting results. Formula for mixing texture and shadow map is: result=texture*shadow map*2.
So, when we have gray shadow map (value 128, half from white, max influence which is 256), one channel's result will be calculated as: y=x*128/256*2, further: y=x*256/256 which is equal to multiplying with 1, resulting in y=x. Therefore, gray shadow value leaves texture as is. If we have light gray shadow map, value 192, result will be calculated as follows: y=x*192/256*2, y=1.5*x. That means that at shadow map value of 192, brightness of texture pixel will be 50% increased. For shadow map value 64, combined pixel will have halved texture's value. When shadow map lightens texture, it is said that it has over-brightening influence.
Dark light
-flag property. If this flag is set, color doesn't add light to polygons, it subtracts it. This type of light doesn't exist in nature, but is useful when we want to lower the lightness of an area. Dark lights work with inverse logic: black color of dark light has no influence, where white color sucks out all existing light when creating an shadow map.
Diffusion
-flag property. Real life light spreading is well simulated with lights that have diffusion flag set. To calculate a specific point in shadow map for diffusive light, Serious Engine calculates not only light source-shadow map pixels distance influence, but also influence of light ray's entering angle. Lights that don't have diffusion flag set ignore entering ray angle's influence.
Directional ambient
-color property. Used for directional lights only. This color defines lighting of areas that are not seen by directional light's rays. Real life atmosphere produces ambient color that gravitates toward blue (because of blue color of sky).
Dynamic
-flag property. This flag should be set for moving lights. This causes the engine to invoke special optimization for dynamic lights. Dynamic lights can't simulate diffusion behavior.
Fall-off
-float number property. Defines distance from light's source (in meters) where light's influence ends.
Hot-spot
-float number property. Defines distance from light's source (in meters) within which light has maximum influence. Light's intensity is applied with maximum light's power inside hot spot and is then interpolated down to nothing at fall off range, where light's influence ends.
Lens flare
-enum property. When seen through objects with lenses (cameras), lights appear to have glaring rings around them. These are called lens flares. Serious Engine allows you to add as much lens flare types. With this property you can assign one of several offered types to a certain light. Serious Engine implements lens FX power drop when light is near center of view.
Lens flare only
-flag property. If this flag is set, light's lens flare effect is rendered, but light's lighting influence is discarded. This way you can create a background sun that displays lens flare with reflections but that has no lighting influence, while having a 'real' sun light cast sun beams somewhere else (where is more appropriate for the user).
Light animation
-enumerated animations. This works just like ambient light animation, but is applied to the normal (diffuse) component of light, not ambient.
Light animation file
-animation file. See previous property description.
Light animation offset
-float number, representing time in seconds. Given time is added to time when animation has started, forming time offset. Use this property when you want to remove synchronization from some lights that are animated with same animation. By altering this property on an array of lights, you can achieve a traveling light effect.
Polygon illumination
-enumerated illumination types. If you want to simulate illuminating polygons, you should set some kind of illumination type. If you set illumination type xxx for a light, it will cast rays only trough polygons that have same illumination type set. For example, you can use light illumination for a corridor where vitrajes (colored glass) casts light from outside.
Render as small
-flag property. Light is seen as a small star, rather than a light of significant size, in Serious Editor's view that renders editor models. Normally, as a light has a greater fall-off, its rendered size in the editor grows. Sometimes, if you have many lights in a level, it can get pretty crowded. If you set this flag, light's editor model will be rendered as small and won't get in the way when you need to see and select other entities.
Subtract sector ambient
-flag property. Set this flag to smoothen differences in ambient lightning between areas that are influenced with directional light and those that are not. By setting subtract sector ambient flag, you can achieve a subtle sun influence effect, where sun rays don't create sharp edge, but rather a smooth edge as sun power drops while entering dark area inside architecture. For advanced users only. Use to polish lightning in your levels.
Type
-enumerated light types. Select between available light types: directional (distant lights, parallel beams), ambient (point light that doesn't cast shadows) and point light (cast shadows). There are two modifications with prefix strong: strong ambient and strong point light. These lights automatically set hot spot at 90% of fall off distance.
+ ambient light
Une lumiere ambiente est une lumiere qui n'a pas de source, elle est uniforme
et éclaire dans toutes les directions à la fois.
+ directional light
La lumiere directionnelle est utilisée pour simuler le soleil par exemple.
La source de lumiere vient d'un point en dehors du niveau et éclaire
toutes les surfaces configurées pour recevoir cette lumiere.
Plutot qu'un grand discours, voici un exemple :)
Commencez par créer une grande salle vide. Puis, ajoutez quelques piliers.
passez en mode polygone,Sélectionnez le plafond, et dans la 'tool
window(Q)' onglet 'polygon', cochez les cases 'Portal' &
'Link'. Le plafond devrait disparaitre. Au dessus de cette piece, ajoutez
une entité 'Light', donnez lui un angle de 45° vers le bas.
Puis dans 'type' sélectionnez 'directional light'. Repassez
en mode polygone, sélectionnez toutes les surfaces de la piece.
dans le 'tool window' onglet 'shadow' cochez les cases 'Directional'
et 'dir ambient'. Pour affiner le detail des ombres vous pouvez diminuer
le 'cluster size' à 1m ou 0.5m.
Appuyer sur la touche R pour recalculer les ombres, et le tour est joué.
Voici votre piece comme illuminée par le soleil.
Il reste les zones d'ombres desesperement noires. Pour cela dans les options
de l'entité 'light', sélectionnez 'directional light' et configurez
la couleur (un gris assez sombre permet de légerement éclairer
ces zones.).
+ point light
un point de lumiere est une ampoule. C'est une source précise d'éclairage.
+ Strong ambient light & strong point light
Identique à ambient light et point light
mais avec une luminosité beaucoup plus importante, à la limite
de la saturation. Tres efficace pour de la lave par exemple.