how to create water?

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

Moderator: Moderators

Post Reply
Darth-Derkie
1st Lieutenant
1st Lieutenant
Posts: 453
Joined: Thu Feb 03, 2005 6:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The Netherlands

how to create water?

Post 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.
Last edited by Darth-Derkie on Mon May 30, 2005 8:55 am, edited 1 time in total.
User avatar
ShadowHawk
Old School Staff
Posts: 1232
Joined: Mon Feb 21, 2005 4:54 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Heartland, Texas
Contact:

RE: how to do create water?

Post 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.
Rippentuck

RE: how to do create water?

Post 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
Last edited by Rippentuck on Sun May 29, 2005 1:45 am, edited 1 time in total.
User avatar
ShadowHawk
Old School Staff
Posts: 1232
Joined: Mon Feb 21, 2005 4:54 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Heartland, Texas
Contact:

RE: how to do create water?

Post 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.
Rippentuck

RE: how to do create water?

Post 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
User avatar
ShadowHawk
Old School Staff
Posts: 1232
Joined: Mon Feb 21, 2005 4:54 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Heartland, Texas
Contact:

RE: how to do create water?

Post 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.
Darth-Derkie
1st Lieutenant
1st Lieutenant
Posts: 453
Joined: Thu Feb 03, 2005 6:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The Netherlands

Post by Darth-Derkie »

When I try to play my map with the water in it, the game crashes.
User avatar
ShadowHawk
Old School Staff
Posts: 1232
Joined: Mon Feb 21, 2005 4:54 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Heartland, Texas
Contact:

Post by ShadowHawk »

Rip, your area of expertise.
Darth-Derkie
1st Lieutenant
1st Lieutenant
Posts: 453
Joined: Thu Feb 03, 2005 6:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The Netherlands

Post by Darth-Derkie »

This is how the water looks in the editor:

Image
MutantMonkey

Post 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)
Rippentuck

Post 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
Darth-Derkie
1st Lieutenant
1st Lieutenant
Posts: 453
Joined: Thu Feb 03, 2005 6:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The Netherlands

Post 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.
Rippentuck

Post 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
Darth-Derkie
1st Lieutenant
1st Lieutenant
Posts: 453
Joined: Thu Feb 03, 2005 6:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The Netherlands

Post by Darth-Derkie »

The water works now.
Darth-Derkie
1st Lieutenant
1st Lieutenant
Posts: 453
Joined: Thu Feb 03, 2005 6:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The Netherlands

Post 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
User avatar
Rends
Sith
Sith
Posts: 1278
Joined: Fri Oct 15, 2004 6:34 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Germany
Contact:

Post 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
Darth-Derkie
1st Lieutenant
1st Lieutenant
Posts: 453
Joined: Thu Feb 03, 2005 6:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The Netherlands

Post by Darth-Derkie »

I removed that entry but I'm still missing watertiles.
Image
Post Reply