Gamasutra is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Gamasutra: The Art & Business of Making Gamesspacer
View All     RSS
August 22, 2019
arrowPress Releases







If you enjoy reading this site, you might also want to check out these UBM Tech sites:


Sponsored Feature: Rendering Grass with Instancing in DirectX 10

Sponsored Feature: Rendering Grass with Instancing in DirectX 10

May 28, 2009 | By Staff

May 28, 2009 | By Staff
Comments
    Post A Comment
More: Console/PC



In a new Intel-sponsored feature, part of Gamasutra's Visual Computing section, Intel senior software engineer Anu Kalra examines ways to render realistic grass in your game, utilizing DirectX 10 and vertex shaders.

As the introduction to the new technical article, which goes on to explain some of the methods that can be used to render grass, explains:

"Because of the geometric complexity, rendering realistic grass in real-time is difficult, especially on consumer graphics hardware. This article introduces the concept of geometry instancing with Direct3D 10 APIs and shows how it can be used to implement realistic grass on consumer graphics hardware.

A typical patch of grass can easily have a few hundred thousand blades. Each blade is similar to the other, with slight variations in color, position, and orientation. Rendering a large number of small objects, each made from a few polygons, is not optimal.

Current generation graphics APIs, such as DirectX and OpenGL, are not designed to efficiently render models with a small number of polygons thousands of times per frame.

To efficiently render thousands of blades of grass, the number of draw calls needs to be drastically reduced. If the geometry of the grass blades doesn't change, the best approach is to process the grass elements in a vertex buffer and render them in one draw call.

However, if the geometry does change often-for example, if the level-of-details scheme is being used for geometry simplification-this approach won't work, because a large amount of data would need to be sent to the graphics card every time the geometry changes.

Geometry instancing allows the reuse of geometry when drawing multiple similar objects in a scene. The common data is stored in a vertex buffer, and the differentiating parameters, such as position and color, are stored in a separate vertex (instance) buffer. The hardware uses the vertex and instance buffers to render unique instances of the models. (Refer 5)

Using geometry instancing APIs helps factor common data from the unique data (flyweight design pattern) and thus reduces memory utilization and bandwidth. The vertex buffer can stay resident in graphics memory, and the instance buffer can be updated more frequently if needed, providing performance and flexibility."


The full Gamasutra article, including code excerpts and plenty more technical explanation on grass creation, is now available to read on the site.


Related Jobs

Cold Iron Studios
Cold Iron Studios — San Jose, California, United States
[08.22.19]

Sr. Character Artist
Cold Iron Studios
Cold Iron Studios — San Jose, California, United States
[08.22.19]

Principal Character Artist
Cold Iron Studios
Cold Iron Studios — San Jose, California, United States
[08.22.19]

Senior Content Designer
Cold Iron Studios
Cold Iron Studios — San Jose, California, United States
[08.21.19]

Senior Systems Designer









Loading Comments

loader image