Jump to content

A glass of wine, not cranberry juice


Macha

Recommended Posts

I re-admired Ratatouille the other week and I am always impressed by how precise, stable and beautiful Pixar's effect work is.

The wineglasses were especially lovely so I tried my own version in Houdini.

As you can see there is a problem with the surface not sticking properly to the glass. There are wavy pockets of air that create a weird effect. Any ideas on how to eliminate this?

post-4013-126714773252_thumb.jpg

post-4013-126714796124_thumb.jpg

Link to comment
Share on other sites

Are you using the feature on the particle surfacer that lets you give it a collision SDF to cut away the surface?

Maybe just make the make the particle radius bigger and use that SDF cutty thing (with a high res sdf) to smooth it out ... ?

Link to comment
Share on other sites

i am trying something similar, although my glass is more like a 10 sided thumbler. anyway, how i did it was to use the cookie node to subtract the glass geo from the particle fluid surface. as long as i have the particle fluid surface intersecting thru the glass. also turned of pre-convex on the cookie node. then used a transform node one the fluid surface to scale it a tiny bit, like 0.995.

tried the subtract collision volumes on the particle fluid surface node, and it takes way too long for a beast of a computer to bake a high rez isooffset of the glass, and doesn't look nearly as good.

again. this may have worked for me since i am using a sided glass. cookie node is pretty unpredictable.

glasswoil.jpg

oil.jpg

i can't believe i still can't model a goddamn glass that will refract properly... :(

Link to comment
Share on other sites

Hm, this is tricker than I thought. The problem is not the shape of the sdf but the voxel resolution of the fluid. Because the fluid is round I get this sliced look.

Appending a smooth sop makes the whole thing look too smooth.

Subtracting collision volumes is an idea but I have imported this from the surface/Visualization DOP field and I'm not sure how to reconstruct a good surface out of this if I use particlefluid sop on it.

I tried a lattice deformer set on points. That pulls the fluid close to the glass walls but retains the waves :P

Attribute transfer the P of the wall edges has some effect but, it messes up my normals and I haven't found a good way to handle that.

Hmmmm!

post-4013-126716023783_thumb.jpg

Link to comment
Share on other sites

Haven't actually tried it but how about using a ray sop to snap the non-upward facing fluid points to the glass or setting up a VOPSOP using intersect?

If you're careful with the Spread Angle while grouping the points you might even be able to hack a meniscus :)

Edited by tjeeds
Link to comment
Share on other sites

Haven't actually tried it but how about using a ray sop to snap the non-upward facing fluid points to the glass or setting up a VOPSOP using intersect?

If you're careful with the Spread Angle while grouping the points you might even be able to hack a meniscus :)

That is a great idea :)

<3 ray SOP

Link to comment
Share on other sites

Today I added some bubbles. They look and animate OK but I need more work on the fluid. It is too syrupy and slow. I think the flicker is a prob with the PBR render so I switch over to micropoly or raytrace for a while.

post-4013-12674348186_thumb.jpg

post-4013-126743482646.jpg

Edited by Macha
Link to comment
Share on other sites

How many particles are you simulating in the glass?

I use volume fluids for this. I don't like particle fluids much because I find them very hard to upscale and control.

I lowered the viscosity today and added some bubbles. Switching off PBR also helped with the flicker in the reflections.

It still looks a bit too thick, but I think that has a lot to do with the bubble animations and I think I can solve that. They are much more stable than I dared to hope for!

A bit of careful design could also help taking care of the glueyness.

post-4013-126749390379_thumb.jpg

Edited by Macha
Link to comment
Share on other sites

Attribute transfer the P of the wall edges has some effect but, it messes up my normals and I haven't found a good way to handle that.

You can always just append a Facet SOP and turn on one of the compute normal toggles. I think the Ray SOP will probably work faster but you'd still want to recompute normals in that case anyhow.

Link to comment
Share on other sites

I am now working on speeding up the render, without loosing too much of the look. The frame below took less than a minute to render, so I am happy with that result.

I am thinking of adding caustics. So, if anybody knows:

Is it possible to get caustics inside the fluid (rather than just on the surface)?

How do I use the pre-rendered caustics in the non-PBR render?

post-4013-126767103998_thumb.jpg

Edited by Macha
Link to comment
Share on other sites

  • 3 months later...

I am now working on speeding up the render, without loosing too much of the look. The frame below took less than a minute to render, so I am happy with that result.

I am thinking of adding caustics. So, if anybody knows:

Is it possible to get caustics inside the fluid (rather than just on the surface)?

I'm trying to do the same project, volume fluids falling and colliding in a wine glass. Right now I'm stuck on getting the collision surface right and would appreciate any insight. So far I have a polygon wine glass, I converted it to an SDF volume before bringing into DOPs (using high divisions in both iso offset and DOP static object). When I use ray-intersect mode I get no result, just the same fog from the iso offset, when I choose volume sample, the whole glass gets fill with the red collision geo instead of just the edges of the glass. I can see in your renders that you are getting clean collision geo. Whats the trick to getting the collision geo looking good for fluids?

How do I use the pre-rendered caustics in the non-PBR render?

I think in the vex global illumination shader you can specify under photon maps tab where you want to use your caustic photon maps. And attach vex GI to a light template.

Link to comment
Share on other sites

Whats the trick to getting the collision geo looking good for fluids?

It was quite tricky and I never found a really beautiful solution. The problem is that there is always some rough voxelillity (also known as voxellyness or voxelnessity) even at high resolution. In a way there is no antialiasing so the collision is never smooth, unless you have perpendicular walls. So you always get a noisy boundary. To get rid of it I used a smooth sop but the real trick is to smooth only the relevant parts of the fluid, otherwise you loose detail. It is a mixture of distance-to-glass-wall and curvature or normal direction. You need to play around with it as it depends on your setup.

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