Fortress Forever

Go Back   Fortress Forever > Editing > Mapping

Reply
 
Thread Tools Display Modes
Old 07-24-2006, 11:09 PM   #1
o_vampiricus
 
o_vampiricus's Avatar
 
Join Date: Jul 2005
Location: San Diego
Posts Rated Helpful 0 Times
Water Reflection/Transparancy

I am by far no expert when it comes to mapping for HL2 so I was curious on reflective water and its Transparency.

Im assuming what makes it transparent is a simply a see-thru brush but when it comes to reflection, will this be part of the mod? If so, maybe someone can enlighten me on how this works. If im looking at a guy standing on the edge of a pool and I see his reflection, then see him fire a projectile which it too reflects, how/what kind of brush makes that possible? Also will it cause a major performance hit.

Back in the day when mapping for the first Unreal, I just mirrored the world and flipped it over then put a clear brush between, but the player models obviously would be absent.

Just looking for a few answers that have kinda been in my head for a while. TIA
o_vampiricus is offline   Reply With Quote


Old 07-24-2006, 11:13 PM   #2
o_jinx
 
o_jinx's Avatar
 
Join Date: Dec 2004
Location: Ohio
Posts Rated Helpful 0 Times
I'm not as good at Source stuff, but afaik:

I think you can do what you describe in Source, but from what I've heard transparent water is a bit laggy in online play..? I know it caused issues in HL1 at times. Most of what I read suggested using "cheap" water that didn't have these effects.

And reflections would definitely make a performance hit, especially in a spammy online game I would think.

TBH, in terms of gameplay I prefer water with an opaque surface. It makes the water a better refuge or escape route, and prevents players in the water from being quite so vulnerable.
o_jinx is offline   Reply With Quote


Old 07-25-2006, 12:15 AM   #3
o_ash
 
Join Date: Jul 2006
Posts Rated Helpful 0 Times
I want my sentry in the flagroom of Well to be able to target people in the water.

we can build it, we have the technology
o_ash is offline   Reply With Quote


Old 07-25-2006, 01:04 AM   #4
o_luminous
 
o_luminous's Avatar
 
Join Date: Jun 2005
Posts Rated Helpful 0 Times
the levels of reflectivity(new word? ) are customisable in the hl2 settings menu, you can decide whether its just the basic water, reflect world, or reflect all

not sure how it works though, i would guess that it does work as a mirror, but has a shader effect which gives it the water texturing and distortion?
o_luminous is offline   Reply With Quote


Old 07-25-2006, 04:04 AM   #5
o_nezumi
 
o_nezumi's Avatar
 
Join Date: Mar 2005
Location: The Peoples Republic of Harmfull Free Radicals
Posts Rated Helpful 0 Times
In terms of implementation, water in source is just 1 brush with a water material on the top, and usually nodraw on all the other surfaces. This brush doesn't need to be an entity (and I think the shaders actually screw up if it is. I'm not sure).

The water material itself calls a number of shaders, and defines things like the volume fog. Water can be reflective and/or refractive, which means that stuff under the water is distorted as by ripples in the water.

Water in source is typically 100% clear, meaning it doesn't use a texture, but gets it's color from the water fog or from what it's reflecting or what is being refracted through it. As far as I know, there's no simple way of making non-transparent water.

I think this means that making your own water should be pretty easy. You just call the right shader in the material and type in a few numbers for the fog values. I havent' actually tried it myself yet. I guess if you really wanted non-transparent water you could make a water shader that simply didn't render any surface properties then stick a non-solid vaguely watery-looking brush where you wanted your water surface to be. It'd probably look pretty out of place in a source game though.

HL2 has a bunch of standard water materials, some are more or less cheap. I generally just poke around untill I find one that looks good.
o_nezumi is offline   Reply With Quote


Old 07-25-2006, 06:22 AM   #6
PHISH
Retired FF Staff
 
Join Date: Dec 2004
Location: cow college
Posts Rated Helpful 13 Times
Quote:
As far as I know, there's no simple way of making non-transparent water.
You can just use cheap water as it's not transparent.

Look at a vmt file for water, and you'll see what values you can mess around with. You can change the color of the fog looking down into the water as well as the fog looking from underwater up. there are 3 values for these fogs maxxing in the format [r g b] with these values being between 0 and 255. The tints for reflection and refraction are between 0 and 1. You can also scale the reflectivity and refraction. Its usually setup to use realtime refraction/reflection with dx9, then there are fallbacks for dx8 using cubemaps for reflection, then dx7 and 6. Playing around with the water is quite simple because you don't have to compile your map each time. Just open up the vmt file in notepad or vtfedit, change some values and save the vmt, then alt tab back ingame and load your map. Just switch to some other map before each change so it reloads the vmt data and you can see the result.
PHISH is offline   Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:08 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.