PhotonDust: Difference between revisions

From Resonite Wiki
Improvements
m PhotonDust is spelled without a space!
 
(7 intermediate revisions by 3 users not shown)
Line 2: Line 2:
<!--ATTENTION WIKI EDITORS: this will probably need more info in general. Mostly things like what people can do, the idea behind the name of Photon Dust, Frooxius talking about how it's like minecraft's system, frooxius talking about expandability, how the system can do effects inaccessible to Unity, and generally ideas and inspiration that get users excited to use such a system-->
<!--ATTENTION WIKI EDITORS: this will probably need more info in general. Mostly things like what people can do, the idea behind the name of Photon Dust, Frooxius talking about how it's like minecraft's system, frooxius talking about expandability, how the system can do effects inaccessible to Unity, and generally ideas and inspiration that get users excited to use such a system-->


'''PhotonDust''' is the particle system made for Resonite<ref>Message by Frooxius on Discord (requires account): https://discord.com/channels/1040316820650991766/1154514014563483759/1292978594683031613</ref> that replaced the Unity particle system. It is more modular and extensible than the original system<ref>Message by Frooxius on Discord (requires account): https://discord.com/channels/1040316820650991766/1154514014563483759/1293664350443274301</ref>.
'''PhotonDust''' is the name of [[FrooxEngine|FrooxEngine's]] particle system.<ref>Message by Frooxius on Discord (requires account): https://discord.com/channels/1040316820650991766/1154514014563483759/1292978594683031613</ref>


{{note|PhotonDust is now in the main game, and the legacy particle system is due to be removed soon. See [https://github.com/Yellow-Dog-Man/Resonite-Issues/discussions/3673 the GitHub discussion thread] for more information.|information}}
It is extremely modular, which allows for making all sorts of effects.


The implementation of this system is currently tracked as issue [https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/587 587 on GitHub].
Each particle has a life-cycle: Particles are "born" from an emitter, "live" or have lifetime, and then "die" at the end of their lifetime.


= How to use it =
== How to use it ==
PhotonDust's modularity allows for making all sorts of effects. The particles have a life-cycle. Particles are "Born" from an emitter, "Live" or have lifetime, and then "Die".
To get started with using the particle system, use the [[Dev Tool]]'s create menu to create a new particle system.


To get started, you can use a [[Dev Tool]]'s Create New menu to create a PhotonDust particle system.
This will create a PhotonDust system with a basic point emitter. A list of alternative emitters that can be used are under the [[:Category:Components:Rendering:Particle System:Emitters|Rendering/Particles/Emitters]] in the Attach Component menu. For any emitter added, they need the [[Component:ParticleSystem]] specified in their System field, which can be found in the root of the PhotonDust object we made. The emitter can have its values adjusted, such as Rate and Direction. More things can be controlled about the emission of particles by creating Initializer modules.  


This will create a PhotonDust system with a basic Point emitter. A list of alternative emitters that can be used are under the [[:Category:Components:Rendering:Particles:Emitters|Rendering/Particles/Emitters]] in the Attach Component menu. For any emitter added, they need the PhotonDust System specified in their system field, which will be the [[Component:ParticleSystem]] in the root of the PhotonDust object we made. The emitter can have its values adjusted, such as Rate and Direction. More things can be controlled about the particles by creating Initializer modules.  
PhotonDust as a whole is [[#Modular approach|composed of many modules]]. To make your particles move with gravity, forces or turbulence, simply create the desired module and insert it into the [[Component:ParticleSystem|ParticleSystem]] component. All modules respect the Enabled property, meaning disabling a module will disable its effect on the Particles.


PhotonDust is made from [[#Modular approach|modules]], which can be read about more in the [[#Modular approach|Modular approach]] section. To make your Particles move with gravity, forces or turbulence; simply create the module component and insert it into the [[Component:ParticleSystem]] that is PhotonDust. This will instantly make the module affect particles in the specified system. Every module respects the disabled property, meaning disabling a module will disable its effect on the Particles.
Some modules depend on other modules to function, for example all of the angular velocity modules depend on the [[Component:RotationSimulatorModule|RotationSimulatorModule]]. Likewise, anything that changes a particle's position will depend on the [[Component:PositionSimulatorModule|PositionSimulatorModule]].


= How it works =
== How it works ==
PhotonDust can be compared to Minecraft's robust particle system. It is modular, fast, multithreaded and allows for forces like Blender3D's and Minecraft's particles.
PhotonDust can be compared to Minecraft's robust particle system. It is modular, performant, and allows for forces like Blender's and Minecraft's particles.


== Multithreading ==
=== Multithreading ===
The PhotonDust system is multithreaded and asynchronous, meaning it will do calculations on separate CPU cores to distribute the load on the machine. This allows for a much greater number of particles running at once. The particle system will visually become a slideshow in cases of high demand without ruining the overall framerate of the game.
The PhotonDust system is multi-threaded and asynchronous, meaning it will do calculations on separate CPU cores to distribute the load on the machine. This allows for a much greater number of particles running at once. If there's high demand, only the particle system will lag, without lowering the overall framerate of the rest of the game.


== Modular approach ==
=== Modular approach ===
Instead of condensing all of the options within a single monolithic component, the options are broken up into modules which are separate components.
All of PhotonDust's functionality is broken up into self-contained modules. These can range from applying a simple force to the particles, to trails and complex color effects based on properties of particles.


Several modules are already implemented, and more will be implemented in the future. Current ones include but not limited to:
Some modules include:
* [[Component:ParticleRibbonsModule|Ribbons]] - Particles will have lines connecting them to each other.
* [[Component:ParticleTrailsModule|Trails]] - Particles will have strips of color or patterns that follow behind them as they move.
* [[Component:SimplexTurbulentForce|SimplexTurbulentForce]] - Particles will move through the air as if it's turbulent, using simplex noise.
* [[Component:RadialForce|RadialForce]] - Particles will be repelled or attracted to a point.
* [[Component:GravityForce|GravityForce]] - Applies a gravity force to the particles.
A list of modules and their effects the game uses can be found under the component category [[:Category:Components:Rendering:Particle System:Modules|Rendering/Particle System/Modules]].


* Ribbons - particles will have lines connecting them to each other.
== Differences from the legacy system ==
* Trails - particles will have strips of color or patterns that follow behind them as they move.
PhotonDust has several notable differences from the old legacy particle system, that was based on Unity.
* SimplexTurbulentForce - particles will move through the air as if hitting turbulent air (using simplex noise).
It is modular (unlike Unity's monolithic particle system), much more performant, and doesn't fall to the same emit and forget philosophy of Unity's particle system.
* RadialForce - particles will be repelled or attracted to a point.
* GravityForce - particles can have gravity.


And many more! A list of modules and their effects the game uses can be found under the component category [[:Category:Components:Rendering:Particle System:Modules|Rendering/Particle System/Modules]].
== See Also ==
 
* [[:Category:Components:Rendering:Particle System:Emitters|PhotonDust Emitters]]
= Differences from the legacy system =
* [[Component:ParticleSystem]]
 
* [[:Category:Components:Rendering:Particle System:Renderers|PhotonDust Rendering Styles]]
PhotonDust has several notable differences from the old legacy particle system that existed before. It is modular, fast, multithreaded, and doesn't fall to the same emit and forget systems of Unity. It also is a clean component, without a monolithicly large component from older days when Unity was the underlying simulator of such systems.
 
= References =


== References ==
<references />
<references />
= See Also =
* [[:Category:Components:Rendering:Particles:Emitters|Photon Dust Emitters]]
* [[Component:ParticleSystem]]
* [[:Category:Components:Rendering:Particles:Renderers|Photon Dust Rendering Styles]]

Latest revision as of 02:40, 9 May 2025

This article or section is a Stub. You can help the Resonite Wiki by expanding it.

PhotonDust is the name of FrooxEngine's particle system.[1]

It is extremely modular, which allows for making all sorts of effects.

Each particle has a life-cycle: Particles are "born" from an emitter, "live" or have lifetime, and then "die" at the end of their lifetime.

How to use it

To get started with using the particle system, use the Dev Tool's create menu to create a new particle system.

This will create a PhotonDust system with a basic point emitter. A list of alternative emitters that can be used are under the Rendering/Particles/Emitters in the Attach Component menu. For any emitter added, they need the Component:ParticleSystem specified in their System field, which can be found in the root of the PhotonDust object we made. The emitter can have its values adjusted, such as Rate and Direction. More things can be controlled about the emission of particles by creating Initializer modules.

PhotonDust as a whole is composed of many modules. To make your particles move with gravity, forces or turbulence, simply create the desired module and insert it into the ParticleSystem component. All modules respect the Enabled property, meaning disabling a module will disable its effect on the Particles.

Some modules depend on other modules to function, for example all of the angular velocity modules depend on the RotationSimulatorModule. Likewise, anything that changes a particle's position will depend on the PositionSimulatorModule.

How it works

PhotonDust can be compared to Minecraft's robust particle system. It is modular, performant, and allows for forces like Blender's and Minecraft's particles.

Multithreading

The PhotonDust system is multi-threaded and asynchronous, meaning it will do calculations on separate CPU cores to distribute the load on the machine. This allows for a much greater number of particles running at once. If there's high demand, only the particle system will lag, without lowering the overall framerate of the rest of the game.

Modular approach

All of PhotonDust's functionality is broken up into self-contained modules. These can range from applying a simple force to the particles, to trails and complex color effects based on properties of particles.

Some modules include:

  • Ribbons - Particles will have lines connecting them to each other.
  • Trails - Particles will have strips of color or patterns that follow behind them as they move.
  • SimplexTurbulentForce - Particles will move through the air as if it's turbulent, using simplex noise.
  • RadialForce - Particles will be repelled or attracted to a point.
  • GravityForce - Applies a gravity force to the particles.

A list of modules and their effects the game uses can be found under the component category Rendering/Particle System/Modules.

Differences from the legacy system

PhotonDust has several notable differences from the old legacy particle system, that was based on Unity. It is modular (unlike Unity's monolithic particle system), much more performant, and doesn't fall to the same emit and forget philosophy of Unity's particle system.

See Also

References