\chapter{Sandstorm the Concept}\label{ch3}

Sandstorm is a Dynamic Multi-contextual GPU-based Particle System that uses vector fields for particle propagation.
Sandstorm is designed to use gathered scientific data, vector fields, and use it to `guide' the motion of the particles according to this observed data.
Also Sandstorm is designed to run in a 3D virtual reality environment with the presence of other applications and simulations.
Therefore the performance of Sandstorm was an issue, thus a GPU-based approach was used to try and free the CPU for use elsewhere.

First off, lets take a look at what is meant by dynamic.
Sandstorm is designed to have the ability to change certain attributes on the fly.
Some of these attributes include, the rate at which particles were emitted, the size of the particles, the area at which the particles are emitted, the vector field that propagates the particles, and the lifetime of the particles.
This ability was added to aid in the real-time scalability of Sandstorm. 
As less and less resources become available to the system, Sandstorm can be scaled back to allow more resources for more important tasks.
This ability also brings with it an inherit level of detail, allowing Sandstorm to decrease the number of particles being emitted when the viewer is far away from the particle system.

Next, lets take a look at why Sandstorm is a multi-contextual particle system.
As previously stated in Chapter 2, the typical architecture for a 3D virtual reality application/simulation is that there is a main context that handles such tasks as input gathering, updating simulations, and multiple rendering contexts that handle the rendering of a scene.
Considering that there are several rendering contexts, the generation of such information as random numbers, for use in rendering algorithms, needs to be context safe.
Therefore a split first approach, described in Chapter 2, was adopted for use in Sandstorm.
What is meant by this is that each context is given a copy of the entire simulation to run on it, but not everything was given to all contexts.
The main context still handles context safe calculations, such as random numbers, and passes them to all the rendering contexts.
This split first approach was adopted to try and take advantage of the massively parallel streaming model that are today's GPUs.

Sandstorm is designed to leverage the use of today's powerful and advanced GPUs.
To take full advantage of todays GPUs, Sandstorm is designed to use Shader Model 4, in particular geometry shaders and transform feedback.
By using these two aspects of Shader Model 4, Sandstorm is capable of isolating all of the particle simulation and render step to the GPU.
In fact only two aspects of the particle system remain on the CPU, the passing of per frame data(such as delta time) and the updating of the vector fields.
The Updating of the vector fields was left on the CPU, because the vector fields are implemented in 3D textures and to update an entire 3D texture on the GPU would put to much work on the GPU.

Finally, Sandstorm is designed to use vector fields, filled with gathered and observed scientific data to propagate the particles.
This was done so that Sandstorm can mimic such scientific phenomenon as the dust cloud that is kicked up by a helicopter's downdraft.

The actual implementation for all of these attributes of Sandstorm will be described in the chapter to follow.
