Opengl simulation of rocket flame and vapor traces with particles

Does anyone have any guidelines for coding the approximation for the particle stream exiting the jet engine (with afterburner) to opengl using particle drawing using vertex buffers / 4f color buffers?

I believe that there are two aspects to this problem:

  • The color of light when particles exit a jet engine, depending on temperature and some constants associated with the type of gas being burned. This article leads me to believe that I will need some kind of array for the temperature / color conversion curve. Probably, hydrogen burns at 2660 ° C in oxygen and 2045 ° C in air, while jet fuel burns at 287.5 ° C in air. (but the temperature of the afterburner of a fighter jet can reach 1700C somehow)

  • The steam path behind the rocket / wall, which will be either white or alpha for water vapor, if the rocket is in the atmosphere. I also believe that my assumption is true that this would not be necessary for rockets that burn fuel in space. The steam trail will be modeled as tiny drops of water that are much longer than the wavelength of visible light, so they will scatter light achromatically. Since the water itself is colorless, will the resulting color be white?

I also want to model this from a bird's eye view, so it does not have to be a full 3D model. Thus, the positions of 10 or so pilot lights around the afterburner cone, for example, can simply be approximated as 5 line points as possible.

+4
source share
1 answer

Depending on the level of detail you require, you can simply use a textured cone coming out of another engine. If you want to go for a full-blown particle system (which I don't think is necessary for a jet engine), you might want to give each particle in the stack many properties, such as speed (vec3), size, gas type, and age.

Make a loop to process each particle every time the game loop goes through. For each tick, your simulation will then change speed and size when the particle gets older. You must perform functions that determine the appearance of the particle depending on the age and type of gas.

In the simplest case, this can lead to the gradual disappearance of colored particles, increasing and accelerating as they age. Is this what you are looking for?

+2
source

Source: https://habr.com/ru/post/1303232/


All Articles