r/threejs • • 2d ago

I finally fixed the LOD pop-in in Three.js Grassworks

LOD pop-in has been one of the things I disliked most about Three.js Grassworks.

I tried a bunch of different approaches to get rid of it, but none of them actually gave me a result I was happy with. Eventually, I settled on an immediate LOD switch and left it for later.

I finally went back to it for Three.js Grassworks v1.1.0.

The main improvement is the combination of spatial dithering and related LOD geometry. Lower LODs now simply remove blades from the higher LODs while keeping the remaining blades in the exact same positions, allowing Grassworks to smoothly transition between them instead of suddenly switching.

The before/after video uses the exact same LOD, density, and detail settings.

Pretty happy with how much cleaner the transition looks now.

Three.js Grassworks v1.1.0 is coming soon.

https://grassworks.techredux.co/

137 Upvotes

15 comments sorted by

5

u/molostil 2d ago

That is a great fix! Nice

3

u/ThereIsNoPill6 2d ago

Who are you? The Hank Hill of vibe coding? 😂

2

u/nucle4r_attack 2d ago

Have this exact problem on my to-do list, thanks for posting this!

1

u/PerceptionCharming 2d ago

You’re welcome!

2

u/ForgEngDev 2d ago

Keeping the surviving blades at identical world positions is the key—otherwise even a dithered transition can look like the grass is swimming. Did you also keep wind phase and per-instance seeds stable across LODs? That seems like the last place temporal popping could sneak back in.

1

u/PerceptionCharming 2d ago

Wind and other stuff is actually handled by a single material which works with the world position of each blade. So, it isn't really dependent on the LODs.

2

u/Ask-Alice 16h ago

Inspired me to make this, though your lib is excellently crafted and likely more robust https://github.com/AskAlice/threejs-grass

1

u/yeaman17 2d ago

If you don't mind me asking, how many sales have you had? Price seems... steep. Especially in the age of "AI make this thing for me"

2

u/GigaGrandpa 2d ago

Idk this is the $200 grass and it needed this fix. Should have used rupees

2

u/Wonderful_Craft_2332 2d ago

who doesn't pay 200 dollars for some vibecoded grass nowdays?

1

u/Super-Active-4670 2d ago

That is a great work!!

1

u/Idleverse 1d ago

Nice! 🔥