FSWC's back in progress!

FSX including FSX Steam version.

Re: FSWC's on halt

Postby Flying Mouse » Thu Jan 24, 2008 2:13 am

I tested the file you posted, works fine on my system  ;)
Coolermaster Storm Enforcer Chassis/ Corsair TX750W PSU/ Gigabyte Ga-990fxa Mobo/ AMD Phenom X4 965 BE 3.4Ghz C3/Coolermaster V6GT CPU air cooler/ 8GB RAM Corsair DDR3 2000Mhz/ Gigabyte GTX570 Overclocked Edition GPU/ Windows 7 Prem 64bit/ 750Gb & 150
User avatar
Flying Mouse
Major
Major
 
Posts: 1574
Joined: Wed May 23, 2007 3:58 am
Location: Somewhere in a bushplane

Re: FSWC's on halt

Postby Ashton Lawson » Thu Jan 24, 2008 7:28 am

Hey guys,

Okay, these'll be my last comparison shots for a month, since I'll be working hard on the main program code.
Image
FS Water Configurator+ has new modifications in the works, plus DirectX 10, Service Pack
1, and Radeon HD 3+ Series support.
Ashton Lawson
Major
Major
 
Posts: 1211
Joined: Thu Jun 15, 2006 5:25 am
Location: Phuket, Thailand

Re: FSWC's on halt

Postby Ashton Lawson » Thu Jan 24, 2008 10:14 pm

Hey guys, this is gonna sound silly, but I just found out we can change shaders during runtime.

Don't kill me...
Image
FS Water Configurator+ has new modifications in the works, plus DirectX 10, Service Pack
1, and Radeon HD 3+ Series support.
Ashton Lawson
Major
Major
 
Posts: 1211
Joined: Thu Jun 15, 2006 5:25 am
Location: Phuket, Thailand

Re: FSWC's on halt

Postby J. » Fri Jan 25, 2008 8:21 am

love the rig shot, water fits in really well with the situation!

so if you can change shader while in game, would it be possible to make the water stormy if a storm started?
[center]
Striking software Beta Team leader | [url=http://twitter.com/strikingsw]Follow Striking Software on
J.
Major
Major
 
Posts: 1273
Joined: Sat Nov 24, 2007 7:35 pm
Location: Herts/Worcs UK

Re: FSWC's on halt

Postby pwheeler » Fri Jan 25, 2008 8:57 am

Hi guys,

just to let you know the eye op went well. Still having a bit of trouble looking at a monitor and its still a bit sore.

I'll probably be able to get back into things in a day or two.

Speak soon,

Paul

P.S. interface is looking great!!!
Image
pwheeler
2nd Lieutenant
2nd Lieutenant
 
Posts: 54
Joined: Mon Dec 31, 2007 11:05 am

Re: FSWC's on halt

Postby NickN » Fri Jan 25, 2008 10:07 am

Hi guys,

just to let you know the eye op went well. Still having a bit of trouble looking at a monitor and its still a bit sore.

I'll probably be able to get back into things in a day or two.

Speak soon,

Paul

P.S. interface is looking great!!!


1. you are alive
2. you can see
3. you are healing

Thats great to hear!

:)
User avatar
NickN
Lieutenant Colonel
Lieutenant Colonel
 
Posts: 6317
Joined: Mon Sep 05, 2005 12:57 pm

Re: FSWC's on halt

Postby Ashton Lawson » Fri Jan 25, 2008 10:58 am

love the rig shot, water fits in really well with the situation!

so if you can change shader while in game, would it be possible to make the water stormy if a storm started?

if u mean seamlessly, like the program detects it the slowly blends into stormy-type water, no.

the only advantage is, u can pause, switch to another profile, or preset, apply, then when u go back to the game, the setttings have changed.  that's the best we can do at the moment.

having that done automatically would take a plugin for FSX, and I dunno how to do that.  yet...

Hi guys,

just to let you know the eye op went well. Still having a bit of trouble looking at a monitor and its still a bit sore.

I'll probably be able to get back into things in a day or two.

Speak soon,

Paul

P.S. interface is looking great!!!


1. you are alive
2. you can see
3. you are healing

Thats great to hear!

:)



lol, that was funny.

get well soon paul, we'll be glad to have you back ;).

ive got some kinks to work out of the interface, but otherwise all is fine.  in fact, the only kink i can think of is the combo box button not changing the status label at the bottom.

but still, im' working on registry key detection and stuff, so this program should be able to work standalone.

i'm also going to add a tree view type folder explorer, in case the program can't find the fsx registry key, or the registry key being wrong or something.

instead of plus and minus signs, or arrows on the tree view, i'll replace the vista-styled arrows with airplanes, lol.

but first things first, registry stuff.  annoying, but essential..
Image
FS Water Configurator+ has new modifications in the works, plus DirectX 10, Service Pack
1, and Radeon HD 3+ Series support.
Ashton Lawson
Major
Major
 
Posts: 1211
Joined: Thu Jun 15, 2006 5:25 am
Location: Phuket, Thailand

Re: FSWC's on halt

Postby pwheeler » Fri Jan 25, 2008 6:07 pm

Hi guys,

In my half blind state I've done a few comparison shots with FSWC and default. These are around Seattle to tie in with Ashtons'.

Shader settings in use - fresnMin 0.03 - FresnMax 0.4 - frdot to the power of seven - colorbase * 1.8 - no moonglow - sun specular * 0.5

FSX with Acceleration, FEX, GEX, UTX

Hope you like...

NOON:
Image

DAWN:
Image

SUNSET:
Image

Image

Image

Image

NIGHT:
Image

HIGH ALTITUDE:
Image

Paul
Last edited by pwheeler on Fri Jan 25, 2008 6:19 pm, edited 1 time in total.
Image
pwheeler
2nd Lieutenant
2nd Lieutenant
 
Posts: 54
Joined: Mon Dec 31, 2007 11:05 am

Re: FSWC's on halt

Postby pwheeler » Fri Jan 25, 2008 6:13 pm

...and some more general shots:

Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image

Paul
Image
pwheeler
2nd Lieutenant
2nd Lieutenant
 
Posts: 54
Joined: Mon Dec 31, 2007 11:05 am

Re: FSWC's on halt

Postby Ashton Lawson » Fri Jan 25, 2008 11:56 pm

already replied to the screenie thread in FSW, but still, great shots.

Another thing, I'm curious about this colour multiple thing, is it what you've added or something?  I can't find mine (copied pasted from Nick's latest config after a request).

And your eyes can take the scenery, that's great.  Soon, (or maybe even already) you'll be back up to speed.
Image
FS Water Configurator+ has new modifications in the works, plus DirectX 10, Service Pack
1, and Radeon HD 3+ Series support.
Ashton Lawson
Major
Major
 
Posts: 1211
Joined: Thu Jun 15, 2006 5:25 am
Location: Phuket, Thailand

Re: FSWC's on halt

Postby J. » Sat Jan 26, 2008 1:29 am

good stuff, could you post your entire .fxh file please paul in a code box, beacuse those looks ace!

loved the way on sunrise/sunset shots, the suns reflections isnt a solid block, you can see the water riplling through it :)

good stuff
[center]
Striking software Beta Team leader | [url=http://twitter.com/strikingsw]Follow Striking Software on
J.
Major
Major
 
Posts: 1273
Joined: Sat Nov 24, 2007 7:35 pm
Location: Herts/Worcs UK

Re: FSWC's on halt

Postby Ashton Lawson » Sat Jan 26, 2008 2:17 am

yeah, sun reflections are good.

It's just a shame that the terrain doesn't cast any real shadows.
Last edited by Ashton Lawson on Sat Jan 26, 2008 5:01 am, edited 1 time in total.
Image
FS Water Configurator+ has new modifications in the works, plus DirectX 10, Service Pack
1, and Radeon HD 3+ Series support.
Ashton Lawson
Major
Major
 
Posts: 1211
Joined: Thu Jun 15, 2006 5:25 am
Location: Phuket, Thailand

Re: FSWC's on halt

Postby pwheeler » Sat Jan 26, 2008 5:19 am

Hi guys,

glad you like the shots.

Here's my water20.fxh file

Code: Select all
//---------------------------------------------------------------------------
// Flight Simulator X - Shader Effect Files
// Copyright (c) 2006, Microsoft Corporation
//---------------------------------------------------------------------------
#include <Common.fxh>
#include <MaterialDecl.fxh>
#include <D3D9Texture.fxh>
#include <FuncLibrary.fxh>

#define vLightDir vSunVectorWorld

// Potential textures
texture Water_BaseTexture               : MATERIAL_BASE_TEXTURE;
texture Water_EnvTexture                : MATERIAL_ENVIRONMENT_TEXTURE;
texture Water_BumpTexture               : MATERIAL_BUMP_TEXTURE;

// Global variables
float3 vCamEyePoint : VIEWPOSITION;

float fTimeScale        : WATER_BUMP_TIME_SCALE;            
float fBumpScale        : WATER_BUMP_SCALE;          
float fBumpUVScale      : WATER_BUMP_UV_SCALE;      
float fBumpU            : WATER_BUMP_DISTANCE_SCALE;
float fBumpV            : WATER_BUMP_LIGHT_SCALE;    
float fFresnelFactorMin : WATER_FRESNEL_FACTOR_MIN;  
float fFresnelFactorMax : WATER_FRESNEL_FACTOR_MAX;  
float fSpecularPower    : SPECULAR_POWER;            
float fSpecularBoost    : SPECULAR_BOOST;            
float fSpecularBlend    : SPECULAR_BLEND;            
float fBumpRotation     : WATER_BUMP_ROTATION;      
float fBumpTimeX1       : WATER_BUMP_TIME_X1;        
float fBumpTimeY1       : WATER_BUMP_TIME_Y1;        
float fBumpTimeX2       : WATER_BUMP_TIME_X2;        
float fBumpTimeY2       : WATER_BUMP_TIME_Y2;        
float fBumpTimeScale2   : WATER_BUMP_TIME_SCALE_2;  

// Samples used by this shader
sampler Water_BaseSampler = sampler_state
{
    Texture       = (Water_BaseTexture);
    AddressU      = Clamp;      // terrain textures must be clamped
    AddressV      = Clamp;
    MinFilter     = (State_MinFilter);
    MagFilter     = (State_MagFilter);
    MipFilter     = (State_MipFilter);
    MipMapLodBias = (State_MipMapLodBias);
};

sampler Water_BumpSampler = sampler_state
{
    Texture       = (Water_BumpTexture);
    AddressU      = Wrap;
    AddressV      = Wrap;
    AddressW      = Wrap;
    MinFilter     = D3DTEXF_LINEAR;
    MagFilter     = D3DTEXF_LINEAR;
    MipFilter     = D3DTEXF_LINEAR;
    MipMapLodBias = (State_MipMapLodBias);
};

sampler Water_EnvMapSampler = sampler_state
{
    Texture       = (Water_EnvTexture);
    AddressU      = Clamp;
    AddressV      = Clamp;
    MinFilter     = (State_MinFilter);
    MagFilter     = (State_MagFilter);
    MipFilter     = (State_MipFilter);
    MipMapLodBias = (State_MipMapLodBias);
};

struct VSWATER20_INPUT
{
    float4 vPos       : POSITION;
    float4 vColor     : COLOR0;
    float3 vNormal    : NORMAL;
    float2 vTex       : TEXCOORD0;
};

struct VSWATER20_OUTPUT
{
    float4  vPos                : POSITION;
    float   fFog                : FOG;
    half4   vColor              : COLOR0;

    float4 TexBump        : TEXCOORD0;
    float4 TexEnvMap      : TEXCOORD1;
    float4 TexBase        : TEXCOORD2;
    float4 MiscData               : TEXCOORD3;
    float3 vNormalWS      : TEXCOORD4;
    float3 vPosWS                 : TEXCOORD5;
    float3 vEyePosWS      : TEXCOORD6;
    float4 TexScreen      : TEXCOORD7;
};

#define fresnMin 0.03
#define fresnMax 0.4

half fresnel2( half3 vEyeDir, half3 vSurfaceNorm )
{
  half frdot = min( 1 - dot(vEyeDir, vSurfaceNorm), 1 );
  return lerp( fresnMin, fresnMax, frdot * frdot * frdot * frdot * frdot * frdot * frdot);
}

VSWATER20_OUTPUT Water20VS(const VSWATER20_INPUT v,const bool b30Shader)
{
    VSWATER20_OUTPUT o = (VSWATER20_OUTPUT)0;

    // Transform to clip space
    o.vPos = mul(v.vPos, mFullProj);

    // Compute fog
    o.fFog = ComputeFog(o.vPos.w, FOG_END, FOG_RECIP, FOG_SELECT_VERTEX, FOG_SELECT_TABLE);

        // Transform to world space
        float3 vWorldPos = mul(v.vPos, mWorld);

    // Compute eye vector
        float3 vEye = normalize(vCamEyePoint - vWorldPos);
        
        // Scale normal based bump based on dist
        //float fNormalScale = max(1.0,length(vEye)-fBumpDistScale);

    // Scale bumpmap texture coordinates by detail coordinates
        //float2 bmp = fmod(v.vPos.xz * (fBumpUVScale * 0.0001f),1024.0f);      
        float2 bmp = fmod((vWorldPos.xz + float2(fBumpU, fBumpV) - mWorld[3].xz) * (fBumpUVScale * 0.0001f),256.0f);    
        float2 sc = float2(sin(fBumpRotation),cos(fBumpRotation));
        if (b30Shader)
        {
                o.TexBump.xy = bmp + (fSimTime * fBumpTimeScale2)*float2(fBumpTimeX1,fBumpTimeY1);
                o.TexBump.zw = (bmp*fBumpScale) + ((fSimTime * fBumpTimeScale2)*float2(fBumpTimeX2,fBumpTimeY2))/2.0f;
                o.TexBump.zw = float2(o.TexBump.z * sc.y - o.TexBump.w * sc.x, o.TexBump.z * sc.x + o.TexBump.w * sc.y);
        }
        else
        {
                o.TexBump.xy = bmp + (fSimTime * fTimeScale)*float2(0.4,-0.4);
                o.TexBump.zw = (bmp*fBumpScale) + ((fSimTime * fTimeScale)*float2(-1.0,1.0))/2.0f;
                o.TexBump.zw = float2(o.TexBump.z * sc.y - o.TexBump.w * sc.x, o.TexBump.z * sc.x + o.TexBump.w * sc.y);
        }    

        // Send out interpolated normal for lighting
    o.vNormalWS = normalize(TransformVectorToSpace(v.vNormal, mWorld));

        // Send out eye pos
        o.vPosWS    = vWorldPos;
        o.vEyePosWS = vCamEyePoint;

        // Output vertex color straight to PS
        // The alpha component is used to represent the relative
        // depth of the water, used in computing water translucenty
        // The color component is simply the color scaled by the
        // diffuse sun lighting component
    o.vColor.a = v.vColor.a;
    o.vColor.rgb = 0.5/*( 1 - fresnel2(vSunVectorWorld_Sun.xyz, o.vNormalWS.xyz) ) * 0.5*/;

    // Environment mapping is determined from the screen-space coordinates
    // of our geometry. This implies that we need to divide them by W, and then
    // offset/scale into a 0-1 range. Because of interpolation issues due to front
    // clipped geometry, the info is pre-processed and passed to the PS where the 1/W
    // is applied. We also apply the normal to the data to emulate reflections caused
    // by the animating geometry
    o.TexEnvMap.xyz = o.vPos.xyz+o.vPos.www;
//    o.TexEnvMap.xyz = o.vPos.xyz+o.vPos.www*(1.0+0.25*o.vNormalWS.xzy/fNormalScale);
    o.TexEnvMap.w = 2.0*o.vPos.w;
    o.TexScreen.xyz = float3(1,-1,1)*o.vPos.xyz+o.vPos.www;
    o.TexScreen.w = 2.0*o.vPos.w;

    // Diffuse texture coordinates
    o.TexBase.xy = v.vTex;

    // Compute per-poly fresnel
        o.MiscData.x = 1.0 - lerp(fFresnelFactorMin, fFresnelFactorMax, pow(smoothstep(0,1,saturate(-normalize(vWorldPos).y)),0.5));
        o.MiscData.y = 0;
        o.MiscData.z = 0;
        o.MiscData.w = 0;

    return o;
}

float4 Water20PS(VSWATER20_OUTPUT Input, const bool b30Shader) : COLOR
{
    float4 Bump;
    float2 BumpEnv;
    float4 Color;
        float2 specularFactor;

    // Renomalize the input vectors and determine the
    // eye vector for lighting and reflection
    float3 vEyeDirWS;
    vEyeDirWS = normalize(Input.vEyePosWS - Input.vPosWS);
        
    
    // Sample the base color and bumpmaps
    // Since this is essentially a texbem style operation, we
    // manually apply the matrix to the bumpmap values, we then
    // scale our envmap texcoords by 1/W before factoring in the
    // bumpmap
        float3 vSurfaceNorm;
    if (b30Shader)
    {
            Bump = tex2Dbias(Water_BumpSampler, float4(Input.TexBump.xy,0,-2.0f))
                     + tex2Dbias(Water_BumpSampler, float4(Input.TexBump.zw,0,-3.0f));
            Bump = normalize(Bump-1.0f);
            vSurfaceNorm = Bump.xzy;
            BumpEnv = (Input.TexEnvMap.xy/Input.TexEnvMap.w)+ (0.2f*Bump.xy);
    }
    else
    {
            Bump = tex2Dbias(Water_BumpSampler, float4(Input.TexBump.xy,0,-2.0f))
                     + tex2Dbias(Water_BumpSampler, float4(Input.TexBump.zw,0,-3.0f));
            Bump = normalize(Bump-1.0f);
            vSurfaceNorm = Bump.xzy;
            BumpEnv = (Input.TexEnvMap.xy/Input.TexEnvMap.w)+ (0.2f*Bump.xy);
    }

        // Compute the diffuse lighting component of the water.
        float3 vHN;
        float3 vHN2;

    vHN = normalize(vEyeDirWS.xyz + vSunVectorWorld_Sun.xyz);
    vHN2 = normalize(vEyeDirWS.xyz + vSunVectorWorld_Moon.xyz);

    specularFactor = fSpecularBlend*(pow(fSpecularBoost*saturate(float2(dot(vSurfaceNorm, vHN),fSunMoonInterpolant * dot(vSurfaceNorm, vHN2))), fSpecularPower));
    
        // Sample the water textures and determine the final color
        float4 baseColor = tex2D(Water_BaseSampler, Input.TexBase);
        float4 envColor = tex2Dbias(Water_EnvMapSampler, float4(BumpEnv.xy,0,1 * (Input.TexScreen.z/Input.TexScreen.w)));
        
        
        float4 terrainColor = baseColor;
    float fAlpha = baseColor.a;
        float4 fLand = { baseColor.a, baseColor.a, baseColor.a, baseColor.a };
        
    half fr = fresnel2( vEyeDirWS.xyz, vSurfaceNorm.xyz);

    Color = half4( lerp( baseColor.rgb * 1.8 * Input.vColor.rgb, envColor.rgb, fr ), 1);
//    return Color;

    return float4(lerp(Color.xyz + (vSunDirectional * specularFactor.x * 0.5) + (0.3 * (specularFactor.y)).xxx, terrainColor.xyz, fLand),fAlpha);
}

// ------- 3.0 ----------
float4 Water30PS(VSWATER20_OUTPUT Input) : COLOR
{
        return Water20PS(Input,true);
}

// ------- 2.0 ----------


float4 Water20PS(VSWATER20_OUTPUT Input) : COLOR
{
        return Water20PS(Input,false);
}

// ------ VS ------
VSWATER20_OUTPUT Water20VS(VSWATER20_INPUT Input)
{
        return Water20VS(Input,false);
}


The changed lines are:

#define fresnMin 0.03

#define fresnMax 0.4

return lerp( fresnMin, fresnMax, frdot * frdot * frdot * frdot * frdot * frdot * frdot);
}

   Color = half4( lerp( baseColor.rgb * 1.8 * Input.vColor.rgb, envColor.rgb, fr ), 1);

   return float4(lerp(Color.xyz + (vSunDirectional * specularFactor.x * 0.5) + (0.3 * (specularFactor.y)).xxx, terrainColor.xyz, fLand),fAlpha);
}

I use the 'medium mediterrainian' wave animation in FEX with my own custom water and sky textures.

It is a shame about the terrain not casting shadows onto the water. It does cast shadows onto itself though. I wonder why this is...


Paul
Image
pwheeler
2nd Lieutenant
2nd Lieutenant
 
Posts: 54
Joined: Mon Dec 31, 2007 11:05 am

Re: FSWC's on halt

Postby pwheeler » Sat Jan 26, 2008 5:24 am

By thw way, how do you get FSX to change the shader while its running Ashton? I tried but couldn't figure it out.

Do you realise that this may mean that the settings could be tied in with a weather engine... e.g. reduce reflections when its windy...

Paul
Image
pwheeler
2nd Lieutenant
2nd Lieutenant
 
Posts: 54
Joined: Mon Dec 31, 2007 11:05 am

Re: FSWC's on halt

Postby Ashton Lawson » Sat Jan 26, 2008 6:47 am

It is a shame about the terrain not casting shadows onto the water. It does cast shadows onto itself though. I wonder why this is...


Paul


Well, if you normally have terrain texture res set to 60cm, it'll be regular.
Last edited by Ashton Lawson on Sat Jan 26, 2008 7:05 am, edited 1 time in total.
Image
FS Water Configurator+ has new modifications in the works, plus DirectX 10, Service Pack
1, and Radeon HD 3+ Series support.
Ashton Lawson
Major
Major
 
Posts: 1211
Joined: Thu Jun 15, 2006 5:25 am
Location: Phuket, Thailand

PreviousNext

Return to Flight Simulator X (FSX) and Steam

Who is online

Users browsing this forum: No registered users and 810 guests