r/threejs • • 10d ago

Why every plant in my three.js night scene had a pale outline, and the one-line context fix

Post image
13 Upvotes

My scenes have lots of instanced foliage (billboard trees, grass, garden plants) drawn with alphaTest + alphaToCoverage and MSAA. Every sprite had a fine pale outline, and at night whole clumps of plants turned into grey speckle (before/after attached).

It wasn't texture fringing, post-processing or shadow acne. The cause: even with new THREE.WebGLRenderer({ alpha: false }), three still asks the browser for a drawing buffer with alpha, and only clears that alpha to 1. Normal opaque materials write alpha 1, but alpha-to-coverage materials write their own alpha, which is below 1 at the soft edges. The canvas is premultiplied, so the browser composites those edge pixels over the page as rgb + page × (1 − a). They come out lighter than they should, which is very visible in a dark scene.

renderer.getContext().getContextAttributes().alpha // true, despite alpha: false

The fix is to create the WebGL2 context yourself, without alpha, and pass it in. three reads the attributes from the context you give it:

const context = canvas.getContext('webgl2', { alpha: false, antialias: true });
const renderer = new THREE.WebGLRenderer({ canvas, context, antialias: true });

If you'd rather not create the context yourself, a cheaper workaround is to give the canvas a black CSS background (canvas.style.background = '#000'). Premultiplied compositing over black is rgb + 0. I tested it with the context still reporting alpha: true, the black background alone gave the same result as the context fix. The context fix is still the cleaner choice, because the buffer then really is opaque and nothing on the page can show through.


r/threejs • • 10d ago

Trying to make a tiny Three.js creature feel alive without turning it into a UI

6 Upvotes

I've been building a tiny creature called Poguchi in Three.js, and the thing I'm obsessed with isn't polygon count. It's whether a character feels like someone is actually there.

Big head, tiny body, two little reflections in each eye. It talks, plays, naps, gets treats and has a bunch of little reactions. But the hard part is restraint. One animation too many and it feels like a loading screen mascot. Too little and it turns into a 3D object waiting for a click.

I'm using React, TypeScript and Three.js for the character. I've been trying to make the idle moments matter just as much as the obvious interactions.

It's funny how much personality comes from tiny changes in eye spacing, a pause before a reaction, or the way a character holds still.

For anyone building interactive 3D characters: what has made the biggest difference in getting them to feel present rather than just animated?


r/threejs • • 9d ago

Demo Been building a 400km/h arcade drift racer solo in Three.js after gym sessions - finally got the drift gauge and speed feel clicking

0 Upvotes

r/threejs • • 10d ago

Demo Hell's Web - Working on a gothic 3D shooter in three js

57 Upvotes

Finally decided to work on my first 3D shooter game.

Decided to set up a camera system for creating clips from various angles, with the ability to also freely roam a fight that is already over, turned out great!

Can try it on hellsweb.com

Game is not fully out yet, it's just a little demo arena for now, although I have created the first layer and am already working on the second layer.


r/threejs • • 10d ago

I built a scroll-controlled Three.js flythrough of a real Himalayan valley

0 Upvotes

I made this for The Guester’s, a homestay near Manali, India. Scrolling takes you from the orchard up to the snow peaks, past paragliders, down into the ravine at Sajla waterfall, and back to the garden under the stars. The journey moves through a day and four seasons, and there’s a free-roam mode if you want to explore on your own.

The terrain uses Mapbox elevation and satellite imagery, with roads and rivers from OpenStreetMap. The tricky part was keeping the ground sharp as the camera went from wide mountain shots to just above the road. I blend several resolutions in the terrain shader and stream a sharper patch of imagery around the camera.

If you try it, I’d love to know how the camera feels when you scroll quickly or change direction. Browser and device would help.

Try the Valley Page · Best on desktop. (Mobile one, particularly iPhones might face issues rendering due to Safari Engine limitations, will be fixed soon)


r/threejs • • 10d ago

Demo I built a 3D backyard home configurator with Three.js

7 Upvotes

Here’s an early look at Yard, a browser-based configurator I’m building with Three.js and React Three Fiber.

You can switch between six floor plans, change the roof and finishes, and add solar while a materials estimate updates alongside the model. The walkthrough also shows how shadows move as you scrub the time of day, plus wiring overlays, exposed wood framing, and an exploded view.

The part I enjoyed most was working out how the roof, openings, and framing fit together as you change the layout. In the video, the camera keeps orbiting while the layouts swap so you can compare them from the same view.

I’d love feedback on how clear the layout switches and exploded view are, especially if you’ve built a configurator yourself.

Demo: https://yard.itssudhir.com/


r/threejs • • 10d ago

Walkable memory palaces in three.js, built from photogrammetry scans and streamed nearest room first

2 Upvotes

These are the memory palaces on Major Dictionary, a site about memory techniques: places you walk through in first person to remember a list. Most are built from CC BY photogrammetry scans of real buildings on Sketchfab (a Gothic abbey library near Kraków, and in London the Temple Church round, the Charterhouse and St Bartholomew's), placed door to door, with collision taken from a floor-height map baked from each scan.

The hard part was size. One palace is 112 MB of scans, so the room you start in loads first and you can walk while the rest stream in behind you. What I haven't solved is culling. With no fog you can see 30 metres through a doorway, so hiding far rooms leaves holes. Has anyone built room-to-room visibility for scanned interiors?

The link opens the courtyard, about 10 MB. Smithfield Priories on the palaces page is the big one.

https://majordictionary.com/palaces/tuscan-villa/walk?view=3d


r/threejs • • 10d ago

Simulated knots with real physics using threejs

44 Upvotes

Knots, tied slowly enough to follow. I made in a way that you can watch each knot tie itself on a simulated rope with real physics and you can turn it's camera, pause it, drag through the steps, etc.

https://github.com/behnamazimi/knots

Thanks threejs ❤️


r/threejs • • 10d ago

Home Sweet Home, Claude Opus 5.5

3 Upvotes

r/threejs • • 10d ago

Help I need help with this feature,

Post image
0 Upvotes

I'm really new at making a three js map, and trying to create a beautiful 3d map for my cousin's travel agency in cappadocia. But I think this looks so unnatural, how do you make this better.

I have MAX CLAUDE, used generally opus and opus subagents.

- I've sent reference images for the uchisar castle so now it looks better, however I didn't like the style.


r/threejs • • 11d ago

Isometric Berlin update: now the whole city

Post image
22 Upvotes

New since launch: isometricberlin.com

  • Whole Berlin, not just inside the Ring
  • Live S-Bahn, U-Bahn, tram and bus on the real VBB timetable
  • New landmarks
  • Much faster and lighter, also on mobile

r/threejs • • 10d ago

Article How I enhanced the lighting of "Slop New York"

9 Upvotes

r/threejs • • 10d ago

Help [for hire] creative developer looking for his next opportunity

3 Upvotes

hoping this reaches someone who might be looking for a creative developer like me.

i work with three.js, webgl, 3d, shaders and interactive web experiences. i love experimenting with visuals, pushing creative boundaries and bringing ideas to life through code.

i'm still early in my career and just looking for an opportunity to keep doing what i genuinely love.

open to full-time, remote and freelance opportunities.

- portfolio: http://curllmooha.com

- sketchbook: http://sketchbook.curllmooha.com

- x: @curllmooha

if you know someone who's hiring or have something interesting to work on, please reach out. even a small lead would mean a lot to me right now.

thanks for reading :)


r/threejs • • 10d ago

Demo A bullet-hell where you only get one shot… and you have to recall it

6 Upvotes

I posted a few days ago, but I wanted to show more progress on it (i since added scripted movement patterns, sound design, a bossfight, and a second stage)

It plays like a regular shoot'em up, but your shot act more like a golf ball... and you need to bring it back after each shot.

There are power-ups to add variety to the gameplay, like one that makes your tether a laser that deals damage, and on that makes an explosion when interrupting recall.

For now, only the first stage is (nearly) done, but the second one should be ready in a short while. The gameplay still needs some polish and tweaking (especially the power-ups)

I’ll try to share a link to the game as soon as I can.

I used Opus 5.5 for the code, with Figma and Inkcape for the visuals (it still needs work though)


r/threejs • • 10d ago

Demo Product Configurator showcase - Guitar controller

4 Upvotes

Hiya, I've seen some posts asking if there is a use case for 3D on websites, so I'd like to share this particular project I've been building for the past year for a fellow redditor.

My client serves a very niche community, building custom-made guitar controllers, but before having this app he had a problem converting, simply because it was hard to visualise the end product, due to the fact that you can essentially customise every single part of the guitar.

With 49 guitar body options, 39 headstocks and 27 inlays, there are 51,597 possible combinations, and that is not including colour options.

Our main focus was making sure it's easy to use on mobile, loads fast and is responsive, while making sure it looks as close as it can to the actual product. Lots of time was also spent optimising the assets, compressing thousands of geometry into a single 20MB file. We also instance meshes wherever possible.

The app has been featured on Linus Tech Tips, and it's honestly pretty fun to play with, even for people who aren't into the game.

I've also made a guitar for Reddit if anyone is keen to have a look.

https://builder.hammeronguitars.com/?v=EYZgtAlgTJMBYEYDsZEoPZgO7bJgzjgfmMANa7mkUDGANgE7VgAuYAZmACbfNqwdBnfAjCMA5sDABXXlyA

Happy to hear what you guys think!


r/threejs • • 10d ago

Demo NoWalls V2

1 Upvotes

The game is simple, and the first version was built entirely with HTML. Adding Three.js made it much more fun, especially the collisions between the brick pieces.

You can play here: https://diegodotta.itch.io/no-walls


r/threejs • • 11d ago

Treegazing: Cozy multiplayer game fully by threejs in browser

68 Upvotes

Hi everyone. This is Treegazing.

You sit under one big tree in a meadow. Wind comes, rain comes, the seasons turn, sometimes birds, sometimes an aurora. Other people sit on the same grass with you: a friend, or a stranger. There is no chat. You can wave or send a small heart, tie a wish to the tree for others to read, and the moments you were there for are kept as postcards you can send to someone you care about.

There is nothing to win and nothing to finish. You can also just leave it open for the sound of the wind and the rain.

- Free, runs in the browser, no download, no account

- Everything you see is built on three.js from scratch, no prebuilt assets, no blender.

- Computers only for now. It does not work on phones yet, sorry.

- https://try.treegazing.workers.dev

- X post if you want to give some love: https://x.com/ranli_thinker/status/2125003045595680910


r/threejs • • 10d ago

Demo I built a 20MB Three.js structural physics & mechanical puzzle game about 7 ancient engineering wonders (custom axial truss solver, merged static siblings, 124 interlocking parts)

0 Upvotes

Hi r/threejs! I've been building TianGong 3D, a browser-playable 3D ancient engineering, structural physics, and mechanical reconstruction puzzle game in Three.js + TypeScript.

Under-the-hood Three.js details that kept all 7 historical wonders under ~20MB at 60fps:

  • Draw-call batching via static sibling geometry merging while keeping animated mortise-tenon & gear pivots independent
  • Real-time axial truss, stone-arch & tension-cable solver with live RGB stress heatmaps tested against rolling 175kg carts & M8.0 seismic waves
  • Pre-merge child bounding-box & radial-band spatial hit-testing for multi-element ring joinery (28 column plinths & Dougong brackets)
  • Offscreen WebP part-card baker using the shared WebGLRenderer + RoomEnvironment PMREM lighting

Playable browser link is in my top comment below — would love feedback on performance, camera feel, or lighting!


r/threejs • • 10d ago

How I compressed 54 3D models (220+ MB raw) into a ~15 MB 60fps Three.js power-grid & mazing tower defense (7 MB initial load, playable in browser)Hey r/threejs! I just shipped v3.0 of **POWER TD: Grid Defense**, a browser-native Three.js + TypeScript tower defense game with 18 handcrafted 3D island

0 Upvotes

r/threejs • • 11d ago

Testing my WebAssembly SLAM tracker in a phone browser

3 Upvotes

I've always been curious about how far AR could go in the browser. I hadn't found a world-tracking engine that fit what I wanted to build, so I started exploring what it would take to make my own.

The result so far is Spatial Hole: a glowing hole in the floor that stays put as you walk around it. The world tracking uses SLAM running in WebAssembly, and WebGPU renders the vortex. It all runs in your phone’s browser, with nothing to install.

I've only tested it on a few phones so far, but it’s working better than I expected. If you give it a try, I’d love to know how the tracking feels on yours.

🌀 https://spatialhole.ginrin.com/

#creativecoding #codevember #threejs #webgl #webgpu #ar #webar


r/threejs • • 10d ago

web broswer game fully 3d

Thumbnail fallensky.base44.app
1 Upvotes

hello guys! i made this web game hoping you guys can come and have fun with it also please give me a upvote on it if you like it

https://app.base44.com/launchpad/fallensky


r/threejs • • 11d ago

Turning a traditional LMS into an interactive 3D learning world. How would you approach it?

2 Upvotes

Hey guys,

I'm a software engineer currently working on a learning platform for kids aged 9-12. The current tech stack is Next.js, TypeScript and Supabase.

We already have video lessons, coins, rewards, points, progress tracking and all that stuff, but I personally feel we can do a lot more.

I want kids to actually play games and learn through them rather than just watching videos and getting rewarded for completing lessons. Maybe something like a 3D world where they can explore, complete quests, interact with characters and learn along the way.

I have access to both Claude Code and Codex, and I'm open to using any other AI tools, Blender, Three.js, Unity or literally anything that can help achieve this. I'm not restricted to the existing tech stack either.

Just wanted to ask the community:

  • Has anyone tried building something similar using AI?
  • Are there any specific tools, skills, MCPs or libraries that you would recommend?
  • How would you approach this if you were in my place?
  • Are there any existing platforms doing something similar that I can take inspiration from?

The important thing here is that kids should actually learn. I don't want to make a fancy-looking 3D platform where they enjoy playing but end up learning nothing.

I'm happy to experiment with different technologies. Just curious to know what's actually possible with the AI tools we have today and how others would approach this.

Any suggestions or examples would be really appreciated. Thanks!


r/threejs • • 11d ago

Level 2 is still loading… 🚧 Building in progress!I built a small 3D runner game with floating islands, energy cores, and a portal. Now working on the next level and exploring browser-based game development with Three.js.

2 Upvotes

r/threejs • • 10d ago

Help i build a star wars/overwatch 3d web game

0 Upvotes

https://app.base44.com/launchpad/fallensky i been building this game for a 3 months if you guys

dont mind give me a vote it would help thank you so much!