View Full Version : [Shader] Halo 2 Water
Roostervier
July 11th, 2007, 11:53 PM
I am just going to release this to the general public so that anyone may have an example of a decent water shader. Feel free to edit it and use as you please, no credit is needed as I doubt anyone will be able to tell if you ripped me off of it anyway since it is water. I hope this helps anyone that is in need, and also, I need a permanent host. Is anyone interested?
Here is the file:
http://rapidshare.com/files/42413146/vindication_water.shader
Permanent Links:
http://www.halonews.org/stuff/vindication_water.shader
Provided Generously by Baturkin.
Here are the instructions to making it, as so generously provided to us by "bum has knife."
basic water pool shader:
-create a new shader and use the "water_pool" shader template.
-apply the liquid_thin_water material in the material_name field
-make sure the water flag is checked
-use the default dynamic_light_specular_type and set your lightmap_specular_brightness to 1
-attach your favorite animated water bitmap, experiment with the scale and translation values (they should be constant functions so you just tweak the numbers)
-bump_map_index, this should be an identity function, and you want it to cycle through all the bitmaps in your bump map plate, so if you have 15 total images it should be set to go from 0 to 14, a time period of .5 seconds works well.
-reflection map: get yourself a cubemap of your level; around where your water is located
-don't worry about the refraction map, you can leave it blank
-apply a fresnel bitmap, the alpha of this map will determine how transparent the water is
-i'm not very knowledgeable about the lightmap translucency section so you can experiment with this and post what results you're seeing, in general, you want to use a color white, with a black alpha bitmap, set the color to the color you want the ground beneath the water to kinda look like and set the translucent_alpha to 0
Credits:
bum has knife - the instructions
kornman00 - the sp/mp bitmap packs
My notes:
Do mostly what bum says, including the light map translucency map. Also, make sure you uncheck the UNUSED flag in kornmans bitmaps. When tiling, keep in mind, 0.2 is quite large actually. If you want it for a small little pool, I'd make it 0.1 or lower. I had a hard time figuring out scale when I kept lowering it. It didn't lower until I started going down from 1 to 0. Make sure, in the bump map index slot, that you make it identity. Leaving it as constant will result in your bitmap not animating. Yet another problem I had answered by bum. Anyway, I hope this helps the community, have fun with it.
Pic(s):
Original
http://i62.photobucket.com/albums/h86/flyinrooster/water2.jpg
Lightened Version (lightened compliments of baturkin)
http://img247.imageshack.us/img247/4031/water2qd4lq8.jpg
An underwater shot (Showing off the Real Time Refractions)
http://img96.imageshack.us/img96/5635/underwaterir6.jpg
Kornman00
July 12th, 2007, 11:22 AM
Just PM the next time you (or someone else) has something serious to be released, and I'll priority the approval.
Roostervier
July 12th, 2007, 11:33 AM
Ok, thanks. Baturkin provided one permanent link, I will edit my post.
Ki11a_FTW
July 12th, 2007, 05:17 PM
yes,finally
CrippieBoy
July 12th, 2007, 06:30 PM
Thank you sir
AAA
July 12th, 2007, 08:05 PM
umm...in the lightened version of the water. you increased gamma or something. compare the Vista Start Menu Bar. =\ This for real? cause I feel as though I'm not buying.
Hurrvish
July 12th, 2007, 08:16 PM
IF you read, flyinrooster did say that baturkin brightened it, and if you compare both pictures, the time and the items on the taskbar are the same.
Roostervier
July 12th, 2007, 08:21 PM
Yes, kornman00 thought the picture was too dark so baturkin simply lightened my picture up. It's not a lighter version of the water.
Kornman00
July 13th, 2007, 11:48 AM
First picture is lost now :-3.
Roostervier
July 13th, 2007, 12:46 PM
Boo! Hold on, I will reupload it.
[edit] Fixed. Also, I think, once lightning can host it, I will make it a rar with all the .bitmaps I used and the shader. I may upload it to halomaps too.
StankBacon
July 13th, 2007, 08:10 PM
nice :D
Con
July 14th, 2007, 11:42 AM
Thanks!
Resinball
July 15th, 2007, 07:04 AM
I have a water Plane that appears in game, but I'm not sure what Shader Symbols to throw in with the material name to get the water to show on both sides, with water splashes (only on top) and no collision.
I have tried %, $, ? and ! (separately) with varying results but not what I need.
Also, I really appreciate the supportive and intelligent community you have going on here, so I finally registered and will be releasing my betas (alphas?) soon enough.
Roostervier
July 15th, 2007, 02:22 PM
First post has been updated with and in game screen-shot showing off the Real Time Refractions ^^. The only bad thing is that it is hard to tell you are under water unless you see it in real time.
Dr Dmoney
July 15th, 2007, 05:02 PM
First post has been updated with and in game screen-shot showing off the Real Time Refractions ^^. The only bad thing is that it is hard to tell you are under water unless you see it in real time.
Yeah, Is there a way to make everything look a little darker when you are underwater. It would be very cool because I want to make a part of a map an underwater map; it would be even more spectacular if you made the water have little bubbles come up when your underwater. These are just ideas that could make a map even cooler, and less of a way to camp underwater inside maps that have underwater parts to them.
And you did a great job... Keep up the fantastic work!!!
Roostervier
July 15th, 2007, 05:11 PM
Yes, just add fog to the water. It is something I haven't really messed with yet, but will in the future.
Roostervier
July 16th, 2007, 05:07 PM
Forgive the double post, but it has come to my attention of something a bit confusing. There are two sections that say water.bitmap. Both the bump map section and reflection map section. I did not use the same bitmap in both. I used a cubemap named the same thing. Just for those who may have been confused.
Ki11a_FTW
July 16th, 2007, 05:39 PM
-me-
Resinball
July 16th, 2007, 05:53 PM
I am also curious about the Lightmap_Translucency_Map:
lightmap_translucency.bitmap
because I seem to be missing it and it is not included in either of the collections that kornman00 released, am I supposed to use another bitmap?
Roostervier
July 16th, 2007, 06:02 PM
Just make a white bitmap with a black alpha. All i did was open photoshop, made a new image 128^, went to channels, hit make new, saved, compiled with explicit alpha, and I was finished.
Resinball
July 16th, 2007, 06:21 PM
Thankx rooster, the only thing I didn't follow was how to compile with explicit alpha.
* I found the the explicit alpha format setting in guerilla.
Floppy
July 22nd, 2007, 11:55 AM
I have some problems with the shader.It don't look like water more like a mirror and if i try to packaging the map the program crash if it is at the shader:(. I didn't change any values of the shader.
Bitmaps i used:
bump_map: scenarios\bitmaps\water\water
reflection_map: scenarios\bitmaps\reflection_maps\earthcity_sky (temporary)
fresnel_map: scenarios\bitmaps\water\fresnel
lightmap_translucency: I used http://image-upload.biz/files/3f27da6b43f78a1b0db1a203b.tif
Sorry, my english is bad:D
crashing program:
http://img522.imageshack.us/img522/3686/crashkz4.th.jpg (http://img522.imageshack.us/my.php?image=crashkz4.jpg)
Water/Mirror:
http://img230.imageshack.us/img230/5731/waterec6.th.jpg (http://img230.imageshack.us/my.php?image=waterec6.jpg)
Roostervier
July 22nd, 2007, 12:13 PM
Make sure the UNUSED flag in the bitmap file is unchecked.
Floppy
July 22nd, 2007, 12:30 PM
Damn. I love you:jibbly:
Kornman00
July 23rd, 2007, 12:49 AM
Damn. I love you:jibbly:
:lmao:
That UNUSED flag annoys me, I just HAD to learn about it AFTER I posted the bitmaps -_-.
fletcher77
July 23rd, 2007, 03:29 PM
where can I get a fresnel_map or how do they look so I can create it.
Kornman00
July 23rd, 2007, 03:54 PM
Look for my thread where I released all the bitmaps for the game
fletcher77
July 23rd, 2007, 03:59 PM
I found the thread thanks
fletcher77
July 23rd, 2007, 05:06 PM
I just can't get it to be transparent I made my own Lightmap_translucency and used the fresnel_map
Roostervier
July 23rd, 2007, 07:46 PM
Is the UNUSED flag checked in any of your bitmaps? Did you follow bums instructions to the letter? We need details.
gamerzworld
July 24th, 2007, 12:30 AM
Just in case you need it...
http://gzwn.net/halo2/modding/vindication_water.shader
Anyway, nice job!
Floppy
July 24th, 2007, 04:56 AM
I have the same Problem.I played around with the fesnel but I don't get it transparent.
fletcher77
July 24th, 2007, 08:55 AM
Is the UNUSED flag checked in any of your bitmaps? Did you follow bums instructions to the letter? We need details.
http://img32.picoodle.com/img/img32/9/7/24/t_shaderm_08f7b97.jpg (http://www.picoodle.com/view.php?img=/9/7/24/f_shaderm_08f7b97.jpg&srv=img32)
I made my own Lightmap_translucency like you said how and used the fresnel_map that Kornman00 put out. and unchecked the bitmaps and made my own cubemap.
this part here I don't get (-bump_map_index, this should be an identity function, and you want it to cycle through all the bitmaps in your bump map plate, so if you have 15 total images it should be set to go from 0 to 14, a time period of .5 seconds works well.) I don't get the 15 total image thing I only loaded 1 bump map. How dose this work?
Roostervier
July 24th, 2007, 10:34 AM
It should be from 0 to 16.
Ki11a_FTW
July 24th, 2007, 04:27 PM
I fixed it easlily just use the following bitmap as a frensel
Scenarios\bitmaps\multi\headlong\bitmaps\ocean_pla ne.bitmap
Floppy
July 26th, 2007, 03:03 PM
Damn. I don't get the shader transaprent. The alpha of the fresnel bitmap should say how transparemt the shader is. I made some shaders to test it. The first one has a fresnel with a white alpha, the second one has a black alpha and the third one is the standart fresnel. Why are my shaders not transaparent?:( No UNUSED flag is checked.....
http://img78.imageshack.us/img78/2342/suckskopiekopieqb0.th.jpg (http://img78.imageshack.us/my.php?image=suckskopiekopieqb0.jpg)
SuperSunny
July 27th, 2007, 03:13 AM
Damn. I don't get the shader transaprent. The alpha of the fresnel bitmap should say how transparemt the shader is. I made some shaders to test it. The first one has a fresnel with a white alpha, the second one has a black alpha and the third one is the standart fresnel. Why are my shaders not transaparent?:( No UNUSED flag is checked.....
http://img78.imageshack.us/img78/2342/suckskopiekopieqb0.th.jpg (http://img78.imageshack.us/my.php?image=suckskopiekopieqb0.jpg)
That...is odd. Maybe there is something else you need to check?
Roostervier
July 27th, 2007, 07:59 PM
I am back! Anyway, I used the standard fresnel map (IIRC). Make sure your lightmap_translucency map is white with black alpha.
Floppy
July 28th, 2007, 05:09 AM
That's weird:iiam:. It makes no differents if I use a white lightmap_translucency with black alpha, a black lightmap_translucency with white alpha or no lightmap_translucency. It would be great if someone would check this lightmap_translucency (http://image-upload.biz/files/382ac135629826f5dca339303.tif) if it is correct.:)
l SINERGY l
August 6th, 2007, 12:54 PM
Yea i'm having this same problem with my water as well. It just comes out looking like a mirror.
jngrow
August 7th, 2007, 06:00 PM
Damn. I don't get the shader transaprent. The alpha of the fresnel bitmap should say how transparemt the shader is. I made some shaders to test it. The first one has a fresnel with a white alpha, the second one has a black alpha and the third one is the standart fresnel. Why are my shaders not transaparent?:( No UNUSED flag is checked.....
http://img78.imageshack.us/img78/2342/suckskopiekopieqb0.th.jpg (http://img78.imageshack.us/my.php?image=suckskopiekopieqb0.jpg)
Yep. I always get 3. I've been screwin around with it forever. And When I make a plane, I can only walk on top of the water. How would I be able to go "in" it?
l SINERGY l
August 8th, 2007, 12:59 AM
Add a ! to the end of your material name in 3ds max, so it would be something like: mylev water!
(et_cg showed me that :))
jngrow
August 8th, 2007, 01:03 AM
Add a ! to the end of your material name in 3ds max, so it would be something like: mylev water!
(et_cg showed me that :))
huh, everywhere else instructed me to use a %. Thanks for the tip!
Sigh, none of this is working. I suck, have been at it for hours. Can someone PLEASE post a step-by-step tutorial on how to use water? Like is the plane called +media, or the sub-mat, where should I put shader symbols, etc.
l SINERGY l
August 9th, 2007, 01:37 PM
Yea ! just makes it so there's no collision which is good for things like waterfalls but not good for pools of water.
*edit* NVM im an idiot. Use % not !.
Roostervier
August 10th, 2007, 11:48 AM
I use ! and ?
! - collisionless, render only
? - double sided transparent
l SINERGY l
August 10th, 2007, 12:29 PM
Hmm I just used %! for a waterfall and it worked fine.
johnnyblaz20
September 25th, 2007, 10:37 PM
I'm having trouble making my water splash when a bullet or anything comes in contact with it. any tips??
heres my water so far
DOES IT LOOK OKAY?
http://img354.imageshack.us/img354/1748/waternm0.png
Vicky
October 30th, 2007, 08:54 PM
Your water looks very similar to mine, i don't know how to make it splash like the water on zanzibar for example, maybe it's just an effect. On zanzibar the water surface and the bottom react as water when shot at.
Anywho, do you have fog on your map by any change? I got fog on mine but there is no fog over the water. So the land is covered in fog at some distance but the water is still clear at that distance. Any thoughts?
johnnyblaz20
November 3rd, 2007, 07:32 PM
I have a fog plane placed 5 max units below my water, and the fog does cover another area on my map but it works out awsome for me. It perfectly covers the ground in my underground base.
For some reason now this water splashes when i shoot it but still does not splash when i walk through it or drive through it but oh well. Maybe its an effect like you said but I can not figure it out as of now.
Vicky
November 3rd, 2007, 09:01 PM
Actually i meant sky/air fog not for underwater... that looks fine now. You can see it in my avatar, hills on the right are foggy but at that distance the water is still clear, no fog whatsoever.
johnnyblaz20
November 3rd, 2007, 09:03 PM
Thats a real thin looking fog.
Vicky
November 4th, 2007, 03:24 AM
It's a very small picture...
I'll post a screenshot where it's better visible.
Vicky
November 4th, 2007, 09:39 AM
http://www.h2vista.net/forums/%5BIMG%5Dhttp://i9.tinypic.com/4q54a3l.jpg%5B/IMG%5Dhttp://i9.tinypic.com/4q54a3l.jpg
Ok, so the fog turns opaque at the green line but there's no fog over the water.. any way to do that?
johnnyblaz20
November 4th, 2007, 05:24 PM
Thats not right. a fog plane should cover everything below it in all directions unless you wanna get more complex. I'll mess around but i cant help you now. Maybe it has something to do with the shaders, like the water shader beating the fog shader with a stick. lol,
Vicky
November 4th, 2007, 06:48 PM
I mean the skyfog, not the underwater stuff... i've got that covered.
johnnyblaz20
November 4th, 2007, 08:45 PM
yeah. Its funny though how your fog just stays away from your water.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.