Changeset 1479 for GTP/trunk/App/Demos
- Timestamp:
- 09/22/06 20:51:24 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Hierarchical Systems Demo [OpenGL]/ReadMe.txt
r1478 r1479 1 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. 2 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. 3 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). 4 5 Usage 6 ----- 7 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. 8 Controls: 9 o w, s : moves camera forward and back 10 o a, d : slides camera left and right 11 o r, f : moves camera up and down 12 o left, right : rotates camera (also can be done with mouse while holding left button) 13 o F1, shift + F1 : increase, decrease cloud density 14 o F2, shift + F2 : increase, decrease cloud albedo 15 o F3, shift + F3 : increase, decrease cloud scattering symmetry 16 o h : change heads up display 17 o l : change lighting mode (see shaders above) 18 o i : toggle depth calculation 19 o p : start/stop screenshot saving 20 o o : start/stop plane and camera animation 21 22 23 Run 24 --- 25 26 Run src/HierarchicalSys.exe 27 28 Build 29 ----- 30 31 Load and build src/HierarchicalSys.sln 32 Some resource includes and libs are located in RESOURCES
Note: See TracChangeset
for help on using the changeset viewer.