This deformation is done along the world-space vertex normal xy direction.įinally, we come to per-leaf bending, which we produce simply by deforming up and down along the z-axis, using the blue channel for leaf stiffness. Leaves' bending, as we have mentioned, is done by deforming the edges, using the vertex color's red channel for controlling edge stiffness control. Functions Used for Wave Generation float4 SmoothCurve( float4 x ) Detail Bending For more details on this shading, see Section 16.2.įigure 16-3 Wave Composition Example 16-1. The alpha channel is used for precomputed ambient occlusion. As shown in Figure 16-2, the red channel is used for the stiffness of leaves' edges, the green channel for per-leaf phase variation, and the blue channel for the overall stiffness of the leaves. This color gives us extra information about the detail bending. Artists paint one RGB color per-vertex, using a common 3D modeling software. Note that care must be taken to limit the amount of deformation otherwise, the results will not look believable.įor leaves' detail bending, we approach things in a similar fashion, but in this case only wind strength is taken into account. We generate the main bending by using the xy components of the wind vector, which gives us the wind direction and its strength, using the vegetation mesh height as a scale to apply a directional vertex deformation. With this approach, we can theoretically afford a large number of wind sources while keeping the per-vertex cost constant, although with some extra linear per-instance CPU cost. Figure 16-1 shows an example.įigure 16-1 Visualization of Increasing Main Bending Strengthĭesigners can place wind sources at specific locations, attach them to an entity (for example, helicopters), and attach then to particle systems as well. Also, each instance has its own stiffness, and the wind strength gets dampened over time when the instance stops being affected by any wind sources. In our case, we compute this sum in a very similar way to light sources affecting a single point, taking direction and attenuation into account. A wind area can be a directional or an omnidirectional wind source. A wind vector is computed per-instance, in world space, by summing up the wind forces affecting the instance. In our approach, we divide animation into two parts: (1) the main bending, which animates the entire vegetation along the wind direction and (2) the detail bending, which animates the leaves. In this chapter, we describe how we handle shading and procedural vegetation animation in an efficient and realistic way. Our game scenes can have thousands of different vegetations, but still we pushed the envelope further by making vegetation react to global and local wind sources, and we bend not only the vegetation but also the leaves, in detail, with all computations procedurally and efficiently done on the GPU. Vegetation in games has always been mainly static, with some sort of simple bending to give the illusion of wind. A key feature of Crysis among these technologies is vegetation rendering, which is composed of several parts, including procedural breaking and physics interaction, shading, procedural animation, and distant sprite generation, among others. For our latest game, we have developed several new technologies that together comprise CryENGINE 2. Vegetation Procedural Animation and Shading in CrysisĪt Crytek, one of our primary goals for Crysis was to define a new standard for computer game graphics. You can also subscribe to our Developer News Feed to get notifications of new material on the site.Ĭhapter 16. The CD content, including demos and content, is available on the web and for download. GPU Gems 3 GPU Gems 3 is now available for free online!
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |