Пропустить навигацию
This one took me almost 2 years to master, soon every Threejs dev will master it with a simple…
0:00 / 0:26

This one took me almost 2 years to master, soon every Threejs dev will master it with a simple…

Renaud

@onirenaud13 тыс. подписчиков

Открыть в X
1 921 отметка «Нравится»СкачатьОригинальный пост

131 159 просмотров

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

61 комментарий

Комментарии из оригинального поста в X (Twitter)

  • Фото профиля Michel Van de gaer

    @MichelVandegaer

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

    15 отметок «Нравится»

  • Фото профиля Renaud

    @onirenaud

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

    9 отметок «Нравится»

  • Фото профиля Michel Van de gaer

    @MichelVandegaer

    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.

    7 отметок «Нравится»

  • Фото профиля Guillaume Boissé

    @guitio2002

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

    5 отметок «Нравится»

  • Фото профиля Renaud

    @onirenaud

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

    1 отметка «Нравится»

  • Фото профиля Guillaume Boissé

    @guitio2002

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

    2 отметки «Нравится»

  • Фото профиля Guillaume Boissé

    @guitio2002

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

    2 отметки «Нравится»

  • Фото профиля Zolden

    @ZoldenGames

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

    5 отметок «Нравится»

  • Фото профиля Renaud

    @onirenaud

    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 😁

    3 отметки «Нравится»

  • Фото профиля Zolden

    @ZoldenGames

    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.

    5 отметок «Нравится»

  • Фото профиля Michal Ševčík

    @melkornms

    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.

    3 отметки «Нравится»

  • Фото профиля Renaud

    @onirenaud

    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!

    7 отметок «Нравится»

  • Фото профиля Michal Ševčík

    @melkornms

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

  • Фото профиля Renaud

    @onirenaud

    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

    @melkornms

    Looking forward to it!

    1 отметка «Нравится»

  • Фото профиля Rafeeque

    @rafeequemavoor

    so cool! how can we try this?

    2 отметки «Нравится»

  • Фото профиля Renaud

    @onirenaud

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

    1 отметка «Нравится»

  • Фото профиля cryptoAYA33

    @cryptoAYA33

    @threejs is amazing!!

    2 отметки «Нравится»

  • Фото профиля phobon

    @thenoumenon

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

    2 отметки «Нравится»

  • Фото профиля Renaud

    @onirenaud

    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

    3 отметки «Нравится»