Exhaust Effects for Diesels

Alxmac84

New member
Does anyone know where I could find effects for exhaust on a diesel locomotive that include:
1. Heat mirage on top of the locomotive from a hot diesel engine?
2. An effect that causes exhaust to come out at a higher velocity, and not 'bend' sharply at the exhaust pipe, but instead bend like 5-10 feet above the exhaust pipe.

Thanks,
Alex
 
Unfortunately it doesn't exist, it is stretched goal in the Kickstarter project, and it actually will be my 1st choice for a stretched goal.

Yes those effects are an absolute must for a modern diesel would look so cool.

Cheers

Lots
 
Hi Alex
The first can be represented using an appropriate smoke effect. This could even be turned on/off via script. It's not perfect, and could be done a lot better natively, but it's still a good start. Take a look at my Victorian Railways 'T' class diesels on the Download Station for this.

For the second one, this may now be possible (as of Trainz Classics 3 actually). It's definitely possible on steam locomotives, but I have not tested it on diesels.

You'll want the 'steam physics' enabled: http://online.ts2009.com/mediaWiki/index.php/"smoke"_Container#enable-steam-physics

Code:
smoke33{
  attachment                            "a.smoke0"
  mode                                  "speed"
  color                                 190,177,161,150
  endcolor                              255,255,255,0
  rate                                  10
  velocity                              10
  lifetime                              3
  minsize                               0.35
  maxsize                               1
  conesize                              0.01,0.01,1
  inherit-velocity                      1
  enable-steam-physics                  1
  drag                                  8
  spring                                3
  dampening                             0.2
  physics-delay                         3
  mass                                  11
  mass-scale                            0.15
  accel                                 10.5
  texture                               <kuid:103475:60076>
  enabled                               0
}

That's an example smoke effect which is 'constant', and will go up a short way before being swept back. It would require a script to operate it correctly on the diesel (rather than just being constantly on ;) ). You'd also need to adjust the size/colour/etc to match what you want. The above was made for the 'chuff' of the air compressor on a steam locomotive, in conjunction with a script.

Regards
 
No problem to use TC3+ smoke effects on Diesels.

Check the DLS for my username.
These smokes are working in conjunction with a script, and you may want to reduce the smoke for anything non-Alco... ;)

iron_ore_shortline_054.jpg


Felix

EDIT: The Trinity Bay Alco's should have all the dependencies either built-in to TS12 or on the DLS, for the other Alco's please check the description field.
 
Last edited:
I also got a smoke effect to work using script and pfx control, lower the notch the finer the smoke is, higher the notch the faster and thicker the smoke is, I have default light smoke for run 0 through to 3 as the engine only runs between 258rpm to 375rpm so you shouldn't have much, but run 4 onwards is 440rpm ish to 835rpm

Code:
  thread void UpdateSanderPFX()
  {
    string throttle1, throttle2, throttle3, throttle4;
    
    while (1)
    {
//      Interface.Print("P Class Current: " + GetEngineParam("current-drawn")); // Should max out 1500 Amperes at 14.5kph
//      Interface.Print("P Class Current Drawbar: " + GetEngineParam("applied-force"));
//      Interface.Print("Aux Res: " + GetEngineParam("aux-reservoir-pressure")); //How does this work?
//      Interface.Print("P Class Main Res: " + GetEngineParam("main-reservoir-pressure"));

//    Controls the Cut-in and Cut-out of the compressor.
      if (GetEngineParam("main-reservoir-pressure") <  0.0086801)
      {
        SetCompressorEfficiency(1.00); // Compressor cut-in, 750kpa
      }
      else if (GetEngineParam("main-reservoir-pressure") >  0.009191)
      {
        SetCompressorEfficiency(0.00); // Compressor cut-out, 800kpa
      }

      // Run 4 setting
      if (GetEngineSetting("throttle") > 3.50)
      {
        throttle1 = "+";
      }
      else
      {
        throttle1 = "-";
      }

      // Run 5 setting
      if (GetEngineSetting("throttle") > 4.50)
      {
        throttle2 = "+";
      }
      else
      {
        throttle2 = "-";
      }

      // Run 7 setting
      if (GetEngineSetting("throttle") > 6.50)
      {
        throttle3 = "+";
      }
      else
      {
        throttle3 = "-";
      }

      // Run 8 setting
      if (GetEngineSetting("throttle") > 7.50)
      {
        throttle4 = "+";
      }
      else
      {
        throttle4 = "-";
      }

      SendMessage(me, "pfx", throttle1 + "1" + throttle2 + "2" + throttle3 + "3" + throttle3 + "6" + throttle4 + "4");

    Sleep(1.0f);
    }
  }

Cheers.
 
I also got a smoke effect to work using script and pfx control, lower the notch the finer the smoke is, higher the notch the faster and thicker the smoke is, I have default light smoke for run 0 through to 3 as the engine only runs between 258rpm to 375rpm so you shouldn't have much, but run 4 onwards is 440rpm ish to 835rpm
...

Cheers.
IMO scripting is the way to go at the moment. I don't work with diesels but I do something similar with steam locos. I started a couple years ago when TS12 came out playing with anim2 smoke containers. "anim2" mode syncs the pxf to the piston stroke and can make for some great steam effects - much better than anything we had before. With a custom loco script the size, velocity and color of the exhaust are dynamically changed in Driver by poling regulator and reverser setting at 1 - 2 secs intervals similar to the above script that wakes up to check things and then goes back to sleep for 1 sec. It looks impressive to see the exhaust fill with steam and shoot straight up when the cutoff and throttle are opened up fighting up grade and then taper to a light haze when the settings are reduce when the hill is crested.

I think pressure and mass of steam in the cylinders is a better choice to base the steam part of the exhaust characteristic exhaust. The smoke is dependant on the type of fuel, condition of the fire and mount of draft - all of which can be monitored or estimated by the script. Someday I'll code up those modifications and test them out.

Currently as a proof of concept it works pretty good.

dragonharh said:
I got a question were do you get a script for smoke ? not every one knows how to make a script.

Most all of my stuff is for my personal use and currently not available for anyone else to test or use. But I suspect there may be more people working on stuff like this than have replied so far. It's not a difficult scripting problem at all.

Bob Pearson

PS Doesn't take too much code - of course still a wip - but the following could be the basis for a nice script controling a steam loco under user control. Instead of turning various smoke containers on and off to produce the exhaust changes it uses just 1 "anim2" mode smoke container and modifies various tag values on the fly. However in general a combination of the 2 approaches can be used with great results [just realized this example doesn't change color but you'll get the idea any how]:

Code:
thread void setSmoke(void)
    {
        int smokeID = 8;
        float factor2 = 0.0;
        float Vmin = 3.0;
        float Vmax = 55.0;
        float Smin = 0.2;
        float Smax = 3.0;
        float vel = 0.0;
        float minSiz = 0.0;
        float maxSiz = 0.0;
        float vel0 = 0.0;
        float minSiz0 = 0.0;
        float maxSiz0 = 0.0;
        while(1)
        {
            //if(pModel == pMSim)
            {
                factor2 = Math.Sqrt(GetEngineSetting("regulator"))*Math.Fabs(GetEngineSetting("reverser"));
                vel = factor2*Vmax+Vmin;
            }
            if(vel!=vel0)
            {    
                minSiz = 0.25*factor2+Smin;
                maxSiz = 3.5*factor2+Smax;
                SetPFXEmitterVelocity(smokeID,1,vel);
                vel0 = vel;
                SetPFXEmitterMinSize(smokeID,1,minSiz);
                minSiz0 = minSiz;
                SetPFXEmitterMaxSize(smokeID,1,maxSiz);
                maxSiz0 = maxSiz;
            }
            Sleep(2.0f);
        }
    }
 
Last edited:
I not on of them tipes who can sit for hours and tipe out script it would drive me up the wall fast it just not my cup of tea modeling on the other hand its easy for me. For me to make a script I need someone who would be willing to explain it to me I did ask about it a few years back bout scripting but no one was willing to take the time to teach me about it.

If there is a script maker program then I love to get my hands on it.
 
For diesel electrics one does not need scripting for what you require smoke to do. By perusing the TRS 04 CC Guide, the TC CC Guide and what is in the DevWiki under smoke configuration one can see how one can manipulate smoke to behave in different ways (I just read up about it there). This is all done without scripting I might add, all one needs to do is to adjust the values of the smoke colour (for haze almost invisible but still a little visible with slow emission speed) and for the velocity out of the smoke stack/exhaust stack to adjust these values until the desired effect is made/created.

Plus of course several of smoke attachment points needed for haze where haze is needed (ventilators/radiators I guess) and possibly several other attachment points (instead of only one there) in the same place where the diesel smoke is emitted etc. but configured with different smoke properties to get the smoke effect required.

By lifting this/these attachment point(s) somewhat, one can create a higher emitting point from the exhaust stack as you require. Most likely also adjusted in conjunction with smoke density, speed and/or longevity and such, experimenting might tell you how this will look when done correctly.

I can not see any problems with getting such smoke effects on diesel electrics without scripting unless someone proves me wrong.

Lennard
 
Here's a short video on the effects I have

http://www.youtube.com/watch?v=DP6rtmzCHY0

Also scripting allows for different colour smoke as well, example would be a light blue smoke for run 0 to 3 which is what I have on the video then it changes to a darker colour as it represents Generator loading on the engine which the Governor would pump more diesel into the cylinders.

The default smoke effect is used on all throttle settings, it also stops the smoke when you have 0kn, such as neutral, but it'll always play smoke effects even when you don't want it, so scripting gives you better control over the effects you want.

I also have radiator heat scripted too for when your above run 6 as I have animated fan which is also controlled by throttle setting, the locomotive in video doesn't have electric fan, but rather a shaft which is turned with the engine.

Cheers.
 
I got a question were do you get a script for smoke ? not every one knows how to make a script.
As stated in the script's header, my script is free to use. However I'm not sure if it is what you are looking for, as the focus is on getting the turbo related Alco smoke when notching up.
On how to set up I have written something some time ago, but I'm not good in explaining things so I'm not sure if it is really helpful. You would have to search my posts of that time (must have been October or November 2012).

[...] With a custom loco script the size, velocity and color of the exhaust are dynamically changed in Driver [...]

[...] Instead of turning various smoke containers on and off to produce the exhaust changes it uses just 1 "anim2" mode smoke container and modifies various tag values on the fly. However in general a combination of the 2 approaches can be used with great results [just realized this example doesn't change color but you'll get the idea any how]: [...]
Thanks for posting your code. - Yes I know that there are SetPFXEmitter...() methods to dynamically change smoke values, instead of turning on and off smoke containers.
But in my case they don't really make things more simple. I prefer to have a couple of very different smokes blended together (different velocity, minsize, maxsize, lifetime etc.). So I do have a lot of smoke containers anyway - and it's easy to combine them the way I want.
Also the same script has to be used on different locomotives, hence any custom values must be in the config. So I would end up with several dozens smoke values to define in the extensions table... not really what I want.
But I might make some limited use of dynamic changing to improve transitions in future versions.

Felix
 
Azervich - the smoke effect of the locos in your you tube video are very good but what is scripting and where do I find it? I would like to make changes on my own steam locos.
I have tried making changes in the smoke containers in the config files but there is obviously more to it. I dont understand what is meant by scripting or where to find it so your help would be appreciated. Cheers
 
This post may be slightly off topic, but I'm sure it shed some light on diesel 'smoke' from and engineers/operators point of view.
In a properly operating, mechanically maintained diesel, the 'smoke' is more of a gray 'haze'; much like the exhaust from an automobile. Any continuous exhaust in a color other than that indicates mechanical deficiencies...........
Black smoke indicates a lack of oxygen in the combustion cycle; i.e. poor combustion. While its true that most diesels start with a puff of black smoke, a normal result of a cold engine and the lack of sufficient supercharging, as the engine comes up to speed; a continuous discharge of black smoke may point to supercharger problems, or serious ring/liner wear (low compression and blow by).
Blue smoke, or a blueish haze indicates, burning lubricating oil. As engine operating hours add up, piston ring and liner wear will normally cause this condition. It's a sign that engine overhaul is due, continued operation results in combustion blow by; contaminating the lube oil sump, and the build up of contaminates within the engine cylinder, causing further wear and eventually seriously inefficient combustion (black smoke). Much more serious, from an operational standpoint, is oil seals leaking by into the turbocharger, which will show up as a continuous blue smoke, regardless of load, and may result in and explosion/fire and catastrophic engine failure.
Keep your diesels well maintained, fellows...........engine downtime is a loss of revenue!
 
Am I seeing black smoke or a serious fault in valve timing.......................................
Listen for the telltale clickety clack that diesels are notorious for........................................
You can't miss it!
Merry Christmas.
 
Back
Top