Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

This one took me almost 2 years to master, soon every Threejs dev will master it with a simple Import: Smoothed Particle Hydrodynamics Simulation, 2D and 3D, optimized with Spatial Hashing and Compute Shaders. Optimized for WebGPURenderer with complete TSL compatibility!!

131,159 Aufrufe • vor 1 Jahr •via X (Twitter)

61 Kommentare

Profilbild von Michel Van de gaer
Michel Van de gaervor 1 Jahr

Whoah, nice!! Could you add a Torus with a spinning spiralled profile? Plz. 🙏😁

Profilbild von Renaud
Renaudvor 1 Jahr

Ouch, last time I implemented rigid bodies in a fluid simulation it was for MLS-MPM and it was quite an adventure. This one might take a while but ultimately I hope so yes! 😁

Profilbild von Michel Van de gaer
Michel Van de gaervor 1 Jahr

It can be 'easier' by making SPH particles rigid (perhaps by adding post-solve constraints), see in this example where you can still see the particles clearly, but rigidly packed.

Profilbild von Guillaume Boissé
Guillaume Boissévor 1 Jahr

Did some experiments a while back for “pre-fetching” the neighbouring tiles, helps quite a bit with performance when using spatial hashing. Might be of interest to you possibly:)

Profilbild von Renaud
Renaudvor 1 Jahr

Nice!! Is it some kind of octree optimization? I will definitely take a look thank you!

Profilbild von Guillaume Boissé
Guillaume Boissévor 1 Jahr

It’s using sparse tiles, which in turn point to 4x4x4 cell blocks. So not really an octree, rather a shallow hierarchy.

Profilbild von Guillaume Boissé
Guillaume Boissévor 1 Jahr

I’m actually using that same data structure to run Marching Cubes and generate a triangle mesh efficiently:)

Profilbild von Zolden
Zoldenvor 1 Jahr

It's sph though. Do people use it for anything except "I'm gona try implementing it"?

Profilbild von Renaud
Renaudvor 1 Jahr

Sometimes I feel like SPH gives a smoother result compared to MLS-MPM for fluids. Also, the explicit neighbor search in SPH can be quite helpful for handling foam or other fine surface effects. That said, I’ve only worked with MLS-MPM and SPH so far, maybe there is better 😁

Profilbild von Zolden
Zoldenvor 1 Jahr

My main concern about SPH is it feels like a gas with a density range too wide. While PIC/FLIP acts more naturally, with stable density and distinct air/fluid border, which is good for practical use in games. Though, I didn't try MLS-MPM to compare.

Profilbild von Michal Ševčík
Michal Ševčíkvor 1 Jahr

But every one of those Three.js devs will have a hard (close to impossible) time reading, understanding, and updating the code to make it do exactly what they want it to do because they don't know the terminology, the ideas and concepts behind it. People with deep knowledge will dominate the software engineering field. Hardcore developers will always have a job. You're one of them.

Profilbild von Renaud
Renaudvor 1 Jahr

Spot on! I'm building Three.js Blocks to simplify these complex concepts so that even non-developers can create a these kind of 3D experience. So a prompt like "Add 50k+ particles in a box I can touch with my mouse" becomes as easy as "Add a sphere to the scene." with AI!

Profilbild von Michal Ševčík
Michal Ševčíkvor 1 Jahr

@onirenaud is Three.js Blocks a website? Or something that's not public yet?

Profilbild von Renaud
Renaudvor 1 Jahr

I'm working intensively on it right now. It should be released in a few weeks. I still need to clean up a bunch of things and ensure a safe launch.

Profilbild von Michal Ševčík
Michal Ševčíkvor 1 Jahr

Looking forward to it!

Profilbild von Rafeeque
Rafeequevor 1 Jahr

so cool! how can we try this?

Profilbild von Renaud
Renaudvor 1 Jahr

Thank you!! I’m still preparing the launch, hopefully in a few weeks 🙏

Profilbild von cryptoAYA33
cryptoAYA33vor 1 Jahr

@threejs is amazing!!

Profilbild von phobon
phobonvor 1 Jahr

Can see this one being huge 😊 look forward to seeing it implemented everywhere 😇

Profilbild von Renaud
Renaudvor 1 Jahr

Contact Page on any Creative Studio at the end of the year: *insert logo instead of a sphere particles in the background with simulation in full screen* -> *user interact with the background and things moves in the window* -> Wow Award Site of The Day gg

Profilbild von phobon
phobonvor 1 Jahr

This is definitely happening haha

Profilbild von Jahid
Jahidvor 1 Jahr

Can you share the threejs blocks site link, I can't find it or it's not released yet?

Profilbild von Renaud
Renaudvor 1 Jahr

@28_Jahid I will try to release it in the upcoming weeks! Still a lot of things to prepare.

Profilbild von Jahid
Jahidvor 1 Jahr

Waiting!!!

Profilbild von Steve Ruiz
Steve Ruizvor 1 Jahr

This is awesome! I was trying to do something like this for the tldraw shader starter kit but couldn't get the bots to do it. Can the particles interact with geometries?

Profilbild von Renaud
Renaudvor 1 Jahr

Thanks! I saw this on my feed, really cool! Not yet. I prefer starting with a clean base and adding features based on community needs, but it's usually straightforward to implement, I mean it's already interacting with the boundaries that is a box. 😁

Profilbild von Steve Ruiz
Steve Ruizvor 1 Jahr

Any chance it's distributed or we can try ourselves? (Slightly different design but I've been a big fan of grant kot's integration here

Profilbild von Renaud
Renaudvor 1 Jahr

I plan to have a license to cover this kind of case. Threejs Blocks won't be open source as I strongly believe in it and want to maintain and improve it for a long time but the price range will be very reasonable. It should be available in a few weeks!

Profilbild von Steve Ruiz
Steve Ruizvor 1 Jahr

Let me know! We’ve done a bunch of iteration around tldraw’s license (it is also not OSS). If there’s a way to include properly I’d love to try

Profilbild von Manu
Manuvor 1 Jahr

@juancazala

Profilbild von Mr.I don't know 😶
Mr.I don't know 😶vor 1 Jahr

Hi, I'm very interested in this.

Profilbild von Renaud
Renaudvor 1 Jahr

Nice! It will be available in a few weeks! Still working on it. 😊

Profilbild von please
pleasevor 1 Jahr

this looks amazing

Profilbild von Emoc11
Emoc11vor 1 Jahr

Thanks for your work, and make it easy for us 💙

Profilbild von Flöh Creative Mary Ellen Schrock
Flöh Creative Mary Ellen Schrockvor 1 Jahr

the collapse is super rad

Profilbild von Hidayat
Hidayatvor 1 Jahr

awesome!

Profilbild von ContraK0rriente 🔴
ContraK0rriente 🔴vor 1 Jahr

Beautiful!

Profilbild von Ben
Benvor 1 Jahr

🔥

Profilbild von Ripler
Riplervor 1 Jahr

Loved!

Profilbild von tsvl
tsvlvor 1 Jahr

no 4d??? 🥺👉👈 we need fourjs already...

Profilbild von David Conner
David Connervor 1 Jahr

I wanted to do stuff like that. I spatial hashing is what I think it is. This is about as far as I got (webgl)

Profilbild von LoneFlame Games
LoneFlame Gamesvor 1 Jahr

Awesome! I can already see some cool things made with this.

Profilbild von Larry Leonidas ✝️
Larry Leonidas ✝️vor 1 Jahr

Whoa nice work!

Profilbild von Renaud
Renaudvor 1 Jahr

Thank you!! 🙏

Profilbild von Suburban_Error
Suburban_Errorvor 1 Jahr

I will never comprehend how people can make this stuff

Profilbild von Alin Climente
Alin Climentevor 1 Jahr

CPU fan goes brrrrr

Profilbild von Renaud
Renaudvor 1 Jahr

No CPU was harmed! All runs on the GPU! 😁

Profilbild von Ernesto Eduardo
Ernesto Eduardovor 1 Jahr

That's very smooth ! nice.

Profilbild von AndreiC
AndreiCvor 1 Jahr

In 2050 JavaScript will be the only remaining programming language

Profilbild von temporarymine
temporaryminevor 1 Jahr

Does this work for complex boundaries?

Profilbild von Renaud
Renaudvor 1 Jahr

Not yet, but that's not a really difficult feature to implement if needed!

Profilbild von Isaac Furlani
Isaac Furlanivor 1 Jahr

Thank you! Solid work 💪

Profilbild von Random_Nobody
Random_Nobodyvor 1 Jahr

Hell yeah. Well done.

Profilbild von @StoryOfAIGuess
@StoryOfAIGuessvor 1 Jahr

Wow wow wow great.

Profilbild von Renaud
Renaudvor 1 Jahr

Thanks!😊🙏

Profilbild von Zee Palm
Zee Palmvor 1 Jahr

This is art and math shaking hands. Incredible work.

Profilbild von Renaud
Renaudvor 1 Jahr

Thank you!! 🙏

Profilbild von We are all ONE
We are all ONEvor 1 Jahr

Nice!

Profilbild von Paulo Coutinho  🇧🇷
Paulo Coutinho  🇧🇷vor 1 Jahr

Incredible 🤩

Profilbild von Shanytc
Shanytcvor 1 Jahr

What to do with it?

Profilbild von Rulatir
Rulatirvor 1 Jahr

Wait, is this the one that was previously a Turing-complete Primordial Essence of Doing Something due to a bug?

Ähnliche Videos