Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.

Qt3D-Particle-Framework

From Qt Wiki
Jump to navigation Jump to search

En Ar Bg De El Es Fa Fi Fr Hi Hu It Ja Kn Ko Ms Nl Pl Pt Ru Sq Th Tr Uk Zh

Details

  • Summary: Support particle systems in Qt 3D's renderer
  • Project lead: Paul Lemire
  • Branch: wip/particles

Goals

To be able to specify particle systems at a high level but remain flexible and efficient.

Some basic requirements for the particle system is that the particle system supports animations based on the particle lifetime for the following properties with configurable random variance:

  • starting and ending geometry (mesh blending)
  • trajectory
  • velocity
  • rotation angle and speed
  • scaling
  • color & transparency
  • Wish: collisions?
  • Wish: similar turbulence and other modifiers from the Qt Quick Particles?


Details

Initial aim is to support systems that provide compute shader capabilities as this is where the hardware is going (OpenGL ES 3.1 onwards, OpenGL 4.3 onwards, Vulkan, D3D12, Metal all have native support). Once this is working we can investigate adding some support for older systems based on transform feedback or vertex shader tricks if deemed worthwhile.

Taking inspiration from particle systems in other engines we want the ability to be able to customise: emission, forces, lifetimes, colors, orientations etc. The approach is to have the ParticleSystem component dynamically generate suitable compute shaders that are then used to step the particle simulations and feed data to the renderer for actually displaying the particles.

The rendering part is taken care of by specifying a GeometryRenderer and Material as usual. The ParticleSystem component only steps the particle simulation.

Rendering may be done by building indirect draw call command buffers in the compute shader.