Idea Realistic Exhaust Velocities

Thundersnook

New member
Joined
Jul 22, 2010
Messages
78
Reaction score
0
Points
0
Heyho Orbinauts!

I think its fair to say that there isn't very much more to do in Orbiter visual-wise. With every new edition and especially with the D3D9 Client it looks absolutely stunning. :thumbup:

However there is one very minor thing that creeps in my mind now and then which I would love to see:

It bothers me that the exhaust-smoke, when you are in the atmospheric part of the accent, always disappears from the vehicle with a constant deltaV no matter how fast you go ... I thought it would look much more realistic if there is the opportunity to set the relative speed of the smoke particles to Zero after a very short time the leaved the engine-nozzles. (As they do in real life, as they have near to no mass and therefore are slowed down quite fast from the atmospheric drag)

With this you would also get a much better idea how insanely fast your ship is going during launch, because you have your smoke-plume behind you as reverence.

On the many different launch-videos of the shuttle or recently the Falcon X you can see how fast the exhaust-gases disappear from the vehicle after a little time into the launch.

As I have no idea how this could be managed (is there a smoke-config-file?) Maybe some of you geniuses have an Idea how to do it, or you consider it as a worthy add-on? :)

Hail the glorious probe!

:hailprobe:
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,620
Reaction score
2,339
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Well, in reality is a lot more complex and its hard to properly simulate this in Orbiter.

At higher altitude, a small bit of exhaust might even flow forward! The exhaust plume expands much more as you can also see in Saturn V launch videos for example.
 

Thundersnook

New member
Joined
Jul 22, 2010
Messages
78
Reaction score
0
Points
0
Well, in reality is a lot more complex and its hard to properly simulate this in Orbiter.

At higher altitude, a small bit of exhaust might even flow forward! The exhaust plume expands much more as you can also see in Saturn V launch videos for example.
Yeah correct, the real atmospheric behaviour is of course much more complex than what I've suggested :D But I thought the Zero-relative-speed-thing might be a relatively easy thing to do compared to the upwards climbing exhaust-gases on the Saturn V (Still waiting for my Lego-Shop to have the Saturn V Ideas Set in stock by the way :( xD )
 
Last edited:

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,620
Reaction score
2,339
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Yeah correct, the real atmospheric behaviour is of course much more complex than what I've suggested :D But I thought the Zero-relative-speed-thing might be a relatively easy thing to do compared to the upwards climbing exhaust-gases on the Saturn V (Still waiting for my Lego-Shop to have the Saturn V Ideas Set in stock by the way :( xD )

I am likely the only one who will not get a Lego Saturn V this year. :(
 

Thundersnook

New member
Joined
Jul 22, 2010
Messages
78
Reaction score
0
Points
0
I am likely the only one who will not get a Lego Saturn V this year. :(

Why that? :cry:
I think they will have it in stock in the next weeks/months in the internet-store? (At least I hope so! :blink:)
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,620
Reaction score
2,339
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Why that? :cry:
I think they will have it in stock in the next weeks/months in the internet-store? (At least I hope so! :blink:)

Many friends of me have theirs already assembled... but I became father this year, I have to go to the toy stores for other things.
 

Thundersnook

New member
Joined
Jul 22, 2010
Messages
78
Reaction score
0
Points
0
Many friends of me have theirs already assembled... but I became father this year, I have to go to the toy stores for other things.

Hey, congratulations!!:cheers: But then again it might not attract any attention if you buy the Lego-Saturn V-Kit accidentally ... :lol:
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
<offt-opic>
I already got myself the Saturn V :thumbup:
When I noticed it, I couldn't resist to get one. The LEGO Store was kind enough to get my pre-order very quickly (next day!)
</off-topic>

---------- Post added at 21:47 ---------- Previous post was at 20:23 ----------

Back to the original topic:

Shouldn't something like this scheme work?

PHP:
// MyVessel.h -----------------------------------------------------------------

class MyVessel : VESSEL2
{
public:
	// overridden
	PSTREAM_HANDLE AddExhaustStream (THRUSTER_HANDLE th, PARTICLESTREAMSPEC *pss = 0) const;

	PSTREAM_HANDLE ChangeExhaustStream (PSTREAM_HANDLE ch, PARTICLESTREAMSPEC *pss = 0);

protected:
	map<PSTREAM_HANDLE,THRUSTER_HANDLE> lut;
}


// MyVessel.cpp ---------------------------------------------------------------

/**
 * Note that a *new* PSTREAM_HANDLE is likely to be returned, ignore the old one!
 */
PSTREAM_HANDLE  MyVessel::ChangeExhaustStream (PSTREAM_HANDLE ch, PARTICLESTREAMSPEC *pss = 0)
{
	// Get the THRUSTER_HANDLE from "known" storage (lookup table)
	auto it = lut.find(ch);
	if (it != lut.end()) {
		// Found! Delete old
		if ( DelExhaustStream(ch) ) {
			// Apply new
			PSTREAM_HANDLE chNew = AddExhaustStream(it->second, pss);
			// invalidate old combi (not needed I think)
			//lut.erase(it);
			// store new combi
			lut[chNew] = it->second;
			return chNew;
		}
	}
  return NULL; // FAIL
}

/**
 * Store any PSTREAM_HANDLE <-> THRUSTER_HANDLE combination for later reuse
 * in ChangeExhaustStream()
 */
PSTREAM_HANDLE MyVessel::AddExhaustStream (THRUSTER_HANDLE th, PARTICLESTREAMSPEC *pss = 0)
{
	// call base class' member
	PSTREAM_HANDLE handle = ::AddExhaustStream (th, pss);

	// store combi
	lut[handle] = th;

	return handle;
}


	// .... somewhere (every second or when velocity changed enough)
{
	// Initial spec (same as  at c'tor); maybe also a member like m_exhaust_main
	static PARTICLESTREAMSPEC spec = {
		0, 2.0, 20, 200, 0.05, 0.1, 8, 1.0, PARTICLESTREAMSPEC::EMISSIVE,
		PARTICLESTREAMSPEC::LVL_SQRT, 0, 1,
		PARTICLESTREAMSPEC::ATM_PLOG, 1e-5, 0.1
	};

	// Just change v0 parameter [m/s]
	spec.v0 = -GetCurrentVehicleVelocity(); // <= should result in ZERO velocity

	// m_pstreamhandle is a member set @ c'tor e.g.
	m_pstreamhandle = ChangeExhaustStream(m_pstreamhandle, spec);
}

Note, that this is just written out of my head, so this will most probably not compile :cheers:
 
Last edited:

francisdrake

Addon Developer
Addon Developer
Joined
Mar 23, 2008
Messages
1,085
Reaction score
901
Points
128
Website
francisdrakex.deviantart.com
The particlestreamspec is quite versatile:

// PARTICLESTREAMSPEC typedef struct {
// flags, srcsize, srcrate, v0, srcspread, lifetime, growthrate, atmslowdown, LTYPE,
// LEVELMAP, lmin, lmax,
// ATMSMAP, amin, amax,
// tex };

As you can see, you could set the lifetime very high, and also the atmospheric slowdown. But my experience is, when too many particles have to be displayed, the framerate drops considerably. I think this is the reason why most developers choose a particle lifetime of only a few seconds, or even fractions of a second. This is sufficient to display a credible fire / smoke trail when looking at the rocket from fairly close.
 

DaveS

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 4, 2008
Messages
9,434
Reaction score
689
Points
203
The problem is that the current particle stream implementation isn't really made for what Orbiter is for. As soon as you start leaving the ground and gain any sort of high speed, the physics behind the system falls apart, even more so when you enter orbit.

In my mind, there's should be a v2 of it that addresses this. The current system is well over 14 years old now (first implemented in the November 5 2003 release of Orbiter).
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,620
Reaction score
2,339
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Well, it works fine in orbit or in low atmosphere. The transition is just not that easy. In space you just need different parameters for getting pretty realistic effects.
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,287
Reaction score
3,255
Points
203
Location
Toulouse
Yeah, and also if you set realistic Ve for the particle streams, you probably won't see anything. Because the ratio between the speed of the streams and the frequency at which they spawn will be to small (or too high). You need to keep that ratio close to the default value if you want something visually nice, and that means an insane frequency that will probably put on the knees any GPU. Also you'd need a very high frame rate (but well, with current hardware, it's not that hard to get over 500 FPS in deep space I guess !)
 

Thundersnook

New member
Joined
Jul 22, 2010
Messages
78
Reaction score
0
Points
0
...Note, that this is just written out of my head, so this will most probably not compile :cheers:

Thank you very much for the detailed suggestions! I will definitely try a little bit (although, my programming skills are just enough to install and run orbiter :lol: but it will be fun to fiddle around a little bit :thumbup:) Thanks again!

The particlestreamspec is quite versatile:

...
This looks quite promising ... where can I find the particlestreamspecs? Are they part of the Vesselconfic?

Edit: ahh, it seems to be in the vessel.dll and I need a C++ Compiler for that? Sounds like something for the weekend ^^
 
Last edited:

Thorsten

Active member
Joined
Dec 7, 2013
Messages
785
Reaction score
56
Points
43
but well, with current hardware, it's not that hard to get over 500 FPS in deep space I guess

With a ~Mach 10 exhaust velocity of the SSME, even this gives you a 6 m movement from frame to frame. Might marginally work for large thrusters.

However, you can't actually see that, since your monitor will update at 60 Hz (~50 m spacing) , and a modern GPU simply throttles when rendering load is low - my GeForce 1080 doesn't go above 120 fps even in emptiness, and my older GeForce 670M throttles at 60 Hz.

I found particles generally unsatisfactory for exhaust plumes, which is why I designed a shader-based solution. This has the added advantage that one can dynamically widen the thruster plume and remove shock diamonds as ambient air pressure decreases

Shuttle_flame05.jpg

Shuttle_flame06.jpg




and even bend the flame in the airstream

Shuttle_flame_sep.jpg


(older pics, but they convey the impression)

Compared to equivalent particle solutions, I found it also performance friendly. I'm very happy with this solution, it hasn't let me down yet (and also can do things like strake vortices and heat blur very efficiently)

If anyone is interested in the details, I link the GLSL code I'm using for this below:

https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/Shaders/thrustflame-ALS.vert
https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/Shaders/thrustflame-ALS-detailed.frag

it's all rendered on a simple bounding box.
 
Last edited:

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,287
Reaction score
3,255
Points
203
Location
Toulouse
Looks very good ! :thumbup:
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
I need a C++ Compiler for that? Sounds like something for the weekend ^^
Yes, you need a C++ Compiler for that!

And that "idea" of mine is only good for vehicles you have the source code of...
It isn't meant to be a add-on that will change all sort of vehicles.

Background info:
The ExhaustStream effect(s) are rendered by Orbiter/GraphicsClient, but their behavior is controlled by each vehicle individually.

I assumed that you were about to change your own vessels code...:facepalm:

/Kuddel
 

francisdrake

Addon Developer
Addon Developer
Joined
Mar 23, 2008
Messages
1,085
Reaction score
901
Points
128
Website
francisdrakex.deviantart.com
Yes, you can only modify the particle behaviour if you modify the vessel's dll, that is by C++ programming. It is a major step to start C++ programming for Orbiter, as it also requires to understand the Orbiter API. But it is very rewarding to learn it and to program your own vessel. :)
 

Thundersnook

New member
Joined
Jul 22, 2010
Messages
78
Reaction score
0
Points
0
I assumed that you were about to change your own vessels code...:facepalm:

/Kuddel

Yeah, I thought there might be a global option for my "problem", but it seems, that I have to get myself into some vessel-programming :D

Thanks dudes!
 

Koloss

Weyland-Yutani Corp.
Donator
Joined
Apr 16, 2013
Messages
167
Reaction score
1
Points
16
Location
Krefeld
Many friends of me have theirs already assembled... but I became father this year, I have to go to the toy stores for other things.


Yeah, congratulations! Boy or girl? How old now? Details! :) I am also a father of two girls so... I know about your sleep deprivation :thumbup::thumbup:
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,620
Reaction score
2,339
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Yeah, congratulations! Boy or girl? How old now? Details! :) I am also a father of two girls so... I know about your sleep deprivation :thumbup::thumbup:

Boy, about one month old now, 5200g GTOW, 61 cm long.
 
Top