Water with specular

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
ForceMaster
Lieutenant General
Lieutenant General
Posts: 737
Joined: Fri Aug 08, 2008 11:27 pm
Projects :: Tron The Grid
Games I'm Playing :: The best..SWBFII
xbox live or psn: No gamertag set
Location: C:\Program Files\ForceMaster\Bin\ForceMaster.exe

Water with specular

Post by ForceMaster »

Hi! I need recreate a ocean like this:

Image

I have a fully functional ocean ingame, but i need add these specular effect to the water texture. Some ideas? Thanks!
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Water with specular

Post by AceMastermind »

In your world's .fx file under the Water effect segment there should be something like this example from kas2.fx:

Code: Select all

		SpecularMaskTextures("water_specularmask_",25, 4);
		SpecularMaskTile(2.0, 2.0);
		SpecularMaskScrollSpeed(0.0,0.0);
SpecularMaskTextures("[name of textures]",[total textures], [not sure])
SpecularMaskTile => the tiled amount for the specular textures (used on low quality)
SpecularMaskScrollSpeed => the scroll speed for the specular textures (used on low quality) 

The textures should be located here:
data_ABC\Worlds\ABC\effects
Have a look at the shipped specular textures to see how they were done if you want to make your own.
ForceMaster
Lieutenant General
Lieutenant General
Posts: 737
Joined: Fri Aug 08, 2008 11:27 pm
Projects :: Tron The Grid
Games I'm Playing :: The best..SWBFII
xbox live or psn: No gamertag set
Location: C:\Program Files\ForceMaster\Bin\ForceMaster.exe

Re: Water with specular

Post by ForceMaster »

Thanks Ace, but these settings not work with "OceanEnable(1)", :(

I can add water like dagobah, with all features but when i change these value to (1) the water lost specular and others effects. some reason why?
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Water with specular

Post by AceMastermind »

I've never needed to use OceanEnable for anything, but it looks like it changes the whole dynamic of how water is handled.
Kamino water uses it and the fx file looks like this for PC with no mention of specular textures:
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's as if the OceanEnable switch builds geometry based water as opposed to layered texture based water. I don't know.
ForceMaster
Lieutenant General
Lieutenant General
Posts: 737
Joined: Fri Aug 08, 2008 11:27 pm
Projects :: Tron The Grid
Games I'm Playing :: The best..SWBFII
xbox live or psn: No gamertag set
Location: C:\Program Files\ForceMaster\Bin\ForceMaster.exe

Re: Water with specular

Post by ForceMaster »

AceMastermind wrote:It's as if the OceanEnable switch builds geometry based water as opposed to layered texture based water.
Well, :( that is not good news...

The second choice to get this was a animatedprop with a loop animations like the kamino's water:


Image

These model have an envmap and transparency flags.

Thanks again Ace.
Post Reply