SimForums.com Homepage
Forum Home Forum Home > Flight One Software Forums > Ground Environment X Series
  New Posts New Posts RSS Feed - Question about Water Blending Masks
  FAQ FAQ  Forum Search   Register Register  Login Login

Question about Water Blending Masks

 Post Reply Post Reply
Author
Message
toby23 View Drop Down
Senior Member
Senior Member


Joined: May-20-2008
Location: UK
Points: 460
Post Options Post Options   Thanks (0) Thanks(0)   Quote toby23 Quote  Post ReplyReply Direct Link To This Post Topic: Question about Water Blending Masks
    Posted: June-04-2008 at 4:30am
Hi Holger (and anyone else who can help!),

Thanks for your help with the default blending mask problem in icy areas yesterday...

If you look at the screenshot below, you can see the same problem with water blending masks too. I've had a look in the blending mask folder but don't know which file this is or if i can just change it for another one without hard edges.

What do you think? Is it possible to remove the sharp edges from the water mask? (see dark areas)


best regards,

Toby

Area around Miami Beach - N25 48.25 W80 7.86

Back to Top
NickN View Drop Down
Certified Professional
Certified Professional


Joined: November-21-2007
Points: 21168
Post Options Post Options   Thanks (0) Thanks(0)   Quote NickN Quote  Post ReplyReply Direct Link To This Post Posted: June-04-2008 at 10:42am

 

 

I dont see anything abnormal in your shots.. the dark spots are suppose to represent deeper water

Back to Top
toby23 View Drop Down
Senior Member
Senior Member


Joined: May-20-2008
Location: UK
Points: 460
Post Options Post Options   Thanks (0) Thanks(0)   Quote toby23 Quote  Post ReplyReply Direct Link To This Post Posted: June-04-2008 at 10:50am
hmm it's hard to see i know...
but there are sharp edges to the dark bits...
and it's a mask problem (i think)
it would be more natural if there were no sharp edges :)
Back to Top
NickN View Drop Down
Certified Professional
Certified Professional


Joined: November-21-2007
Points: 21168
Post Options Post Options   Thanks (0) Thanks(0)   Quote NickN Quote  Post ReplyReply Direct Link To This Post Posted: June-04-2008 at 10:58am

 

 

are you using the UTX water layer?

I do.. after setting up UTX and making sure the default water layer is enabled for clear or blue.. I then install my theme from FEX

This does work and it also cuts down on the plastic wrap look

 

 

Back to Top
toby23 View Drop Down
Senior Member
Senior Member


Joined: May-20-2008
Location: UK
Points: 460
Post Options Post Options   Thanks (0) Thanks(0)   Quote toby23 Quote  Post ReplyReply Direct Link To This Post Posted: June-04-2008 at 11:09am
i did as you suggested and the straight edges are still there but a lot less noticeable than before...

thanks for your help...

Back to Top
NickN View Drop Down
Certified Professional
Certified Professional


Joined: November-21-2007
Points: 21168
Post Options Post Options   Thanks (0) Thanks(0)   Quote NickN Quote  Post ReplyReply Direct Link To This Post Posted: June-04-2008 at 11:12am

 

 

 

As for shader tweaking..

 

Here is my shader file

 NOTE: MUST BE FSX-SP2 -or- Acceleration and this is not for DX10

..BEGIN COPY HERE:

//---------------------------------------------------------------------------
// 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.05
#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 );
}

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 * 2 * Input.vColor.rgb, envColor.rgb, fr ), 1);
//    return Color;

    return float4(lerp(Color.xyz + (vSunDirectional * specularFactor.x * 0.5) + (0.1 * (specularFactor.y + 0.2 * saturate(dot(vSunVectorWorld_Moon,vSurfaceNorm)))).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);
}

 

----------------------------------------

END COPY

 

 

Instructions:

 

1. Browse to: Flight Simulator X\ShadersHLSL\Terrain

2. Locate the file: Water20.fxh and SAVE a copy of the original in a safe place

3. Open Water20.fxh in NOTEPAD (right click, open with.. notepad)

4. Overwrite the entire contents with the edit above and save

5. Browse to: (XP) C:\Documents and Settings\YOUR ACCONT NAME\Local Settings\Application Data\Microsoft\FSX\Shaders\Terrain

...and delete everything in that folder.

 

NOTE: Hidden files and folders must be disabled in Windows to find the folder above

 

NOTE: ANYTIME you make an edit to that shader file or revert back to the default you MUST empty the contents of the Application Data\Microsoft\FSX\Shaders\Terrain folder before the revert or change will take place.

6. Start FSX and enjoy...   Water in bush flying can be pushed up to 2x MED or HIGH for a bit better reflection but it does come with a cost to performance

 

the above gets rid of too much reflection from clouds and landscape, corrects moonglow on water and makes the overall appearence better

 

Paul Wheeler and Ashton Lawson will be releasing a control that will allow much more in change http://www.fswaterconfigurator.com/contact.htm

Back to Top
toby23 View Drop Down
Senior Member
Senior Member


Joined: May-20-2008
Location: UK
Points: 460
Post Options Post Options   Thanks (0) Thanks(0)   Quote toby23 Quote  Post ReplyReply Direct Link To This Post Posted: June-04-2008 at 11:21am
nick,

thank you for sharing your shader edit with us all...

FSX looks so much better now...


      
Back to Top
NickN View Drop Down
Certified Professional
Certified Professional


Joined: November-21-2007
Points: 21168
Post Options Post Options   Thanks (0) Thanks(0)   Quote NickN Quote  Post ReplyReply Direct Link To This Post Posted: June-04-2008 at 6:56pm

 

 

Your welcome

 

That file was tweaked with FEX Depths of Tropics 2 and the UTX Waterclass enabled

 

I can rework it a bit for other themes.. and it may not look quite right if you dont use FEX and the theme I mentioned

 

The FS Water Configuration Tool will allow direct access and make edits simplistic for any user via a sider based GUI.... color, tint, reflection, glow.. all controllable

 

http://www.fswaterconfigurator.com/index.htm

Back to Top
HolgerS View Drop Down
Senior Member
Senior Member


Joined: April-01-2005
Location: Canada
Points: 400
Post Options Post Options   Thanks (0) Thanks(0)   Quote HolgerS Quote  Post ReplyReply Direct Link To This Post Posted: June-04-2008 at 8:19pm

Hello Toby,

good eye. Those straight edges do exist and for a similar reason as with the ice mask files. They are more obvious in low-contrast, light-colored tiles and the straight sections are pretty short but it can be distracting nevertheless. For example, I made a blue-gray "glacial silt" water texture for my Alaskan projects and the straight lines are quite noticeable.

There are a number of design "rules" when making texture blending masks and ACES broke these (their own rules) in a couple of places with the water masks, which is the 902b2*.bmp series in \Scenery\World\texture.

Fixing up those tiles is on my to-do-list for the near future and I'll post here once they are available for download, unless someone else beats me to it.

Cheers, Holger

 

Back to Top
NickN View Drop Down
Certified Professional
Certified Professional


Joined: November-21-2007
Points: 21168
Post Options Post Options   Thanks (0) Thanks(0)   Quote NickN Quote  Post ReplyReply Direct Link To This Post Posted: June-04-2008 at 8:40pm

 

 

Thanks Holger!  Smile

 

Back to Top
toby23 View Drop Down
Senior Member
Senior Member


Joined: May-20-2008
Location: UK
Points: 460
Post Options Post Options   Thanks (0) Thanks(0)   Quote toby23 Quote  Post ReplyReply Direct Link To This Post Posted: June-05-2008 at 3:23am
thanks for your reply holger,

i'd love to help repairing these 'tiles'.

I compared the 902b to the others and have highlighted what i think needs to be corrected below. If i'm right, the edges need to meet dead centre but not overlap each other?

If you can let me know what to do (i'm a graphic designer), i'll prepare all the bmp's and upload them here.

thanks,

toby

Back to Top
pwheeler View Drop Down
Senior Member
Senior Member


Joined: August-08-2007
Points: 227
Post Options Post Options   Thanks (0) Thanks(0)   Quote pwheeler Quote  Post ReplyReply Direct Link To This Post Posted: June-05-2008 at 4:24am
Holger,

I kind of think that you should be working for ACES and sorting all this out at the source! You seem to have more knowledge than the rest of us put together! Wink

Looking forward to trying your fixes.

Paul
Back to Top
HolgerS View Drop Down
Senior Member
Senior Member


Joined: April-01-2005
Location: Canada
Points: 400
Post Options Post Options   Thanks (0) Thanks(0)   Quote HolgerS Quote  Post ReplyReply Direct Link To This Post Posted: June-05-2008 at 2:17pm

Hi guys,

Toby, excellent deduction and many thanks for the initiative. I made more than 200 of these blending mask files (m-tiles) during the past few months so I'm more than happy not having to look at the screen in black and white for a while Wink

You've almost got it right except the "rule" is even more restrictive. As you've probably figured out already the eight panels in each m-tile are required for the different ways in which two different classes (textures) can be neighbors to one another and require blending: opposing corners (panels 1 & 2), block edges (panels 3 & 4), or block corners (panels 5-8). The sim then picks the correct panel for a given situation and uses that for the blending overlay.

Since any of these combinations can occur anywhere in the sim world, all panels need to be tileable (join without visible edges) and thus the place where black meets white along the tile edges needs to be dead center for each of the four edges of each of the eight panels.

For example, if you look at the left edge of the sixth panel from the top you'll notice that black extends quite a ways higher up than the center point. Since each pixel of the 512x512 bitmap represents about 8ft on the ground it becomes apparent where those straight edges in the water come from.

There are a number of ways to check existing m-tiles for proper alignment. I'm using an overlay that splits each panel into four squares thus highlighting the center points of the edges. You can download that template here: http://hsandmann.com/FSX/M-tile_checking_template_902.zip . Placing it as a semi-transparent layer on top of a 902 file should help with the task. 

The water m-tiles are somewhat different from the land m-tiles. Land m-tiles are strictly black&white and use 1.2-m resolution (1024px) whereas water tiles allow for gradual blending through 8-bit pixel depth but at 2.4-m resolution. Once you've edited your bitmaps you need to use the Terrain SDK Imagetool utility to convert to 8-bit format with mipmaps (land m-tiles would need to be in 1-bit format).

More information about m-tiles is included in my land class spreadsheet available at http://forums.simflight.com/viewtopic.php?f=231&t=57245  I'm still working on updating that information since some of it isn't entirely correct as I've since discovered. However, those changes won't have any bearing on how to properly create or update m-tiles.

If we want to continue a technical discusssion on m-tiles we should probably do so in that simFlight forum or at FSDeveloper as it's not really a support forum issue for GEX. 

 

As for Paul's comments I'd like to say this: we, as FS users, tend to make judgements about sim features (or lack therof) quickly and often quite harshly. Similarly, us add-on developers work daily to "tear apart" the original files and, at the end of the day, are proud of how our interpretation of the sim world looks oh-so-much better. It's easy to forget, though, that all this is possible only because of what the core features of the sim are and how they were made accessible to us through a (fairly) open architecture. It's the people at ACES who, over many generations of FS, have developed a "terrain engine" that is truly amazing in its design and abilities; the more one becomes familiar with it, the farther the jaw drops. Thus, IMO, the biggest credit should always go to ACES Clap  We're just nibbling on the edges; in this case, literally Wink  

Cheers, Holger

Back to Top
NickN View Drop Down
Certified Professional
Certified Professional


Joined: November-21-2007
Points: 21168
Post Options Post Options   Thanks (0) Thanks(0)   Quote NickN Quote  Post ReplyReply Direct Link To This Post Posted: June-05-2008 at 2:35pm

 

 

Holger

No problem with discussions of issues like this. If they are helpful and can help people meet their goals, we are all for that here.

I do a lot of tweaking help and that is not GEX related either.

When a subject comes up outside the realm of GEX design or issue and a discussion of the problem and offer of possible resolutions that can be of help to people, and, answer their questions around subjects like the above, this forum as far as we are concerned is open to that at anytime. Your experience and knowledge is greatly appreciated in those discussions and always will be.

 

Back to Top
toby23 View Drop Down
Senior Member
Senior Member


Joined: May-20-2008
Location: UK
Points: 460
Post Options Post Options   Thanks (0) Thanks(0)   Quote toby23 Quote  Post ReplyReply Direct Link To This Post Posted: June-05-2008 at 2:49pm
thanks Holger,

exhaustive, educational and informative...
i think i understand what you mean and will have a look tomorrow and see what i can do. I have a couple of Questions before i start...

1. Files 902b2m11-902b2m71 are exactly the same right? All 7 bmp's are exactly the same. Theoretically i could just repair one and then export it with 7 different names, right?

2. The bmp's are saved with Indexed Colour, do you know exactly which photoshop format ACES used to save them? ie perceptual, adaptive, 256 colours etc etc?

And before i forget, without the hard work of the team at ACES, none of us would be having as much fun flying the virtual skies anyway! thanks guys!    
Back to Top
HolgerS View Drop Down
Senior Member
Senior Member


Joined: April-01-2005
Location: Canada
Points: 400
Post Options Post Options   Thanks (0) Thanks(0)   Quote HolgerS Quote  Post ReplyReply Direct Link To This Post Posted: June-05-2008 at 3:14pm

Me again,

thanks for the support, Nick.

Toby, I hadn't realized that those seven variants were idential but you are correct: only one of them needs to be edited and then copied. Usually, each m-tile bmp is unique but I guess with water there's no real need for that. It's kind of typical for ACES though to provide "placeholder" features that are intended to be fleshed out in future versions of the sim.

Sorry, I don't know the specifics of ACES' process. I work with Photoshop and keep the bmps in 24-bit RGB mode, which allows for layering. Specifically, I use a simple batch file in my Imagetool working folder, with the command line "imagetool -24 -nomip -noalpha *.bmp", to convert the originals to 24bit. I save my edits as 24-bit as well and then load them into Imagetool, convert to 1-bit format, and auto-add mipmaps.

Cheers, Holger

Back to Top
HolgerS View Drop Down
Senior Member
Senior Member


Joined: April-01-2005
Location: Canada
Points: 400
Post Options Post Options   Thanks (0) Thanks(0)   Quote HolgerS Quote  Post ReplyReply Direct Link To This Post Posted: June-05-2008 at 3:35pm

And me again...

Oops, I was wrong about the size of the 902 m-tiles too. The panels are 256x256 not 512x512 so each pixel represents about 4.8m on the ground (~16ft). I've shrunk my template file accordingly and re-uploaded it under the same name/link.

Also, my statement "thus the place where black meets white along the tile edges", is a bit misleading for water m-tiles as they work with 8-bit grayscale depth. It's 50% gray (128) that is the actual threshold value that those edge center points should have.

Sorry about that.

Cheers, Holger

Back to Top
toby23 View Drop Down
Senior Member
Senior Member


Joined: May-20-2008
Location: UK
Points: 460
Post Options Post Options   Thanks (0) Thanks(0)   Quote toby23 Quote  Post ReplyReply Direct Link To This Post Posted: June-05-2008 at 3:49pm
Thanks for the update :)
I already resized your mesh

happy flying, toby

Back to Top
pwheeler View Drop Down
Senior Member
Senior Member


Joined: August-08-2007
Points: 227
Post Options Post Options   Thanks (0) Thanks(0)   Quote pwheeler Quote  Post ReplyReply Direct Link To This Post Posted: June-05-2008 at 5:48pm
Absolutely Holger. I was not trying to take any thing away from ACES. They have truely created something very special and immensly complex.

I just astounds me how lucky we are to have developers such as yourself with such an indepth knowledge of the sims architecture. Wink I doubt there is any other computer game franchise where the users have such knowledge.

Paul
Back to Top
toby23 View Drop Down
Senior Member
Senior Member


Joined: May-20-2008
Location: UK
Points: 460
Post Options Post Options   Thanks (0) Thanks(0)   Quote toby23 Quote  Post ReplyReply Direct Link To This Post Posted: June-06-2008 at 7:49am
I've edited the water masks and here's the result...

Not too much change, unfortunately, but there is a visual improvement.
I had hoped a quick edit would sort this out but it looks like the positioning of the tiles, something out of my control, is causing more of a problem than the actual texture of the tiles...

Tiles with a black edge (hard colour in screenshot) are placed next to tiles with no colour, not even a 50% gradient (for a smooth fade), and that's creating this visual phenemenon...


Before Edit


After Edit
Back to Top
HolgerS View Drop Down
Senior Member
Senior Member


Joined: April-01-2005
Location: Canada
Points: 400
Post Options Post Options   Thanks (0) Thanks(0)   Quote HolgerS Quote  Post ReplyReply Direct Link To This Post Posted: June-06-2008 at 3:28pm

Hello Toby,

many thanks for making those changes. They did help with my silt water transitions though a few small edges remain. I think the best way to do more in-depth checking of the edges is by tiling them in Photoshop outside the 1x8 panel. Meaning, open a new file at, say, 1024x1024 and then copy and paste individual m-tile panels so that the end up next to one another as they would in FS. That should help with finding and eliminating remaining grayscale jumps.

I must admit I never checked the Miami Beach location until today otherwise it probably would have dawned on me that this is a different issue.

All water textures use the same m-tiles (902) so there shouldn't be any remaining edges once your edits are completed. However, the 8-bit grayscale method for water blending, with its gradual transition across most of the tile, can "fail" if neighboring classes have very different brightness or hue values. That's because blending is applied only for grid nodes where different classes meet. And because that blending is very gradual, it extends to the edge of the neigboring tile that is not blended and thus you have a sharp edge. If you set water effects to Mid 1.x and switch to top-down view you can clearly distingish tiles with blending from those without.

Now, if you look at the default water class file (worldwc.bgl in \Scenery\Base\scenery) in TMFViewer you'll notice that ACES was quite careful to use similar classes/textures as neighbors. (To some extent that's a carry-over from FS9 because that version had no 8-bit blending and thus required very gradual hue/brightness changes between classes.) Obviously, if adjacent textures are similar in hue, brightness, and content, then visible edges are much less likely to occur.

However, you're flying with the UT-X USA water class enabled and it looks like Allen did not implement the same gradual transitions of class types. In that particular location at Miami Beach, a dark blue and unstructured inland water class (#5) is mixed with the light blue coral reef classes 43 and 37. (the corresponding file is WC2622U.bgl in \Scenery\UtWc\Scenery).

Deactivating the UT-X water class entry in the scenery library will solve that issue. However, the UT-X water class files are better at differentiating inland water bodies and their different hues so you'll lose that advantage. I'll talk to Allen about the drawback of his files. Perhaps there are ways to minimize the problem in future updates.

Cheers, Holger

Back to Top
toby23 View Drop Down
Senior Member
Senior Member


Joined: May-20-2008
Location: UK
Points: 460
Post Options Post Options   Thanks (0) Thanks(0)   Quote toby23 Quote  Post ReplyReply Direct Link To This Post Posted: June-06-2008 at 5:49pm
Hi Holger,

No problem at all...
I'm working this weekend but I'll read through your post in peace and quiet next week and play around with the tiles and see what i come up with...

can you send me some landclass jpegs to help explain what you mean by a few small edges remain... I know it wasn't perfect but if you can send me some images, i can do a better job next time.. (maybe you can mock up a demo of how the tiles could be laid together or is every variation possible?)

many thanks,

toby

Back to Top
toby23 View Drop Down
Senior Member
Senior Member


Joined: May-20-2008
Location: UK
Points: 460
Post Options Post Options   Thanks (0) Thanks(0)   Quote toby23 Quote  Post ReplyReply Direct Link To This Post Posted: June-08-2008 at 12:03pm
Hi Holger,

Me again..
So job's done and i've just been flying around a bit..

but what i'm seeing (quite often) is pieces of the 8 part mask i edited being laid next to tiles with no 'silt' mask whatsoever...

this creates an ugly effect, for example i just saw one of the corner pcs, and one side looked nice (the smooth gradient side) and the other 2 edges really stood out in the surrounding lighter ocean..

do i need to accept this or can i do something about this?

thanks, toby

Back to Top
HolgerS View Drop Down
Senior Member
Senior Member


Joined: April-01-2005
Location: Canada
Points: 400
Post Options Post Options   Thanks (0) Thanks(0)   Quote HolgerS Quote  Post ReplyReply Direct Link To This Post Posted: June-08-2008 at 1:45pm

Hi Toby,

it's all in the "hands" of the water class file and corresponding textures, default or otherwise. Are you flying with UT-X water class active or not?

Cheers, Holger

Back to Top
toby23 View Drop Down
Senior Member
Senior Member


Joined: May-20-2008
Location: UK
Points: 460
Post Options Post Options   Thanks (0) Thanks(0)   Quote toby23 Quote  Post ReplyReply Direct Link To This Post Posted: June-08-2008 at 2:08pm
yup, it's active but switched to clear blue so FEX can do it's thing...

Back to Top
HolgerS View Drop Down
Senior Member
Senior Member


Joined: April-01-2005
Location: Canada
Points: 400
Post Options Post Options   Thanks (0) Thanks(0)   Quote HolgerS Quote  Post ReplyReply Direct Link To This Post Posted: June-08-2008 at 5:49pm

Hi Toby,

try it without the UT-X water class entry, that should minimize the sharp edges.

Cheers, Holger

Back to Top
flightjam View Drop Down
Senior Member
Senior Member


Joined: December-18-2008
Points: 101
Post Options Post Options   Thanks (0) Thanks(0)   Quote flightjam Quote  Post ReplyReply Direct Link To This Post Posted: March-03-2009 at 7:25pm
Hey Nick, and anybody else who might know this

ok, ive done all the other steps for the shader tweaking but in
STEP 5: Browse to: (XP) C:\Documents and Settings\YOUR ACCONT NAME\Local Settings\Application Data\Microsoft\FSX\Shaders\Terrain...and delete everything in that folder.

Now do you mean to go to ShaderHLSL, then the terrain folder, and delete all that stuff inside cause there is a lot of different stuff in that folder, or do you mean to just delete the water20.fxh thats in that folder and replace it with the new water20 that you posted here for us to copy and paste?
im kind of confused about this

thanks
Back to Top
flightjam View Drop Down
Senior Member
Senior Member


Joined: December-18-2008
Points: 101
Post Options Post Options   Thanks (0) Thanks(0)   Quote flightjam Quote  Post ReplyReply Direct Link To This Post Posted: March-03-2009 at 7:26pm
also im using Vista incase that matters
Back to Top
NickN View Drop Down
Certified Professional
Certified Professional


Joined: November-21-2007
Points: 21168
Post Options Post Options   Thanks (0) Thanks(0)   Quote NickN Quote  Post ReplyReply Direct Link To This Post Posted: March-03-2009 at 11:55pm

 

 

This thread is very, very old

 

You can use the program FSWC to do this all for you automatically

http://www.fswaterconfigurator.com/

 

Back to Top
flightjam View Drop Down
Senior Member
Senior Member


Joined: December-18-2008
Points: 101
Post Options Post Options   Thanks (0) Thanks(0)   Quote flightjam Quote  Post ReplyReply Direct Link To This Post Posted: March-04-2009 at 1:28am
ok didnt know
thanks
Back to Top
flightjam View Drop Down
Senior Member
Senior Member


Joined: December-18-2008
Points: 101
Post Options Post Options   Thanks (0) Thanks(0)   Quote flightjam Quote  Post ReplyReply Direct Link To This Post Posted: March-04-2009 at 9:35pm
Hey Nick

just a quick question, is the sun fix you have on Avsim that you posted october 2007 the same as the one on
FSwaterconfigurator.com?


Back to Top
flightjam View Drop Down
Senior Member
Senior Member


Joined: December-18-2008
Points: 101
Post Options Post Options   Thanks (0) Thanks(0)   Quote flightjam Quote  Post ReplyReply Direct Link To This Post Posted: March-05-2009 at 12:46am
i read the sun modification on FSWC is a bit different but does it really add anything more than the one you made a while ago?

also it says that in the READ ME file it could cause the game to not work and that you guys are not held responsible. should i worry about it not working? and do u use it?

thanks
Back to Top
pwheeler View Drop Down
Senior Member
Senior Member


Joined: August-08-2007
Points: 227
Post Options Post Options   Thanks (0) Thanks(0)   Quote pwheeler Quote  Post ReplyReply Direct Link To This Post Posted: March-05-2009 at 4:29am
The sun mod on the FSWC forums is a variation on Nicks original from Avsim.

I have increased the suns glow and added a new corona texture so that it gives a simulation of bloom when you run with the FSX bloom switched off.

Try the 'no-bloom' version in the late afternoon and you'll get a really beautiful sunset without having the fps hit from using FSX's bloom.

That READ ME was just me covering my back! (actually it was Nick covering all our backs!) It is thoroughly tested as are all our releases.

I use it all the time. The installer gives you the option of installing bloom or no bloom verisons and the uninstaller will put all the default textures back.

Paul

Back to Top
flightjam View Drop Down
Senior Member
Senior Member


Joined: December-18-2008
Points: 101
Post Options Post Options   Thanks (0) Thanks(0)   Quote flightjam Quote  Post ReplyReply Direct Link To This Post Posted: March-05-2009 at 7:20pm
alirght, i dont have any problems with my FPS when i use bloom
just wanted to know what it would do overall and if it would effect my game from that READ ME thing i saw,
thanks though, you've answered my question Smile

Back to Top
NickN View Drop Down
Certified Professional
Certified Professional


Joined: November-21-2007
Points: 21168
Post Options Post Options   Thanks (0) Thanks(0)   Quote NickN Quote  Post ReplyReply Direct Link To This Post Posted: March-05-2009 at 7:33pm

 

 

Its called a 'liability disclaimer' which releases from liability the person who made the files if somehow they blow up your computer

 

Every single installer has them... read the EULA's

Back to Top
flightjam View Drop Down
Senior Member
Senior Member


Joined: December-18-2008
Points: 101
Post Options Post Options   Thanks (0) Thanks(0)   Quote flightjam Quote  Post ReplyReply Direct Link To This Post Posted: March-05-2009 at 7:52pm
ok got it
Thanks man
but i guess i wont be using that since its just mainly for people who dont use Bloom
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.250 seconds.