Jump to content
mr pedersen

Change color of the sea?

Recommended Posts

Im just wonder if any one have learn how to change the color of the A3 sea?

Im want it more Pacifc-blue and are just about to start see if I can change it.

From config.cpp:

class Sea

{

seaTexture = "a3\data_f\seatexture_co.paa";

seaMaterial = "#water";

shoreMaterial = "#shore";

shoreFoamMaterial = "#shorefoam";

shoreWetMaterial = "#shorewet";

WaterMapScale = 20;

WaterGrid = 50;

MaxTide = 0;

MaxWave = 0.25;

SeaWaveXScale = "2.0/50";

SeaWaveZScale = "1.0/50";

SeaWaveHScale = 1.0;

SeaWaveXDuration = 5000;

SeaWaveZDuration = 10000;

};

class Underwater

{

noWaterFog = -0.001;

fullWaterFog = 0.001;

deepWaterFog = 200;

waterFogDistanceNear = 10;

waterFogDistance = 40;

waterColor[] = {0.04,0.16,0.22};

deepWaterColor[] = {0.0,0.001,0.009};

surfaceColor[] = {0.04,0.16,0.22};

deepSurfaceColor[] = {0.0,0.001,0.009};

};

class SeaWaterShaderPars

{

refractionMoveCoef = 0.03;

minWaterOpacity = 0.0;

waterOpacityDistCoef = 0.4;

underwaterOpacity = 0.5;

waterOpacityFadeStart = 60;

waterOpacityFadeLength = 120;

};

Share this post


Link to post
Share on other sites

Try changing this: seaTexture = "a3\data_f\seatexture_co.paa"; to the paa texture you want.

Or try messing with these values:

waterColor[] = {0.04,0.16,0.22};

deepWaterColor[] = {0.0,0.001,0.009};

surfaceColor[] = {0.04,0.16,0.22};

deepSurfaceColor[] = {0.0,0.001,0.009};

Share this post


Link to post
Share on other sites

The Information of the actual "Watercolor" is stored in the material definitions.

seaMaterial = "#water"";

shoreMaterial = "#shore";

shoreFoamMaterial = "#shorefoam";

shoreWetMaterial = "#shorewet";

In this case, you define your own material definitions for changing the watercolor not on a global space.

seaMaterial = "[color="#B22222"]#TUT_water[/color]";

The default #material definitions are stored in the bin configs but you can add and load them inside your terrain config via cfg materials.

class CfgMaterials
{
class Water;
class [color="#B22222"]TUT_water[/color]: Water
{
	ambient[] = {0.016,0.0264,0.040,0.4};
	diffuse[] = {0.032,0.128,0.128,1.0};
	forcedDiffuse[] = {0,0,0,0};
	specular[] = {1,1,1,0};
	specularPower = 4;
	emmisive[] = {0,0,0,0};
};
};

Edited by Atsche
buggy

Share this post


Link to post
Share on other sites

Or try messing with these values:

waterColor[] = {0.04,0.16,0.22};

deepWaterColor[] = {0.0,0.001,0.009};

surfaceColor[] = {0.04,0.16,0.22};

deepSurfaceColor[] = {0.0,0.001,0.009};

those values are for underwater color

Edited by Fabio_Chavez

Share this post


Link to post
Share on other sites
those values are for underwater color

Just Follow atsches post that how it's done

Share this post


Link to post
Share on other sites

i know i know, i just wanted to mention, its relevant since you need to change those values according to how the water looks from the outside anyway.

Share this post


Link to post
Share on other sites

has anybody an idea if, and if yes, how these shaders are editable?

PixelShaderID = "Water";

VertexShaderID = "Water";

they seem to force a certain color on the reflection of the seawater surface and id like to addapt it to fit the rest of the color changes.

is it even possible to change this?

p.s.

what are these doing?

class SeaWaterShaderPars
	{
		refractionMoveCoef = 0.03;
		minWaterOpacity = 0;
		waterOpacityDistCoef = 0.4;
		underwaterOpacity = 0.5;
		waterOpacityFadeStart = 60;
		waterOpacityFadeLength = 120;

also this:

			surfaceColor[] = {0.03,0.21,0.12};
		deepSurfaceColor[] = {0.001,0.08,0};

Edited by Fabio_Chavez

Share this post


Link to post
Share on other sites

In case anyone looks this thread up again, I thought I would post this. The stuff above does not change the color in A3. It will change the 'reflection' color of the shallow water near the shore, but the main deep water will be largely unaffected. It does have some effect, mostly when you are looking straight down at it, but even then it doesn't affect the hue or brightness of the water. The real trick is in the island's weather class:

		class Overcast : Overcast
		{
			class Weather1 : Weather1
			{
				sky = "A3\Map_Stratis\Data\sky_veryclear_sky.paa";
				skyR = "A3\Map_Stratis\Data\sky_veryclear_lco.paa";
				horizon = "A3\Map_Stratis\Data\sky_veryclear_horizont_sky.paa";
			};
		};

there are 7 levels of weather, and each uses it's own texture for the ocean, namely the SkyR texture. It is a reflection map of sorts that is used to determine the color of the ocean. These get blended as the weather changes, and it allows the ocean to change color when the weather changes. For some reason the game does not use the "veryclear" weather set. To change the color of the ocean, just edit the textures to your liking.

Share this post


Link to post
Share on other sites
The Information of the actual "Watercolor" is stored in the material definitions.

In this case, you define your own material definitions for changing the watercolor not on a global space.

seaMaterial = "[color="#B22222"]#TUT_water[/color]";

The default #material definitions are stored in the bin configs but you can add and load them inside your terrain config via cfg materials.

class CfgMaterials
{
class Water
class [color="#B22222"]TUT_water[/color]: Water
{
	ambient[] = {0.016,0.0264,0.040,0.4};
	diffuse[] = {0.032,0.128,0.128,1.0};
	forcedDiffuse[] = {0,0,0,0};
	specular[] = {1,1,1,0};
	specularPower = 4;
	emmisive[] = {0,0,0,0};
};
};

When adding this code I get:

File p:\mp\favslev3\config.cpp, line 900: /CfgMaterials/: 'c' encountered instead of '{'

What am I doing wrong?

Config: http://pastebin.com/L2kiVRc5

//Line 2342

Thanks for this thread! Its getting me closer to a scandinavian looking water. (Not like Im counting on figuring out what all those numbers mean in 'class Water') :P

Share this post


Link to post
Share on other sites

Yup, there was. Thanks.

Next error is:

File p:\mp\favslev3\config.cpp, line 900: /CfgMaterials/Water.MUG_water: Undefined base class 'Water'

It seems it cant find class water, but its right there?

seaMaterial = "#MUG_water";

class CfgMaterials

{

class Water

class MUG_water: Water ......

Share this post


Link to post
Share on other sites

It seems it cant find class water, but its right there?

seaMaterial = "#MUG_water";

class CfgMaterials

{

class Water

class MUG_water: Water ......

Theres still a missing ; in your example so its logical that he tells you water class is not there.

class CfgMaterials
{
class Water[color="#FF0000"];[/color]
class MUG_water: Water ......

I suggest you cleanup your config and seperate cfgAmbient and cfgLighting, like you can see in A2SM sample terrain config structures, saves alot of space in the config and gives you a clean overview.

Edited by Atsche

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×