Difference between revisions of "Light probes"
(→Types) |
m (→Atmospheres) |
||
(39 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
<br /> | <br /> | ||
= General = | = General = | ||
− | Light probes are the Larian Engine's system for indirect lighting and reflections. <br /> | + | Light probes are the Larian Engine's system for indirect lighting and reflections. A pre-calculated approximation to global illumination.<br /> |
In short, a light probe is an object you place in the level. It looks at the surrounding lighting and objects and uses that information to calculate realistic indirect lighting.<br /> | In short, a light probe is an object you place in the level. It looks at the surrounding lighting and objects and uses that information to calculate realistic indirect lighting.<br /> | ||
This includes light bouncing off of objects, causing colors to carry over to nearby objects (this effect is called ''color bleeding''). <br /> | This includes light bouncing off of objects, causing colors to carry over to nearby objects (this effect is called ''color bleeding''). <br /> | ||
Line 10: | Line 8: | ||
<br /> | <br /> | ||
− | = Types = | + | = Probe Types = |
− | There are 2 types of light probes, used for different parts of the overall lighting. | + | There are 2 types of light probes, used for different parts of the overall lighting: distant and local light probes. |
+ | <br /> | ||
=== Distant === | === Distant === | ||
Line 33: | Line 32: | ||
<br /> | <br /> | ||
+ | === Local === | ||
− | + | Local probes are used to simulate color bleeding and reflections related to nearby lights and objects.<br /> | |
+ | Local probes only gather information within a defined area around them and thus, only apply to objects in that same area.<br /> | ||
+ | Contrary to distant probes, you can place as many local probes as you want. Even probes inside other probe areas are allowed.<br /> | ||
+ | The lighting of the smallest probes always gets priority over the lighting of a larger probe that covers the same area. | ||
+ | With local probes, you fine-tune illumination and reflections where the distant probe, or a larger local probe proves to be insufficient. | ||
<br /> | <br /> | ||
+ | = Shapes = | ||
− | + | Probe influence areas are approximated by 2 shape types: spheres and boxes.<br /> | |
+ | This only applies to local probes. Distant probes capture all information visible, without being limited within a specific area. | ||
<br /> | <br /> | ||
− | = | + | |
+ | = Lighting Types = | ||
+ | |||
+ | Probes can capture two types of lighting. <br /> | ||
+ | Diffuse light is of a very low resolution and captures the general color of the surroundings. <br /> | ||
+ | The performance cost of this light type is very low and produces what we know as 'bounce light'. <br /> | ||
+ | Specular lighting is of a high resolution and is used to produce reflections on smooth surfaces and metals. <br /> | ||
+ | This lighting is far more expensive. It is also most notable on smooth surfaces and metals. <br /> | ||
+ | These materials accurately reflect their surrounding, thus an accurate reflection is necessary. In other situations, a more general capture might suffice. | ||
+ | |||
+ | Given how dynamic a world can be (characters with metal armors running around), generally you'll want to have both diffuse and specular capture enabled on a probe. <br /> | ||
+ | But because mirror-like surfaces are very rare (metal armor is not a mirror), for performance it is beneficial to use less specular probes. <br /> | ||
+ | Don't worry too much though. Performance impact will only be noticeable when having multiple tens of probes visible on screen at the same time. <br /> | ||
+ | |||
+ | === Rule of thumb === | ||
+ | Capture both. <br /> | ||
+ | If you start having a multitude of probes in one screen, look to reducing performance impact by generalizing the specular probe.<br /> | ||
+ | |||
+ | === Sidenote === | ||
+ | Don't tweak too much. There might be intensity scaling on probes, but working with several probes and/or splitting diffuse and specular probes can have unwanted side effects. <br /> | ||
+ | Start with an intensity of 1, and slowly adjust situations. Again from big to small. | ||
<br /> | <br /> | ||
= Atmospheres = | = Atmospheres = | ||
+ | |||
+ | Atmospheres (sun direction, sky color) naturally influence the lighting and probes account for this. <br /> | ||
+ | Atmospheres are defined by atmosphere triggers. <br /> | ||
+ | |||
+ | |||
+ | As mentioned earlier, always place one distant probe per atmosphere trigger. <br /> | ||
+ | Local probes will gather lighting information from the atmosphere trigger they are in.<br /> | ||
+ | |||
+ | |||
+ | To account for atmosphere changes (day to night), which can be achieved through scripting, atmosphere triggers can be assigned multiple atmospheres (through atmosphere resources).<br /> | ||
+ | Probes will gather information from every atmosphere assigned to the atmosphere trigger they are in. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | |Information on atmosphere resources can be found here: [[Resources_explanation|Resources]] | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | |For more information on atmosphere triggers, look here: [[Triggers]] | ||
+ | |- | ||
+ | |} | ||
<br /> | <br /> | ||
+ | |||
= Best Practice = | = Best Practice = | ||
+ | |||
+ | Light probes make a scene's lighting feel more natural.<br /> | ||
+ | To optimally make use of light probes, try to follow these guidelines: | ||
+ | |||
+ | * Always '''1 distant probe''' per atmosphere. Always place one distant probe to capture far off lighting and apply it to everything in that atmosphere. This is your base layer of natural lighting. | ||
+ | * Place '''distant probes low to the ground'''. This way, they are more heavily influences by the ground color, making color bleeding more apparent. | ||
+ | * '''Follow geometry''' when placing local probes. Try to align the probe's influence area as closely as possible to its surrounding. F.e. shape a probe like the room the probe is in. | ||
+ | * '''Start big'''. Too many probes can be bad for performance. Start with the distant probe and large/rough local probes. Only place a smaller probe where necessary. |
Latest revision as of 08:40, 18 March 2019
Contents
General
Light probes are the Larian Engine's system for indirect lighting and reflections. A pre-calculated approximation to global illumination.
In short, a light probe is an object you place in the level. It looks at the surrounding lighting and objects and uses that information to calculate realistic indirect lighting.
This includes light bouncing off of objects, causing colors to carry over to nearby objects (this effect is called color bleeding).
It also provides accurate reflections of surrounding objects.
Probe Types
There are 2 types of light probes, used for different parts of the overall lighting: distant and local light probes.
Distant
Distant probes are used to account for far away lighting information: the sun and sky.
It uses the information of the surrounding atmosphere to apply an approximation of sun and sky light bouncing and color bleeding to everything in that atmosphere.
Since the probe contains atmosphere information, it applies to everything in that atmosphere. So in editor terms, you only need one distant probe per atmosphere trigger.
For more information on atmospheres, look here: Atmosphere panel |
More information on atmosphere triggers can be found here: Triggers |
Local
Local probes are used to simulate color bleeding and reflections related to nearby lights and objects.
Local probes only gather information within a defined area around them and thus, only apply to objects in that same area.
Contrary to distant probes, you can place as many local probes as you want. Even probes inside other probe areas are allowed.
The lighting of the smallest probes always gets priority over the lighting of a larger probe that covers the same area.
With local probes, you fine-tune illumination and reflections where the distant probe, or a larger local probe proves to be insufficient.
Shapes
Probe influence areas are approximated by 2 shape types: spheres and boxes.
This only applies to local probes. Distant probes capture all information visible, without being limited within a specific area.
Lighting Types
Probes can capture two types of lighting.
Diffuse light is of a very low resolution and captures the general color of the surroundings.
The performance cost of this light type is very low and produces what we know as 'bounce light'.
Specular lighting is of a high resolution and is used to produce reflections on smooth surfaces and metals.
This lighting is far more expensive. It is also most notable on smooth surfaces and metals.
These materials accurately reflect their surrounding, thus an accurate reflection is necessary. In other situations, a more general capture might suffice.
Given how dynamic a world can be (characters with metal armors running around), generally you'll want to have both diffuse and specular capture enabled on a probe.
But because mirror-like surfaces are very rare (metal armor is not a mirror), for performance it is beneficial to use less specular probes.
Don't worry too much though. Performance impact will only be noticeable when having multiple tens of probes visible on screen at the same time.
Rule of thumb
Capture both.
If you start having a multitude of probes in one screen, look to reducing performance impact by generalizing the specular probe.
Sidenote
Don't tweak too much. There might be intensity scaling on probes, but working with several probes and/or splitting diffuse and specular probes can have unwanted side effects.
Start with an intensity of 1, and slowly adjust situations. Again from big to small.
Atmospheres
Atmospheres (sun direction, sky color) naturally influence the lighting and probes account for this.
Atmospheres are defined by atmosphere triggers.
As mentioned earlier, always place one distant probe per atmosphere trigger.
Local probes will gather lighting information from the atmosphere trigger they are in.
To account for atmosphere changes (day to night), which can be achieved through scripting, atmosphere triggers can be assigned multiple atmospheres (through atmosphere resources).
Probes will gather information from every atmosphere assigned to the atmosphere trigger they are in.
Information on atmosphere resources can be found here: Resources |
For more information on atmosphere triggers, look here: Triggers |
Best Practice
Light probes make a scene's lighting feel more natural.
To optimally make use of light probes, try to follow these guidelines:
- Always 1 distant probe per atmosphere. Always place one distant probe to capture far off lighting and apply it to everything in that atmosphere. This is your base layer of natural lighting.
- Place distant probes low to the ground. This way, they are more heavily influences by the ground color, making color bleeding more apparent.
- Follow geometry when placing local probes. Try to align the probe's influence area as closely as possible to its surrounding. F.e. shape a probe like the room the probe is in.
- Start big. Too many probes can be bad for performance. Start with the distant probe and large/rough local probes. Only place a smaller probe where necessary.