Fr/Adding Water: Difference between revisions

From Valve Developer Community
< Fr
Jump to navigation Jump to search
No edit summary
m (obsolete language category)
 
(31 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{LanguageBar}}


== Requirements ==
== Règles/Restrictions ==
To make it perform efficiently, water also has a collection of rules regarding its placement and usage inside of a map.
Pour créer de l'eau efficacement vous devez respecter plusieurs règles qui dépendent de son placement et de son usage :


* There may be only one water level height in a [[PVS]] if the water is expensive.
* 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.
* "Expensive" and "cheap" water may not be used simultaneously in the same [[PVS]].
* L'eau "Expensive" et "cheap" ne peuvent pas être utilisé simultanément dans le même {{L|PVS}}.
* The water's surface should never slope in the Z-axis; it should always be parallel to the horizon line in a map.
* la surface de l'eau doit être parallèle à l'horizon et non verticale (Axe-Z).
* 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.
* 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>.
* The [[water_lod_control]] entity controls the distance at which expensive water transitions into cheap water.
* L'entité {{L|water_lod_control}} contrôle le LOD (diminue la qualité à partir de la distance choisie).  
* An [[env_cubemap]] entity must be present for the water surface to render properly on sub-DX9 hardware.
* 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).


{{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.}}


== Construction ==
{{note|L'eau ne doit pas être attachée à une entité, ceci pourrait engendrer des problème de rendu.}}
To add a water volume to your level, follow these steps:


# Create a brush the size of the water volume using the Block Tool.
== Constructions ==
# Open the '''Texture Browser''' by clicking the '''Browse''' button on the Texture Bar.
Pour ajouter un volume d'eau suivez ces étapes :
# Double-click the <code>tools\[[tool textures#nodraw|toolsnodraw]]</code> material in the Texture Browser.
# Créez un Brush avec le Block Tool de la taille du volume d'eau désiré.
# 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.
# Ouvrez le '''Texture Browser'''  
# Select the Texture Application tool, which opens the '''Face Edit''' mode.
# Appliquez la texture <code>tools\toolsnodraw</code> à votre Brush.
# Left-Click the top face of the water brush in the 3D view to select it.
# Sélectionnez la face supérieure du Brush.
# Click '''Browse''' to bring up the '''Texture Browser''' again.
# Dans  le '''Texture Browser''' filtrez en tapant <code>water</code> dans le champ filtre.
# Type <code>water</code> into the '''filter''' field. This will show you all materials with the keyword <code>water</code> in their name.
# Choisissez votre texture d'eau et appliquez la sur la surface supérieurs de votre Brush.
# Select a water material to apply by double-clicking it. One water material to try is <code>nature/water_canals_water2</code>.
# Compilez et lancez votre map (avec VVis et Vrad).
# 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 ==
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.


Adding a [[env_cubemap]] to water surfaces:
== 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


# Add an [[env_cubemap]] entity using the Entity Tool.
# Ajoutez une entité {{L|env_cubemap}} à la surface de l'eau, au centre.
# Place the [[env_cubemap]] above the top surface of the water, near the center.
# Dans les propriété de l'entité cliquez sur '''Pick...''' et sélectionnez la surface de l'eau.
# Double-click the [[env_cubemap]] in the 3D view to bring up the Object Properties dialog.
# Compilez et lancez votre map. Dans la console, tapez <code>buildcubemaps</code>. Cela va créer votre cubemap et l'enregistrez dans le BSP.
# 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 ==
{{ACategory|Level Design}}
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.
{{ACategory|Tutorials}}
{{ACategory|Water}}


<!-- SDK nuts has closed. When (and if) these tutorials are ported onto the VDC, please link to them instead!
{{ACategory|Level Design}}
== External links ==
{{ACategory|Tutorials}}
* [http://www.sdknuts.net/akg/tutorials/wiseWaters.asp SDK Nuts - Water crash course]
{{ACategory|Water}}
* [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.