logo80lv
Articlesclick_arrow
Research
Talentsclick_arrow
Events
Workshops
Aboutclick_arrow
profile_loginLogIn

Infinite GPU Instanced Grass Field In Unity URP

"I just thought, 'It would be fun to have grass that expands to infinity.'"

Take a look at another example of beautiful grass from the Unity subreddit, created by Technical Artist Youssef Afella, who also shared the project code for free.

Similar to August Håkansson's grass system, this infinite GPU grass field that doesn't require storing trillions of positions in memory was inspired by Colin Leung's repository. Youssef Afella revealed that he made this project just for fun and had no idea how he could possibly use it in any way in a game. "I just thought, 'It would be fun to have grass that expands to infinity', that's all. But since a lot of people liked it let's push this shit to the production level", commented the developer.

If you want to incorporate this grass into your project, first you need to make sure that it has URP. According to Youssef Afella, the only folder you gonna need to add to your project is the "Core" folder. After importing it, just make a new empty object in your scene and add the script "InstancedIndirectGrassRenderer." You will need to assign some properties: the first one is the compute shader, which is GrassPositionsCompute, and the second is the material named InstancedIdirectGrass. Then, you should be able to see the grass in your scene. Play with the values in the script and the grass material to fit your scene.

Get the code here and learn more in the original Reddit post. Also, join our 80 Level Talent platform and our Telegram channel, follow us on InstagramTwitterLinkedInTikTok, and Reddit, where we share breakdowns, the latest news, awesome artworks, and more.

Join discussion

Comments 0

    You might also like

    We need your consent

    We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more