Fr/Adding Water: Difference between revisions

From Valve Developer Community
< Fr
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:
* L'entitée [[env_cubemap:fr|env_cubemap]] doit être présente à la surface de l'eau pour générer des reflections sur les sytèmes inférieurs à DX-9.
* L'entitée [[env_cubemap:fr|env_cubemap]] doit être présente à la surface de l'eau pour générer des reflections sur les sytèmes inférieurs à DX-9.


{{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.}}
{{note|L'eau ne doit pas être attaché à une entitée, ce qui peut engendrer des problème de rendue.


== Construction ==
== Construction ==
To add a water volume to your level, follow these steps:
Pour ajouté un volume d'eau suivez ces étapes :
# Créer un Brush avec le Block Tools de la taille du volume d'eau désiré.
# Ouvrez le '''Texture Browser'''
# Aplliquez la texture <code>tools\toolsnodraw</code> à votre Brush.
# Selectionnez la face supérieurs du Brush.
# Dans  le '''Texture Browser''' filtrez en tapant <code>water</code> dans le champ filtre.
# Choisissez votre water et appliquez la surface supérieurs de votre Brush.
# Compilez votre map (avec VVis et Vrad).
 


# Create a brush the size of the water volume using the Block Tool.
# Open the '''Texture Browser''' by clicking the '''Browse''' button on the Texture Bar.
# Double-click the <code>tools\[[tool textures#nodraw|toolsnodraw]]</code> material in the Texture Browser.
# 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.
# 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.}}
{{note|In order for water surfaces to render correctly, it is necessary for your map to have a skybox.}}

Revision as of 03:22, 22 November 2008

Règles

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 (senblable au niveau de la mer) dans le même PVS si l'eau est expensive.
  • L'eau "Expensive" et "cheap" ne peuvent pas être utilisé simulanément dans le même PVS.
  • la surface de l'eau doit être parrallèle à l'horizon et non vertical (Axe-Z).
  • L'eau est créer en appliquant un matériaux water à la surface d'un Brush, les autres faces doivent être recouverte de la texture tools\toolsnodraw.
  • L'entitée water_lod_control controle la transtion entre l'eau expensive/cheap.
  • L'entitée env_cubemap doit être présente à la surface de l'eau pour générer des reflections sur les sytèmes inférieurs à DX-9.

{{note|L'eau ne doit pas être attaché à une entitée, ce qui peut engendrer des problème de rendue.

Construction

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

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


  1. The brush should have water correctly applied. Compile and run your map (with VVis and VRad enabled) to test it.
Note.pngNote: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:

  1. Add an env_cubemap entity using the Entity Tool.
  2. Place the env_cubemap above the top surface of the water, near the center.
  3. Double-click the env_cubemap in the 3D view to bring up the Object Properties dialog.
  4. Click on the Brush faces key in the Object Properties.
  5. Click the Pick... button. The mouse cursor will change to the eye dropper icon.
  6. 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.
  7. Close the Object properties dialog.
  8. Compile and run your map. After the map is loaded, open the developers console and type buildcubemaps. 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 for specific information on how to create water materials.