Page 1 of 1

Water with specular

Posted: Mon Dec 28, 2015 2:41 pm
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!

Re: Water with specular

Posted: Mon Dec 28, 2015 8:29 pm
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.

Re: Water with specular

Posted: Mon Dec 28, 2015 11:45 pm
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?

Re: Water with specular

Posted: Tue Dec 29, 2015 3:51 pm
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.

Re: Water with specular

Posted: Tue Dec 29, 2015 9:09 pm
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.