opengl 用粒子模拟火箭火焰和蒸汽尾迹

发布于 2024-08-23 17:49:21 字数 607 浏览 4 评论 0原文

有没有人有任何指导,可以使用顶点缓冲区/4f 颜色缓冲区进行粒子绘制,在 opengl 中对从喷气发动机(带加力燃烧器)出来的粒子流进行近似编码?

我认为这个问题有两个方面:

  1. 粒子离开喷气发动机时的光颜色是温度和与燃烧气体类型相关的一些常数的函数。 这篇文章让我相信我需要某种数组来表示温度/颜色转换曲线。显然,氢气在氧气中的燃烧温度为 2,660°C,在空气中的燃烧温度为 2,045°C,而喷气燃料在空气中的燃烧温度为 287.5°C。 (但喷气式战斗机加力燃烧室的温度可以以某种方式达到 1700C)

  2. 火箭/喷气式飞机后面的蒸汽尾迹,如果火箭在大气中,则水基蒸汽尾迹将是白色的,带有阿尔法。我也相信我的假设是正确的,这对于在太空中燃烧燃料的火箭来说是不必要的。蒸汽尾迹将被模拟为比可见光波长大得多的微小水滴,因此它们会消色差地散射光。由于水本身是无色的,因此产生的颜色将是白色?

另外,我希望从鸟瞰角度对其进行建模,因此它不需要是完整的 3D 模型。例如,加力锥体周围 10 个左右指示灯的位置可以近似为 5 个线性点。

Does anyone have any guidance for coding an approximation for the particle stream coming out of a jet engine (with afterburner) in opengl using particles drawing using vertex buffers / 4f color buffers?

I believe there are two aspects to this problem:

  1. The colour of the light as particles exit the jet engine as a function of temperature and some constants relating to the type of gas being burnt. This article leads me to believe I will need some sort of array for the temperature / color conversion curve. Apprently hydrogen burns at 2,660C in oxygen and 2,045C in air whereas jet fuel burns at 287.5C in air. (but the temperature of jet fighter afterburner can reach 1700C somehow)

  2. The vapour trail behind the rocket / jet which will be either white with alpha for the water base vapour trail if the rocket is in atmosphere. Also I believe my assumption is correct that this would not be necessary for a rocket burning fuel in space. The vapour trail will simulated as tiny water droplets which are much larger than the wavelength of visible light, so they would scatter light achromatically. As water itself is colorless the resulting color would be white?

Also I am looking to model this from a birds eye perspective so it does not need to be a full 3D model. So the positions of the 10 or so pilot lights around the afterburner cone for example could just be approximated as maybe 5 linear points.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暗喜 2024-08-30 17:49:21

根据您需要的细节级别,您可能需要简单地使用来自 Yet 引擎的纹理锥体。如果你想要一个成熟的粒子系统(对于喷气发动机来说这对我来说似乎没有必要)那么你可能想要为堆栈上的每个粒子提供一系列属性,例如速度(vec3)、大小、气体类型和年龄。

每次游戏循环进行时,创建一个循环来处理每个粒子。对于每个刻度,您的模拟将随着粒子变老而改变速度和大小。您应该创建一个函数,根据粒子的年龄和气体类型来确定粒子的外观。

最简单地说,随着年龄的增长,这可能会使有色颗粒褪色、变大和变慢。这是您要找的吗?

Depending on the level of detail you require, you may want to simple use a textured cone coming out of the yet engine. If you want to go for a full-blown particle system (which for a jet engine does not appear necessary to me) then you might want to give each particle on the stack a bunch of properties like speed (vec3), size, gas type and age.

Make a loop to process each particle each time your game loop goes around. For each tick, your simulation would then change the speed and size as the particle gets older. You should make a functions that determines the look of the particle according to its age and gas type.

At its simplest, this could make colored particles fade, enlarge and speed down as it gets older. Is this what you are looking for?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文