Jump to content
Sign in to follow this  
Fubar512

Speaking of shader effects

Recommended Posts


Here's a quick and dirty video of the "enhanced" shader effects in action. I'm still tweaking and refining it, and bear in mind that I'm using an ATI Radeon (which has pixelation issues with ThirdWire's shaders). Is it worth it it? Watch the video and judge for yourselves:

 

http://forum.combatace.com/index.php?autoc...si&img=5582

Share this post


Link to post
Share on other sites

Just drop the attached file into your terrain folder, and make sure that you have the terrain (or water effects in WoI) at the highest settings. If you already have a waternormal.bmp in there, rename it so you can go back to it just in case you do not like the effect.

 

Feel free to experiment with it.

 

 

 

These are the settings that I'm using in WoV ( in the Vietnamsea_data.ini):

 

[WaterTextureMaterial]

UseEffectShader=TRUE

EffectShaderName=WaterEffect.fx

DepthBufferCheck=TRUE

DepthBufferWrite=FALSE

RenderedInOrder=TRUE

AlphaTestEnabled=TRUE

CullMode=CLOCKWISE

LightEnabled=TRUE

SpecularEnabled=TRUE

EmissiveEnabled=FALSE

FogEnabled=TRUE

AmbientColor=1.000000,1.000000,1.000000,1.000000

DiffuseColor=1.000000,1.000000,1.000000,1.000000

SpecularColor=1.500000,1.500000,1.500000,1.000000

SpecularPower=5.000000

Reflectivity=1.00000

Transparency=0.95000

ZBufferOffset=2.000000

ZBufferOffset=4.000000

BlendOp=BLEND_SRC_ALPHA

NumTextureStages=2

TextureStage[01].TextureName=vietnamS1.TGA; <---in WoE, use GERMANYS1.TGA

TextureStage[01].MipMap=TRUE

TextureStage[01].FilterEnabled=TRUE

TextureStage[01].StageColorOp=TEXTURE_MODULATE_DIFFUSE

TextureStage[01].StageAlphaOp=TEXTURE

TextureStage[02].TextureName=vietnamS1.TGA; <---in WoE, use GERMANYS1.TGA

TextureStage[02].MipMap=TRUE

TextureStage[02].FilterEnabled=TRUE

TextureStage[02].ReflectionMapping=TRUE

TextureStage[02].StageColorOp=TEXTURE_BLEND_TEXTURE_ALPHA

TextureStage[02].StageAlphaOp=DIFFUSE

Share this post


Link to post
Share on other sites
It`s nice but look here it ends just in the middle of the pic its the israel2 terrain

 

 

 

Sorry, but shader effects view distance is hardcoded into the series, just as are the tree and building "pop up" distances. Because the water/sea tgas are being referenced in the ini as having a high level of reflectivity, the line of demarcation where the shader fx becomes visible is unfortunately quite evident. The shaders make the surface somewhat "less" reflective . Just look at the river surface in the image I posted and you'll understand.

Share this post


Link to post
Share on other sites

I contacted TK about those hardcoded things.. here is his answer.

 

Er, those aren't hardcoded Smile I suggest you dig deeper into the .ini files Wink

 

However, I do recommend that you leave most of those alone, how far you can render isn't only limited by cpu power, but also by inherent precision limit of computer math.

 

TK

Share this post


Link to post
Share on other sites

There are no parameters in the terrain .dll file that determines at which point ( or distance) the shader effects become visible.

 

You can merely switch it on, or off, or set the reflectivity, transparency, and specularity of the shader effect in question.

 

And, TK knows that :rolleyes:

Share this post


Link to post
Share on other sites

Actually, the distance of the shader is controlled in the fx file. I've extended the distance as well as changed the direction of the water flow.

Original:

const half StartFadeDist = 500.0;

const half EndFadeDist1 = 4000.0;

const half EndFadeDist2 = 8000.0;

const half SpeckleAmount = 0.7;

Changed mine to:

const half StartFadeDist = 1000.0;

const half EndFadeDist1 = 8000.0;

const half EndFadeDist2 = 18000.0;

const half SpeckleAmount = 0.7;

 

Other notable lines to play with:

const half3 SpecularColor : SPECULAR_LIGHT_COLOR = { 0.8, 0.8, 0.8 };

const half3 WindVelocity /*: WIND_VELOCITY */ = { -3.0, 1.0, 0.0 };

Share this post


Link to post
Share on other sites
Actually, the distance of the shader is controlled in the fx file. I've extended the distance as well as changed the direction of the water flow.

Original:

const half StartFadeDist = 500.0;

const half EndFadeDist1 = 4000.0;

const half EndFadeDist2 = 8000.0;

const half SpeckleAmount = 0.7;

Changed mine to:

const half StartFadeDist = 1000.0;

const half EndFadeDist1 = 8000.0;

const half EndFadeDist2 = 18000.0;

const half SpeckleAmount = 0.7;

 

Other notable lines to play with:

const half3 SpecularColor : SPECULAR_LIGHT_COLOR = { 0.8, 0.8, 0.8 };

const half3 WindVelocity /*: WIND_VELOCITY */ = { -3.0, 1.0, 0.0 };

 

wich file?

where can i change this values?

Share this post


Link to post
Share on other sites
wich file?

where can i change this values?

 

Terrain.FX in the "X_terrain".cat file.

 

Thanks, Deuces...I knew you'd eventually chime in on this.

Share this post


Link to post
Share on other sites

You'll need a copy of FX Composer (don't get the 2.5 beta) from Nvidia. I'd make a backup obviuosly before messin with it but some of the stuff is fairly obvious. Should make for some cool stuff.

Share this post


Link to post
Share on other sites
Terrain.FX in the "X_terrain".cat file.

 

Thanks, Deuces...I knew you'd eventually chime in on this.

 

Thanks, but i found mine in watereffects.fx

o/

and i could'nt extrack watereffects from IsraelMe.cat :dntknw:

so i extracted from vietnamsea.cat

Share this post


Link to post
Share on other sites

Well, it's a no-brainer (and it should have been obvious to me from the onset), but after playing with this, it appears as if the maximum effects rendering distance is still limited by pixel-size. :yes:

Share this post


Link to post
Share on other sites

We'll always be slaves to pixel size...but it's not the size of the pixel....it's how you use it :biggrin:

There are interesting entries in there...slowing the movement of the water effect is one I prefer. It's definitely worth fooling with.

Share this post


Link to post
Share on other sites

The settings don't run...please someone can write the watermaterial INI settings for use with polak's desert tilesets, for the EAWeuro terrain and for NAfrica terrain in SFP1? :dntknw::dntknw::good:

Share this post


Link to post
Share on other sites
The settings don't run...please someone can write the watermaterial INI settings for use with polak's desert tilesets, for the EAWeuro terrain and for NAfrica terrain in SFP1? :dntknw::dntknw::good:

 

First, to run the shader effects, you need a video adapter that natively supports DX9.0. That would be at least an ATI Radeon 9500 or later, or a Geforce 6000 series or later (If I'm not mistaken, the GF 5FX series had issues with DX9 support).

 

Second, you need to have the terrain and effects detail set to the highest levels.

 

Now, the file in question is the WATEREFFECT.FX file. These are the settings that I'm currently using:

 

const half3 CameraPos :

 

CAMERA_GLOBAL_POSITION;

const half3 SpecularColor :

 

SPECULAR_LIGHT_COLOR = { 0.8, 0.8, 0.8 };

const half3 WindVelocity /*: WIND_VELOCITY

 

*/ = { 2.0, -4.0, 0.0 };

const half2 FogDistance :

 

FOG_DISTANCE;

 

const half StartFadeDist = 1500.0;

const half EndFadeDist1 = 8000.0;

const half EndFadeDist2 = 18000.0;

const half SpeckleAmount = 0.7;

const float NoiseScale = 0.0005;

const float WaveCycleRate = 0.85;

const float WaveMovementRate = 0.0003;

Share this post


Link to post
Share on other sites

Now, you can change out the NOISENORMAL.BMP and tailor it for a specific terrain. This is the effect I'm after, hopefully without obvious transition lines (visible borders) for WoI, or any desert terrain. Anyone want to step up to the plate and try it?

 

gallery_279_43_300291.jpg

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..