Hierarchical particle systems deal with the problem of high particle count that should be used to achieve realistic high quality effects. If we want to add detail to the individual particles, we can use a detail texture (usually a video texture) that visualizes the desired natural phenomena. This texture gives detail by perturbing the particle opacity and or color. This usually gives nice results but the cheating is usually visible if the camera moves in or rotates around the medium, because these images are only 2D and has no depth information. The main task of hierarchical systems is to create the correct image for all view directions. We use a particle system that will visualize the described phenomena and give a detail texture for all view directions. This way we build a particle system made out of duplications of a smaller particle system, but the smaller system needs to be rendered only once and the resulting image will be multiplied. Another great advantage of this method is that not only color and opacity but depth information can be stored for the given direction, which gives us a good substitute of the small system. These color or opacity images with their depth information are called depth impostors. To handle volumetric media as one depth information is not enough we have to store both front and back depth values. This information can be used to determine correct opacity taking into account the objects located inside particle system, so billboard clipping can be avoided which results even higher realism. The simplified modeling of the particle system also makes real time shading of the medium possible. Handling light volume interaction on the particle level would be too computation intensive since the light pass requires the incremental rendering of all particles and the read back of the actual result for each of them. To speed up the process, we render particle blocks one by one, and separate light volume interaction calculation from the particles. During a light pass we classify particle blocks into groups according to their distances from the light source, and store the evolving image in textures at given sample distances. These textures are called slices. The first texture will display the accumulated opacity of the first group of particle blocks; the second will show the opacity of the first and second groups of particle blocks and so on. The required number of depth samples depends on the particle count and the cloud shape. For a roughly spherical shape and relatively few particles (where overlapping is not dominant), even four depths can be enough. This method provides real time shading of animated particle systems under changing light conditions (both light color and position can be changed). Usage ----- This sample application displays a cloud shaded with one light source. As the application starts a plane flies into the cloud and the camera follows it. The animation loops and can be stopped. If the animation is stopped we can control the camera ourselves. The scattering properties of the cloud can be changed interactively. The displayed cloud is made out of 100 blocks each with 400 particles resulting in a total count of 40000 modeled particles. The positions of the particles inside a block are animated which give a swirling effect to the cloud, while the positions where the blocks should be placed (particle positions of the bigger system) are read from a file. Controls: o w, s : moves camera forward and back o a, d : slides camera left and right o r, f : moves camera up and down o left, right : rotates camera (also can be done with mouse while holding left button) o F1, shift + F1 : increase, decrease cloud density o F2, shift + F2 : increase, decrease cloud albedo o F3, shift + F3 : increase, decrease cloud scattering symmetry o h : change heads up display o l : change lighting mode (see shaders above) o i : toggle depth calculation o p : start/stop screenshot saving o o : start/stop plane and camera animation Run --- Run src/HierarchicalSys.exe Build ----- Load and build src/HierarchicalSys.sln Some resource includes and libs are located in RESOURCES