正在加载视频...

视频加载失败

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 次观看 • 1 年前 •via X (Twitter)

61 条评论

Michel Van de gaer 的头像
Michel Van de gaer1 年前

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

Renaud 的头像
Renaud1 年前

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! 😁

Michel Van de gaer 的头像
Michel Van de gaer1 年前

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.

Guillaume Boissé 的头像
Guillaume Boissé1 年前

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:)

Renaud 的头像
Renaud1 年前

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

Guillaume Boissé 的头像
Guillaume Boissé1 年前

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

Guillaume Boissé 的头像
Guillaume Boissé1 年前

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

Zolden 的头像
Zolden1 年前

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

Renaud 的头像
Renaud1 年前

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 😁

Zolden 的头像
Zolden1 年前

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.

Michal Ševčík 的头像
Michal Ševčík1 年前

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.

Renaud 的头像
Renaud1 年前

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!

Michal Ševčík 的头像
Michal Ševčík1 年前

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

Renaud 的头像
Renaud1 年前

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.

Michal Ševčík 的头像
Michal Ševčík1 年前

Looking forward to it!

Rafeeque 的头像
Rafeeque1 年前

so cool! how can we try this?

Renaud 的头像
Renaud1 年前

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

cryptoAYA33 的头像
cryptoAYA331 年前

@threejs is amazing!!

phobon 的头像
phobon1 年前

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

Renaud 的头像
Renaud1 年前

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

phobon 的头像
phobon1 年前

This is definitely happening haha

Jahid 的头像
Jahid1 年前

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

Renaud 的头像
Renaud1 年前

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

Jahid 的头像
Jahid1 年前

Waiting!!!

Steve Ruiz 的头像
Steve Ruiz1 年前

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?

Renaud 的头像
Renaud1 年前

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. 😁

Steve Ruiz 的头像
Steve Ruiz1 年前

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

Renaud 的头像
Renaud1 年前

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!

Steve Ruiz 的头像
Steve Ruiz1 年前

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

Manu 的头像
Manu1 年前

@juancazala

Mr.I don't know 😶 的头像
Mr.I don't know 😶1 年前

Hi, I'm very interested in this.

Renaud 的头像
Renaud1 年前

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

please 的头像
please1 年前

this looks amazing

Emoc11 的头像
Emoc111 年前

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

Flöh Creative Mary Ellen Schrock 的头像
Flöh Creative Mary Ellen Schrock1 年前

the collapse is super rad

Hidayat 的头像
Hidayat1 年前

awesome!

ContraK0rriente 🔴 的头像
ContraK0rriente 🔴1 年前

Beautiful!

Ben 的头像
Ben1 年前

🔥

Ripler 的头像
Ripler1 年前

Loved!

tsvl 的头像
tsvl1 年前

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

David Conner 的头像
David Conner1 年前

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)

LoneFlame Games 的头像
LoneFlame Games1 年前

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

Larry Leonidas ✝️ 的头像
Larry Leonidas ✝️1 年前

Whoa nice work!

Renaud 的头像
Renaud1 年前

Thank you!! 🙏

Suburban_Error 的头像
Suburban_Error1 年前

I will never comprehend how people can make this stuff

Alin Climente 的头像
Alin Climente1 年前

CPU fan goes brrrrr

Renaud 的头像
Renaud1 年前

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

Ernesto Eduardo 的头像
Ernesto Eduardo1 年前

That's very smooth ! nice.

AndreiC 的头像
AndreiC1 年前

In 2050 JavaScript will be the only remaining programming language

temporarymine 的头像
temporarymine1 年前

Does this work for complex boundaries?

Renaud 的头像
Renaud1 年前

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

Isaac Furlani 的头像
Isaac Furlani1 年前

Thank you! Solid work 💪

Random_Nobody 的头像
Random_Nobody1 年前

Hell yeah. Well done.

@StoryOfAIGuess 的头像
@StoryOfAIGuess1 年前

Wow wow wow great.

Renaud 的头像
Renaud1 年前

Thanks!😊🙏

Zee Palm 的头像
Zee Palm1 年前

This is art and math shaking hands. Incredible work.

Renaud 的头像
Renaud1 年前

Thank you!! 🙏

We are all ONE 的头像
We are all ONE1 年前

Nice!

Paulo Coutinho  🇧🇷 的头像
Paulo Coutinho  🇧🇷1 年前

Incredible 🤩

Shanytc 的头像
Shanytc1 年前

What to do with it?

Rulatir 的头像
Rulatir1 年前

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

相关视频