Page 1 of 1

how to make water or fog

Posted: Thu Jun 17, 2004 9:37 pm
by gecko753
ive had some people asking me how to create water and fog, so heres a little tut on how. please please please if u see something wrong or know more info about this, tell me and ill try to update it. im not the greatest at this but i figured people might like to know how

read sect IV if you just wanna make normal fog.. (im not a very organized writer)

I Creating your water image
1. draw water surface on an image that has power of 2 dimensions (64x64, 128x128...)
2. create alpha map for it
3. save as a .tiff in your levels\test\"mapname"\bitmaps folder
i suggest saving it with a file name of "mapname"_water.tiff (replace "mapname")
4. run tool.exe with the following prompt:
tool bitmap levels\test\"mapname"\bitmaps\"mapname"_water
5. open up the newly created tag for this bitmap in guerilla
6. under format, change "compressed with color-key tra" to compressed with explicit alpha"
7. save and close the tag

II Creating a shader for the water bitmap
1. open up guerilla
2. open up an existing water shader, such as levels\test\deathisland\shaders\distant water.shader_transparent_water
3. click save as... and save it in levels\test\"mapname"\shaders with the same name as the .bitmap file (just to keep things simple)
4. in the shader_transparent_water tag, click the "..." next to base map to find and select the .bitmap tag that will be used
5. right below that, click the blueish colored box next to "view perpenicular tint color" and change it to whatever you want. (not sure what it does yet)
6. save and close the tag

III Creating the fog plane in 3ds for the water
1. open up the desired level in 3dsmax
2. in the material editor, create a new material and name it "mapname"_water!$
the ! makes the plane have no collision, and the $ makes it recognized by halo and sapien as a fog plane
3. click make viewable and whatnot like you usually do for textures
4. create a plane in your level at the desired altitude you want the water to come up to.
make the plane go past the ends of where you want the water to be
5. select your level box and attatch the plane to it with the edit mesh "attatch" button
6. select the plane's faces and apply the water image to it
7. export the map as .jms
8. run tool.exe like usual using the structure command

IV Creating a .fog tag to be used for water or fog
1. open up guerilla
2. open an existing .fog tag, such as levels\test\deathisland\water.fog
3. click save as... and save to your maps main tag folder
i suggest saving it as something like "mapname"_fog.fog or ""_water_fog.fog
4. if the fog is going to be used as water, selest the "is water" box near the top
5. edit the 4 density values to suit your needs. look around for other .fog tags for different levels to see what kind of values you want there
6. under color, click the colored box to chose the color your fog will be
7. i dont really know what the rest of the values in the .fog tag do, but you can fool around with them if you like
8. save and close the tag

V Applying the fog to the water area in sapien
1. open up sapien and select your map's .scenario tag
2. run radiosity
3. in the hierarchy window, go to Mission > Cluster Properties > Palettes > Fog Pallette
4. click "new instance"
5. select this new instance and in the properties window, give it a name something like, water, or fog.
6. click "..." next to fog to find and select the .fog tag you made for the level
7. in hierarchy, open up the Fog folder which is on the same level as Palettes
if you are adding water fog, you will see a red outline on the edges of the area that will contain water
8. in the properties window, select the fog you just added to the fog palette
the red outline should turn green now
9. click save scenario_structure_bsp
10. run tool.exe like normal using build-cache-file prompt

VI What to do differently for adding fog only.
1. do not make a .tiff file or .bitmap tag or shader or anything
2. in 3ds in the material editor, use the name +unused!$ for the material
this way the plane has no image or collision model and is still a fog plane
3. remember that which way you have the faces of the fog plane matters. if you have them facing up, then the fog will be below the plane. if you have the faces facing down, the fog will be above it
4. in guerilla, do not check "is water" (duh)

umm ok i think that is about it...

Posted: Fri Jun 18, 2004 2:04 am
by KappaX
great topic. gj

Posted: Fri Jun 18, 2004 9:34 am
by clappro33
thank you, thats just what i needed for my map. are there any water bitmaps already made? there is some stuff in b30 but i dont know what to use...

Posted: Fri Jun 18, 2004 12:49 pm
by SteelixB
Ok, I'm having a bit of a problem, I've just done all of the above to make a fog plane and water. I think I've done it correctly, the map works fine in tool, then i load it into Sapien, i see the water fine.

However after i set the radiosity_quality to 0 and type radiosity_start and press enter, it freezes, with no error, no close down, nothing in debug.txt... It was working fine earlier too. I think it may have something to do with the size of the plane (probably not), so how big should the plane be? I know it cant be anything wrong with the shaders, as I set those up exactly the way you said

Posted: Fri Jun 18, 2004 10:09 pm
by TheMissingLink117
THANK YOU!!!!!!!!!!!!!!!! This is EXACTLY what I have been looking for. I haven't read it but THANK YOU.

I agree with clappro. I wan't to find the water bitmap that is used in levels like Death Island and Blood islands.

If you are going to make another tut, I would suggest how to make the water near the beach be waves by making the bitmap scroll. It said to do this in the HEK tutorial but I didn't see where it said how.

Posted: Sat Jun 19, 2004 3:22 am
by SteelixB
right, i figured out why it wasnt running radiosity, the problem is it didn't like my 240,000 unit surface underwater. I've had a look at the death island map and that is about 240,000 units wide too. Please help, i don't know how big to make the underwater surface! I made it much smaller and applied the fog, but it looks wierd cos only the area around the map looks darker with fog.

Posted: Sat Jun 19, 2004 6:55 am
by MJBoa
Damnit, all I was doing wrong was I didn't add the ! to the material name.

Posted: Thu Jun 24, 2004 4:45 pm
by andrew matlock
Thanks... I'm making Omaha Beach which is very foggy and watery. You tut was great help!