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 1087 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6040
Experimenting with fire/smoke for crash wreckage
« on: January 18, 2024, 08:37:18 PM »

When a plane crashes, some fraction of the wreckage is assigned a fire and smoke effect. I've seen some mods where all have a quite large fire. I prefer that most flaming bits have a small fire (about 1m versus several meters). Furthermore, all effects can be given a scaling value in the Java classes. Most are typically given a scale of 1.0; occasionally I find a different value, such as 0.4, or 2.0. Not only can a fixed value be assigned, one can randomize it. For instance, for each instance of the generation of an effect one could have its generated particles fall within a selected size range, such as between 0.7 and 1.4. This means a fire particle sized at 2.0 in the .eff file will be created with a size randomly between 1.4m and 2.8m. I've been doing this in MANY effects during the v2.0 effects pack development process, which adds further variety.

It's not wise to push the variation in scaling too far, because other parameters are not also varied to suit. This can result in unsatisfactory results, such as widely separated particles when made small, or conversely a tight, blended bunch when made large.

So yesterday I had another brainstorm. To overcome the limits of excessive scaling, and wanting some flaming bits of wreckage to have considerable size so as to represent burning fuel flung away at some velocity, I decided to add code that treated a random fraction of the wreckage bits with completely separate effects for the purpose.

I apply a check on these conditions:
- The plane have at least 1 engine.
- The fuel on board must be at least 10% of max capacity.
- The plane height much be less than 5m AGL.

The randomizing process causes some crashes to have none of these, and others to have several, along with the other smaller fire/smoke effects for other wreckage.

Here's a screenie snapped just after a plane has crashed. It also had a random explosion occur as well, which creates many glowing sparks and a few (there are 4 here) ballistically flung small fireballs with trailing smoke (and which make a small dust cloud or water splash on impact). The tongues of fire extending toward the right are the new component I'm discussing here. This fire transitions to a dark smoke within a couple or three seconds.

Again, what I'm doing here is merely taking a random fraction of the existing fire/smoke effects for the wreckage and assigning a different pair of fire and smoke effects. And this is restricted to ground events; when this method is invoked for air explosions, the altitude check causes this process to be bypassed.


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

Frankiek

  • SAS Team
  • member
  • Offline Offline
  • Posts: 2952
Re: Experimenting with fire/smoke for crash wreckage
« Reply #1 on: January 18, 2024, 09:54:54 PM »

Waiting for the new pack i can see some nice trees
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6040
Re: Experimenting with fire/smoke for crash wreckage
« Reply #2 on: January 19, 2024, 04:22:36 AM »

My effects work doesn't involve trees.  ;)

After some tweaking to the math, to obtain tighter control on the velocity and directionality of the big fire streams. The aim is to have a kind of 'rolling fire' from the residual velocity of the pane, where fuel is moving with the wreckage. I have the effect lasting for a random period of time, currently between 1 and 1.4 seconds. The velocity is also random for each fire 'stream', between 1/2 and 3/4 the plane's speed at impact. Additionally, formerly at low speeds the streams could be directed at a considerable upward angle, a consequence of the 'bounce' of the wreckage at steep angles of fall. I'm constraining it to near the ground; already I have a fireball at the impact point, and a slow stream at a rising angle would kind of get 'lost' in the main fireball.

Also done was a balancing of the fire and smoke effects, to simulate the transition from fire to smoke as the fuel burns off. Compare this screenie with that in the first post. Shortly after this snapshot the fire had transitioned to just dark, expanding smoke hanging about for a short spell.

Note also the small dust clouds raised at each impact of wreckage with the ground. This is a new effect for v2.0. Formerly only water hits would raise a splash/water ring.


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 #3 on: January 19, 2024, 09:27:08 AM »

 ]cheers[
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6040
Re: Experimenting with fire/smoke for crash wreckage
« Reply #4 on: January 21, 2024, 01:47:00 AM »

As part of the process, the matter of wreckage undergoing a considerable 'bounce' is also receiving attention.

You'll doubtless have seen the pile of separated plane parts after a crash exhibiting a not inconsiderable bounce up into the air, which can have the wreckage be carried a large distance downrange before hitting the ground (and taking additional time to bounce some more while slowing.) I've always found this to be somewhat cartoonish looking, as though the plane had hit a trampoline.  ;) This is made specially bad when all pieces have nearly the exact amount of loft into the air, and much the same horizontal speed, in a very regimented manner. It's so artificial looking.

In Aircraft.class there are three methods involved here; two for the handling of the chunks upon being cut from the model, and the third for the wreckage that can have fire/smoke applied.

In all three instances I have added a check on height; if the FM location above ground is no higher than 1/2 the FM.length (size of the aircraft) parameter, the vertical velocity of the pieces is set to zero.

One more change has been made, this in Wreckage.setSpeed(). Here the vertical velocity had always had +5m/s added, which is the cause of the regimented lofting of the parts just described. I've altered the fixed 5m/s value to a random addition of between 0.5 and 1.5m/s. (I might further tweak this.)

In the 3-panel screenshot collection below, a B-17 has just crashed; from L to R the time is increasing, and the viewpoint has been pulled back due to the advancing wreckage along the ground. In the rightmost panel the wreckage has just come to a stop. (Note also the little clouds of dust they make--a new effect.) The perspective doesn't make it readily seen, but all the parts are largely sliding along the ground, with some having received a small bit of initial lift into the air.

Because of the reduced lofting of parts, they commence to slow down much sooner due to hitting the ground earlier. They don't then get as far downrange, and they also don't curve as markedly. The longer it takes a chunk to slow down, the farther along it travels on the curved path executed for it, getting to nearly a 180 degree change of direction in the worst cases.

Another consequence is the larger dispersion in distance traveled along the ground track; That is, the various pieces will have a larger range in distance they reach from the point of impact.

All this results in what I consider to be more sensible behaviour.


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 #5 on: January 21, 2024, 07:30:16 AM »

A consequence of my latest manipulations is the presence of the same wreckage for water crashes. Previously ONLY land crashes would create such wreckage. After many years of never having it present, it was something of a shock to see this new phenomenom. It behaves as best as can be expected, where the first contact of a piece with the water produces a splash, and the piece immediately disappears. (As opposed to the action on land, where the pice will bounce along for a while as it slows, and remaining visible for a time after coming to a stop.) The more shocking aspect was the sometimes not inconsiderable distance traveled by the bits of wreckage.

I have got rid of this by adding some checks for the location being on water; the wreckage, as before, is generated only for land impact or aerial burst.

But I am wondering if it would indeed be desirable to have this wreckage present for water crashes. I'll try some experiments, based on setting the velocities in the horizontal plane (X and Y) quite low, so that the bits cannot travel so far from the point of impact...
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 #6 on: January 21, 2024, 08:37:22 AM »

I've 'restored' the wreckage for water crashes, it being a consequence of the new handling of wreckage vertical velocity for events on the surface. Again, note that in the stock game such wreckage was never created with water crashes. (I'm not completely confident that such an omission was deliberate.)

The velocities are much reduced compared to land impacts, and so the pieces don't travel nearly as far. In this view, a plane has fallen at a moderately steep angle. Some parts have already hit the water near the point of plane impact as evidenced by the splashes. Those still above the surface came down about 1/3 to 1/2 second later, a bit beyond the right edge of this view. I have reduced the probability for the occurrence of the larger wreckage fire/smoke as compared to land crashes; we see a bit of that here.

Any thoughts on whether this is a good thing to have?


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 #7 on: January 21, 2024, 08:45:46 AM »

This should be a good thing to have because it give our brain the conseguence of the crash that it unconsciously is looking for after the impact....
Logged

UberDemon

  • UberDemon/danzigzag
  • Modder
  • member
  • Offline Offline
  • Posts: 1475
Re: Experimenting with fire/smoke for crash wreckage
« Reply #8 on: January 21, 2024, 12:11:13 PM »

That is looking good.
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 #9 on: January 23, 2024, 02:43:20 AM »

While playing with the wreckage, which is handled specifically in method Aircraft.explode(), I've been dealing also with the plane chunks as they become separated from each other and fall individually. This is done in methods cut() and cut_Subtrees(). Formerly, the velocities of the chunks have been the same as the plane at the moment of being cut. The result is that they look as though they suffer practically no drag, maintaining much the same speed as the intact, streamlined plane, all falling as a body albeit separating.

But once real parts are chopped from a plane and subject to aerodynamic forces, their drag will typically result in a rapid deceleration. Especially for high aspect, low density parts like wings and control surfaces. I believe there exists code to apply a drag, involving an assumed mass based on size of the chunk's mesh. It would take some ferreting and stumbling about for this non programmer. ;)  In the meantime, an easy expedient is to merely apply a random smaller velocity for the chunks. For the moment I'm using a speed reduced by factor of 0.6 to 0.85.

This screen cap shows the result, about a second or so after wrecking that poor Fulmar. Formerly the bunch of plane parts would have been still in the immediate vicinity of the parent plane. Here we see a notable falling behind, as well as a dispersion in distance resulting from the aforementioned randomized speed reduction applied to each part. A neat result is the more rapid overtaking of the debris! Another agreeable result is a fall pattern on the ground covering a longer footprint along the flight path upon the surface. Instead of the previous, most unnatural, geometric arc resulting from the identical velocities, there is now a more organic distribution to the surface impacts.

Yes, there's that favourite descriptor of mine again; "organic." I like simulated behaviour to at least pretend to pay lip service to reality. This involves what I call an organic randomness. Any improvement upon artificial regularity, even if as simple and crude as this, is a step forward, I think.

Furthermore, there has been only ever been the one effect tied to the chunks when separated. Originally it was a smoke, lasting for 3 seconds, with a 50% chance of occurrence. There are mods in which this effect is made into a fire (sometimes comically huge!). I have added a second effect, so that now there is an independent chance of occurrence of either or both of a fire and smoke. This is further randomized in size and duration (at the moment, fire can be generated for 0.5-1.5 seconds, smoke 0.75-2.5 seconds.) The fire has a smaller chance of being invoked than the smoke (here in this image a few parts are smoking; no fire attends.) More variety, baby!

The important element in this image is the pile of plane parts my Zero is rapidly overtaking, quite soon after wrecking the Fulmar. Additionally, note the dispersion in distance from the Fulmar due to the differing velocity reduction applied to each individual piece.

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 #10 on: January 23, 2024, 03:17:31 AM »

From the Kamikaze02 track, here a Betty's aileron, just after being knocked off, is quickly falling behind, with both of the randomly generated, brief fire and smoke. Sometimes there will be no fire/smoke, or just the fire, or just the smoke.

If after reading this you play this track, the aileron will always fall along with the plane, largely retaining the same speed as it slowly drifts laterally. With the speed range factor of 0.6-0.85, a part can have a speed as low as 60% of the plane's speed at the moment of separation. If the plane is doing, say, 200 kt, a part can be as slow as 120 kt.

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 #11 on: January 23, 2024, 03:54:04 AM »

From the BeauTorp track. This is at the moment of plane #2 of 3 plane crashing upon being shot down by the destroyer. On the far right is the fading splash from the 3rd plane's torp entering the water. Note the large range in distance along the ground track for the splashes from debris from plane #2. Formerly this splash pattern was much nearer to the crash point, due to the parts retaining the plane's speed.

Also worthy of note is the randomly generated explosion attending a plane crash, which just happened to occur for this running of the track. Clustered about is a pattern of high velocity shrapnel splash. Also seen are several 'tendrils' of smoke reaching skyward from high velocity smoking bits. Because this is a Pacific map, we see my new blast shock wave for tropically moist maps, with more structure than the typical, simple, single arc segment. There is also a soft glow of illumination from the blast.




This is 4 seconds or so later. Note the cluster of fading splashes to the right of the ship, they being made by the slowest debris that has taken longer to fall. At the plane's crash site we see several slower, ballistically thrown firey/smoky bits, which will make a small splash (or dust cloud on ground) on contact with the surface.




While I'm at it... Just a bit later still, the first torpedo has just detonated, generating high velocity shrapnel splash. In the background the plane's crash splash is settling down.

Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)
Pages: [1] 2   Go Up
 

Page created in 0.031 seconds with 24 queries.