Делаем отражения в воде для DirectX 8.0, 8.1
Открываем файл Sewer_Water001.vmt:
"Water"
{
 "Water_DX60"
 {
  "$fallbackmaterial" "nature/water_canals03_dx70"
 }
 "Water_DX80"
 {
  "$refractamount" ".25"
 }
 "Water_DX81"
 {
  "$refractamount" ".25"
 }
 // Make this water expensive no matter what the water_lod_control entity
 // says.
 "$forceexpensive" 1
 // Make the water reflect entities.  By default, no entities are
 // reflected
 //"$reflectentities" 1
 // Make this water cheap no matter what the water_lod_control entity
 // says.  This'll ignore $reflecttexture and $refracttexture.
 // Reflections will happen with $envmap, and refraction is assumed
 // to be opaquely the water fog color.
// "$forcecheap" 1
 // This says what texture to use to view this is Hammer.
 "%tooltexture" "dev/water_normal"
 // If this is set, we want real-time refraction
 "$refracttexture" "_rt_WaterRefraction"
 // This is the amount of warp for the refraction.
 "$refractamount" "3.0"
// "$refractamount" "0.0"
 // This is the color of the refraction
 // This is going away so that edge transitions don't screw up.
 // Always set to white for now.
 "$refracttint" "[1.0 1.0 1.0]"
 // If this is set, we want real-time reflection.
 // If this isn't set, you'll use an envmap, which needs to be set here.
// "$reflecttexture" "_rt_WaterReflection"
 // This is for cheap reflections.  Point env_cubemaps entities at
 // each major water area.
 "$envmap" "env_cubemap"
 // This is the amount of warp for the reflection.
 "$reflectamount" "0.2"
 // This is the color tint for the real-time reflection AND env_cubemap.
 "$reflecttint" "{255 255 255}"
 // WTF?
 "$scale" "[1 1]"
 // This is the dudv map for the water.  It is generated from a normal map.
 "$bumpmap" "dev/water_dudv"
 // This is the normal map for the water.
 "$normalmap" "dev/water_normal"
 // This is needed for the tools
 "%compilewater" 1
 // This is needed for physics, etc.
 "$surfaceprop" "water"
 // You must have this. . this is a material that is practically identical
 // to this one in most cases.  It must have $reflecttexture disabled, and
 // you can set for params uniquely for underwater.
 "$bottommaterial" "nature/sewer_water001_bottom"
 // This is needed for the proxy below which animates the normal map, etc.
 "$bumpframe" "0"
 // Enable water volumetric fog.
 "$fogenable" 1
 // This is the color of the fog in the water when looking from above.
 // You'll have the same thing in the bottom material for when looking from
 // below.
 "$fogcolor" "{45 45 35}"
 // This is the distance in inches from the eye which water fog starts.
 // This has to be 0.0 for edge fading to work properly.
 "$fogstart" 0.00
 // This is the distance in inches from the eye which water fog ends.
 "$fogend" 250.00
 "$abovewater" 1 
 "Proxies"
 {
  "AnimatedTexture"
  {
   "animatedtexturevar" "$normalmap"
   "animatedtextureframenumvar" "$bumpframe"
   "animatedtextureframerate" 20.00
  }
  "TextureScroll"
  {
   "texturescrollvar" "$bumptransform"
   "texturescrollrate" .05
   "texturescrollangle" 45.00
  }
  "WaterLOD"
  {
  }
 }
}
Далее в разделы Water_DX81 или Water_DX80, соответственно DirectX 8.1 и DirectX 8.0, должны содержать следующие строки:
"$reflecttexture" "_rt_WaterReflection"
  "$reflectentities" 1
  "$refractamount" ".25"
Если каких то не хватает то добавляем.
Также изменяем параметр $fogstart с 0 на 1.
Следующие параметры отвечают за скорость движения текстуры.
Изменяем параметр "animatedtextureframerate" с 20 на 16.
Изменяем параметр "texturescrollrate" с 0.5 на .01
Соответственно поступаем с другими текстурами:
1. Sewer_WaterDarkFog.vmt
2. Sewer_WaterDarkFog2.vmt
3. water_canals_cheap001.vmt
4. water_canals_city.vmt
5. water_canals_city_murky.vmt
6. water_canals_water_clear.vmt
7. water_canals_water_murky.vmt
8. water_canals_water2.vmt
9. water_canals03.vmt
10. water_lowdirty001.vmt
11. water_lowdirty002.vmt
12. water_lowmurkref.vmt
13. water_wasteland002a.vmt
14. water_wasteland002b.vmt
15. water_wasteland002c.vmt
Не обязательно выставлять те значения, которые здесь указаны. Для одних текстур лучше подойдут одни значения параметров, а для других другие. Можно также изменять параметр "$refractamount" ".2". Можно провести огромное количество экспериментов и каждый раз будем получать разный результат.
Источник: Source Inside

Автор: DomenER

CMT (CS Mapping Tutorials) - © 2006-2011+. Created by VM
[ Script Execution time: 0.005 ]