Water Tutorial By Rippentuck (And Others)

Post everything from general questions, to modding questions, to map WIPs to releases. (SWBF1 only)

Moderator: Moderators

Jedi Admin
User avatar
Posts: 2186
Joined: Mon May 30, 2005 5:22 pm
Location: North Texas

Water Tutorial By Rippentuck (And Others)

Postby EraOfDesann » Sat Aug 27, 2005 11:27 am

Recently I've been working with water and was able to get it working properly thanks to this great tutorial that Rippentuck typed up. It's perhaps the best tutorial out there for getting water working. So, I thought I'd make it easy to access and hopefully this turns into a sticky.

Rippentuck's Water Tutorial

First you find a world that has water, such as Kashyyyk. Go to its world req file (under BFBuilder/Assets/Shipped Worlds/Kashyyyk). Find the section of that file that looks like this:

Code: Select all
REQN
{
"texture"
"platform=pc"
"water_bumpmap_0"
"water_bumpmap_1"
"water_bumpmap_2"
"water_bumpmap_3"
"water_bumpmap_4"
"water_bumpmap_5"
"water_bumpmap_6"
"water_bumpmap_7"
"water_bumpmap_8"
"water_bumpmap_9"
"water_bumpmap_10"
"water_bumpmap_11"
"water_bumpmap_12"
"water_bumpmap_13"
"water_bumpmap_14"
"water_bumpmap_15"

"water_normalmap_0"
"water_normalmap_1"
"water_normalmap_2"
"water_normalmap_3"
"water_normalmap_4"
"water_normalmap_5"
"water_normalmap_6"
"water_normalmap_7"
"water_normalmap_8"
"water_normalmap_9"
"water_normalmap_10"
"water_normalmap_11"
"water_normalmap_12"
"water_normalmap_13"
"water_normalmap_14"
"water_normalmap_15"

"water_specularmask_0"
"water_specularmask_1"
"water_specularmask_2"
"water_specularmask_3"
"water_specularmask_4"
"water_specularmask_5"
"water_specularmask_6"
"water_specularmask_7"
"water_specularmask_8"
"water_specularmask_9"
"water_specularmask_10"
"water_specularmask_11"
"water_specularmask_12"
"water_specularmask_13"
"water_specularmask_14"
"water_specularmask_15"
"water_specularmask_16"
"water_specularmask_17"
"water_specularmask_18"
"water_specularmask_19"
"water_specularmask_20"
"water_specularmask_21"
"water_specularmask_22"
"water_specularmask_23"
"water_specularmask_24"
}


Copy and paste this into your own world's req file, being careful to blend it into the same format so that it looks like it belongs there. Save and close the file. Then go to the Kashyyyk FX file (which is in BFBuilder/Assets/Shipped Worlds/Kashyyyk/World1 or World2 folder, depending on which one you want to use), and find the section that looks like this:

Code: Select all
Effect("Water")
{

// general parameters
PatchDivisions(8,8);
Tile(2.0,2.0);

// ocean parameters
OceanEnable(0);

// water event parameters
WaterRingColor(148, 170, 192,255);
WaterWakeColor(192, 192, 192,255);
WaterSplashColor((192, 192, 192,255);
OscillationEnable(0);

DisableLowRes();


// PC parameters
PC()
{
Velocity(0.01,0.02);
MainTexture("kam1_water.tga");
LODDecimation(1);

RefractionColor(0, 68, 80, 255);
ReflectionColor(200,200,200,200);
UnderwaterColor(0, 78, 60, 190);
FresnelMinMax(0.2,0.7)

NormalMapTextures("water_normalmap_",16,8.0);
BumpMapTextures("water_bumpmap_",16,8.0);
SpecularMaskTextures("water_specularmask_",25, 2.0);
SpecularMaskTile(4.0,4.0);
SpecularMaskScrollSpeed(0.0,0.0);
}


Copy and paste all of this into your own world's FX file(create one if you don't), again blending it into the format so it looks like the other things in there. You also have to have a main texture (it goes into the "MainTexture" value), so enter one from Kashyyyk, Kamino, or any other world with water. Save and close. Then go to where that texture is found (in one of the world folders of whatever world you chose) and copy/paste it into your World1 folder. You also need to check the effects folder of the world you chose, and copy/paste any water_bumpmap and water_specularmask files from there to your own effects folder. Once you've copied all the assets needed into your own folders, go into your editor and click on "Water" mode, and begin laying down water texture. Make sure your alpha value (which just helps you see it better) is set to around 200 or so, so that you can see the water tiles. You can play around with the other values after you get some water down. When you're done, save and munge, then copy into your game's addon folder, and try it.

Unless I forgot something, you should have water showing up.


Rip
Last edited by EraOfDesann on Sat Aug 27, 2005 6:26 pm, edited 1 time in total.

OOM-9

Postby OOM-9 » Sat Aug 27, 2005 11:56 am

*crosses fingers after using these values for his ARC: Theed Estate map.*

please work please work please work please work please work




*gets angry and tosses CPU out of nearby window...*

LoL it still doesn't fix my problem... *sighs* must not be my water then. Thanks for the post, that's all I remember there needing to be also. I prolly have some other error and need to stop blaming my water.

:)

Brigadier General
User avatar
Posts: 629
Joined: Thu Jun 23, 2005 6:06 am

Postby Jawa_Killer » Sat Aug 27, 2005 12:14 pm

ähm i think there is a better tutorial in german :D :D but 2 things!

1.the section with REQN
{
"texture"
"platform=pc"
"water_bumpmap_0"
"water_bumpmap_1"
"water_bumpmap_2"
"water_bumpmap_3"
"water_bumpmap_4"
"water_bumpmap_5"
"water_bumpmap_6"
"water_bumpmap_7"
"water_bumpmap_8"


........
MUST look like in the req file in the map you looked up!
also you have to copy the files from the effects section assets>shipped worlds>kashyyyk>effects
copy from there all files with the word water in it EVERYONE!

2.You can just copy the kas1.fx or kas2.fx (the water you want) and put it in your world folder and rename it to

modid.fx

then look up the .fx file in the kashyyyk world folder, in this case called:
kam1_water.tga
and put it also in your world folder!

for placing it in the editor select water and take these preferences on the left side

http://mitglied.lycos.de/michl748/Bilder/Editor2.jpg

-water brush is the size of the placing field
-height says everything
-u vel and v vel is how the waves are i think
-u rept and v rept (dont know but fill in the 1)
-texture must not be named
-color is just for the editor
-alpha (dont know but fill in the 255)!
hope this helps

mfg jawakiller!

MasterNoth

Postby MasterNoth » Sat Aug 27, 2005 4:49 pm

Jawa Killer: You could work on a consolidation of both Rippentuck's tutorial (Which is in the tut I'm working on) and the ideas you posted. Make sure that whoever is reading it is gonna be able to understand both ways. Sound cool?

Brigadier General
User avatar
Posts: 629
Joined: Thu Jun 23, 2005 6:06 am

Postby Jawa_Killer » Sat Aug 27, 2005 5:45 pm

For this tutorial i will use the water of Kashyyyk:Docks (kas2).Of course can be other maps used as base.

ok!At first u have to open your modid.req data (Datamodid/worlds/modid.req).Here you have to set your water textures!
Search the column:


REQN {
"texture"
"platform=pc"

and just put this part of kas2.req (Assets/Shipped Worlds/Kashyyyk) in:

ATTENTION!!!!!!DONT COPY THE TEXT BELOW!COPY IT FROM kas2.req BECAUSE ALL MUST BE IN THE RIGHT ORDER!!!!!!

"texture"
"platform=pc"
"water_bumpmap_0"
"water_bumpmap_1"
"water_bumpmap_2"
"water_bumpmap_3"
"water_bumpmap_4"
"water_bumpmap_5"
"water_bumpmap_6"
"water_bumpmap_7"
"water_bumpmap_8"
"water_bumpmap_9"
"water_bumpmap_10"
"water_bumpmap_11"
"water_bumpmap_12"
"water_bumpmap_13"
"water_bumpmap_14"
"water_bumpmap_15"

"water_normalmap_0"
"water_normalmap_1"
"water_normalmap_2"
"water_normalmap_3"
"water_normalmap_4"
"water_normalmap_5"
"water_normalmap_6"
"water_normalmap_7"
"water_normalmap_8"
"water_normalmap_9"
"water_normalmap_10"
"water_normalmap_11"
"water_normalmap_12"
"water_normalmap_13"
"water_normalmap_14"
"water_normalmap_15"

"water_specularmask_0"
"water_specularmask_1"
"water_specularmask_2"
"water_specularmask_3"
"water_specularmask_4"
"water_specularmask_5"
"water_specularmask_6"
"water_specularmask_7"
"water_specularmask_8"
"water_specularmask_9"
"water_specularmask_10"
"water_specularmask_11"
"water_specularmask_12"
"water_specularmask_13"
"water_specularmask_14"
"water_specularmask_15"
"water_specularmask_16"
"water_specularmask_17"
"water_specularmask_18"
"water_specularmask_19"
"water_specularmask_20"
"water_specularmask_21"
"water_specularmask_22"
"water_specularmask_23"
"water_specularmask_24"

ok then scroll down to this section:

REQN {
"envfx"
-- "modid"
}

This section calls the envfx (environment effects) and is called modid.fx which has not been created at this time.So what to do??
Right!We need another .fx file to know what it does.We took kashyyyk as sample map so we have to go in the world folder of kashyyyk (Assets/Shipped Worlds/Kashyyk/World2)
and search the kas2.fx file...got it?Ok open it and look what it does.If you dont understand no problem thats not necessary for now^^
We have not to change anything in this file so we can just copy it into our world folder i think now u have to know where it is^^Ok but we aren't finish now.
You have this file in your folder and have to rename it because your modid is not kas2 right?Rename the kas2.fx into modid.fx.
ooooooooooooooooook!Now open modid.fx and sroll down to this section:

PC()
{
Tile(2.0,2.0);
MainTexture("kas2_water.tga");
LODDecimation(1);
RefractionColor(5, 217, 255, 255);
ReflectionColor(57,90,138,255);
UnderwaterColor(61, 124, 144, 128);
FresnelMinMax(0.3,0.6);
FarSceneRange(1500)

the file needs a texture called kas2_water.tga!
Now go to the kashyyyk world folder and search for this .tga and copy it into your world folder!
Ok before you can say YES I GOT IT we have to copy the other necessary files!Go to assets/shipped worlds/kashyyyk/effects and take all files with "water" in its name except waterspout.fx

for example these files

water_specularmask_15.tga
water_normalmap_14.tga
water_normalmap_13.tga.option

ok?ALL FILES!Ah before i forget it :P
Now you have to place your water in the editor:

1.Click on the section "water" next to hight,textures and so on ok?
2.You see on the left side a box with fields to change

a)width "1" and depth "1"
b)layer "1" and height "variable bust just on hight possible"
c)u vel "0.02" and v vel "0.02) /////this is for the wave!i dont know what it does i think it changes the hight and hardnes of the waves.
d)u rept "1" and v rept "1"
e)texture "dont fill anything in there"
f)color 0 and 0 and 200 /// this is only for the editor
g)alpha "255" and glow "off" /////is necessary dont know why "255".....!


Ok now u get it!This is only a translated and little changed version of Dragonums tutorial on http://dragonum.parlaris.com/ftopic14.html.
Dont forget giving credit to him when including this Tutorial!

with friendly greetings JawaKiller

******thanks*******

Dragonum!

Bobafett16

Postby Bobafett16 » Mon Aug 29, 2005 7:41 pm

thank's i don't know how to add water,but thank's to these tut's now i may know!!i want to add some deadly sess pool's that if u step in to them u start to die.for my Raxus Prime map.

Brigadier General
User avatar
Posts: 629
Joined: Thu Jun 23, 2005 6:06 am

Postby Jawa_Killer » Mon Aug 29, 2005 8:08 pm

check saturns side and check the lava TUT there is a tut how to make kill reagions!

Bobafett16

Postby Bobafett16 » Mon Aug 29, 2005 9:34 pm

yea i know i printed some of that stuff, im workin on my map right now,progress is a little slow since im learning how to do water stuff/ect. a beta will be ready in bout week or 2,i am hopein to post pic's soon!

Return to All things SWBF1

Who is online

Users browsing this forum: No registered users and 0 guests