Fr/Adding Water: Difference between revisions

From Valve Developer Community
< Fr
Jump to navigation Jump to search
No edit summary
m (obsolete language category)
 
(32 intermediate revisions by 8 users not shown)
Line 1: Line 1:
L'eau est le shader le plus complexe du moteur Source : il est animé (proxies), reflete (cubemap/temp réel), a du brouillard, utilise la réfractions, les normal maps. En plus de cela viens des restrictions quand à son placement et selon le type d'eau.
{{LanguageBar}}


== Règles/Restrictions ==
Pour créer de l'eau efficacement vous devez respecter plusieurs règles qui dépendent de son placement et de son usage :


== "Expensive" water ==
* Il doit y avoir seulement un niveau d'eau (semblable au niveau de la mer) dans le même {{L|PVS}} si l'eau est expensive.
Eau haute qualitée, mais qui demande le plus de ressources. Ce shader reflete le monde autour de lui, refracte, à du brouillard et une normal map animée à sa surface.
* L'eau "Expensive" et "cheap" ne peuvent pas être utilisé simultanément dans le même {{L|PVS}}.
* la surface de l'eau doit être parallèle à l'horizon et non verticale (Axe-Z).
* L'eau est créée en appliquant un matériau "water" à la surface d'un Brush, les autres faces doivent être recouverte de la texture <code>tools\toolsnodraw</code>.
* L'entité {{L|water_lod_control}} contrôle le LOD (diminue la qualité à partir de la distance choisie).  
* L'entité {{L|env_cubemap}} doit être présente à la surface de l'eau pour générer des réflexions sur les systèmes inférieurs à DX-9.
* Il dois y avoir un skybox.
* Il n'est pas possible de modifier la densité de l'eau, pour par exemple simuler de l'huile, de la boue....
* Tous Leak entrainera des problèmes de rendu (eau invisible,par exemple).


== "Cheap" water ==
Eau basse qualitée, utile pour des raisons de performances. Cette version ne reflete pas le monde.


{{note|L'eau ne doit pas être attachée à une entité, ceci pourrait engendrer des problème de rendu.}}


For situations where a more simplistic water solution is called for (normally for performance reasons), "cheap" water may be used. This version of water does not reflect the world around it, making it less realistic, but also much cheaper. Expensive water will fallback to cheap water on video cards that are unable to support the features necessary for it to render properly. It will also fallback to this material if the user overrides the visual quality setting for water's appearance in the Video options in-game.
== Constructions ==
Pour ajouter un volume d'eau suivez ces étapes :
# Créez un Brush avec le Block Tool de la taille du volume d'eau désiré.
# Ouvrez le '''Texture Browser'''
# Appliquez la texture <code>tools\toolsnodraw</code> à votre Brush.
# Sélectionnez la face supérieure du Brush.
# Dans  le '''Texture Browser''' filtrez en tapant <code>water</code> dans le champ filtre.
# Choisissez votre texture d'eau et appliquez la sur la surface supérieurs de votre Brush.
# Compilez et lancez votre map (avec VVis et Vrad).


== Requirements ==
To make it perform efficiently, water also has a collection of rules regarding its placement and usage inside of a map.


* There may be only one water level height in a [[PVS]] if the water is expensive.
== Cubemaps et water ==
* "Expensive" and "cheap" water may not be used simultaneously in the same [[PVS]].
Les cubemaps sont important pour l'eau. Sur les carte vidéo inférieurs à DX9, il n'est possible de rendre en temps réels les réflexions à la surface de l'eau. L'entité env_cubemap permet de résoudre ce problème
* The water's surface should never slope in the Z-axis; it should always be parallel to the horizon line in a map.
* Water is created by applying a water material to the top-most surface of a brush, while covering the remaining faces with the <code>tools\toolsnodraw</code> material.
* The [[water_lod_control]] entity controls the distance at which expensive water transitions into cheap water.
* An [[env_cubemap]] entity must be present for the water surface to render properly on sub-DX9 hardware.


{{note|Water is ''not'' a brush entity, and should not be attached to an entity. Water brushes included in any brush entity will not render correctly.}}
# Ajoutez une entité {{L|env_cubemap}} à la surface de l'eau, au centre.
# Dans les propriété de l'entité cliquez sur '''Pick...''' et sélectionnez la surface de l'eau.
# Compilez et lancez votre map. Dans la console, tapez <code>buildcubemaps</code>. Cela va créer votre cubemap et l'enregistrez dans le BSP.


== Construction ==
To add a water volume to your level, follow these steps:


# Create a brush the size of the water volume using the Block Tool.
{{ACategory|Level Design}}
# Open the '''Texture Browser''' by clicking the '''Browse''' button on the Texture Bar.
{{ACategory|Tutorials}}
# Double-click the <code>tools\[[tool textures#nodraw|toolsnodraw]]</code> material in the Texture Browser.
{{ACategory|Water}}
# With your water brush selected, click the Apply Current Texture button to assign the <code>tool textures|tools\toolsnodraw</code> material to the whole brush.
# Select the Texture Application tool, which opens the '''Face Edit''' mode.
# Left-Click the top face of the water brush in the 3D view to select it.
# Click '''Browse''' to bring up the '''Texture Browser''' again.
# Type <code>water</code> into the '''filter''' field. This will show you all materials with the keyword <code>water</code> in their name.
# Select a water material to apply by double-clicking it. One water material to try is <code>nature/water_canals_water2</code>.
# Click the '''Apply''' button on the '''Face Edit''' panel.
# The brush should have water correctly applied. Compile and run your map (with VVis and VRad enabled) to test it.
{{note|In order for water surfaces to render correctly, it is necessary for your map to have a skybox.}}


== Cubemaps and water ==
{{ACategory|Level Design}}
Cubemaps are important to use with water surfaces. On lower than DX9 level video cards, it is not possible to render the real-time reflective water shader. For these cards, an [[env_cubemap]] entity provides the pre-calculated environment map use to render water on sub-DX9 cards.
{{ACategory|Tutorials}}
 
{{ACategory|Water}}
Adding a [[env_cubemap]] to water surfaces:
 
# Add an [[env_cubemap]] entity using the Entity Tool.
# Place the [[env_cubemap]] above the top surface of the water, near the center.
# Double-click the [[env_cubemap]] in the 3D view to bring up the Object Properties dialog.
# Click on the '''Brush faces''' key in the '''Object Properties'''.
# Click the '''Pick...''' button. The mouse cursor will change to the eye dropper icon.
# Click the top water face to select it with the eyedropper. The face will highlight in red, to show it has been associated with the [[env_cubemap]] entity.
# Close the '''Object properties''' dialog.
# Compile and run your map. After the map is loaded, open the developers console and type <code>buildcubemaps</code>. The engine will calculate an environment map for each [[env_cubemap]] entity, and save the data into the [[BSP]] file.
 
 
== Creating water materials ==
See [[Material Creation]] for general information on creating your own materials, and see [[Water_Shader|Water Shader]] for specific information on how to create water materials.
 
<!-- SDK nuts has closed. When (and if) these tutorials are ported onto the VDC, please link to them instead!
== External links ==
* [http://www.sdknuts.net/akg/tutorials/wiseWaters.asp SDK Nuts - Water crash course]
* [http://www.sdknuts.net/akg/tutorials/wiseWaters17.asp SDK Nuts - Water textures illustrated]
-->
 
[[Category:Level Design Tutorials]]

Latest revision as of 03:30, 22 August 2024

English (en)Français (fr)Русский (ru)中文 (zh)Translate (Translate)

Règles/Restrictions

Pour créer de l'eau efficacement vous devez respecter plusieurs règles qui dépendent de son placement et de son usage :

  • Il doit y avoir seulement un niveau d'eau (semblable au niveau de la mer) dans le même PVS(en) si l'eau est expensive.
  • L'eau "Expensive" et "cheap" ne peuvent pas être utilisé simultanément dans le même PVS(en).
  • la surface de l'eau doit être parallèle à l'horizon et non verticale (Axe-Z).
  • L'eau est créée en appliquant un matériau "water" à la surface d'un Brush, les autres faces doivent être recouverte de la texture tools\toolsnodraw.
  • L'entité water_lod_control(en) contrôle le LOD (diminue la qualité à partir de la distance choisie).
  • L'entité env_cubemap(en) doit être présente à la surface de l'eau pour générer des réflexions sur les systèmes inférieurs à DX-9.
  • Il dois y avoir un skybox.
  • Il n'est pas possible de modifier la densité de l'eau, pour par exemple simuler de l'huile, de la boue....
  • Tous Leak entrainera des problèmes de rendu (eau invisible,par exemple).


Note.pngNote:L'eau ne doit pas être attachée à une entité, ceci pourrait engendrer des problème de rendu.

Constructions

Pour ajouter un volume d'eau suivez ces étapes :

  1. Créez un Brush avec le Block Tool de la taille du volume d'eau désiré.
  2. Ouvrez le Texture Browser
  3. Appliquez la texture tools\toolsnodraw à votre Brush.
  4. Sélectionnez la face supérieure du Brush.
  5. Dans le Texture Browser filtrez en tapant water dans le champ filtre.
  6. Choisissez votre texture d'eau et appliquez la sur la surface supérieurs de votre Brush.
  7. Compilez et lancez votre map (avec VVis et Vrad).


Cubemaps et water

Les cubemaps sont important pour l'eau. Sur les carte vidéo inférieurs à DX9, il n'est possible de rendre en temps réels les réflexions à la surface de l'eau. L'entité env_cubemap permet de résoudre ce problème

  1. Ajoutez une entité env_cubemap(en) à la surface de l'eau, au centre.
  2. Dans les propriété de l'entité cliquez sur Pick... et sélectionnez la surface de l'eau.
  3. Compilez et lancez votre map. Dans la console, tapez buildcubemaps. Cela va créer votre cubemap et l'enregistrez dans le BSP.