Jump to content

Stary

MODDER
  • Posts

    8,500
  • Joined

  • Last visited

  • Days Won

    100

Posts posted by Stary

  1. On 10/25/2025 at 11:18 PM, yakarov79 said:

    uh. Living in Bergen, 

    have not seen that in-game, but the scenery is indeed stunning. To make it more real, you should always have tons of clouds and rain.  

    guess hand-sclupted terrrain mesh and tri-planar mapping would also help with the ingame look 😉

  2. On 10/22/2025 at 5:56 PM, Cellinia_Texas said:

    Now I am making a mod for Sea Power, and by coincidence, I learned that the game developers had made a mod for SF before. I want to give it a try. Maybe it will just be an interesting experience. Maybe I am too late now and I have missed the golden age of this game. But if I can, I hope I can learn something. I am also sorry for causing you some trouble.

    Hi Cellinia_Texas! MekStark from Triassic here. Julhelm also shows up here occasionally.

    Sure! SF2 is still a great modding platform and once you look past it's engine and avionics limitations, continues to be a good fun! 

    So have a go at it and enjoy the new hobby 🙂 

    • Like 1
    • Haha 1
  3. 21 minutes ago, Menrva said:

    @Stary fantastic stuff! I look forward to trying your shaders and make the best use out of them! I experimented a lot with shaders during the development of Operation Desert Storm 30th Anniversary Edition, but never got this far. Thank you for your works on Strike Fighters, they are much appreciated 👏🤩

    By the way, some years ago someone experimented with creating PBR shaders for Strike Fighters 2, they're available on GitHub. Their implementation is rather broken here and there, but they also introduced nice results under specific light conditions, so they may be of your interest: https://github.com/Zackin5/StrikeFighters2-PbrShaders

    Yeah I am familiar with that guy's test but it seems abandoned and also I personally never got them to work wihtout artifacts.

    That said I am curious what you will come up with using the shaders I uploaded if you ever want to do next real sky environment mod 🙂 did some tests with alpha-based normalmaps etc but so far nothing worth mentioning but here's the shaderENVCLOUDS rework works no inis exposed.FX

    • Like 2
    • Thanks 1
  4. Hello gang, both old familiar faces and the newer ones.

    Haven't been much around recently (if 9 years modding hiatus can be described as such...) but to be frank meeting recently  again with the very passionate Enoc "Flogger23" -and being introduced by him to intriguing dlls-related work started by Eagle114th- made me somewhat nostalgic for the old days here, thus took few downer rainy days to have a look at the old pre Cat-lockdowns shaders -with the help of AI. Yes, I distrust the prevalence of AI as much as the odd smelly prepper dude everyone has on the edge of his circle but being someone who couldn't calculate own age if his life depended on it, here we are.
    Man I still can't write a coherent short sentence, can I? 😄

    As per title, I am attaching some tweaked shaders that my stubborn pal, Chad GPT, helped me refine.

    SF2 shaders tweaks.zip

    Given the limitations and bit of artistic license, it's all on a "take it or leave it" basis.
    Those are focused on 2 key aspects of the SF2 quality of life upgrades that interest me:


    Flight:
    -gunsights/HUD rendering and investigations
    -in-cockpit displays rendering
    -clouds, stars rendering

    ThatTerrainYouLoveBombing(tm):
    -terrain tiles rendering hacks

    1) Gunsights/HUD shaders:
    Flight\FLTGUNSIGHT.FX -the usual gunsights
    Flight\FLTHUD.FX -HUD with assorted imagery as per aircraft's avionis file setup
    Flight\TWCOLOR1.FX -all the one-tint alpha-based letters and digits
    Flight\TWCOLOR2.FX -added as test, have not found the examples but I have not tested all the stock all-in-one aircraft, the shader uses two separate texture slots
    Flight\TWCOLOR8.FX -same as with TWCOLOR2.FX, expects 8 texture slots

    Those have now added user-adjustable faint shimmering and jittering to simulate older style cathode ray tube projectors onto phosphorate screen displays
    Please note: Gunsights use center of screen radial mask to clip the gunsight from the view if the gunsight image moves outside of the mask area;
    due to the way TK implemented things the mask is a screen space overlay, I was so far (bar one crap example I might look at again) unable to make the mask render as a quad in world space thus stay at pre-set position in cockpit, so if you have your gunsight reticle depressed for example during CCIP mode when moving your viewpoint downwards the mask which is in the center of screen will make the gunsight visible again.

    2) Radar displays, TV displays, moving map display:
    Those are updated to a point engine allows: 
    Flight\FLTCOCKPITMAP.FX -Map displas: fully configurable tint of the map image (the style of original map image -PLANNINGMAP3.xxx being of biggest importance, default style maps look better IMO) with additional noise and scanlines where you can control scanlines intensity, size and scroll speeds, noise dimming factor etc.
    Flight\TWCOLOR1.FX -Same goes for RADARS/RWR BUT the radar/RWR returns are hard coded into being green, if we were able to hack the blending mode of those we might get better results.
    Same noise and jittering as with TV/MAP/HUD digits.
    We CAN decopule the material shaders in avionics inis so one can use different shaders/renamed copies of for on-HUD digits etc and something else with diffferent parameters for RADAR/RWR displays, but that was not the scope of my tests.
    Flight\FLTDTVFILTER.FX -similar treatment, able to adjust tint and scanlines, flickering etc, but I saw sommunity already did some interesting thigns using various BlendOp= methods, might look intriguing when paired together with this shader (ie. amber LLLTV with negative/whitepoint etc)

    every shader has a part at the top around constant buffers declarations that allows one to adjust, example from FLTGUNSIGHT.FX shader:

    // Mask, jitter, flicker, and noise controls
    cbuffer cbScreenMask
    {
        float2 g_ScreenSize;       // resolution
        float  g_ScreenRadius;     // visible radius [0..1]
        int    g_DebugMode;        // 1 = debug overlay
        float  g_FadeWidth;        // 0.02 typical
        float  g_JitterAmount;     // UV shake amplitude
        float  g_JitterFrequency;  // jitter/flicker frequency (Hz)
        float  g_BrightnessAmp;    // brightness flicker amplitude (0–0.2)
        float  g_NoiseAmp;         // random sparkle intensity (0–0.05)
        float  g_NoiseFreq;        // random noise evolution speed (Hz)
        float  _pad;
    };

    // Defaults
    #ifndef HUD_CONST_OVERRIDES
    static const float2 HUD_DEFAULT_SCREENSIZE = float2(1920.0, 1080.0);
    static const float  HUD_DEFAULT_RADIUS     = 0.25;
    static const float  HUD_DEFAULT_FADEWIDTH  = 0.02;
    static const float  HUD_DEFAULT_JITTER     = 0.005;
    static const float  HUD_DEFAULT_FREQ       = 10.0;
    static const float  HUD_DEFAULT_BAMP       = 0.2;
    static const float  HUD_DEFAULT_NOISEAMP   = 0.02;
    static const float  HUD_DEFAULT_NOISEFREQ  = 50.0;
    static const int    HUD_DEFAULT_DEBUG      = 0;
    #endif
     


    3) Clouds, stars:
    Flight\ENVSTAR.FX -now shimmer randomly with configurable parameters in the shader, simple thing
    ENVCLOUDS.FX -AKA The Frustrating One. The one that I spent the most time on and achieved the least. The shading is somewhat improved but needs tons of additional tweaking, decoupled fade distance from fog distance etc but gave up in the end. Also no baked in altitude hacks though there is provision for those (Flight\ENVCLOUDS height offset.FX) as altitude hacks still rely on CPU-provided physical position in scene, so we can not really push them down, only the vertices

    4) Terrain visuals shaders that go into desired terrain folder:
    TERTERRAINEFFECT.FX, 
    TERFARTERRAINEFFECT.FX, 
    TERWATEREFFECT2.FX

    Basically updated terrain mesh shaders that do 1 thing: take the tile texture and calculate luminosity-based fake normalmap on per-tile basis and applies it on top of the noise normals we all are used to. Blending and derived normal  value are adjustable. Just for best visually matching output set the parameter to your tiles resolution:

    cbuffer cbPseudoNormal
    {
        float g_PseudoNormalStrength = 5.0;   // bump contrast (default ~3.0)
        float g_PseudoNormalTexRes = 512.0;     // tile texture resolution (default 256)
        float g_PseudoNormalInvert = 1;     // 0 = normal, 1 = inverted height
    };

    Given the nature of TK's wang tiles terrains that means the TERWATEREFFECT2.FX for land-sea and rivers tiles had to be adjusted with the same methods but also then I worked on adding more bells and whistles and looked into adding bits from the SF2NA water mesh shader (not much luck there) to the water branch of the tiles, all parameters are described in the shaders:

        // Fresnel / reflection
        float  WT_Fresnel_R0          = 0.0204;    //0.0204; // water reflectance at normal incidence (~2%)
        float  WT_ReflStrength        = 1.0;    // overall reflection strength multiplier
        float  WT_ReflDistNear        = 0.10;    //0.10;   // reflection UV distortion near
        float  WT_ReflDistFar         = 0.01;    //0.010;  // reflection UV distortion far
        float  WT_ReflDistGeomScale   = 0.05;    //0.35;   // base geom/distance reflection factor

        // Water tint
        float3 WT_WaterTint           = float3(0.08, 0.11, 0.14);
        float  WT_WaterTintAmount     = 0.55;    //0.55;   // 0 = use terrain albedo, 1 = full tint

        // Wave band blend
        float  WT_SecondWaveWeight    = SecondWaveWeightD; // default from cbConstant
        float  WT_Unused_pad0; float WT_Unused_pad1; float WT_Unused_pad2;

        // Sparkle/spec
        float  WT_SparkleStrength     = 1.0;    // 0 = off, 1 = default
        float  WT_SpecStrength        = 1.0;    //1.0;    // extra gain on specular lobe

        // --- WHITE CAPS controls ---
        float  WT_WhitecapAmount      = 0.40;   // overall foam blend amount (default used to be 0.4 in code)
        float  WT_WhitecapExponent    = 8.0;    //8.0;    // how sharp angle-to-sun is before foaming
        float  WT_WhitecapNoiseScale  = 4.0;    // frequency of noise mask (was *4.0)
        float  WT_WhitecapMaxBlend    = 0.85;    //0.85;   // safety clamp for foam mix [0..1]

        // Wave strength scaling at shores
        float  WT_WaveAlphaStrength   = 1.0;    // multiply alpha weighting on wave strength (shore calming)
        float  WT_WaveDistStrength    = 0.5;    //1.0;    // multiply distance fade impact on wave strength
        float  WT_WaveOverallGain     = 1.0;    // overall normal strength gain (pre-Fresnel)
        float  WT_Unused_pad3;

    Please note there are already very good mods for ingame environment and user-tweaked water shaders, shoutout to Menrva for his work in sky/water domains! But I decided to roll this one out too so people smarter and more artistically inclined than I am can have a go at those.

    I mostly tested them with the beautiful new retextured Korea MiG-Alley by Gepard+Lacsap and the extended Desert 4 by PieceMeal.

    Misc test shaders I included for giggles:
    extra terrain objects shaders\TERALPHAOBJECT.FX -for TOD trees that are randomly swaying juust a bit, purely visual "can be done? oh" test
    extra terrain objects shaders\TERSOLIDOBJECT.FX -added derived normalmaps

    Feel free to do much smarter things with those than I was able to, use as you see fit.

    Cheers, 
    Stary

     

    • Like 6
    • Thanks 2
  5. @Eagle114th circling back to cockpits being excluded from receiving shadows, I did quick digging and we have the OpenCockpit=TRUE flag being used in First Eagles 2 but is seems it's not used in SF2, example from FE2 Albatros V cockpit:

    [CockpitSeat001]
    ModelName=Alb5_pit.LOD
    HideExternalNodeName=cockpit
    OpenCockpit=TRUE
    ExternalClipDistMin=0.05

    All of those are self-explanatory.
    If it was the same with First Eagles 1 I can't tell, haven't really played that one much ever.

    Also there is individual ID for cockpits in viewlist.ini, ViewGroupID=1, used only by internal cockpit views, somehow I feel like this is of less importance as the OpenCockpit=TRUE seems to be the one of interest -of course I have no idea if it's even included in SF2 engine but omitted or not used at all.
    Ages ago I used Pe.Explorer to disassemble and grab all the possible strings and whatnot from all the dlls, need to check that stuff again but I think you're much better suited to search for the stuff with Ghidra and python scripts.

    • Like 3
  6. Intriguing.

    I am in no way going to do requests but two questions that are still on my mind 10 years after I drifted away from being regular here:

    1) Are you planning to take a look at ViewManager.dll? As far as my own digging went years back, and I might be wrong here but this might be of use to you, it seems certain view classes -the cockpit ones- are hardcoded from having shadowcasting on cockpit object(s) meshes.
    2) Same with TerrainEngine.dll -the damn locked altitude clouds are dealbreaker for me and make SF2 look much worse than it could, had we had clouds back at more sane altitudes (or the engine parsing their altitudes from environmentsystem.ini on scene creation), visual issues with the clouds particles aside as those are small price to pay compared to fluffy clouds at 16k feet we have now.

    • Like 6
  7. On 10/4/2025 at 9:05 AM, Menrva said:

    What Wrench said, it's not happening, it's vaporware, the web page for it was last updated 5 years ago. Not to mention that we're almost close to a Windows 12, Windows 10 about to be decommissioned. TK prefers to work on a cheap mobile game, apparently that guarantees him a steady flow of money.

    To be honest TK (or whoever runs those) wasn't active on his Instagram SF Modern Combat /SF Legends account for like 11 months now so he is kind of MIA.

  8. those were there since day one IIRC, just modulation options built in, I was fiddling with those for some different trees graphics blending options for soem test treemods back when, never found them usable, nice to see those actually do have some use on certain materials/textures

    • Like 1
  9. On 28.05.2022 at 2:37 PM, Stratos said:

    Hope you could find some time to hack other parts of the game like avionics...

    well this is very crude shader tweak, messing with avionics -without even saying what specifically?- is different level and frankly out of scope of my interest

  10. On 26.05.2022 at 1:30 AM, Menrva said:

     One of TK's weird (or cheap) design decisions; of course, this doesn't happen on stock terrains which hardly reach a safe value of 4km of elevation.

    this is most likely cheap 2002 era solution, puzzling given EAW had transparent see-through clouds layers (but not on overcast)

×
×
  • Create New...

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..