Andrea Gargaro (@agargaro_dev) header
Andrea Gargaro (@agargaro_dev) profile picture

Uncreative developer

Santeramo in Colle, Puglia
Joined November 2023
To run my demos smoothly, I needed the best LOD thresholds with meshoptimizer. So I built a tool that also writes InstancedMesh2 code. 5,000 animated characters: 76M → ~500K triangles. More to come, ideas and criticism welcome! Link below 👇 #threejs #webgl #webgpu #gamedev
9
7
1
45
1,606
Try it here, also with your own models: agargaro.github.io/simplify-…
111
Bone Animation Textures are now in InstancedMesh2 🦴 Skeletal clips are baked once into a GPU texture, and every instance plays its own clip, speed and crossfade. No per-frame CPU animation. 10,000 skinned monsters, WebGL, WebGPU. Link in the next post. #threejs #WebGPU #WebGL
15
15
3
177
10,658
The demo is live! It still needs some optimization but it's a good start. Add ?debug=true for stats and controls. Demo: instanced-mesh-showcase.verc… Code: github.com/agargaro/instance…
1
11
750
After a month of work, InstancedMesh2 now supports WebGPURenderer 🎉 250,000+ asteroids, WebGPU and WebGL: runtime LODs, BVH frustum culling and per-instance raycasting. Fly through the field and blast some rocks 🚀 #threejs #webgl #webgpu
9
7
3
82
5,674
Play it in your browser (desktop and mobile): instanced-mesh-showcase.verc…
2
2
379
Today I started rewriting InstancedMesh2 to make it compatible with WebGPURenderer. InstancedMesh2 has been used more widely than I expected, and I’m grateful to you all. #threejs
3
31
1,349
My best friend @LuigiDenora’s enthusiasm after the three.js conf convinced me to get back to my open-source projects. I’ll use AI sparingly, so progress may be slow, but I’m really happy to be working on this again. Repo + findings soon.
1
1
1
9
385
Playing with my octahedral impostors library 🤓 There are still things to improve, should I continue? I created a demo with a terrain 3072 x 3072 and 200k trees. It should work on mobile too! Demo: octahedral-impostor.vercel.a… Github ⭐️: github.com/agargaro/octahedr… #threejs #webgl
9
12
1
151
8,261
Just added LODs to batched-mesh-extensions! This scene goes from 14 to 1 million triangles in a single draw call — LODs are generated on the fly with meshoptimizer 😁 Demo: glitch.com/edit/#!/three-ez-… Github: github.com/agargaro/batched-… #threejs #webgl #webgpu
15
36
3
369
19,541
I'm working on a new library that adds extension methods for BatchedMesh. One of them builds a BVH to accelerate frustum culling and raycasting. More methods coming soon! Repo: github.com/agargaro/batched-… Demo: three-ez-batched-mesh-extens… #threejs #webgl #webgpu
6
11
2
103
6,354
Work in progress on a new library for octahedral impostors based on Ryan Brucks' article. Texture atlas generated at run time, 4096x4096 with 20x20 sprites. Model by @quaternius Demo: octahedral-impostor.vercel.a… Github: github.com/agargaro/octahedr… #threejs #webgl
3
3
49
2,353
I used my InstancedMesh2 library to create a simple smoke effect. It was easy using the API to set opacity/add/remove instances 🚀 I hope the code is clear and easy to read❤️ Demo: agargaro.github.io/instanced… Code: github.com/agargaro/instance… #three #webgl thanks @LuigiDenora
10
39
1
314
14,673
I also created a demo on glitch to play with partcles settings: glitch.com/edit/#!/three-ez-…
2
847
InstancedMesh2 now supports skeletal animation😄 In this video there are 20k instances! I need to improve the partial texture update now. if you like my work, please leave a⭐ Library repo: github.com/agargaro/instance… Demo (3k instances): instanced-mesh-skinning-demo… #threejs #webgl
13
20
3
166
12,166
Optimizations: - frustum culling - animate only instances within the camera frustum - set animation fps based on camera distance for each instance (0 to 60) - generates geometry LODs with meshoptimizer (5 LODs here) - update less bones if the instance is far away
9
728
I am glad to introduce the new feature of InstancedMesh2: shadow LODs 🎉 Strange example, isn't it? 😇 I would love to get your feedback. #threejs #webgl repo: github.com/agargaro/instance… example: stackblitz.com/edit/three-ez…
2
12
95
4,922
1 million spheres + raycasting at 165 fps 🏁 InstancedMeshLOD implements LODs, frustum culling and fast raycasting using a BVH. This is executed every frame. demo (start can be a bit slow): instanced-mesh2-lod-demo.ver… library repo: github.com/agargaro/instance… #threejs #webgl
2
13
116
6,526
LOD will soon be added to InstancedMesh2 🥰 165 fps using 100,000 instances and it's really easy to use. I can't wait to share it with you! Library repository: github.com/three-ez/instance… #threejs #webgl
6
20
2
158
16,692
I will soon publish a new library to handle generic dynamic BVH (for frustum culling and raycasting), already used by my 'three.ez/instanced-mesh' library!🥳 repo: github.com/agargaro/bvh.js instanced-mesh: github.com/three-ez/instance… #threejs #webgl #webgl
2
24
1
205
8,242
InstancedMesh2 is finally available 🎉 This includes frustum culling, sorting, fast raycasting, visibility, and simplified instance management. It uses a dynamic BVH. I'll post soon an open world example using this library. github.com/three-ez/instance… #threejs #webgl #bvh
6
14
76
5,431
I am writing a library to improve InstancedMesh by handling sorting, frustum culling and fast raycasting using a BVH. I would like to get some feedback demo: stackblitz.com/edit/instance… repository: github.com/three-ez/instance… #threejs #webgl #bvh
2
5
47
3,848
🚀 Exciting news! Introducing three.ez – a powerhouse for simplifying your three.js development! 🎉 Extend Object3D functionalities effortlessly, streamline rendering, and enjoy cleaner code. Give it a try 🔥 github.com/agargaro/three.ez #threejs
2
9
569