Forest Environment Built with Three.js and WebGPU

Hey everyone!

I’ve been building a forest environment in Three.js, focusing on terrain, vegetation, lighting, and performance.

The forest uses six different tree models generated with EZTree, repeated throughout the environment to create around 500 tree instances. The cabin, stones, broken logs, and small plants are 3D models sourced from Sketchfab. The grass is rendered using my own grass system, built for Three.js.

I’ve added quite a few details to the environment, including subtle movement in the tree leaves, falling leaves, spores floating in the air, broken logs, stones, and small plants.

The scene uses a post-processing pass with color grading, bloom, film grain, a vignette, and a subtle fisheye effect.

For the god rays, I’m using fake light shafts rather than a physically accurate volumetric effect. I used Claude to analyze top-down images of the map and identify gaps between trees, then placed the shafts around those openings. They fade away as you approach, and all the shafts are rendered using a single instanced mesh.

There’s also an ambient audio system with environmental sounds and separate footsteps for grass and mud. Each surface has five sound variations selected randomly to avoid repeating the same sound.

On a M1 Mac at maximum settings, it runs at around 27-35 FPS, depending on the area.

This specific video was recorded on an RTX 4080 at 4K resolution with 2x pixel density, effectively rendering at 8K. It runs at a locked 60 FPS due to my display.

I will post the link to try it very soon.

1 Like

The Three.js Forest Environment is officially live after some new updates.

These are the updates I made:

  • Updated Three.js to r187.
  • The trees and other objects in the scene except grass and tree leaves now use the new meshlet pipeline. Giving a nice performance boost even after so much detail.
  • Added different quality settings.
  • Added some toggles and sliders to control the environment in realtime.
  • Optimized the assets so much now that the whole scene fits in 11.7mb total.

The performance isn’t still where I really wanted it. But I also didn’t wanna compromise on the quality. I wanted to keep the whole environment dense and realistic. So, I cut corners where possible without compromising on the quality.

It runs at 30-35 fps on base M1 Mac at 1080p and 40-50 fps on an iPhone 16 Pro on high settings.

Go play with it: Abandoned House - A Three.js Grassworks Experience

2 Likes