Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3]   Go Down

Author Topic: Flak Burst Flash Light Effects  (Read 19784 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5590
Re: Flak Burst Flash Light Effects
« Reply #24 on: October 07, 2019, 12:28:38 AM »

After recently installing this mod into my Modact 4.12.2 game, I noticed that the smaller calibre AA rounds (20mm and 25mm) which have a timed terminal burst would awfully strongly light up the scenery. Indeed, the bigger flak would do so as well. My first task was to tone this down.

Now, having just *one* calculation of the light intensity and range apply to both the small and big AA is ill advised, in my opinion. And so I differentiated between them, as will be seen below.

But one odd thing always bothered me. Even with the lighting values set extremely low for the small AA, bursts in cloud continued to light up the cloud way too much. At this juncture I've effectively disabled light emission from the small stuff, in order to fix its too-strong cloud lighting.

Below is my java code for the AirFlak class, inside Explosions.class...

1) I suspect it would be more elegant to define the lightPointIntensity and lightPointRange variables outside this class instead of here. ;)

2) I very considerably lowered the original Intensity and Range values that are possible. This keeps the flak from lighting the ground below to what I consider to be much too strong a degree.

3) For the big flak, the lightPointIntensity varies randomly between 2.0 and 3.0. The lightPointRange is 75 times the Intensity, or 150 to 225. This is the dark night baseline. As twilight brightens, the Range is adjusted down from this to 1/10 at lowest.

4) I kept decrementing the small AA values for these two variables, hoping to get to a point where the cloud would not be obviously lit up. No joy, even with the tiny 0.001 values here. Hence the test for the Intensity < 0.01, to disable the creation of a lightpointactor for these bursts. In the end, I find this to be just fine. After all, these bursts occur at a fixed range from the guns, and rarely is one hanging about in this narrow zone for the lighting to be appreciated anyway. ;)

5) I'm certain more elegant code than this ham-fisted effort could be constructed. But it works. Further tweaking is virtually certainly in order. The main thing I want to get across is the means of treating the different calibres separately.



Code: [Select]
    public static void AirFlak(Point3d point3d, int i) {
float lightPointIntensity;
float lightPointRange;
if (Config.isUSE_RENDER()) {
    o.set(0.0F, 90.0F, 0.0F);
    l.set(point3d, o);
    String string = "effects/Explodes/Air/Zenitka/";
    switch (i) {
    case 0:
string += "USSR_85mm/";
lightPointIntensity = 2.0F + World.rnd().nextFloat();
lightPointRange = lightPointIntensity * 75.0F;
break;
    case 1:
string += "Germ_88mm/";
lightPointIntensity = 2.0F + World.rnd().nextFloat();
lightPointRange = lightPointIntensity * 75.0F;
break;
    case 2:
string += "USSR_25mm/";
lightPointIntensity = 0.001F;
lightPointRange = 0.001F;
break;
    default:
string += "Germ_20mm/";
lightPointIntensity = 0.001F;
lightPointRange = 0.001F;
    }
    SfxExplosion.zenitka(point3d, i);
    float f = -1.0F;
    Eff3DActor.New(l, 1.0F, string + "SmokeBoiling.eff", f);
    Eff3DActor.New(l, 1.0F, string + "Sparks.eff", f);
    Eff3DActor.New(l, 1.0F, string + "SparksP.eff", f);
    if (World.Sun().ToSun.z > 0.1F)
Eff3DActor.New(l, 1.0F, string + "Burn.eff", f);
    else {
float burnSize = MiscEffects.cvt(World.Sun().ToSun.z, -0.3F, 0.1F, 10.0F, 1.0F);
lightPointRange *= MiscEffects.cvt(World.Sun().ToSun.z, -0.3F, 0.1F, 1.0F, 0.1F);
Eff3DActor eff3dactor = Eff3DActor.New(l, burnSize, string + "Burn_night.eff", f);
if (lightPointIntensity < 0.01)
return;
LightPointActor lightpointactor = new LightPointActor(new LightPointWorld(), new Point3d());
lightpointactor.light.setColor(0.6F, 0.4F, 0.2F);
lightpointactor.light.setEmit(lightPointIntensity, lightPointRange);
eff3dactor.draw.lightMap().put("light", lightpointactor);
    }
}
    }

Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

SAS~Storebror

  • Editor
  • member
  • Offline Offline
  • Posts: 23587
  • Taking a timeout
    • STFU
Re: Flak Burst Flash Light Effects
« Reply #25 on: October 07, 2019, 01:51:29 AM »

Might be a matter of taste, but in my opinion illumination effects from explosive rounds can hardly be overdone.
We've been using this mod in Ultrapack for almost 5 years now, of which 3 years ago it was integrated into a UP3 patch pack and therefore is in everyone's game for all players who join e.g. our sunday sessions.
The feedback we get is "brilliant". All over. People who play with us are excited, no one ever asked to tone this down on our sessions. You're actually the first one who thinks it'd be overdone.

Nevertheless, the more variety the better.

]cheers[
Mike
Logged
Don't split your mentality without thinking twice.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5590
Re: Flak Burst Flash Light Effects
« Reply #26 on: October 07, 2019, 03:27:56 AM »

Mike,
My first experience after first installing was when viewing the Kamikaze track. The water surface was surprisingly well lit up, and the clouds were flashing like mad, over a *humongous* area/volume. All from those small airbursts, and when the Sun is not at all far below the horizon.

Second experience was during a deep twilight run on the Net8Islands map. There the ground a kilometer below those small bursts was surprisingly brightly lit. At such distance there should be no ground/object illumination at all.

In both those circumstances, the luminosity of real 20/25mm bursts is far too dim to do this. (The brightness values originally assigned are more akin to the values given 250kg bombs). I'd say that such a burst in full darkness should induce no surface illumination worth simulating beyond 100m, and perhaps nearer to 50m.

My motivation in the end is to obtain better internal consistency. Explosive cannon shells can't produce the light of a 500lb bomb. ;) I'd have preferred to retain light emission for the small AA, but the damnable cloud lighting was just too objectionably bright to me. I wonder if some .mat file parameter for the cloud texture could be altered so as to circumvent this. It reminds me of how a high specularity value for the gun sight glass results in it flashing like mad while firing guns and the Sun is at the same time reflecting within the appropriate range of angles. (Which is why I started to assign zero specularity to the reflector glass face years ago.)
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5590
Re: Flak Burst Flash Light Effects
« Reply #27 on: October 07, 2019, 03:34:04 AM »

I forgot to add...

The issues I've raised are much more noticeable nearer to the ground/water and/or the cumulus clouds. For those flying bombing missions at several km altitude the ground/sea will not light up, and if well above the cumulus clouds they will not light up either. Or at least only very dimly so.

My first adventures were in the context of low level attacking of carriers and airbases, where bursts occur within a km of the ground/sea and within the cumulus clouds.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

SAS~Storebror

  • Editor
  • member
  • Offline Offline
  • Posts: 23587
  • Taking a timeout
    • STFU
Re: Flak Burst Flash Light Effects
« Reply #28 on: October 07, 2019, 04:22:57 AM »

I'm not talking about situations where we're too far off to see the effect.
This for instance is in darkest night, the flak shell explosion illuminates the clouds for a tenth of a second or so, just fine with me and anyone else we met:
https://www.sas1946.com/main/index.php/topic,40959.msg565183.html#msg565183
https://www.sas1946.com/main/index.php/topic,40959.msg565255.html#msg565255

And that's the same thing at the dawn of day:
https://www.sas1946.com/main/index.php/topic,40959.msg564960.html#msg564960

As I said, people who witnessed the effect on our online sessions were totally excited and no one ever asked to tone down the effect.

]cheers[
Mike
Logged
Don't split your mentality without thinking twice.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5590
Re: Flak Burst Flash Light Effects
« Reply #29 on: October 07, 2019, 05:02:32 AM »

Mike,
For the big stuff, a good 'n bright lighting is fine.

But for the 20mm/25mm stuff, the lighting should be only a fraction as bright.

Have you run the Kamikaze02 track, to see how those numerous small bursts light up the scenery?

Oh, incidentally. Notice that I set the RGB color values for the light as (0.6F, 0.4F, 0.2F). This gives a less yellow, more orange hue.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

SAS~Storebror

  • Editor
  • member
  • Offline Offline
  • Posts: 23587
  • Taking a timeout
    • STFU
Re: Flak Burst Flash Light Effects
« Reply #30 on: October 07, 2019, 05:09:14 AM »

I've tried all of this and we actually also have a mission taking place in north africa at sunset where lots of small AAA guns illuminate the sky.
Everyone's been totally excited about the effects and so am I.
Can't see much wrong with the Kamikaze02 track either, but once again: It's probably a matter of taste.

]cheers[
Mike
Logged
Don't split your mentality without thinking twice.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 5590
Re: Flak Burst Flash Light Effects
« Reply #31 on: October 07, 2019, 06:21:40 AM »

Indeed, personal taste accounts for much difference in opinion. ;)
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

DONAGHY

  • SAS Honourable Member
  • member
  • Offline Offline
  • Posts: 474
Re: Flak Burst Flash Light Effects
« Reply #32 on: November 10, 2019, 08:54:49 PM »

hi mike great mod adds a new feel to the night missions and congrats on bat lol converted hsfx nut  a big salute to all involed
Logged
Pages: 1 2 [3]   Go Up
 

Page created in 0.08 seconds with 23 queries.