Loading [MathJax]/extensions/Safe.js

Special Aircraft Service

Please login or register.

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

Author Topic: Musings on contrails  (Read 375 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6162
Musings on contrails
« on: March 28, 2025, 12:09:18 PM »

I don't see a means to disable contrails if the player should desire.

I've already implemented a means to set the threshold height for contrail formation as scaling with the temperature set in a map's load.ini. Between a surface temperature of +10C to -35C the condensation altitude for contrails decreases linearly from the usual 7km down to 3km. Outside of this scaling range the thresholds are fixed at 7km and 3km.

Would it be worthwhile to add the capability for the player to choose whether to generate contrails or not?

Now, I do know that AI detection of planes is enhanced when contrails are being generated. And so this would have to be taken into account, by ensuring that the contrails are indeed properly disabled and not just declined to draw. ;)

Part of the reason I'm pondering this is that for well populated skies at altitude the number of contrails can cause their appearance/disappearance depending on what's within the field of view. And of course in the real world it's not always the case that contrails are created, as the ambient temp/humidity plays a role.

Another possible option is to have shorter, less persistent contrails, which are very much a real thing.

Another thing to consider is the option to NOT draw contrails for ALL engines. For 4-engined birds one could have contrails drawn for, say, motors 1 and 3 (inboard). This would be made even more feasible if only hooks specifically for contrails existed. Such hooks would be located some distance to the rear of the motor, instead of the existing engine hooks being repurposed. A more rearward location would be more amenable to a contrail being 'shared' by a pair of engines, as the hook could be laterally shifted to lie between the motor axes.


Thoughts?
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: 6754
  • In memory of my beloved hero: Saburo SAKAI!
Re: Musings on contrails
« Reply #1 on: March 28, 2025, 12:23:10 PM »

Hi!

Just my thoughts about....

IMHO as contrails are a phisical phenomena don't think I'll disable them even if possible in the future....

About to reduce the CPU load , a reduction in the number of contrails could be a good solution....

Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6162
Re: Musings on contrails
« Reply #2 on: March 28, 2025, 12:39:14 PM »

A quick proof of concept on halving the number to generate, assigning the effect to engines #1 and #4. The appearance of the effect could be improved for the purpose, here being a simple TSmokeTrail type of effect.

The method can be tweaked to allow to choose a desired effect. If a 4-engined plane has just 2 motors creating a contrail, a different effect could be invoked, such as being made a bit wider. There's no reason all contrails must be the same effect. Indeed, I've already implemented the selection of a subtler contrail for use at night, because the one good for daytime is FAR too brightly obvious in the dark. (I've also dome the same for tracer smokes, making a much subtler set for use when it's dark.)

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: 6754
  • In memory of my beloved hero: Saburo SAKAI!
Re: Musings on contrails
« Reply #3 on: March 28, 2025, 12:49:11 PM »

From your image , if the contrails became a little more backcombed and start between engines and elevators the result could be a good compromise!
Logged

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6162
Re: Musings on contrails
« Reply #4 on: March 28, 2025, 01:22:01 PM »

To verify that a different effect could be added, in addition to the effect that would apply for planes (singles and twins) not having such a 'sharing' scheme in operation, here I've made a new effect with 3X the width of the other contrail used in the previous screenshot. If I had a little friend along for support, it would be using the other, thinner contrail effect.

To get the contrail to start farther aft would necessitate placing the relevant hook farther aft. Because the hook used is the same as for damage smoke, no such relocation would be advisable. It would be better to add new hooks specifically for contrails, which of course must be done for every such plane individually. This could be started for just a single plane by having the code first look for the contrail hook, and failing to find it fall back to the usual smoke hook. In this way backward compatibility is assured for all planes not augmented so.

Now, a problem with starting a contrail removed from the engine is the empty space after which the contrail suddenly starts. If we could construct effects so that the particles or line segments could start out at a low opacity (or even invisible), build up to the desired maximum opacity, and then fade to the desired low or zero opacity, that would be awesome. It would open up a whole new world of effect possibilities.

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: 6162
Re: Musings on contrails
« Reply #5 on: March 28, 2025, 01:26:42 PM »

I've already added the capability to use TWO simultaneous tracer smoke effects, allowing to mix 3D AND trail types of effect together at once. It might be even easier to do the same here. A 3D particle effect could be of short duration, dominating the contrail near the plane, with the simpler and less resource-hungry 2D trail type taking over in dominance farther aft.
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: 6162
Re: Musings on contrails
« Reply #6 on: March 28, 2025, 01:47:09 PM »

I just made the change necessary in AircraftState to enable the generation of two contrail effects simultaneously. I have yet to verify if it behaves correctly when passing through the transition altitude of 7,000m. Here I quickly adapted an existing engine damage smoke for the purpose of checking on the feasibility. This new effect is particle-based and I left it darker so as to stand out against the lighter trail-based effect. Note how the contrast in the differing tones of the two effects makes visible the polygons of the trail-based effect. This would be much reduced when both effects have similar tone (brightness.)

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: 6162
Re: Musings on contrails
« Reply #7 on: March 28, 2025, 02:08:48 PM »

Well, I tried flying through the threshold altitude.

If I start already above, both contrail effects for both engines are being generated. When descending to below the threshold altitude, one of the two 3D effects ceases, but all three of the other effects always remain operating.

If I start below, no contrails are generated. When ascending to above the threshold altitude, all 4 effects are generated. Then when dropping back down just one 3D effect ceases, with the three remaining effects remaining always active.

The issue is how the effects are finished and made null. More sleuthing...

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: 6162
Re: Musings on contrails
« Reply #8 on: March 28, 2025, 02:42:36 PM »

Getting two simultaneous effects to behave is proving to be a tough nut to crack. I'll let that sit for now.

Here we see that indeed different planes can have different contrail effects (as long as one has a scheme in place by which to differentiate). My Frank has a thin, 1m wide trail and the B-24s have 3m wide trails, and reduced to being generated by just the outboard engines.

A player-selectable option could be introduced that permits to have all motors making contrails, or to have half of them do so, as here...

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: 6162
Re: Musings on contrails
« Reply #9 on: March 29, 2025, 11:26:38 AM »

As to the length of contrails, it should be expected that more can be drawn if they are not too long lived and hence comprise fewer segments or particles. I'm gravitating toward a different effect for single-engined planes versus multis. As far as I've seen a live time of around 50 seconds seems to have been the norm for a long time. Perhaps those for single-engined planes could be made to live for a shorter time?
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

DarkenedFantasies

  • member
  • Offline Offline
  • Posts: 12
Re: Musings on contrails
« Reply #10 on: March 29, 2025, 10:23:54 PM »

I don't see a means to disable contrails if the player should desire.
Is the call to doSetCondensateState, from within AircraftState.update, what you're looking for? I suppose you could check for your user setting this way:

Code: [Select]
if (userHasEnabledContrails) {
bCriticalStatePassed = bIsAboveCondensateAlt != aircraft.FM.getAltitude() > Mission.curCondensateCriticalAlt();
if (bCriticalStatePassed) {
bIsAboveCondensateAlt = aircraft.FM.getAltitude() > Mission.curCondensateCriticalAlt();
doSetCondensateState(bIsAboveCondensateAlt);
}
}
Where userHasEnabledContrails holds your .mis or conf.ini setting.
Logged

Wing Walker

  • member
  • Offline Offline
  • Posts: 364
Re: Musings on contrails
« Reply #11 on: March 30, 2025, 04:25:21 PM »

I have to say that since I tend to make full scale missions with real world numbers where I have more than 100 flights,  I would love to be able to disable contrails to help frame rates.

Contrails look good, but I want more game play ability.
Logged
Pages: [1] 2   Go Up
 

Page created in 0.074 seconds with 20 queries.