Graphics Reference
In-Depth Information
two colors, which are alternated for each successive thread group. This produces a check-
erboard pattern that can be seen in the final rendered output, as shown in Figure 12.9.
12.1.3 Conclusion
This fluid simulation provides an efficient method to represent realistic, time-varying fluid
surfaces. The simulation is run completely on the GPU, freeing up the CPU to perform
other tasks. Since the simulation grid size is not fixed, it can be expanded to any desired
size, as long as it fits within a structured buffer resource. This allows for potentially huge
simulation spaces, or extremely high resolution simulations of smaller spaces. In addition,
since it leverages a highly parallel algorithm, the performance of the technique will scale
well with future hardware performance improvements.
12.2 Particle Systems
Fluid rendering is a very useful and visually appealing simulation to add to a scene.
However, its use is restricted to a fairly specific domain of situations due to the fact that it
represents a fluid. There is a whole class of additional natural and man-made phenomena
that are desirable to add to a scene, and that are fundamentally different than fluids. These
effects include smoke, fire, sparks, or debris from an explosion, just to name a few. As with
fluid simulation, the visual appearance of these phenomena is the result of many millions or
billions of individual molecules continually interacting with one another in many different
ways, over a period of time. This is simply not possible to directly simulate in a real-time
rendering context; hence, we must find a more efficient method to produce a rendered im-
age sequence that can approximately produce a similar appearance.
One potential technique for implementing these effects is the use of particle systems.
A particle system is a construct composed of many individual elements, referred to as
particles. Each particle has a unique set of variables associated with it to define its current
status; when considered at the same time, the particles form a particle system. The simula-
tion portion of this concept requires us to define an algorithm for creating new particles,
destroying old particles, and incrementally updating the state of the particles between cre-
ation and destruction events for a small increment of time. Each particle is created, then is
updated once in each simulation step, and finally destroyed after it is no longer needed. The
main constraint in a particle system is that all particles must use the same set of variables,
which allows their update method to operate in the same way on each particle.
This technique of using many unique elements and updating them with the same
set of rules is used to derive complexity out of many simple components. For example,
Search WWH ::




Custom Search