Fr/Lightmap: Difference between revisions

From Valve Developer Community
< Fr
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
A lightmap is the static lighting data for each [[Brush]] face. This light data is applied additively to each surface texture to produce the final lit effect. Especially common in [[BSP]] based engines, it's the method used for most lighting effects within the source engine.
Un lightmap est une technique permettant de créer des faux ombrages. Elle s'applique au Brush et aux modèles statique. Cette méthode consiste à créer lors de la compilations une texture, l'ombre, qui sera superposé à une autre pour ainsi faire croire à un ombrage dans le jeux. La majorité des ombrages dans Source sont en faites des lightmaps. Ils on l'avantages d'être facile à calculer, mais l'inconvenients d'être statiques.
 
Determined during the [[vrad]] compile process lightmaps are only applied to brush faces as models are lit differently.  


== Lightmap Scale ==
== Lightmap Scale ==
The '''lightmap scale''' determines how sharp or diffuse the static shadows will be on a particular facet. It is defined by the number of [[dimensions|game units]] per lightmap pixel (luxel). The default value in Hammer is 16 units/luxel. Smaller values increase the sharpness of shadows, but mean more luxels,  larger lightmap file size and slower compile times.  
La résolutions des Lightmaps determinerons la qualitéz du rendu. La diminuez donnera un meilleure rendu et ne jouera pratiquement pas sur les performances dans jeux, mais le fichier BSP sera plus volumineux et le temps de calcul plus long.
* In Hammer, the "lightmap" viewmode shows the lightmap scale on all surfaces in the camera view. For individual surfaces, view and edit lightmap scale in the [[Hammer_Face_Edit_Dialog|Face Edit Dialog]].
La valeurs par default est de 16 units/luxel.
* Faces such as [[displacement]] maps calculate and use their own lightmap scale; different values will often get reset by Hammer to match the displacements' lightmap size.
Cette donnée se trouve dans la boite de '''dialogue de textures'''.


* Dans hammer, utilisez le mode de camera spécial "lightmap" dans la vue 3D pour les visualiser. Et la boite de dialogue [[Hammer_Face_Edit_Dialog|Face Edit Dialog]] pour les contrôler.
* Les faces avec [[displacement] utilise leur propre valeurs de Lightmaps.
[[image:intlight_lmap4.jpg|thumb|left|A lightmap scale of 4]]
[[image:intlight_lmap4.jpg|thumb|left|A lightmap scale of 4]]
[[image:intlight_lmap16.jpg|thumb|left|A lightmap scale of 16]]
[[image:intlight_lmap16.jpg|thumb|left|A lightmap scale of 16]]
Line 17: Line 17:
:* However, Direct light from the Sun or Moon (see [[light_environment]]) has negligible falloff and spread (ie parallel rather than radial rays) because these strong light sources are so far away. Direct parallel light will tend to cast equally sharp/diffuse shadows at any distance within a map.
:* However, Direct light from the Sun or Moon (see [[light_environment]]) has negligible falloff and spread (ie parallel rather than radial rays) because these strong light sources are so far away. Direct parallel light will tend to cast equally sharp/diffuse shadows at any distance within a map.
:* Thicker Fog (see [[env_fog_controller]]) increases atmospheric scattering, which means all shadows will be be (a lot) more diffuse.
:* Thicker Fog (see [[env_fog_controller]]) increases atmospheric scattering, which means all shadows will be be (a lot) more diffuse.
== Related [[ConCommand]]s ==
*[[Lightmap Commands#mat_filterlightmaps|mat_filterlightmaps]]
*[[Lightmap Commands#mat_showlightmapcomponent|mat_showlightmapcomponent]]
*[[Lightmap Commands#mat_showlightmappage|mat_showlightmappage]]
*[[Lightmap Commands#r_avglightmap|r_avglightmap]]
*[[Lightmap Commands#r_lightmap|r_lightmap]]
[[Category:Level Design]]
[[Category:Glossary]]

Revision as of 06:12, 10 November 2008

Un lightmap est une technique permettant de créer des faux ombrages. Elle s'applique au Brush et aux modèles statique. Cette méthode consiste à créer lors de la compilations une texture, l'ombre, qui sera superposé à une autre pour ainsi faire croire à un ombrage dans le jeux. La majorité des ombrages dans Source sont en faites des lightmaps. Ils on l'avantages d'être facile à calculer, mais l'inconvenients d'être statiques.

Lightmap Scale

La résolutions des Lightmaps determinerons la qualitéz du rendu. La diminuez donnera un meilleure rendu et ne jouera pratiquement pas sur les performances dans jeux, mais le fichier BSP sera plus volumineux et le temps de calcul plus long. La valeurs par default est de 16 units/luxel. Cette donnée se trouve dans la boite de dialogue de textures.

  • Dans hammer, utilisez le mode de camera spécial "lightmap" dans la vue 3D pour les visualiser. Et la boite de dialogue Face Edit Dialog pour les contrôler.
  • Les faces avec [[displacement] utilise leur propre valeurs de Lightmaps.
A lightmap scale of 4
A lightmap scale of 16
A lightmap scale of 64
Tip.pngAstuce:A couple of things to bear in mind when configuring static shadow diffusion:
  • Generally, shadows will become more diffuse as they get further away from your average light bulb or flame. As these light sources are radial, the illuminated surface area is much smaller closer to the light. Thus increasing the lightmap density for these small, close areas is relatively cheap.
  • However, Direct light from the Sun or Moon (see light_environment) has negligible falloff and spread (ie parallel rather than radial rays) because these strong light sources are so far away. Direct parallel light will tend to cast equally sharp/diffuse shadows at any distance within a map.
  • Thicker Fog (see env_fog_controller) increases atmospheric scattering, which means all shadows will be be (a lot) more diffuse.