Kamino water

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Kamino water

Post by Fiodis »

I'm getting a crash with no errors greater than severity 2 in the debug log. All I've done is added the files to add Kamino-esque water, following the "How to add water" tutorial in the FAQ. I haven't actually added any yet in ZE, I just munged and found it was crashing, while it wasn't before I added the files. The texture part and everything's pretty simple, but I may be getting the .fx file wrong. I don't want the miserable rain and thunder and lightning, so I only copied what I thought I needed. Perhaps I'm missing something?
fx file:
Hidden/Spoiler:
[code]Effect("Water")
{
// general parameters

Tile(4.0,4.0);
MainTexture("kam1_water_2");

FoamTexture("kam1_water");
FoamTile(5.0,5.0);

// ocean parameters
OceanEnable(1);
WindDirection(0.2,1.0);
WindSpeed(25.0);

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

// PS2 parameters
PS2()
{
Velocity(0.01,0.05);
PhillipsConstant(0.00001);
PatchDivisions(16,16);
LODDecimation(2);

MinDiffuseColor(32, 40, 32, 255);
MaxDiffuseColor(128, 130, 128, 255);
BorderDiffuseColor(160, 160, 160, 255);
SpecularColor(192, 192, 192, 192);
SpeckleSpecularColor(160, 160, 160, 255);
SpeckleAmbientColor(75, 75, 75, 255);
SpeckleTextures("water_specles0", "water_specles1", "water_specles2", "water_specles3");
SpeckleTile(5.0, 5.0);
SpeckleBlendSpeed(4.0);
SpeckleScrollSpeed(0.0,0.0);
SpeckleCoordShift(10.0,10.0);
LightAzimAndElev(1.0,0.0);
}

XBOX()
{
Velocity(0.001,0.005);
PhillipsConstant(0.00001);
PatchDivisions(16,16);
LODDecimation(2);
}

PC()
{
Velocity(0.001,0.005);
PhillipsConstant(0.00001);
PatchDivisions(16,16);
LODDecimation(2);
}

}

Effect("hdr")
{
Enable(1);
}
[/code]
Hidden/Spoiler:
Also, while searching for the answer I found a lot of people who argue Kamino's water isn't water, but rather a animated terrain/prop. But then there's this post.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Kamino water

Post by AceMastermind »

ZE shows the terrain is painted with kam1_water.tga with a -8 water level offset painted from the terrain. You'll likely need the ZE stuff to avoid crashing and to make it look like Kamino's water.
Hidden/Spoiler:
Image
The PC stuff should be all you need for this water in the *.fx file:
Hidden/Spoiler:
[code]Effect("Water")
{
// general parameters

Tile(4.0,4.0);
MainTexture("kam1_water_2");

FoamTexture("kam1_water");
FoamTile(5.0,5.0);

// ocean parameters
OceanEnable(1);
WindDirection(0.2,1.0);
WindSpeed(25.0);

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


PC()
{
Velocity(0.001,0.005);
PhillipsConstant(0.00001);
PatchDivisions(16,16);
LODDecimation(2);
}

}
[/code]
It looks like most of the ocean appearance is dynamic aside from the typical steps for adding water.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Kamino water

Post by Fiodis »

I added a bit of water with the same exact settings as in Kamino, and now it doesn't crash anymore, but I don't see the water showing up either. There's nothing water-related in the debug log. I know Xavious had trouble with the Kamino water disappearing when viewed from certain angles, but my water's disappearing when viewed from any angle. I'm quite lost. :?
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Kamino water

Post by AceMastermind »

I created a fresh map and only added this Kamino water (textures ,fx ,req and ZE edits) and it does work, but you can only see it if you go under it and look up. I even brought the water level above the terrain because I was seeing a problem with the transparency of kam1_water.tga not working and still couldn't see anything looking down from above.

EDIT
I copied over the kamino sky file and was able to see the water from above or below the plane but the transparency of the terrain texture (kam1_water.tga) still isn't working. I'm also experiencing similar disappearing issues that Xavious encountered, but it looks like fine-tuning the sky file is the solution to this.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Kamino water

Post by Fiodis »

I also copied over Kamino's sky and fx files, and all relevant files, and I only see the water from below looking up. I didn't change the files from the stock in any way. This is really weird; has anyone else managed to solve this problem?
Post Reply