Jump to content

Independent smoke effects for each engine


TornadoWilkes

Recommended Posts

Hi all,

 

I'm interested in how it might be possible to shut down one engine in a four engine jet and have the smoke from that one engine alone disappear. I'm focused on the IRIS Vulcan (having an XML gauge) which triggers the smoke via corrected N1 being above 55% for engine 1 alone, it then turns the smoke on for all engines. However if you have an in flight shutdown either:

 

  • Engine 1 shuts down and all the smoke vanishes to all four engines
  • Engine 2, 3 or 4 shut down and the smoke to that engine/s remains

 

Has anyone any ideas how this can be overcome?

 




(A:TURB ENG1 CORRECTED N1,percent) 55 > (A:ENG1 N1 RPM,rpm) 2.0 > &&
       if{ (A:SMOKE ENABLE,bool) ! if{ (>K:SMOKE_ON) } }
       els{ (A:SMOKE ENABLE,bool) if{ (>K:SMOKE_OFF) } }



PPL(A)

PPL(H)

IMC

Link to comment
Share on other sites

Hang on, I may have discovered the answer...

 

http://www.fsdeveloper.com/forum/threads/independent-multiple-smoke-fx.14592/

 

My code now looks like this and seems to be working ;-) I hope this helps someone else lol

 




(A:TURB ENG1 CORRECTED N1,percent) 55 >  (A:ENG1 N1 RPM,rpm) 2.0 > &&
       if{ (A:SMOKE ENABLE,bool) ! if{ 1 (>K:SMOKE_ON) } }
       els{ (A:SMOKE ENABLE,bool) if{ 1 (>K:SMOKE_OFF) } }






(A:TURB ENG2 CORRECTED N1,percent) 55 >  (A:ENG2 N1 RPM,rpm) 2.0 > &&
       if{ (A:SMOKE ENABLE,bool) ! if{ 2 (>K:SMOKE_ON) } }
       els{ (A:SMOKE ENABLE,bool) if{ 2 (>K:SMOKE_OFF) } }






(A:TURB ENG3 CORRECTED N1,percent) 55 >  (A:ENG3 N1 RPM,rpm) 2.0 > &&
       if{ (A:SMOKE ENABLE,bool) ! if{ 3 (>K:SMOKE_ON) } }
       els{ (A:SMOKE ENABLE,bool) if{ 3 (>K:SMOKE_OFF) } }






(A:TURB ENG4 CORRECTED N1,percent) 55 >  (A:ENG4 N1 RPM,rpm) 2.0 > &&
       if{ (A:SMOKE ENABLE,bool) ! if{ 4 (>K:SMOKE_ON) } }
       els{ (A:SMOKE ENABLE,bool) if{ 4 (>K:SMOKE_OFF) } }



PPL(A)

PPL(H)

IMC

Link to comment
Share on other sites

Yes, ignore the Smoke Channel 0 (zero) entirely, as it is the "master channel" for all intents and purposes. That leaves up to 99 independent "Smoke Channels" to play with... :cool:

Bill Leaming http://smileys.sur-la-toile.com/repository/Combat/0054.gif

Gauge Programming - 3d Modeling Military Visualizations

Flightsim.com Panels & Gauges Forum Moderator

Flightsim Rig: Intel Core i7-2600K - 8GB DDR3 1333 - EVGA GTX770 4GB - Win7 64bit Home Premium

Development Rig1: Intel Core i7-3770k - 16GB DDR3 - Dual Radeon HD7770 SLI 1GB - Win7 64bit Professional

Development Rig2: Intel Core i7-860 - 8GB DDR3 Corsair - GeForce GTS240 1GB - Win7 64bit Home Premium

NOTE: Unless explicitly stated in the post, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...

Link to comment
Share on other sites

I've realised that this means you can have denser smoke at higher power settings, do you guys already do this on individual engines? Also it would be possible to add vapour and vortex effects as a plane goes through cloud. Roll this video to 1:30, has this ever been done?

 

 

And I've only ever seen one smoke density I believe?

PPL(A)

PPL(H)

IMC

Link to comment
Share on other sites

I stared at the code for hours last night. With the XML guides By Nixc Pike, Arne Bartels, The Operators list, etc, in hand.

After a few hours I figured out you were parsing a value (1,2,3 or 4) to K:SMOKE ON.

 

I guessed you would need to add a smokeeffect to each engine position as well.

I was thinking you would need to create effects.

Four copies of the smokeeffect named differently for example.

smoke1.fx, smoke2.fx, etcetera.

 

Was not sure of that, and was tired, so I curled up into bed and fell asleep. Well pleased with myself so far.

 

This morning I looked at this thread, hoping more responses had come in, but no.

I did finally pick up the courage to click the FSDeveloper link you gave.

Suddenly it's clear. No separate named .fx files at all.

smoke.0 - smoke.1 - smoke.3 is what it refers to! Got it!:)

Could even be very different effects if you want to! Sweet!

 

----

Now I also see what you mean by making the smoke more dense at higher thrust settings.

Should be doable. Nice idea.

 

I also realised hat this engine smoke will look great on some aircraft.

But it will be impossible to get it exactly right in an aircraft with wingflex.

By placing the effect some way behind the wing in you could make that less obvious in aircraft with wingflex I expect.

 

Wonderful! Thank you very much!

A very happy il88pp.:)

 

 

I like n4gix idea of creating a small panel with clickspots to switch some effects on and off. I'll try that too. Would be a fun tool. :):)

[sIGPIC][/sIGPIC]
Link to comment
Share on other sites

I like n4gix idea of creating a small panel with clickspots to switch some effects on and off. I'll try that too. Would be a fun tool. :):)

 

I created a small popup "gauge" some few years ago that allowed me to select different colored "smoke" for use at virtual airshows: Red, White, Blue or Green.

Bill Leaming http://smileys.sur-la-toile.com/repository/Combat/0054.gif

Gauge Programming - 3d Modeling Military Visualizations

Flightsim.com Panels & Gauges Forum Moderator

Flightsim Rig: Intel Core i7-2600K - 8GB DDR3 1333 - EVGA GTX770 4GB - Win7 64bit Home Premium

Development Rig1: Intel Core i7-3770k - 16GB DDR3 - Dual Radeon HD7770 SLI 1GB - Win7 64bit Professional

Development Rig2: Intel Core i7-860 - 8GB DDR3 Corsair - GeForce GTS240 1GB - Win7 64bit Home Premium

NOTE: Unless explicitly stated in the post, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...

Link to comment
Share on other sites

Thank you n4gix, I'm sure I will look that up some day. Not yet though, to prevent overload.

 

For now I was refering to the gauge by you, that you showed in the FSDeveloper link from TornadoWilkes first post. As background image it's a small grey panel with 8 drawn "buttons" (not changing when clicked). It has 8 clickspots, each tied to a smoke.XX line.

It's a small panel that turns different effects on and off. (you used navlight effects, cold be smoke too).

 

One use for that that I saw was dropping a bomb. I once found a effect that drops a (nuclear) bomb. I installed that but never really use it, in large part because of not having a button to make it drop. (At the crucial moment I keep forgetting it's the I key I need to use.)

Another use would be testing out various positions on a model. For example placing nav light effects to find good positions for floats.

 

First on my list is trying some things with this engine gauge from TornadoWilkes. Then trying to use your panel in some ways.

I may redo TornadoWilkes gauge to light my plane up like a christmas tree when throttling up for takeoff run.;)

I have to pace myself though... It's a fine line between "major headache" and "loads of fun"!!

 

have a good one,

il

[sIGPIC][/sIGPIC]
Link to comment
Share on other sites

Ah, may be I misunderstood. Perhaps you ere talking about the same thing?

 

Anyway, I couldn't resist, and lloked at the SmokeTest.xml again.

link: http://www.fsdeveloper.com/forum/threads/independent-multiple-smoke-fx.14592/

 

I tried to add it as a popup. Succesfully.

I made a bacground image. 300x200 pixel wide bitmap. Brown in colour.

Filename: background_smoketest.bmp

 

I turned your file "smoketest.jpg" into a file "smoketest.bmp"

 

Then I created a small folder. Folder name: Smoketest.

In it three files:

your: smoketest.xml

your: smoketest.bmp

my: background_smoketest.bmp

 

I placed the folder "Smoketest" into the panel folder of the aircraft.

 

 

I added the gauge to the panel.cfg file. I used position 8, 8,

That way the edges can be pulled in any direction to make the gauge larger. Also the popup can be grabbed and moved.

(It shows up a little small for my eyes.)

 

Thank you very much. Oodles of fun. No headache yet.;)

 

//-------------------------------------------------------------------------------------------------------

//SmokeTest - by n4gix

[WindowXX]

file=smoketest\background_Smoketest.bmp

size_mm=175,85

position=8

visible=0

BACKGROUND_COLOR=16,16,16

ident=SmokeTest

 

gauge00=Smoketest!smoketest, 8, 8,159, 68

 

//-------------------------------------------------------------------------------------------------------

 

worked a charm, the result:

 

smoketest-done.JPG

 

 

Thanks again, il

 

PS, for completeness, this is the brown background_smoketest.bmp file I created. (In .jpg form.)

 

background_Smoketest.jpg

[sIGPIC][/sIGPIC]
Link to comment
Share on other sites

You could do wingflex too, just have a different set of smoke co-ordinates that you switch on using the variable used for wing warping... (that variable would go in the code section that identifies the N1 above) I don't know what it is but the SDK should help.

 

il88pp, the code does need some looking at doesn't it. To break it down:

 

(A:TURB ENG1 CORRECTED N1,percent) 55 > (A:ENG1 N1 RPM,rpm) 2.0 > &&

Means that FSX will hit the smoke switch for you automatically when:

  • Engine 1 N1% is greater than (show as &gt) 55%
  • Engine 1 RPM is greater than 2 (in other words running)

 

When those parameters are sensed by FSX as being true, it will automatically trigger the next lines which are:

 

        if{ (A:SMOKE ENABLE,bool) ! if{ 1 (>K:SMOKE_ON) } }
       els{ (A:SMOKE ENABLE,bool) if{ 1 (>K:SMOKE_OFF) } }

 

Switch on/off the smoke effect at channel 0 (shown as 1 (&gt)

 

The channels are found in the aircraft.cfg under smoke system and are out of sync by 1 with XML gauge code..

 

This all means that you could go down the route of using a visible gauge like the testsmoke gauge kindly developed, or the beauty of the XML gauge is that this is totally invisible and automatically operated by FSX as engine power increases.

PPL(A)

PPL(H)

IMC

Link to comment
Share on other sites

Using (A:SMOKE ENABLE,bool) as a check variable is not the best practice, since if you are using multiple "smoke effects" it could cause the the above to fail, since the (A:SMOKE ENABLE,bool) will always remain "true" if any smoke system is operational!

 

Best practice to is create and use unique control variables to keep track of things:

 

       if{ (L:SMK1,bool) ! if{ 1 (>K:SMOKE_ON) 1 (>L:SMK1,bool) } }
       els{ (L:SMK1,bool) if{ 1 (>K:SMOKE_OFF) 0 (>L:SMK1,bool) } }

Bill Leaming http://smileys.sur-la-toile.com/repository/Combat/0054.gif

Gauge Programming - 3d Modeling Military Visualizations

Flightsim.com Panels & Gauges Forum Moderator

Flightsim Rig: Intel Core i7-2600K - 8GB DDR3 1333 - EVGA GTX770 4GB - Win7 64bit Home Premium

Development Rig1: Intel Core i7-3770k - 16GB DDR3 - Dual Radeon HD7770 SLI 1GB - Win7 64bit Professional

Development Rig2: Intel Core i7-860 - 8GB DDR3 Corsair - GeForce GTS240 1GB - Win7 64bit Home Premium

NOTE: Unless explicitly stated in the post, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...

Link to comment
Share on other sites

Thanks, its funny that you say that, I have seen this fall out of sync with my physical switches (FSUIPC) after restart and was going to try to fix it. And I have to admit, this is the first time I've opened a gauge file... so I'm learning with no teacher.... thanks for the really useful advice.

PPL(A)

PPL(H)

IMC

Link to comment
Share on other sites

Thanks n4gix and Tornadowilkes,

 

I got that first line.

It was the second that had me scratching my head:

 

N1 55% or greater and rpm above 2

then do IF:

If= (see if smoke is on) will result zero if it's of.

But then (!) which turns the 0 into a 1

1 is last on stack, so the next if occurs

Which is: send 1 to K:Smoke On

 

if N1 lower then 55 AND/OR rpm lower then 2

then do ELSE

which is:

Else= (Check if smoke is on) --> gives 1 if smoke is on.

No (!) this time, so stays 1

next if is executed,

Which is: send 1 to K:Smoke off

 

 

I think I got it in the end.

-----------------------------------------

 

I realised it was an invisible gauge.

Just have not gotten around to setting it all up, all the 4 smokes.

 

I think it's not needed to offset the smoke numbers.

I think you can use smoke.1 - smoke.2 - smoke.3 - smoke.4

And even simply skip smoke.0 in the aircraft.cfg

 

(I think I read that in the FSDeveloper thread, something about the numbers matching up anyway after smoke.9

and it being possible to start off with smoke.1 instead of smoke.0 in the file. Without needing to make changes to the gauge.

I was planning to test that, but did not get around to it.

Not with your gauge anyway.

I did install n4gix'x gauge.

That also sends 1 to K:Smoke On whe clicking the "smoke1" button.

In the aircraft.cfg I used no smoke.0

only smoke.1

and the smoke switched on with the "smoke1" button on the gauge.

 

Fogged up the runway nicely.;) )

-------------------------------------------------

 

Now another curveball n4gix throws here.

Will need to take my time for it.

But no problem, thanks for yet another chalange.:)

[sIGPIC][/sIGPIC]
Link to comment
Share on other sites

  • 1 year later...

Old thread, I know.

I had some problems understanding this bit that n4gix last posted:

       if{ (L:SMK1,bool) ! if{ 1 (>K:SMOKE_ON) 1 (>L:SMK1,bool) } }
       els{ (L:SMK1,bool) if{ 1 (>K:SMOKE_OFF) 0 (>L:SMK1,bool) } }

 

I was thinking, Ok, but how do you then define that L:Variable.

I was thinking it had to be defined before you could use it like that.

I never used L:Variables so far.

 

Now I see that:

(L:SMK1,bool)

Does not really need to be defined beforehand.

It will not have a value of one (1), untill you assign it that value.

 

That means when you click the spot when the smoke is not on:

(L:SMK1,bool) gives 0

(L:SMK1,bool) ! gives 1

1 means the same as TRUE, so the 'if' statement is executed.

the 'if' statement does two thing:

it swiches smokeeffect 1 on.

1 (>K:SMOKE_ON)

and it gives a value of 1 to variable L:SMK1 as follows:

1 (>L:SMK1,bool)

 

 

The 'els' statement works the same way.

it swiches smokeeffect 1 off.

and gives a value of 0 (zero) to varable L:SMK1

 

The 'els' statement will be performed when the swich is clicked when smokeeffect-1 has already been switched on.

Swiching it on has set SMK1 to 1

(L:SMK1) is 1

(L:SMK1) ! gives 0

0 is the same as "FALSE"

so the 'els' statement is carried out.

The 'els' statement switches the smokeefect off, and sets variable L:SMK1 to 0 again.

 

-

I'm not 100% sure, but I think L:SMK1 will have a value of zero until another value gets assigned to it.

 

thanks,

il88pp.

[sIGPIC][/sIGPIC]
Link to comment
Share on other sites

Hi all :)

If it helps any the FSDT Hornet has some very good engine smoke, afterburner, LEX Vapor, and so on, effects. I can post the code for how they do one or more of them if you like. Surprizingly, they aren't that complicated.

Let me know. You may use code snippets from the .xml files they use to operate the FX for the plane, but they don't want you copying an entire file for your own use. I asked :D Like you could use an If-Then set up, but not more then that from any one file, if you see what I mean.

Of course, to make life easier, you could download and install the v16.1, and take a look at how they did what they did for yourself.

Hope this helps a little...

Pat☺

[sIGPIC][/sIGPIC]

Had a thought...then there was the smell of something burning, and sparks, and then a big fire, and then the lights went out! I guess I better not do that again!

Sgt, USMC, 10 years proud service, Inactive reserve now :D

Link to comment
Share on other sites

Hi Tom,:)

thanks! I've shied away from L: variables so far, but I'll try to use them in a gauge soon. Have some ideas already.:)

 

Thanks Pat,

I made an effects controller a while ago. To switch on my afterburner flames when throttle over 70% or so. Then even more flames when over 75%

I expect it will be similar to their effects controllers.

To prevent myself copying their stuff, I'll put on the blinders and not check out their files.

Seeing it would make it harder to find my own solutions.;)

I'll keep it in mind though, thanks!

il88pp.:cool:

[sIGPIC][/sIGPIC]
Link to comment
Share on other sites

No, problem, il, I just thought you might get an idea or three on "how-to". :)

 

Mr. Zippy: LEX=Leading Edge eXtension . That part of the F/A-18 wing's leading edge that runs up the fuselage to under the cockpit or there-abouts.

600px-FA18_LEX.jpg

 

Also, a nice example of LEX Vapor trails :D

Pat☺

[sIGPIC][/sIGPIC]

Had a thought...then there was the smell of something burning, and sparks, and then a big fire, and then the lights went out! I guess I better not do that again!

Sgt, USMC, 10 years proud service, Inactive reserve now :D

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...