top of page

GRASS RENDERING

TYPE

SUMMARY

TOOLS & TECH

University

Added realistic grass rendering to an existing game

C++ // DirectX // Phyre Engine // Shader Programming

vlcsnap-2025-06-24-22h10m18s887.png

I spent several weeks working on grass rendering as part of the Integrated Development Project for my course at Sheffield Hallam University. The goal of the project was to enhance the visuals of the PlayStation 3 game Aspect, which had been developed by another group of students, without negatively affecting gameplay or performance.

 

Aspect is a cooperative puzzle game in which two players must collaborate to fit building blocks into matching holes by rotating and moving them. Each player controls one axis of movement and one axis of rotation, making coordination essential to progressing through a series of levels. During the project, I initially worked with DirectX 11 and later transitioned to the PhyreEngine, which had been used to create the original version of the game.

​

After researching a variety of visual effects, including weather systems, I decided to implement grass rendering. The effect had potential for wide application across environments and was well documented, making it a manageable and efficient choice. I based my implementation on a widely used technique involving interleaved quads with grass textures, which display blades of grass surrounded by transparent areas. Placing a large number of these quads close together creates the appearance of dense grass coverage, while keeping the polygon count relatively low.

​

Since I was unfamiliar with the PhyreEngine at the time, I first prototyped the grass effect in DirectX 11 by integrating it into an application I had previously built. Once the effect proved viable, I created a standalone PhyreEngine application to focus on the technical implementation without yet needing to integrate with Aspect. This phase included implementing geometry instancing for performance, writing a custom shader in Cg, and developing a method for controlling grass placement.

​

To ensure grass was only rendered in appropriate locations, I used distribution and height maps. The distribution maps were greyscale, top-down representations of each game island, with black areas indicating places where no grass should appear. Other shades of grey corresponded to different types of grass or flowers. These maps were interpreted in code and used to check whether a given grass object's location was valid and which grass type to apply. The height map worked similarly and was used to ensure that grass objects appeared correctly positioned on the terrain surface, avoiding floating or sunken blades. 

​

To improve the realism of the grass, I introduced random variations in size and rotation. I also added simple wind animation, based on a simplified wind model. This effect was achieved by translating the upper vertices of the quads according to wind direction and strength. I further enhanced the effect with basic fake lighting by oscillating between lighter and darker tones as the grass swayed. These techniques helped make the grass feel more dynamic without significantly affecting performance. Most parameters, including those related to wind and appearance, could be easily adjusted in code to fit different environments.

​

When the grass effect was complete, I encapsulated much of the functionality into reusable classes to simplify integration with Aspect. Toward the end of the project, I focused on fine-tuning the system to ensure it worked well with the existing game levels and code. After I completed the course, Aspect was intended to be ported to and released on the PlayStation 4 by other students. I'm not entirely sure if it was ever officially released, but from what I heard, the grass effect I implemented was not included in the new version, as it could not be successfully transferred during the porting process.

Below you can find a low quality video of the effect from the Steel Minions Youtube channel (that's the on-campus game studio of the university). Also, I found another video that was filmed directly off the screen, showing the additional levels and different configurations of vegetation.

bottom of page