General Question More Launch Pad Smoke?

Saturn V

Addon Developer
Addon Developer
Donator
Joined
Mar 24, 2008
Messages
548
Reaction score
2
Points
0
Location
West Hell
Somebody (don't remember who) posted directions on the old forum how to add an invisible engine mesh to a launch pad flame trench to generate more smoke at launch.

While tinkering with some ideas, I got one to belch more smoke than an old steam calliope, but the problem is, no matter how little fuel I specify, it doesn't STOP!

Anybody remember exactly how to do this correctly (and might be willing to share the info)?

Thanks...
 

Saturn V

Addon Developer
Addon Developer
Donator
Joined
Mar 24, 2008
Messages
548
Reaction score
2
Points
0
Location
West Hell
Thanks for the reply Urwumpe,

The link goes to a blank page (via my browser anyway) and searching Source Forge for the source code was unproductive (I did find your SSU 1.0, but I don't see anything regarding the MLP in there).
 

Saturn V

Addon Developer
Addon Developer
Donator
Joined
Mar 24, 2008
Messages
548
Reaction score
2
Points
0
Location
West Hell
Unfortunately that doesn't do me much good :compbash2:



---------- Post added at 06:02 PM ---------- Previous post was at 06:01 PM ----------

Finally located the MLP source code, but it's not going to help as I'm not proficient at coding and don't understand most of what I'm looking at to begin with.

If anone has a link to the original thread I mentioned or remembers how to do this, I'd appreciate whatever info you've got.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,624
Reaction score
2,343
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Actually, the trick is rather simple. You create a particle stream. You don't need a thruster, the particle stream is enough. The strength of the particle stream is then just a function of "how much energy you get into the water-filled flame trench?" This can be simply by time, by altitude of a previously selected vessel or something more sophisticated. In the MLP case, the exhaust power (Thrust * ISP) projected into the openings of the MLP, each opening described as two triangles in barycentric coordinates.
 

streb2001

Addon Developer
Addon Developer
Donator
Joined
Feb 9, 2008
Messages
326
Reaction score
0
Points
16
Location
North Yorkshire
Is this any use?

JSLC_pad is the launchpad for the Long March in the China Manned Space Program addon.

Code:
void JSLC_pad::CreateThrusters (void)
{

    char tex[255];

    // propellant resources
    PROPELLANT_HANDLE hpr = CreatePropellantResource (PB_FUELMASS);

    // ***************** thruster definitions *******************

    // Liftoff steam

    sprintf(tex, "%s", "Contrail4");
    SURFHANDLE hSmokeTex = oapiRegisterExhaustTexture(tex);

    sprintf(tex, "%s", "Contrail2");
    SURFHANDLE hFireTex = oapiRegisterExhaustTexture(tex);

    PARTICLESTREAMSPEC steam_main = {
        0,                                //flags
        10.0,                            //particle size at creation
        10,                                //generation rate
        500,                            //emission velocity
        0.8,                            //emission velocity randomisation
        3.0,                            //particle lifetime
        25,                                //growth rate
        5.7,                            //deceleration rate
        PARTICLESTREAMSPEC::EMISSIVE,    //EMISSIVE, DIFFUSE
        PARTICLESTREAMSPEC::LVL_SQRT,    //mapping between level parameter and particle opacity
        0,                                //minimum level for alpha mapping
        2,                                //maximum level for alpha mapping
        PARTICLESTREAMSPEC::ATM_PLOG,    //mapping between atmospheric parameters and opacity
        1e-4,                            //min atm value for alpha mapping
        1                                //max atm value for alpha mapping
    };

    PARTICLESTREAMSPEC smoke_main = {
        0,                                //flags
        5.0,                            //particle size at creation
        7,                                //generation rate
        250,                            //emission velocity
        0.8,                            //emission velocity randomisation
        5.0,                            //particle lifetime
        10,                                //growth rate
        6.0,                            //deceleration rate
        PARTICLESTREAMSPEC::DIFFUSE,    //EMISSIVE, DIFFUSE
        PARTICLESTREAMSPEC::LVL_SQRT,    //mapping between level parameter and particle opacity
        0,                                //minimum level for alpha mapping
        2,                                //maximum level for alpha mapping
        PARTICLESTREAMSPEC::ATM_PLOG,    //mapping between atmospheric parameters and opacity
        1e-4,                            //min atm value for alpha mapping
        1,                                //max atm value for alpha mapping
        hSmokeTex
    };

    PARTICLESTREAMSPEC fire_main = {
        0,                                //flags
        3.0,                            //particle size at creation
        50,                                //generation rate
        250,                            //emission velocity
        0.3,                            //emission velocity randomisation
        0.5,                            //particle lifetime
        5,                                //growth rate
        6.0,                            //deceleration rate
        PARTICLESTREAMSPEC::EMISSIVE,    //EMISSIVE, DIFFUSE
        PARTICLESTREAMSPEC::LVL_SQRT,    //mapping between level parameter and particle opacity
        0,                                //minimum level for alpha mapping
        2,                                //maximum level for alpha mapping
        PARTICLESTREAMSPEC::ATM_PLOG,    //mapping between atmospheric parameters and opacity
        1e-4,                            //min atm value for alpha mapping
        1,                                //max atm value for alpha mapping
        hFireTex
    };

    th_main1 = CreateThruster (_V(0,0,0), _V(0,0,1), PB_MAXMAINTH, hpr, PB_ISP);
    th_main2 = CreateThruster (_V(0,0,0), _V(0,0,-1), PB_MAXMAINTH, hpr, PB_ISP);

    AddExhaustStream (th_main1, _V(0,0.3,-30), &smoke_main);
    AddExhaustStream (th_main2, _V(0,0.3,+30), &smoke_main);
    AddExhaustStream (th_main1, _V(0,0.3,-30), &fire_main);
    AddExhaustStream (th_main2, _V(0,0.3,+30), &fire_main);
    AddExhaustStream (th_main1, _V(0,0.3,-30), &steam_main);
    AddExhaustStream (th_main2, _V(0,0.3,+30), &steam_main);
}


void JSLC_pad::clbkPostStep (double simtt, double simdt, double mjd)
{
    if(is_visible)
    {
        // Create exhaust from flame trench
        // dependant on launcher thrust level and height above launchpad (LM launcher is focus vehicle)
        if (!launched & (has_exhaust == 1)){
            double focus_alt = 0;
            double LM_thrust_level = 0;
            double exhaust_factor = 0;
            double max_exhaust_alt = 150;

            oapiGetFocusEngineStatus(&es);
            LM_thrust_level = es.main;

            oapiGetFocusAltitude(&focus_alt);
            focus_alt = focus_alt-30;
            if(focus_alt < 0) focus_alt = 0;
            exhaust_factor = (max_exhaust_alt-focus_alt)/max_exhaust_alt;

            SetThrusterLevel (th_main1, LM_thrust_level*exhaust_factor);
            SetThrusterLevel (th_main2, LM_thrust_level*exhaust_factor);

            if(focus_alt > max_exhaust_alt){
                launched = true;
                SetThrusterLevel (th_main1, 0);
                SetThrusterLevel (th_main2, 0);
            }
        }
}
 
Top