Jump to content

FEM spheres sticking together? (Lava Lamp)


locvio

Recommended Posts

Looking for ideas to make Finite Element solver-driven spheres stick together or merge.

Working on Lava lamp effect, trying it with FEM spheres blown around by a fluid's vel field.

(alternatives seem to be particles/Metaballs or viscous Flip, but in reference sometimes the lava balls bounce off of each

other in a soft body way.. hence trying FEM).

including a sample file (FEM_setup node)..

Youtube Lava Lamp Ref..

 

femBalls.hiplc

Link to comment
Share on other sites

I got kinda inspired but decided to start from scratch and this is what I came up with, using metaballs. The problem with metaballs, though, is they want to be round. I think a combination of these techniques might be a winner, so starting out with geometry and doing a FEM sim as a first step, then grouping a couple of points from the FEM sim and copying metaballs to them... I think that should work, providing the best of both worlds, so to speak.

And though I know you can already set it up, if I'm not mistaken, SESI is implementing a new surface tension feature in the FLIP solver in H16 and with that and playing with viscosity, you should be able to set this up pretty easily in a single FLIP setup. Maybe. ;)

lava.lamp.v1.hiplc

 

Edited by Farmfield
  • Like 1
Link to comment
Share on other sites

Much appreciated, Tim, I was actually looking for that tut before doing anything, but I thought it was a Peter Quinn tut and I couldn't find it... :P

But yeah, this zero gravity FLIP setup but driven by a Pyro sim for the lava lamp motion, I would guess at this point it's basically the perfect solution for a lava lamp.

Edited by Farmfield
Link to comment
Share on other sites

Johny,

 

went through your file.. Really neat idea simulating the whole fluid and creating the lava out of just a few points..  Especially cool if you

want to do a lava lamp with "sparkles" floating around that you sometimes see! thank you!

Tim,  thanks a lot.. Great tutorial! just had enough time to go through it today before heading off to work (attaching for reference)..   Sort of works, but getting pulled apart too much right now.. He mentions that

upping the res can help with that, will need to balance it out.     Interesting gradient-based mixing of forces.. For lava lamp, maybe just the "gas surface tension" coupled with viscocity and noise forces might be enough?

(on top of that thinking tiny gravity in combination with a "heat" attribute that accumulates at the bottom of the lamp to drive vels upward, and cools off as they

get closer to the top)..   attaching the file I got from following tutorial for reference..

 

 

 

 

 

 

 

 

zeroGravityFluids.hiplc

Link to comment
Share on other sites

Yeah, you gotta sim som kind of fluid to get the correct feeling of movement - though as I stated before, it doesn't necessarily need to be FLIP, you can use pyro too, for driving the movement. And I'm watching the tutorial now, I'll definitely play around with some of the stuff used in it. Using gradients is one of the first things I did, as I started out with POPs, learning Houdini. They are really useable for a lot of stuff, like layering particles inside an object, etc...

But I'm having a calm day so I might continue with this stuff today, if nothing else gets in between, and I'll post anything I come up with. :D

  • Like 1
Link to comment
Share on other sites

Just wanted to pop in and say HOLY F*CK how annoyingly slow it is to tweak fluids. Working with a dual viscosity setup right now, it's just horrible to tweak, I'll be here rest of the year, ffs... Ditching that crap for a mixed setup next - as I suggest earlier, zero gravity FLIP for the vax, Pyro for the "liquid". Hope it's faster to tweak than this crap. :P

Link to comment
Share on other sites

Naeh, it's not the simming in itself, it's sim'ing, tweaking, sim'ing, tweaking, sim'ing, and so f¤%&/ing on... It's just too hard to get this setup looking even close to "right". At this point my crap fakery from this morning looks 100 times better than my FLIP setup after hours trying to get it even close to working...

This is really the stuff that drives me, I get panicky as F! getting into these endless tweaking sessions, waiting to see if it looks better, worse, that's why I'm always into simplifying and faking stuff. Tweaking should be about getting stuff "perfect", not getting it working at all.

Link to comment
Share on other sites

Metaballs are just "sticky primitives" so you don't sim those at all, they just create geometry from points. :)

But the problem is they are pretty recognizable as metaballs, so it's not a good solution unless it's just for something in the background. The zero g FLIP sim is the only thing that will behave realistically enough for a hero object.

amoebtastic.hiplc

  • Like 1
Link to comment
Share on other sites

10 minutes ago, Farmfield said:

Metaballs are just "sticky primitives" so you don't sim those at all, they just create geometry from points. :)

But the problem is they are pretty recognizable as metaballs, so it's not a good solution unless it's just for something in the background. The zero g FLIP sim is the only thing that will behave realistically enough for a hero object.

amoebtastic.hiplc

Ah my thoughts were to drive a metaball from particle or something then convert to another sloppy mesh thing via sdf or vdb volume.. then into polys and sim that mesh

Altho I guess a prob may come when the poly count changes in the metaball?  How does fem handle that sort of thing when poly counts change?

 

Gonna have a look at that file shortly sounds cool :)

Link to comment
Share on other sites

19 minutes ago, anthonymcgrath said:

Ah my thoughts were to drive a metaball from particle or something then convert to another sloppy mesh thing via sdf or vdb volume.. then into polys and sim that mesh

Altho I guess a prob may come when the poly count changes in the metaball?  How does fem handle that sort of thing when poly counts change?

 

Gonna have a look at that file shortly sounds cool :)

Good question about FEM. The deforming, changing mesh is one issue, that you have meshes combining, splitting, another. But I would guess it could work if you remesh and tetrahedralize it per sim step, but it would be immensely computationally expensive - and might look like crap. But the worst part about the idea is it's likely way to much of a tweaking nightmare. As I've said before, tweaking is for getting stuff look good, not for getting stuff working. If I find an approach is to hard to get going in the right direction, I'll drop it and try another approach, and then another, and if they seem worse, I might go back to the first one, and give it another go. But don't get stuck trying to make stuff work, it'll kill your enjoyment of doing this stuff. ;)

In this particular case, we know we have a setup that works - the zero g FLIP - so not basing a lava lamp setup on that would be very foolish - using that setup you're halfway there already, anything else you'll have to start from scratch, more or less.

And I don't mean we shouldn't try other things - we should always do that - but say this was client work, then it's just no question about it, it's the zero g setup which will give you the rest of the time until deadline to get it looking "right". :D

Edited by Farmfield
  • Like 1
Link to comment
Share on other sites

Johny, thanks! Will take a look at your file today.

Gave it a shot using viscous fluids, an animated heat source and faked heat dissipation, balanced out with gravity.  I think the general motion is close,but too fast..    The blobs are too jiggly, need to see how to stabilize their surfaces.   Animating the heat source helped a lot, if it was constantly on blobs would get stuck where rising fluid from below would not be able to overcome the cold fluid getting pulled down by gravity. (expressions below for quick ref).

 

 

 

 

What I'm doing to transfer heat from the heat source and dissipate it..

int handle = pcopen(@OpInput1,"P",@P, ch("maxrad") , ch("maxpoints"));
float heatCur =0;
heatCur = pcfilter(handle, "heat");
float heatDissipation = -0.2;
f@heat = clamp(f@heat + heatCur + heatDissipation,0,100000);
float velFromHeat = f@heat * .3;
@v += set(0,velFromHeat,0);
 

 
 

zeroGravityFluidAF.hiplc

Edited by locvio
Link to comment
Share on other sites

Hehe, I didn't do anything close to that nice VEX, I just did the simplest crap even just accumulated heat to a level, upwards force over a certain value, then dissipated the heat and a downwards force on a certain value - so my laziness might be the biggest issue with my setup, or my incompetence, or a combination of both. :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...