Contagion Guide

Water for Contagion for Contagion

Water for Contagion

Overview

This guide will help you to make a working water texture just for Contagion, since its stock ones doesn’t work.

Introduction

This guide will help anyone who is having problems with their water texture’s and/or want to have their own custom ones. You can also download my Sewer texture (.vmt’s only) since you will ONLY use 2 textures for the water, which is water_shared_dudv and water_shared_normal. You can download these 2 textures below within a zip.

The Required files

Download: [link]

The texture files
File name
Texture Preview
water_shared_dudv.vtf
water_shared_normal.vtf

Texture Creation

When we make a texture, we need to make a vmt file. But we also need a dx60 version of it, same with the beneath version (*_bottom.vmt).

Here is the raw .vmt format of water_sewer.vmt

“Water” { “Water_DX60” { “$fallbackmaterial” “nature/water_sewer_dx60” } “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” “nature/water_sewer” // If this is set, we want real-time refraction “$refracttexture” “_rt_WaterRefraction” // This is the amount of warp for the refraction. “$refractamount” “2.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” “[.9 1 .9]” // 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” “nature/water_shared_dudv” // This is the normal map for the water. “$normalmap” “nature/water_shared_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/water_sewer_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” “{25 25 15}” // 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” 200.00 “$abovewater” 1 “Proxies” { “AnimatedTexture” { “animatedtexturevar” “$normalmap” “animatedtextureframenumvar” “$bumpframe” “animatedtextureframerate” 20.00 } “TextureScroll” { “texturescrollvar” “$bumptransform” “texturescrollrate” .05 “texturescrollangle” 45.00 } “WaterLOD” { } } }

Look at the comments to understand what the code parameters are doing, and what they are supposed to do. Its mostly up to you to play around with the variables to get the amount of brightness, mood etc that you need for your water texture.

If you want more in depth what the stuff do, please head to the water article over at Valve Developer Wiki

The DirX 6 and down

The raw .vmt format of water_sewer_dx60.vmt

“LightmappedGeneric” { “$basetexture” “dev/water” “$color” “{120 148 166}” “$scale” “[1 1]” “$translucent” “1” // “$additive” “1” “%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/water_dx70_beneath” // 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” “{25 25 15}” // 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” 150.00 “$abovewater” 1 “$texoffset” “[0 0]” // The water generally looks better if we scale it down a bit “$texscale” “0.5” “Proxies” { “AnimatedTexture” { “animatedtexturevar” “$basetexture” “animatedtextureframenumvar” “$frame” “animatedtextureframerate” 20.00 } “TextureScroll” { “texturescrollvar” “$texoffset” “texturescrollrate” .025 “texturescrollangle” 45.00 } “TextureTransform” { “translateVar” “$texoffset” “scaleVar” “$texscale” “resultVar” “$basetexturetransform” } } }

Conclusion


That’s how the texture will look like after its done, pretty neat huh? Creating a water texture is pretty simple, and its very handy to know how to make them as well.

Water does not show!

A: Be sure you compiled the map with Normal VIS or Fast VIS.
B: Check if the vmt are properly set.

Where is the water_sewer.vtf??

I created that tool texture myself, you can use the water_shared_normal for your tool texture. I only created mine to make it easier for me to see trough the texture browser. But i provided a link below + previews of the textures.

File name
Texture Preview
water_sewer.vtf
water_sewer_bottom.vtf

Download: [link]

Download: [link]

SteamSolo.com