Particles and Lighting

The mouse cursor becomes a ball of flame in this particle system and lighting demo. Light the four torches on the screen to witness their different behaviors. Also, each particle system acts as a light source, emitting varying intensities against the brick wall.

Image Gallery:


After considering how much opportunity I had to do some gameplay, systems, tools, and generalist programming, I decided I wanted to further my skills with effects. I figured there was no better way to do that than to build a simple particle system demonstration involving lighting effects! This simulation contains four torches on screen that can be lit by a player-controlled flame. Each torch is a particle system that acts as a light source, as well as the flame. Model importing was also incorporated to render the torch models.

In order to accomplish the particle effects, I built a particle system and emitter tool to govern the behavior of a given system. Each particle system is customizable to achieve various effects, which is demonstrated in each torch flame. Some attributes that could be defined include emit position, emit velocity, emit acceleration, random ranges for position, velocity, and acceleration, color, size, lifetime, rotational velocity, transparency, and growth/decay factors for each attribute. The player’s flame is a simple fire particle system rendered over a smoke particle system. The actual behavioral component of the particle systems is governed entirely on the GPU, using HLSL.

Lighting is also a factor that I wanted to include. Each particle system acts as a light source with a position, intensity, and source color. Lighting calculations are done on the GPU – the brick wall is lit in certain areas based on the intensity ranges of each light. There is an option in the simulation to enable/disable color lighting, which will take the color of the particle system itself and apply that as the color on the brick wall, rather than just white.

This project was developed using XNA C# and HLSL.


Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>