r/GraphicsProgramming • • Oct 05 '26

I finally got procedural grass looking the way I always wanted in Three.js

Enable HLS to view with audio, or disable this notification

Every blade is rendered individually, with enough geometry and detail that you can get right down into the grass and still see the shape of individual blades.

What I'm really happy about is how well that detail holds up into the distance. The grass doesn't just look good up close and then turn into a blurry carpet. There's still a surprising amount of visual fidelity as you move further away.

And this is running at 1080p on a base M1 Mac.

I've spent a huge amount of time working on the rendering, LOD system, culling, tiling, wind, and overall density to get this balance between individual blade detail and performance.

This is essentially what I've been trying to achieve with Three.js Grassworks: pushing procedural grass in Three.js as far as I can while still keeping it practical enough to actually use in a real-time scene.

It's built around WebGPU and Three.js, and the current system can handle different grass types, terrain interaction, distance-based LOD, and large grass fields while maintaining this level of detail.

Still a lot more I want to push with it, but I'm genuinely really happy with where it's at now.

https://grassworks.techredux.co/

247 Upvotes

41 comments sorted by

6

u/Seusoa Oct 05 '26

diversity of grass not found

2

u/PerceptionCharming Oct 06 '26

This is to show off the coverage and performance of it. With grass maps in Grassworks, you can definitely have diversity. Lower or taller grass in different areas, also bigger and smaller patches as well

5

u/DescriptorTablesx86 Oct 05 '26 edited Oct 05 '26

If I can just share that imo the interaction delayed recovery looks really weird. I think the typical displacement in a radius around player position is much better and probably simpler.

-2

u/PerceptionCharming Oct 05 '26

There's no interaction with grass in the video. I think you're talking about the grass being darker near the player.
That's just a shadowmap that moves with the player. I added a 4k shadow map to get sharp looking per blade shadows. The rest of the grass doesn't cast shadows.

1

u/DescriptorTablesx86 Oct 05 '26 edited Oct 05 '26

Interaction enabled.
Grass that reacts to your scene.
Make your grass respond to the objects moving through your environment. Grassworks supports configurable influence areas so characters, vehicles, and other objects can create natural deformation and movement as they interact with the field.

2

u/PerceptionCharming Oct 05 '26

Ah, you're talking about the interaction in Grassworks. I thought you were talking about the video.

That's basically due to the influence map. I actually tried your approach when I first started implementing it, but you can't really get trails in the grass that way, and it also ends up looking too uniform.

With the influence map, the grass can recover naturally over time, and that recovery duration is customizable. So you can also get the more immediate effect you're talking about simply by reducing the recovery time.

I made a video explaining the interaction system in detail if you want to check it out:
https://www.youtube.com/watch?v=IzwrW5xy-ag&list=PLBZ2CAONpf7g&index=5

30

u/biteater Oct 05 '26

definitely AI :(

3

u/Any_Wait_7309 Oct 06 '26

I don't think this is AI, but this is 100% based on the Ghost of Tsushima ( GDC Vault ) conference talk. They had given a talk on how they generate procedural grass in their game.

3

u/PerceptionCharming Oct 06 '26

Yes, I did in fact learned a lot from it and this uses most of those approaches.

3

u/PerceptionCharming Oct 06 '26

Just to clarify, this isn’t AI generated. I have been working on it for the past 3 months. I have used AI in some capacity, and who doesn’t. I mostly used it to try out different approaches and write small blocks that I know how to write, but would take a lot of time to write by hand.

This is actually an iteration of a grass system I wrote nearly two years ago. Without the help of AI. Here’s the post:  https://www.reddit.com/r/threejs/s/7QKYsQXrE1

I have actually made a complete series on YouTube, explaining how all of the systems work in Three.js Grassworks and how to use them. So, if someone is interested, take a look at it:  https://youtube.com/playlist?list=PLBZ2CAONpf7g&si=TULuzGuAqhb4N0Kv

-19

u/PerceptionCharming Oct 05 '26

Haha, I’ll take that as a compliment 😅

-7

u/yhrana Oct 06 '26

You should

Well done, it looks awesome 👑

0

u/PerceptionCharming Oct 06 '26

Thank you man!

-12

u/Disastrous-Gain5870 Oct 05 '26

..ok? It still looks amazing.

6

u/whatairport Oct 05 '26

Use rust wasm bro agents write it the same speed anyways

0

u/PerceptionCharming Oct 06 '26

I don’t know anything about rust

27

u/DapperCore Oct 06 '26

This is 100% ai, even the post's text is 100% ai generated according to pangram.

2

u/EarlMarshal Oct 05 '26

I get like 10-23 FPS on my (above average) smartphone. Seems like it is eating a lot of resources. I rather have no grass than a resource hog.

1

u/PerceptionCharming Oct 06 '26

Might I know which above average smartphone you have? Runs at 60fps on my iPhone 16 pro

3

u/EarlMarshal Oct 06 '26

And you really think that 60 FPS on that powerful hardware can be considered good?

Think again.

1

u/PerceptionCharming Oct 06 '26

I am not targeting for a 6 year old realme phone.

4

u/EarlMarshal Oct 06 '26

You are also not targeting your own phone since 60 FPS for fucking grass is slow AF.

1

u/PerceptionCharming Oct 06 '26

The demo has a lot more than just grass.

3

u/EarlMarshal Oct 06 '26

Not enough to justify that bad of a performance.

1

u/PerceptionCharming Oct 06 '26

Not everything is made for your potato phone.

2

u/EarlMarshal Oct 06 '26

We talking about yours. 60 FPS are not enough.

1

u/No-Difference629 Oct 06 '26

He’s probably got some bullshit ass old phone

2

u/fintip Oct 05 '26

some projects aren't made for phones.

2

u/biteater Oct 05 '26

If you're going to vibe something in three you should at least try to have it run everywhere

2

u/mrpressydepress Oct 05 '26

Looks great been wanting to use this for a project. Cant wait to have a few hours to do that. Looks really nice. Hope it can handle large areas and has smooth transition between patches.

0

u/PerceptionCharming Oct 05 '26

Thank you! Yes, it can handle large areas, and v1.1.0 adds smooth LOD transitions too. Would love to see what you build with it!

5

u/SubstantialSeesaw374 Oct 06 '26

This is just an ad. 

0

u/HolyVRGamingStudio Oct 06 '26

Looks good, doesn't matter AI or not, AI is here to be used, you should improve diversity

1

u/NuclearVII Oct 07 '26

AI slop ad for AI slop.

2

u/[deleted] Oct 05 '26

[removed] — view removed comment

-4

u/PerceptionCharming Oct 06 '26

Let me know how I can improve it

6

u/tastychaii Oct 06 '26

Maybe learn how to program instead of contributing another slop video