Skip to content

Dynamic thrust colors#6352

Open
Mc-Pain wants to merge 3 commits into
pioneerspacesim:masterfrom
Mc-Pain:dynamic-thrust-colors
Open

Dynamic thrust colors#6352
Mc-Pain wants to merge 3 commits into
pioneerspacesim:masterfrom
Mc-Pain:dynamic-thrust-colors

Conversation

@Mc-Pain

@Mc-Pain Mc-Pain commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Make thrust color non-static. Only white/blue at full, smolder to yellow/red when barely fired.

Temperature clamp'ed between 0 and 30000K

image image image

@impaktor

impaktor commented Jun 4, 2026

Copy link
Copy Markdown
Member

What determines the thruster color? Engine model? Engine health? Ship class?

@Mc-Pain

Mc-Pain commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

What determines the thruster color? Engine model? Engine health? Ship class?

Throttle amount

@sturnclaw sturnclaw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General thoughts about the visual effect: deep red is generally immersion-breaking. Maneuvering thrusters are typically playing on the visual identity of a plasma jet or cold gas thruster (white/colorless spray), so a color temperature of 3000-5000K at the low end.

In general, varying the color of the entire thruster flame rather than having it fall off at the edges of the thrust plume is going to look slightly unrealistic, and regardless of the "real" Planck temperature of the thruster, the center will be an out-of-range white when viewed through a camera or human eye anyway.

I've left a comment below about the technical implementation that will need to be resolved before this is considered for merge.

@@ -140,16 +140,18 @@ namespace SceneGraph {
// emissive.r is the thruster power setting which effects flame length and brightness
m_tMat->emissive.r = m_glowMat->emissive.r = 255.0f * displayedPower;

// emulate thruster temperature
double temperature = MathUtil::Lerp(0.0, 30000.0, power);
vector3d thrustColor = PhysicsUtil::GenerateTemperatureColor(temperature);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once again, this is an excessive consumption of CPU cycles for something that should be a 30 or 60-entry precomputed lookup table. Feel free to store an interpolation curve with each entry in the LUT for maximum accuracy, but computing 48 wavelength bands per thruster, every frame is simply wasteful.

@impaktor

Copy link
Copy Markdown
Member

@bszlrd along which dimension do you think thruster color is best variable? Throttle amount? Engine type? Engine class, ship model? Engine health?

I'm thinking throttle amount is already keyed to sound and size of flame?

@bszlrd

bszlrd commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

I'm not sure it is good to vary the colors on the fly. Thust power ( (thrust*EV)/2) could be a good candindate. Or EV directly.
Later on engine wear and tear could govern it.
But I think for now hand-setting their color would be better. Which did not work as it was documented in #3948 the last time I tried.

Anyhow, I think such things should be data driven. As in defined in the ship.json, say as a color for 0% thrust and 100%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants