Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

I've integrated fluids into my physics engine. Fluids are made of the same particles as solid matter, but computed differently. Phase change is seamless, matter melts and hardens back on temperature change. It runs fast, and world size limits are wider than any game would need.

119,168 Aufrufe • vor 11 Monaten •via X (Twitter)

73 Kommentare

Profilbild von Rendezvous Extraordinaire
Rendezvous Extraordinairevor 11 Monaten

You have rediscovered Clonk (and… well, I’m grateful for that)

Profilbild von Zolden
Zoldenvor 11 Monaten

I'm actually enchanted by Clonk design and mechanics and the game I'll be making might be heavily inspired by it. Though, it's not decided for sure.

Profilbild von Rendezvous Extraordinaire
Rendezvous Extraordinairevor 11 Monaten

Please do!

Profilbild von Bananaft
Bananaftvor 11 Monaten

Finally someone will make that stupid mobile game ad about lava, gold and water a reality.

Profilbild von Tabot
Tabotvor 11 Monaten

Noita 2 confirmed?

Profilbild von Michal Pawlowski (Squeezed Hamster)
Michal Pawlowski (Squeezed Hamster)vor 11 Monaten

Is it your own engine or it runs inside a regular game engine? It's absolutely amazing.

Profilbild von Zolden
Zoldenvor 11 Monaten

It runs inside Unity. Thank you!

Profilbild von Michal Pawlowski (Squeezed Hamster)
Michal Pawlowski (Squeezed Hamster)vor 11 Monaten

Is this something you're planning to release as a plugin? I'd pay quite a lot to have access to this kind of technology. Ideas for games that utilises this just kills my imagination everyday I see it 👀🥹🥰

Profilbild von Zolden
Zoldenvor 11 Monaten

I might release it, yes. After I make a game with it. There's so much to improve until it's really useful and convenient to make games with.

Profilbild von Michal Pawlowski (Squeezed Hamster)
Michal Pawlowski (Squeezed Hamster)vor 11 Monaten

Yeah I totally get you. And How's the simulario going? Are you planning to release Beta / demo? It clicks right buttons in me head, can't wait to give it a go 🙈

Profilbild von Zolden
Zoldenvor 11 Monaten

Simulario has been in R&D phase for many months, and finally I've implemented all physics features I needed. I'm currently finalizing the physics, to move to rendering for a few improvements, and then will go straight to implementing actual game design.

Profilbild von Michal Pawlowski (Squeezed Hamster)
Michal Pawlowski (Squeezed Hamster)vor 11 Monaten

Sweet. I hope it will go smooth from now on. Keep us posted 🔥

Profilbild von Jonas Tyroller
Jonas Tyrollervor 11 Monaten

Veeery satsifying to watch already.

Profilbild von Alex
Alexvor 11 Monaten

Looks awesome! Is it still Lennard-Jones or is it completely different kind of simulation? By the way do you use the standard 12-6 Lennard-Jones potential, or some simplified version of it, like just some linear attraction–repulsion (which technically isn’t Lennard-Jones)?

Profilbild von Zolden
Zoldenvor 11 Monaten

It's a blend between solid material (LJ), and PIC/FLIP fluid simulation. LJ is 13-7. I don't remember why I chose it and not the default 12-6. Using linear attraction-repulsion wouldn't let particles form such stable and solid material. Though, even LJ is not ideal for 2d. It was made for 3D simulations after all.

Profilbild von Alex
Alexvor 11 Monaten

Wow! I was sure you were using the term “Lennard-Jones” loosely. I was under the impression it was too stiff with such large exponents for real-time simulations. I also thought you were using springs to make materials solid. How many sim steps/iterations per frame do you run?

Profilbild von Zolden
Zoldenvor 11 Monaten

16 a frame, dt is really small. But it works solid 150 fps on my 3090

Profilbild von Alex
Alexvor 11 Monaten

16 is smaller than I expected, but I guess that’s because it’s running unconstrained at 150 fps? So basically we can say that "effective" iteration count per frame on 60 fps display/video is 40 (16 x 150 / 60)? i.e. dt should be 1/150/16 = 1/60/40 = 0.0004166666667

Profilbild von Zolden
Zoldenvor 11 Monaten

Almost correct, dt is 0.0002. When I make it 0.0004, simulation explodes

Profilbild von proc0
proc0vor 11 Monaten

Is the physics really running on GPU (as your bio suggests?). Looks amazing.

Profilbild von Zolden
Zoldenvor 11 Monaten

Correct, runs on GPU. Thank you.

Profilbild von Critter
Crittervor 11 Monaten

I imagine when you say "any game" you're not including something like Terraria, right? If that sort of scale isn't viable out of the box, I imagine it could be chunked or something.

Profilbild von Zolden
Zoldenvor 11 Monaten

Here the size is shown. Camera has moved to the right by maybe 10% of world size in this video. Same length goes underground. So, plenty of space.

Profilbild von J Bet
J Betvor 11 Monaten

@CritterObserves Is this real time? I hit massive roadblocks with liquid physics when it comes to this stuff which turned me off it, as the visuals aren't 3090 worthy but require a 3090.

Profilbild von Zolden
Zoldenvor 11 Monaten

@CritterObserves There's plenty of optimization possibilities, so it's totally doable running a good quality particle simulation with tens of thousands interacting particles on something like 3070, with cute enough rendering. If you go pure fluid, it's even faster, as it allows 10x time step.

Profilbild von J Bet
J Betvor 11 Monaten

For myself specifically I was looking at Noita style game with the addition of somewhat realistic physics and first handful of options I looked into didn't seem do-able at a convenient enough efficiency (for me on a 3060). Fractala seems to have it though, and some of yours as well. I'm still wondering if its functional enough to be the focus of a full game and not in like a sandbox style one.

Profilbild von J Bet
J Betvor 11 Monaten

@CritterObserves somewhat realistic liquid* physics.

Profilbild von J Bet
J Betvor 11 Monaten

@CritterObserves But it sounds to me like I missed a lot of options.

Profilbild von Zolden
Zoldenvor 11 Monaten

@CritterObserves I think it's doable,and you can do it if experiment a bit more with different approaches and optimisation tecniques.

Profilbild von Alex
Alexvor 11 Monaten

Fluids are cool enough as is. Seamlessly transitioning between fluid and solid is insanely cool!

Profilbild von Topotoy Labs
Topotoy Labsvor 11 Monaten

Needless to say, this is absolutely AWESOME. Keep up the great work!

Profilbild von Sols 🐣
Sols 🐣vor 11 Monaten

so smmooooooth! remarkable!

Profilbild von Stinky
Stinkyvor 11 Monaten

Interesting! Reminds me of desiccant gels when they've absorbed water. Looks great

Profilbild von coolerputt
coolerputtvor 11 Monaten

Cool How does this run fast? Any articles or Tutorials to help? I feel you aren't using water particles and apply physics on each particles like my dumb brain would

Profilbild von Zolden
Zoldenvor 11 Monaten

Fluid sim uses grid, where it solves incompressibility. Running each cell of the grid would be slow, because there's too many. So, I made it so only cells that have partciles would be computed. This way I have both huge world and fluid is computed fast.

Profilbild von coolerputt
coolerputtvor 11 Monaten

Ohh I get it now ,cool so the entire mesh is made into grids... How do you handle physics tho any tips for fluid physics apart from studying 300paged of lecture material🤧🤲

Profilbild von Zolden
Zoldenvor 11 Monaten

PIC/FLIP method for fluids is quite simple, you just put particle velocities to grid, solve incompressibility, and return velocities to particles. It all boils down to adding a few numbers a few times, but would still require reading a few pages of explanations.

Profilbild von coolerputt
coolerputtvor 11 Monaten

Ohh thnx , I do understand the principle from what explained tho Calculations are not done on particles directly but are applied instead... Cool stuff

Profilbild von Zolden
Zoldenvor 11 Monaten

For the fluid it's indeed calculations on the grid. But for the solid part it's each particle computes forces between its neighbors, so per particle calculations.

Profilbild von coolerputt
coolerputtvor 11 Monaten

Ohhh ok ok makes sense, thanks alot❤️

Profilbild von Todd Lehman
Todd Lehmanvor 11 Monaten

This is beautiful! 🤩 Suggestion: rather than having the temperature, decrease linearly, use exponential decay. Then, dissipate heat based on surroundings, to allow hot particles to stay hot if they are near other hot particles, so that large clumps cool slower.

Profilbild von Zolden
Zoldenvor 11 Monaten

It's an interesting and physical concept. If it's not much a performance burden, I might implement it. It could even be used for some gameplay mechanics.

Profilbild von Todd Lehman
Todd Lehmanvor 11 Monaten

Cool. Dissipation is probably likely to be somewhat computationally expensive, although perhaps not marginally so... but the exponential decay ought to be cheap, if you choose to implement that, since it's just a remapping of the linear elapsed time. 🤓

Profilbild von octane_turnip
octane_turnipvor 11 Monaten

That's so cool! How are collisions for this many particles computed efficiently? Is it a delaunay/voronoi graph?

Profilbild von Zolden
Zoldenvor 11 Monaten

@f_allat There's a grid, that knows local particles, so each particle only interacts with few neighbors, therefore, it's about O(k * N) complexity.

Profilbild von octane_turnip
octane_turnipvor 11 Monaten

It makes sense. Thank you!

Profilbild von 𝕊𝕖𝕥𝕙 “The Surge” 𝓒𝓱𝓪𝓶𝓹𝓲𝓸𝓷
𝕊𝕖𝕥𝕙 “The Surge” 𝓒𝓱𝓪𝓶𝓹𝓲𝓸𝓷vor 11 Monaten

>wider than any game would need

Profilbild von BreathOfSpace
BreathOfSpacevor 11 Monaten

Looks nice.

Profilbild von International Ranni Simp
International Ranni Simpvor 11 Monaten

Holy shit that's insanely fucking cool. I've been trying to imagine this concept in my head for a while to eventually implement it for like a dynamicly generated game mechanics, and you've represented it so perfectly. This fills me with unimaginable joy

Profilbild von Zolden
Zoldenvor 11 Monaten

I'm glad it gave you these feelings!

Profilbild von M2
M2vor 11 Monaten

This reminds me of Noita

Profilbild von Mr Sean
Mr Seanvor 11 Monaten

Can it do live multiplayer?

Profilbild von Zolden
Zoldenvor 11 Monaten

Currently no, as physic computation is not deterministic. But I'll try to fix it.

Profilbild von MindForge
MindForgevor 11 Monaten

I'm seeing Liero and Scorched Earth possibilities all over this :D

Profilbild von Jordan Shurmer
Jordan Shurmervor 11 Monaten

This looks great. Could be used to make some really good Noita-likes

Profilbild von Tristan John
Tristan Johnvor 11 Monaten

A lemmings reboot is in order.

Profilbild von Denise Angle 🫧👻
Denise Angle 🫧👻vor 11 Monaten

This is EXCELLENT.

Profilbild von SvenBrimstone
SvenBrimstonevor 11 Monaten

Worms Armageddon (1999) (but cooler)

Profilbild von ҳ̸Ҳ̸ҳ🦄ҳ̸Ҳ̸ҳ
ҳ̸Ҳ̸ҳ🦄ҳ̸Ҳ̸ҳvor 11 Monaten

looks a little bit like noita

Profilbild von Drarra
Drarravor 11 Monaten

Very impressive! especially the huge world from the other clip. Is this a standalone engine, or to be plugged into an existing engine via its computer shader api etc.?

Profilbild von Zolden
Zoldenvor 11 Monaten

It all runs under Unity. When I call it "my physics engine", I mean I created all physics from scratch, and it allows me building a physicsbased game on top of it.

Profilbild von Drarra
Drarravor 11 Monaten

Ooh awesome o: Hope you plan to release it as an asset one day :) (don't have plans for it myself I think, unless it could do what FluXY does in limited range, but there'd surely be demand)

Profilbild von Ali Khaleqi Yekta
Ali Khaleqi Yektavor 11 Monaten

Curious about the performance. Does it run smoothly (or at all) on mobile?

Profilbild von Zolden
Zoldenvor 11 Monaten

Performance depends on amount of particles and other quantity limits. It can run on mobiles with fewer particles. Maybe up to 10K. At some point I might make a mobile game with these physics.

Profilbild von Ali Khaleqi Yekta
Ali Khaleqi Yektavor 11 Monaten

Thanks for the explanation, that's very interesting! I think one concern is the huge array and operating on it on every frame. I don't think 100x100 would be enough for games though. If it's possible to load and unload groups of 10k particles at a time, that completes the puzzle

Profilbild von Alice Masters
Alice Mastersvor 11 Monaten

Noita 2 when looks amazing

Profilbild von luna 🦉
luna 🦉vor 11 Monaten

This looks INSANE

Profilbild von Autistic Bratwurst
Autistic Bratwurstvor 11 Monaten

Looks like Powder Games

Profilbild von Zolden
Zoldenvor 11 Monaten

It was the main inspiration.

Profilbild von Drew Brereton
Drew Breretonvor 11 Monaten

time for some orbital mechanics? (I'm saying I would love to watch planets collide in this engine)

Profilbild von Zolden
Zoldenvor 11 Monaten

oh yeah, I planned making a simulation like this with massive planets colliding. Now with fluid dynamics it shall be epic.

Profilbild von BK
BKvor 11 Monaten

If this was Minecraft 2.0 I would play it

Profilbild von Laszlo Vincze
Laszlo Vinczevor 11 Monaten

Extremely Noita-coded. Hoping to see a cool sandbox game with this tech!

Ähnliche Videos