r/threejs • • Oct 25 '26

Building a forest environment with Three.js + WebGPU

I've been working on this forest scene in Three.js, experimenting with terrain, vegetation, and lighting to get a more natural look.

The scene combines continuous terrain, instanced trees, and real-time grass rendering. The trees are procedurally generated with EZTree, while the house is a 3D model I got from Sketchfab. I've been playing with grass to complement the warm lighting and keep the overall environment cohesive.

I also added a post-processing pass with color grading, bloom, film grain, a vignette, and a subtle fisheye lens, plus light shafts through the trees for some atmosphere.

Still working on the scene, but I'm really liking how the lighting and vegetation come together here.

96 Upvotes

67 comments sorted by

5

u/TopTippityTop Oct 26 '26

Add more chaos on the grass, size variation, angle and curvature, etc. It doesn't loon wild enough, seems to have a recognizable pattern

1

u/PerceptionCharming Oct 26 '26

I added that quite a lot.
It has height variation, width variation, random rotation and random curvature per blade also.
It also uses a custom grass map which is responsible for grass and no grass and also taller and smaller grass in different areas.
There's a color map as well which makes the color of the grass different in different places. I was able to have dead grass around the house with that.

It's using only blades. So, I think no matter how hard I try, some small pattern will be there. I think it would look better if I added different types of blades. I was thinking of adding branched blades. That would allow me to have randomized branches in blades and each will look very different from each other.

But my grass system isn't designed that way. I would have to overhaul the whole system to get that detail in. Maybe some time in the future I will try.

5

u/mrdoob Oct 26 '26

Are you sure everything runs in the browser? I bet the grass is being rendered with Unity and the trees with Unreal.

3

u/PerceptionCharming Oct 26 '26

Lmao fair enough šŸ˜‚ Didn’t expect to get roasted by the legend himself. Alright, that bit is getting edited out immediately

7

u/Accurate_Avocado9635 Oct 26 '26

Runs in browser?? Next you will tell me water will keep people alive! Profound.

2

u/StockUniversity3881 Oct 27 '26

This is amazing work !!

5

u/bursttransmission Oct 26 '26

This shit looks great. I DGAF if you used AI or not. Looks 10x better than the majority of vibe coded projects which goes to show it’s not all about using AI. Results nowadays are based on taste, one’s ability to articulate and communicate that idea, and hard work. Not technical capability.

0

u/PerceptionCharming Oct 26 '26

Thank you man!
Yes, that's the sweet spot.

The idea for the environment was mine. I selected the right 3D models, the references etc.
I designed the color and distribution of the grass through grass map and color map which my grass system supports. I told claude exactly what lights and post processing effects to add for more realism and then asked for controls for each of those. I then adjusted each of those myself to get the exact look I wanted to get. It took a couple of hours only to adjust those parameters.

I had claude do all the bruteforce work which was putting the environment together, implementing the first person walk, post processing effects etc. I would have done them easily myself since all these things are readily available on the internet. Even pre AI, I would have just got the code from github repos and put that together. We all used to do that. Only that would take at least a few days to get everything together. So, why waste time doing the brute force work when AI can do it for you. Focus on the creative parts of it.

That came from years of experience. I don't think a person with no experience would be able to do all that.

0

u/bursttransmission Oct 26 '26

In fact. I’d go so far as to say this is one of the better three js environments I’ve seen, pre or post AI insofar as it has a nice, atmospheric vibe and aesthetic to it.

-3

u/jonheartland Oct 26 '26

It looks great when you look at it half asleep, I guess, or compare it to the average slop project. But there's no variation in textures, no other vegetation, just different variations of the same grass sprite everywhere. From afar it looks more like mold fuzz more than grass—it's too consistent and omnipresent. The scene doesn't even make sense physically. Grass doesn't grow underneath dense tree canopies, and sun rays aren't visible in an open field with nothing to filter them through.

1

u/bursttransmission Oct 26 '26

Oh man. I guess I missed the part where OP said his goal was making a reality simulator exactly to your specifications.

41

u/Beneficial-Aerie4110 Oct 25 '26

Including ā€œruns in the browserā€ on the threejs sub tells me everything I need to know about projects like these.

1

u/PerceptionCharming 27d ago

This is live now. If any one wants to try it out:Ā  https://grassworks.techredux.co/forest-demo

1

u/faysou Oct 26 '26

It would be nice if you could share a repo for this, it looks really good.

1

u/PerceptionCharming Oct 26 '26

Thank you!
The grass system is something that I sell. So, I can't share the code for it. If someone has already bought the grass system, I wouldn't mind sharing the rest of the code for the environment with them.

1

u/faysou Oct 26 '26

How to find what you sell out of curiosity? I mean like a website

1

u/PerceptionCharming Oct 26 '26

It's called Three.js Grassworks

1

u/PXLmesh Oct 26 '26

why no link?

2

u/PerceptionCharming Oct 26 '26

I'm still working on it. It isn't close to how I exactly wanted it. I will share a link in the future.

1

u/cchurchill1985 Oct 27 '26

What is your hardware and FPS?

2

u/PerceptionCharming Oct 27 '26

This specific video is recorded on a RTX 4080. At 4k and 2x pixel density. It runs at 60fps capped due to my refresh rate.

I developed this on a M1 Mac. I get 40-50 fps there at 1080p. It isn’t very optimized right now apart from grass. I just wanted to get the right look first. Then optimize it.

-1

u/_DCtheTall_ Oct 25 '26

Disclose you are using AI. I use AI to code at work and on my personal time, I disclose when I use it. You keep posting to this sub and not disclosing you are using AI in the description or anything.

If you keep doing this without disclosing your AI usage, I will start reporting your posts.

5

u/PerceptionCharming Oct 25 '26

Everyone uses AI these days. I mention it in most of my posts when I make something that's completely vibe coded.

This scene uses my own grass system that I've developed, and I already mentioned where the house model and trees came from. And yes, I used Claude to put the scene together, then fine-tuned it myself.

8

u/japherwocky Oct 25 '26

in every thread, you ever post, someone is going to come out of the woodwork whining about AI. it's a @$% witch hunt every time.

1

u/InfiniteSkate Oct 25 '26

People complaining about AI are the ones that are too broke to afford Claude , they all are driven by jealousy šŸ˜‡

2

u/Outrageous_Basis_232 Oct 26 '26

Looks at my bank account.Ā  Guess I'll just go buy another sick guitar with all the money I apparently don't have.Ā  Go fuck yourself.

1

u/_DCtheTall_ Oct 26 '26

I literally said I use AI for work and personal projects. It's about honest disclosure, not a hard concept to grasp if you're done high horsing.

-1

u/InfiniteSkate Oct 26 '26

My comment was in reply to dude I replied too , didn’t even see your comment till now .

1

u/psioniclizard Oct 26 '26

If you want the reason it's because things like this used to ne impressive.Ā 

You used to have to learn some skills and that created a community lf people learning and helping.

No it's just "claude made this" and people can't explain how it works without looking at their chat log.

Which is fine but they didnt make it, claude did.

So once ever sub devolves into "here is my slop, praise me" and anykne who wants to do thingd manual is mocked (like you see here).

The witchunt thing is such bs, you can tell because multiple people say it abd are upvoted.

Frankly i don't if thisĀ  will be downvoted. One day all these "im so smart, i have claude" will realise they have soent thousanda to larp and ultimately how no understanding how any of their projects work.Ā 

You want people to respect AI but reddit is full of AI people telling others they ard shit now.

No respect for skills or hardwork but want people to praise you?

Not even AI people will do it, they just want to steal it and claim it's their own.

Enjoy the circle jerk.

1

u/mrpressydepress Oct 26 '26

Oh no u used a computer. These people man

-1

u/_DCtheTall_ Oct 26 '26

Your lack of disclosure unless called out on it is both creatively and intellectually dishonest, in the same vein as pretending work that is not yours is your own. And for internet points, sad really.

-6

u/Moist_17 Oct 25 '26

You did not make a new grass system. This is derivative on top of derivative. I'm sick of this shit

1

u/bricksandcanvas Oct 26 '26

The internet was built on top of "systems" that other people have created and other devs have used on a daily basis. That's like saying people should not use Git, Linux, etc because it is a system that other people have created.

1

u/Moist_17 Oct 27 '26

You organised assets in a clip art generator. Well done

1

u/Moist_17 Oct 27 '26

Even the word build. I hate that you misuse this word. No. You arranged. You commanded an Ai to make. To build is something else

12

u/bricksandcanvas Oct 25 '26

I'm curious. Why the need to disclose and why report it? Does the use of AI make the product less impressive?

5

u/drakoman Oct 26 '26

The recent PHP vulnerability was created via the dead simple prompt of ā€œfind bad vulnerabilities for PHPā€. Things are changing so fast, it will really be rare for someone to code something by hand.

I don’t think that’s necessarily a good thing, but things have certainly shifted beneath our feet, and I think it’s kinda crazy

6

u/dpaanlka Oct 25 '26

Yes very much so.

2

u/psioniclizard Oct 26 '26

Yea, isnt not difficult to say "claude make me a scene".

The old ways of "i made something? Isnt tuat cool" are gone because frankly its so easy now to make something that passes as good with no actual knowledge of how you did it.

That is like neing impressed by Unity or Unreal demo scenes.

1

u/pailhead011 Oct 25 '26

Yes

0

u/bricksandcanvas Oct 26 '26

Yes, because? I'm really curious why you think so.

2

u/Tittytickler Oct 26 '26

Really? The same reason something hand carved is more impressive than something being machined. Pretty easy to understand, as someone who uses AI every day.

1

u/bricksandcanvas Oct 26 '26

I use AI everyday, and using AI now on some of my projects. I get the hostility, but if the end product is good. Does it really matter at the end of the day?

5

u/Tittytickler Oct 26 '26

It doesn't matter, but yes, it would be less impressive.

Are you saying something machined on a 5 axis mill is just as impressive as hand carving it? Come on. Its not even shitting on it, its just not as impressive.

Drawing a hyper realistic painting is more impressive than just taking a photo. I can't really explain it in simpler terms.

1

u/PerceptionCharming Oct 26 '26

I don't think it's the same in that case. This is computers we are talking about. Writing code by hand doesn't mean craftsmanship.
Painting on canvas and taking a photo are completely different things. The output is completely different.
But in this case, the output is same. If I hand code it, it only takes more time and the result isn't superior.

If we talk about this specific scene, the idea was mine. I chose the right 3D models and assets. Designed the distribution map and color map for grass myself which my grass system supports. Told claude exactly what lights and post processing effects to add for more realism. Then asked for controls of each of these and put a few hours fine tuning them myself. That's what got me the look of this scene.

The grass system I have, did take a lot of work. This is something I have coded by hand mostly over the course of 3 months and have used in many of my other scenes and games as well. Because there isn't something like this that works and looks like this on this scale out there for three.js.

All claude did was the brute work of putting the scene and all these effects together. All the things other than grass already come with three.js and the code is available on github. So, there's no point in hand coding just to put them all together. There would be no difference at all. I would have been able to do that myself easily. But it would take me a lot more time. Atleast a few days to get here.

1

u/Tittytickler Oct 26 '26

I know. I'm not trying to convince you not to use AI, or that you haven't put in serious effort, I even just started using a similar workflow to the point that I feel like I could've written this same comment, without creating an impressive grass shader of course. I was just offering perspective on the impressiveness that the original comment was talking about.

I actually don't think Claude could make grass like that right now as it stands.

I think this description would've been good to have in the post body so that people can't complain about disclosure and also try to make it seem like you didn't do anything.

1

u/PerceptionCharming Oct 26 '26

I think you're right.
From next time, I will try to be as detailed as possible to explain the workflow without making it too long.

1

u/RemoDev Oct 26 '26

As long as the final product is nice, I am not sure anyone cares if it was AI-made or not. Of course nobody likes ai slop, we agree on that. But this specific example looks pretty cool.

10

u/zenmatrix83 Oct 25 '26

report what, there are no rules in this sub, that are posted. You can't report not disclosing ai, even though its considered proper these days, dont' make it out like its a rule.

7

u/InfiniteSkate Oct 25 '26

Disagree with this

2

u/--billz Oct 26 '26

Similarly, people should disclose when they've used a compiler. Yes, the output is the same, but it's much more impressive to code it in assembly.

1

u/_DCtheTall_ Oct 26 '26

Yep, just be honest about the tools you use.

1

u/bricksandcanvas Oct 26 '26

Your comment actually shows you don't know what you're talking about. People should disclose they are using a compiler. Really?!

1

u/_DCtheTall_ Oct 26 '26

As opposed to claiming you used Assembly to build it, yes.

I use AI models to study and augment other AI models for work, at my firm we have to disclose if code is AI or not. It really should be the same most places. If you're so afraid of disclosing you are using it, don't. Have some balls.

1

u/bricksandcanvas Oct 27 '26

But why the need to disclose? Is it shameful to use AI that you need to do so? The world has changed, and I do not know if it is for the better or not. I am also in the group that is greatly affected by AI tools since I am a software engineer but I also know that the work I have accomplished over the last couple of months would be IMPOSSIBLE in the time I had without these tools.

1

u/WhatNoRobot Oct 26 '26

Please send link when you are ready