Page 1 of 1

how to create water?

Posted: Sat May 28, 2005 2:18 pm
by Darth-Derkie
How do you create water?

I know someone has a topic about this in this forum or another forum, but I can't find it.

RE: how to do create water?

Posted: Sat May 28, 2005 7:02 pm
by ShadowHawk
Try this:
http://www.gametoast.com/index.php?name ... ight=water

I will continue to look through the forums for a more complete discussion on the subject for ya. I know I saw one in here and I think a member of my team posted it or another one on the same lines. Either way it was descriptive enough.

RE: how to do create water?

Posted: Sat May 28, 2005 9:19 pm
by Rippentuck
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:

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:

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, 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

RE: how to do create water?

Posted: Sat May 28, 2005 9:45 pm
by ShadowHawk
welp, there ya go. can't get any more detailed than that. Rip, I edited your post to disable smilies because it was placing them where they shouldn't be and would possibly confuse him. Remember when pasting code to either disable smiles for that post, or place it with a [code] attribute. Other than that, it was very useful.

RE: how to do create water?

Posted: Sat May 28, 2005 10:21 pm
by Rippentuck
Thanks Shadow for the edit. And I'm just trying in a small way to pay something back into the modding community that helped (and continues to help) me.


Rip

RE: how to do create water?

Posted: Sun May 29, 2005 12:39 am
by ShadowHawk
That is a very good thing and thanks. I try my best at times too, but lately I've been too busy with college and my mod team (98% college and I'm sure guru is about to strangle me so bad I can't use my thermometer :) ) to contribute lately. Keep up the good work.

Posted: Sun May 29, 2005 12:17 pm
by Darth-Derkie
When I try to play my map with the water in it, the game crashes.

Posted: Sun May 29, 2005 12:20 pm
by ShadowHawk
Rip, your area of expertise.

Posted: Mon May 30, 2005 4:27 am
by Darth-Derkie
This is how the water looks in the editor:

Image

Posted: Tue May 31, 2005 12:07 pm
by MutantMonkey
try it with kashyyyk water... i am having issues with kamino water too but kashyyyk water works for me.

PS. Like the road texture (don't forget roads r slightly raised along the middle - drainage)

Posted: Tue May 31, 2005 4:17 pm
by Rippentuck
Hi Derkie,

I don't think anyone can tell what the problem is just by the fact that it crashed, because there's any number of things that could cause it. Are you sure you copied everything over right? Did you put it in the right format? Did you copy the texture over? Did you edit the req file correctly? Double and triple check, and make sure you did all that correctly. It might even be a good idea to post your relevant files here so people can try to spot any problems.


Also, pull up the equivalent files for shipped worlds to use as a reference. See what's in theirs, compare, try to discover what you're missing. The idea is to make yours look like the shipped worlds' as far as functionality, and then just to change values where necessary to your own specs.

This shouldn't be hard to fix, water if fairly easy compared to other things.


Rip

Posted: Wed Jun 01, 2005 4:11 am
by Darth-Derkie
Now my map crashes when I press the spawn button. This are my files:
Now1.req:

ucft
{
REQN
{
"config"
}

REQN
{
"class"
}

REQN
{
"texture"
"NOW1_map"
}


REQN
{
"texture"
"platform=pc"

}

REQN
{
"path"
"NOW1"
}
REQN
{
"congraph"
"NOW1"
}
REQN
{
"envfx"
-- "NOW1"
}
REQN
{
"world"
"NOW1"
}
REQN
{
"prop"
-- "NOW1"
}
REQN
{
"boundary"
"NOW1"
}
REQN
{
"config"
-- "flyerspray"
-- "walkerstomp"
-- "hailfire_wake"
-- "dustwake"
}

REQN
{
"config"
}

REQN
{
"texture"
"kashyyyk1_map"
"bird"
}

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"
}

}

Now1.fx:

Effect("Water")
{

// general parameters
PatchDivisions(4,4);

// ocean parameters
OceanEnable(0);

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


// PC parameters
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)

NormalMapTextures("water_normalmap_",16,8.0);
BumpMapTextures("water_bumpmap_",16,8.0);
SpecularMaskTextures("water_specularmask_",25, 4);
SpecularMaskTile(3.0, 3.0);
SpecularMaskScrollSpeed(0.0,0.0);
Velocity(0.01,0.01);

}

}
In zeroeditor:
Image

And i put all water_specularmask, water_normalmap and water_bumpmap in my effects folder.

Posted: Wed Jun 01, 2005 5:51 am
by Rippentuck
One thing I noticed was that you need to uncomment the "envfx" line in your world req. Uncommenting means just remove the dotted line from in front of the "envfx," save, and see if it works. Also uncomment the "NOW1" line under props.


Rip

Posted: Wed Jun 01, 2005 5:45 pm
by Darth-Derkie
The water works now.

Posted: Sat Jun 04, 2005 5:40 am
by Darth-Derkie
I can see the water now in the game, but some watertiles are not showing up. I get this while munging: Warning: Discarding additional water layer 1 != 2

Posted: Sat Jun 04, 2005 6:05 am
by Rends
Your problem is that you didn“t add your water entries in the first req under
REQN
{
"texture"
"platform=pc"

but you added the same entry a second time wich cause trouble

Posted: Mon Jun 06, 2005 10:39 am
by Darth-Derkie
I removed that entry but I'm still missing watertiles.
Image