Jump to content

Complex Fluid Containers?


Eucalyptus

Recommended Posts

Hey all,

I should start by saying that I'm very new to Houdini, so if any answers could be kept as straight forward, or "hand holding" as possible that would be great. Tried to find a solution on my own obviously but... Still learning!

(1) My question at the moment, is whether or not it's possible to make a complex/dynamic container for a fluid, or to be filled by a fluid. I imagine this is possible, so I guess the real question is HOW. Let's say for example, I want to have a sphere be filled with water from the inside of it (so imagine it had a glass material on it so we could see through it). How would I go about making the sphere my container, and keeping it "watertight" (Fuse node?) so fluid didn't escape. If you'd like to take it to the next level, I'm really looking for a way to fill letters from inside of them. So imagine an emitter inside of a letter, slowly filling it up with a fluid.

(2) The bonus question is sort of relevant to this as well, and that is: When I use the shelf tool Emit Particle Fluid in H12, if I had a tiny tube as my original object (0.1 radius), it seems to bulge my object and make it much fatter/bigger, as if it were changing the geometry of it. Is there a way to avoid this, and to emit from very tiny objects without it scaling them up?

(3) Last but not least, and this one is probably real simple: in 3DS Max I could create some particles, and there was a simple "particle count" setting to increase/decrease the amount of particles in your effect. Is there an easy way to drive the amount of particles being produced? This can be for both fluid/smoke/particles in general. Just curious.

Cheers and any responses are appreciated, you don't have to answer all 3 questions if you only know 1 or 2.

Link to comment
Share on other sites

1) You can check "invert sign" on the collision volume settings. This will turn the geometry 'inside out' basically

2) Division settings on the flip object and inside the create_surface_volume node (in sops). If you have higher division size, you get more approximated geometry, thus rounding it out more. If you lower the division size of the volumes, you will get something more detailed. I believe the spacing on the sop node is automatically channel referencing the dop nodes here to match the division sizes, however you can always override it to get a more detailed emission volume, while still keeping the spacing of particles the same.

3) Same as 2. If you increase the particle spacing in the flip object you will have less particles. Decrease the spacing, you have more particles. You will need enough detail to resolve small object, which usually means smaller spacing, more particles, and thus, more memory. :)

Link to comment
Share on other sites

Thanks very much for the replies guys. While Andrew Lyons tutorial was definitely more complex than I was lookin for, once again Solitude nailed it.

The Invert Sign was what I was looking for exactly. I found that in order to get a proper collision guide geometry I had to set Laser scan and have about 150 Uniform Divisions on as well. Not sure if this is above average but, so far it's working perfectly.

I sort of got the "resized" emitter under control as well. It seems that no matter how good my Collision Guide geometry is though, the particle spacing is the key component to get particles to fill every tiny nook and cranny (and sharp corners). And the smaller my emitter gets, the less particle separation I need in order to still emit a good amount. Which makes sense really. I had to use a mix of Division Size and Edge Location (SDF From Geometry tab) on the SOP level.

Thanks guys!

Edit: Quick question, even after I use a Fuse node on my Letter (geometry that water is inside), I get a few tiny particles sneaking through the geometry as it fills on the bottom corner. Any specific reason for this? I figured a Fuse would make it "watertight", as mentioned above.

Edited by Eucalyptus
Link to comment
Share on other sites

Just a follow-up question to this: I seem to be "leaking" fluid out of a container. It's only a few particles here and there, but obviously since they are fluids it is going to show up in the render and look silly. Is there a way to fix this? I've used a PolyCap and Fuse node on my container object.

I tried PolyExtruding it so it had some thickness, which I imagine is the problem, but it messed up my sim a lot since it is using Invert Sign.

Is there an easy way to add thickness to a fairly simple object like this besides PolyExtrude? (It's just a letter)

Picture as always:

2guw9w8.jpg

Link to comment
Share on other sites

If the polyextrude isn't working you could try killing the few particles that are escaping, if the sim looks good as is. Just use the letter as bounding geometry to create a group and delete points outside the group. If they don't want to join the party, just kill them!

Link to comment
Share on other sites

Hey wooden,

That's such a simple solution. Question though: To set that up, I assume I would create a Group Geometry in my Letter SOP before the dopimport, group it using bounding volume under the bounding tab, but then where do I put the Delete node to reference it? I tried in a few places and it didn't see to delete anything.

Cheers

Link to comment
Share on other sites

after the dopimport you can create a group geo, set the letter you filled up as it is before you sent it as container to dops as the bounding geometry.

then set the group option to bounding geo only points group points and call the group delete, ones again this is all right after the dopimport.

after the group geo node simply use a delete select the group, change delete to none selected and points and there you go.

No more particles leaking.

if you want a clean simulation, you could also set up a sdf of the letter and in dops create a sop solver connect it to the velocity input of the solver(i think :)) and inside of it create the vop set up shown in the flip fluid waterfall tutorial by sidefx, just change the if then block(the trigger statement from smaller then to greater then)

this should then move your points to the edge of the letter when ever they want to leave it.

But then again the delete version is much faster.

Also try to set up sub steps on the whole autodop to something like 2-3, that could also solve the problem for you

cheers,

Juri

Link to comment
Share on other sites

Sorry to bring this back up again but, I must not be doing something right. None of the suggested fixes worked. I still can't seem to get the Group/Delete setup to work properly. I'm using H12, and some of the options just aren't there, or I don't unerstand what you are talking about maybe. I put a group node after the dopimport on my object (the Letter, which is the container), and then a delete after, and no matter what settings the delete wouldn't even recognize the group.

How do I upload an attachment so I can load the .hip file, or do I need more posts to do so?

Here is a freefilehosting.com link to the project file:

http://www.freefilehosting.net/fluidlettermaterials02

Cheers

Link to comment
Share on other sites

Alright here you are.

Your problem is that you got confused by Houdini :)

Houdini lays down a few new nodes when you use the shelf tools.

When you use the flip fluid tools it always creates a node called particle_fluid and that is the node where all the simulation data off the flip simulaten gets imported into.

I think what happened is that you tried to delete the points inside the letter node, since there is also a dop import it at first seams logical.

But what you have to do is bring the letter into the new fluid object and then delete the points where they actually exist.

One easy way to see where stuff is is to turn on Hide other objects and then if its not there if you are in the node you think it should be, then its some where else :)

I fixed your little problem with the fast and dirty way. (check the red node)

and if you want to attach something here you need to go to more reply options.

FluidLetter_Materials_02.hipnc

Link to comment
Share on other sites

Thanks so much Juri, will have a look at this!

Still pretty new to Houdini so - I'm sure it will all make sense one day :)

Update:

You guessed it, another question. This time more about the rendering with my materials/fluids. I have a Fluid material and Glass material on both my container and my fluid in the SHOP level. When I click the mantra render button to preview my current view, it gives me a decent looking render of the glass material - but the fluid does not show up. Not even at all. It used to at some point in time when I previewed.

I think something is wacky with my AutoDopNetwork vs. particle_fluid node? The deleted particles fluid (the final fluid sim that stays inside the container) is in the particle_fluid node in the OBJ level, which shows up grey particles in the viewport. The AutoDopNetwork however still shows the non-delected particles that are outside the container with the blue velocity visualization when I have it view enabled, and when I render my viewport with it turned on it gives me a wacky, non-glass material and makes my letter no longer translucent. When it's off however, I just see the Glass letter, no fluid. Hopefully this makes sense, but I've attached the scene file as well.

Any idea what's going on with my textures, and if this is setup properly to render?

Sorry if this is a long thread asking exactly how to do things... learning Houdini and using the basic shelf tools got boring, so wanted to challenge myself. This is what I get when I don't know the program I guess :P

Cheers,

FluidLetter_03_Delete.hip

Edited by Eucalyptus
Link to comment
Share on other sites

I think you are just trying to render the points. Which Mantra won't do by default. You either need to check the Render/Geometry/Render as points checkbox on the particle fluid geometry node, or use the particle fluid surfacing node on the points before you render.

Link to comment
Share on other sites

okay here you are.

Simple render set up for what I think you might be going for.

Honestly if the letter is just glass leave it away, unless you want caustics from it, it only adds render time at least in my opinion :)

here is a quick render and the scene that made it.

post-7530-0-53330900-1354739328_thumb.jp

Hope that helps a bit :)

cheers,

Juri

FluidLetter_03_Delete.hipnc

Link to comment
Share on other sites

Wow your water material looks incredible.

I am actually rendering something out right now, taking about 4 minutes a frame once it gets into the simulation. I am rendering the glass however as well, as I wanted it to look like an actual "container", and then might try and have it smash into the ground when it's halfway full, but that's a future plan haha...

How did you get the water to look so great and solid? I just put a sort of light blueish color on my diffuse and a lighter color on my refraction color in the water shader material. Yours has so much detail!

Also, using wooden's suggestion of "rendering points" in the render/geometry tab that he mentioned earlier, my water looks sort of just like that... points... while yours is a very obvious fluid.

Hmmm:

2vt9qnb.jpg

I mean it doesn't look awful but... yours... wow.

Link to comment
Share on other sites

no, I muss understood him.

Only turn on render point only if you want to render particles, you are trying to render a normal mesh so leave that part alone.

To get a better water shader, simply add more detail to the environment:)

I used a simple Environment light with a HDRI to render the image.

That gave me more details in the reflections plus better looking refractions since there is actually something to see.

And all I did in the shader is add some light blue in defuse and turn defuse to 0.05.

Take a better look at the file I posted, its all there and nothing complicated about the set up.

It is actually not really the best since it still takes long to render.

If you want to learn more about flips and how to render them, go and take a look at the flip fluid water fall tutorial on sidefx.

Cheers,

Juri

Link to comment
Share on other sites

I see...

So the only thing that really gave it such a great look is that you rendered it as the particle_fluid, without rendering the glass letter/background, and the environment map gave it such detail. Good to know. :)

Thank you very much for all your help, will keep playing with this.

I've watched that Waterfall one before but will definitely take another look!

Edit: Managed to get a pretty nice looking render coming out. Nice enough for my learning experience at least. It's taking like 15 min/frame, which is pretty long I think... any cheap ways to optimize? This was just a learning project anyways. :)

Edited by Eucalyptus
Link to comment
Share on other sites

You can also add attenuation in refractions.

The suggestion for rendering the points in refraction is supposed to be a whitewater emulation, the points should be faded with respect to speed so the slow moving points have zero opacity.

Edited by ikarus
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...