Special Aircraft Service

Please login or register.

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

Author Topic: Experimenting with fire/smoke for crash wreckage  (Read 1088 times)

0 Members and 2 Guests are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6040
Re: Experimenting with fire/smoke for crash wreckage
« Reply #12 on: January 23, 2024, 07:44:08 AM »

I've added some vertical dispersion to the cut pieces.

Formerly, the distribution of the population of bits was a highly flattened fan, spread out horizontally and arcing downward due to gravity. There is considerable horizontal spread, very significantly contributed to by a divergent, curving path whose axis is vertical. I would really(!) like to quell this, but cannot discern where it's being introduced. Due to the fixed vertical speed (being that of the plane at release), as seen from the side view like below, previously there would be practically no difference in the paths with respect to the vertical. All pieces would follow much the same course due to having the same vertical speed.

I've added a scaled vertical component to the velocity at such that the least slowed bits are given a -5m/s velocity (downward) and the most slowed ones are given a +5m/s velocity. This results in a maximum dispersion in the vertical of 10m/s. The result is the range of paths shown here, as seen from the side. The reasoning is this. The least slowed parts (currently slowed to 85% of the plane's speed) are those having higher density/lower drag and thus a smaller deceleration in the slipstream. This would be accompanied by a faster acceleration downward. Conversely, the most retarded bits (currently slowed to 60% of the plane's speed) have lower density/higher drag, and thus accelerate downward less quickly.

By the way, the nearly vertical smoke trail is one of the couple or several (randomly generated) ballistic particles thrown out by the explosion of the plane, here a B-25 obliterated by a volley of 30mm shells.


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

shardana

  • member
  • Offline Offline
  • Posts: 862
Re: Experimenting with fire/smoke for crash wreckage
« Reply #13 on: January 23, 2024, 09:10:49 AM »

Have you ever been accused of torture? I mean this is becoming really and awfully hard to bear!

Can't wait for version 2.0
Logged

Whiskey_Sierra_972

  • Modder
  • member
  • Offline Offline
  • Posts: 6508
  • In memory of my beloved hero: Saburo SAKAI!
Re: Experimenting with fire/smoke for crash wreckage
« Reply #14 on: January 23, 2024, 01:42:45 PM »

Dear Wx....you're a translator!

I mean that you're translating the game into reality!
Logged

RABIZO

  • member
  • Offline Offline
  • Posts: 512
Re: Experimenting with fire/smoke for crash wreckage
« Reply #15 on: January 23, 2024, 05:09:58 PM »

I'm filled with anticipation. ;D ;D ;D
Logged

UberDemon

  • UberDemon/danzigzag
  • Modder
  • member
  • Offline Offline
  • Posts: 1475
Re: Experimenting with fire/smoke for crash wreckage
« Reply #16 on: January 26, 2024, 04:46:35 PM »

Yes, much anticipationing!
Logged
Best Regards, UberDemon/danzigzag, Get UQMG at SAS BAT Mission area.  www.uberdemon.net no longer exists.  (** Alienware Aurora R7 / i7-8700 3.20GHz / 16GB RAM / Win 10 x64 / NVIDIA GeForce GTX 1080 **)

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6040
Re: Experimenting with fire/smoke for crash wreckage
« Reply #17 on: February 10, 2024, 05:07:08 PM »

More refinement in the handling of wreckage.



The velocities of the various pieces of wreckage are modified via three approaches:
- Add more drag to the pieces, by a factor of 3.
- Apply a variable rate of vertical velocity based on mass of part; less mass has a slower acceleration applied. (Yes, ideally density would be a far better determinant, but I've not figured out a means of calculating it.  ;)  )
- Reduce the horizontal component of additional 'ejection' velocity by a factor of 2; now the pieces fan out over a much narrower initial angle.

The result is a fall pattern that is smaller and more nearly circular, instead of a VERY wide, VERY narrow arc. This also hugely reduces the former behaviour whereby parts followed increasingly curved paths.

In the 3-panel image above, the left frame shows my Zero at the far left, and we're looking at the exploded plane's pieces from the side. Note the range in position of the pieces in terms of distance traveled from the exploded plane, as well as in height.

The middle frame is at the same instant in time, but the view is now from behind. Note the fairly small lateral spread in the paths the parts are taking; formerly this spread was at least 2X wider.

In the third frame the view is from my Zero looking back just after the pieces have fallen to the surface. The pattern of fall shown by the splashes reveals a roughly circular dispersion of reasonably small areal coverage. The stock pattern would have been a pretty narrow arc lying nearer to my plane and extending L-R by at least 2X the width of this pattern.

In short, the pieces do not travel as far, they do not spread out as widely, and they have a larger range of ejection and falling speed.


In the Java snippets below I show my changes done to achieve this result. I'm sure further tuning could be done by a Real ProgrammerTM, of which I am not.  ;)  Note the power law function modifying the vertical acceleration variable, World.g. Variable A is the 'retarding' factor to slow each part, based on mass; I've tripled its effect. Array [dv] holds the 8 values that are randomly selected from and applied to the horizontal component of each individual part's velocity upon release from the plane; I've halved the values.


From Wreckage.class
Code: [Select]
public boolean tick()
{
float f = Time.tickLenFs();
float f2 = (float)v.length();
float f1 = 10F / (f2 + 0.1F);
if(f1 > 1.0F)
f1 = 1.0F;
f1 *= Wreckage.dv[lr] * f;  //NOTE: [lr] has values randomly taken from array dv[]
pos.getAbs(Wreckage.p, Wreckage.o);
Wreckage.o.increment(W.z * f, W.y * f, -W.x * f);
Wreckage.oh.set(f1, 0.0F, 0.0F);
Wreckage.oh.transform(v);
Wreckage.o.setYaw(Wreckage.o.getYaw() - f1);
float f4 = A * f;
v.x = deceleron(v.x, f4);
v.y = deceleron(v.y, f4);
v.z = deceleron(v.z, f4);
// v.z -= World.g() * f;
v.z -= (World.g() + (float) Math.pow(A, 0.25F) * 9F) * f;  //reduces vert accel with decreasing mass; g effectively becomes -9.35 to -4.25 (800kg to 0.4kg)
Wreckage.p.scaleAdd(f, v, Wreckage.p);
            double d = World.land().HQ(Wreckage.p.x, Wreckage.p.y);


private void construct(float f)
{
.
.
.
wn = 60F + 80F / (wn + 0.2F);
W.scale(wn);
lr = World.Rnd().nextInt(0, 8);
// A = 0.02F / M;
A = 0.06F / M;
interpPut(new Interpolater(), null, Time.current(), null);
MsgDestroy.Post(Time.current() + 0x1d4c0L, this);  //1d4c0 = 120,000, or 120 sec
}


// private static float dv[] = {
// -80F, -60F, -40F, -20F, 20F, 40F, 60F, 80F, 0.0F
// };
private static float dv[] = {
-40F, -30F, -20F, -10F, 10F, 20F, 30F, 40F, 0.0F
};
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: 6040
Re: Experimenting with fire/smoke for crash wreckage
« Reply #18 on: February 10, 2024, 05:15:18 PM »

Here's a familiar case, from the Black Death track. This capture was taken during an intermediate stage in the refinements outlined above; the current pattern is a bit more confined than shown here.

The smoke from the plane collision is at the left. Compare the pattern of splashes from your own result when you run this track. The splashes here are nearer to the explosion, do not fan out as widely, and have a larger range in distance from the causative event.

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

Whiskey_Sierra_972

  • Modder
  • member
  • Offline Offline
  • Posts: 6508
  • In memory of my beloved hero: Saburo SAKAI!
Re: Experimenting with fire/smoke for crash wreckage
« Reply #19 on: February 11, 2024, 01:58:54 AM »

The effect of post 17 is absolutely like a real thing!
Logged

Dimlee

  • member
  • Offline Offline
  • Posts: 1254
Re: Experimenting with fire/smoke for crash wreckage
« Reply #20 on: February 13, 2024, 12:22:18 PM »

The effect of post 17 is absolutely like a real thing!

Agree. It looks frighteningly realistic.
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.034 seconds with 24 queries.