- Is DPSF free? (License info)
DPSF is 100% free to use in any application, although donations are appreciated :) If you are releasing an
application that uses DPSF, you must reference DPSF somewhere in your application. It is recommended that you display the DPSF splash screen
(players can skip splash screen by pressing a button), but not required; you can just show the DPSF Logo (image) or mention DPSF in text somewhere in the application
instead. If the only place that DPSF is mentioned in your application is in the credits, then they should be accessible from the main menu.
The DPSF Logo and Splash Screen Particle System can be found in the DPSF install directory in the Logos directory, typically "C:\DPSF\Logos".
Putting our logo somewhere on your website (if you have one) with it linking back to this website would also be appreciated,
but is not required. We also recommend announcing any software releases that uses DPSF on the DPSF Forums,
as this will help drive more traffic to your website. Also, if you post any videos of your software, remember to include "DPSF" in the video's tags/keywords so
that people searching for "DPSF" will find your videos.
- What is a particle system?
A particle system is a piece of software used to control the movement, behavior, and visualization of many particles, where a particle is
typically represented on screen as a texture (i.e. image). When the particles are percieved as a whole they appear to be a single object. Particle systems
are typically used to create special effects, such as fire, smoke, explosions, dust, clouds, rain, snow, water, sparks, fur, hair, magic spells, etc.
- What is DPSF?
DPSF (Dynamic Particle System Framework) is a framework for creating custom particle systems in Microsoft's XNA framework.
- Is it easy to create simple particle systems using DPSF?
Yes, DPSF provides Default Particle System Classes with built in support for things like velocity, acceleration, friction, rotation, external forces, etc.
so creating a simple particle system is as easy as specifying a few parameters.
- Is DPSF only good for creating simple particle systems?
No, DPSF is great for creating both simple and complex particle systems. DPSF was originally designed to allow you to create complex or unusual
particle systems, such as those often needed in research applications. DPSF allows you to specify your own particle properties and behaviors. So
if you wanted to, for example, give your particles a Temperature property and have them rise when they are hot and fall when they are cool, this
can easily be accomplished with a few lines of code.
- Are there any tutorials on how to use DPSF?
Yes! DPSF provides tutorials and their source code in the DPSF installer. The tutorials can be found in the DPSF Help.chm included
with the installer, which is also available online here. You can also view the particle system source code of the
DPSF Demo to see how all of the effects in the Demo are created and learn from them as well.
- Is there a GUI editor that can be used to create particle systems?
Not at the moment, but one is currently in development. At the moment though, all particle system parameters must be specified by code.
- Is it easy to integrate DPSF into my existing project?
Yes, it simply involves adding a reference to a dll file. From there you can create a particle system class (or simply grab one from the demo samples
provided) and start using it in your application. You can have a particle system in your application within a matter of minutes.
- Can DPSF only be used with XNA applications that use the Game class?
No, the Game class is not required. DPSF can be used with games as well as WinForms applications; as long as they use an XNA GraphicsDevice to do
the rendering, as shown in the WinForms samples on the XNA Creators Club website.
- Does DPSF run on the CPU or GPU?
In order for DPSF to maintain its flexibility and to support the complex behaviors that it does, while being easy to use, it must run on the CPU.
However, since you can still write the GPU shaders that DPSF uses, you can create a GPU particle system using DPSF, but you would have to write all
of the shader code yourself (nothing is provided by DPSF for you to do this yet). In the future DPSF may get official support for GPU particle systems,
but at the moment DPSF is designed for CPU particle systems.
- Can I use your particle systems and images in my project?
Yes, you can use any of the particle systems provided by DPSF in your projects for free, and feel free to modify them as you need. You can also
use any of the particle image textures provided by DPSF for free in your projects as well. If you release your project to the general public though
it must have a DPSF splash screen (users can skip splash screen).
- Does DPSF support XNA 4.0?
Yes, DPSF fully supports both XNA 3.1 and 4.0, including full support for Windows PCs, Xbox 360, Windows Phone, and the Zune. Through the use of
MonoGame DPSF can also run on Android and WinRT (e.g. Windows 8 metro).
- How do I kill a particle before it reaches the end of its lifetime?
Set the particle's NormalizedElapsedTime property to 1.0.
- Why aren't my particles showing up?
Make sure you are calling the particle system's Update() and Draw() functions, as well as its
SetWorldViewProjectionMatrices() function directly before the Draw() function. If you have particle systems contained within other
particle systems, make sure these functions are being called on the inner particle systems as well. Other things to check include making sure the particle
system's Enabled and Visible properties are both true, and that the SimulationSpeed property is greater than zero.
- My Quad particles show up, but don't always face the camera (i.e. are not billboards).
All of the Quad particle systems must be told where the Camera is each update call in order to orient themselves to face it. If your Quad particles are visible, but
do not always face the camera (and you want them to), you are likely forgetting to update the Quad particle system's CameraPosition property to
the position of the camera before calling the particle system's Update() function. The other thing to make sure of is that you are also using an Everytime Event to
update each particle to face the camera each frame (i.e. this.ParticleEvents.AddEveryTimeEvent(UpdateParticleToFaceTheCamera).
An alternative to having to do this is to use a Sprite3DBillboard particle system instead of a Quad particle system, as these are designed to always
face the camera; even without setting up an Everytime Event to rotate the particle towards the camera.
- After drawing one of the particle systems, the textures on my models no longer show up.
When a DPSF particle system is drawn, it typically changes the Graphics Device's Samper State's U, V, and W Address modes to Border. To restore the textures
to your models, you will need to change these modes back to Wrap before drawing your models, using the code:
GraphicsDevice.SamplerStates[0].AddressU = TextureAddressMode.Wrap;
GraphicsDevice.SamplerStates[0].AddressV = TextureAddressMode.Wrap;
GraphicsDevice.SamplerStates[0].AddressW = TextureAddressMode.Wrap;
- My particle systems are broken after updating DPSF versions.
Check out the DPSF help documentation. There is an entire section describing the common code breaking changes that will need to
be fixed from one version of DPSF to the next.