flip fluids variable viscosity control.

   6641   11   1
User Avatar
Member
57 posts
Joined: Feb. 2014
Offline
ok ive just come to houdini from 15 years of 3dsmax. i feel like a newborn baby here! talk about alien environment. but i will persevere.

i have a sneaking feeling im trying to do something way above my level.

- i want to set the initial viscosity of the fluid in a fliptank with a procedural texture. im basically after meaty chunks in gravy.

before starting id assumed this would be as simple as assigning a procedural texture to the viscosity channel in the fluid.. but thats 3dsmax thinking.. doh!
User Avatar
Member
1769 posts
Joined: Dec. 2006
Offline
hi, try this, most basic example

Attachments:
viscosity.zip (168.1 KB)

daniel bukovec | senior fx td | weta digital
qLib -- http://qlab.github.io/qLib/ [qlab.github.io]
User Avatar
Member
99 posts
Joined: July 2007
Offline
Hi and Welcome

buki, damn you've beaten me

Attachments:
fluids_viscosity_example.hip (2.9 MB)

User Avatar
Member
1769 posts
Joined: Dec. 2006
Offline
daniel bukovec | senior fx td | weta digital
qLib -- http://qlab.github.io/qLib/ [qlab.github.io]
User Avatar
Member
57 posts
Joined: Feb. 2014
Offline
wow thanks for the fast reply.. not only that.. 2 replies quite refreshing after 15 years of the autodesk “community”

ive had a look around inboth examples , and i basically understand whats going on, had a fiddle with some parameters, tried controlling the density with another new attribute etc.. not bad for my second day.. still find it extremely hard to imagine getting from here, to actually knowing how to work something like this out myself. seems id have to know a whole pile of nodes and a stack of syntax just to start.

i guess i have to keep calm and start with the basics.

the temptation now is to ask how to do all the other aspects of my sim but thats hardly fair.

one question that im currently stuck on, how to control the difference between the viscous and non viscous components. i can use the multiplier to control the overall viscosity, but i cannot see how to make the difference between the two larger.

i assume i could do something in (using buki's example) the pyronoise output - output correction, playing with the bias and gain, but all the controls there are greyed out for some reason, as are almost all other controls in the pyronoise. im guessing this is a simple interface quirk that i dont get yet.

any tips on this appreciated of course.

cheers, Robin.
User Avatar
Member
99 posts
Joined: July 2007
Offline
Don't worry, you'll learn it one node at a time ,)
Don't be shy and ask, even better if you can post your hip(nc) file

Pyronoise seems ok to me in buki's hip, or are you looking inside vop sop?
He promoted parameters to upper level
User Avatar
Member
1769 posts
Joined: Dec. 2006
Offline
I my example i set viscosity with a texture, simple as that. The general rule is that You can “compose” your attributes in Geometry context (SOPs) and that way you “feed” the dynamic solver.

So here i set viscosity between 0-1, and you have a multiplier in DOPs on the solver.

Here is a modified version of the scene, I set only color with vopsop, then make 2 groups out of it, the first one using the color (viscous), the second one is all that is not part of the first group (nonviscous)

This way i can use 2 attrib create SOPs to explicitly define the viscosity attribute, play the sim

Attachments:
viscosity02.zip (168.5 KB)

daniel bukovec | senior fx td | weta digital
qLib -- http://qlab.github.io/qLib/ [qlab.github.io]
User Avatar
Member
57 posts
Joined: Feb. 2014
Offline
fantastic.. ill have a play when i get back to my workstation. many thanks again.

edit: yes i was looking inside the vopsop.
User Avatar
Member
57 posts
Joined: Feb. 2014
Offline
one thing i dont understand (going back to the initial examples provided) if the procedural tex is outputting values between 0 and 1, and im controlling with a multiplier, surely the less viscous component should always have viscosity 0? this doesnt appear to be the case (in Buiki's first example) as when i crank up the multiplier to 50k, the viscous component gets nice and solid, but the less viscous component has a consistency like glue.


thanks for the second example by the way, i understand the concept of separating into groups (similar to a tutorial i saw using groups to apply a seperate surface to fluids of different densities in the same sim.) however when i open and playback that scene, there seems to be only one viscosity.

dont sweat it though, ive got more than enough to be fiddling with!

one final thing, and i could probably find this in the manual, how do i get a preview of the procedural texture while i play with it?

cheers, Robin.
User Avatar
Member
1769 posts
Joined: Dec. 2006
Offline
I plugged the procedural noise to Cd (color) so i could see it, if you're wondering is there a swatch or something, no, there is not. Usually we visualize it on a reasonably subdivided geometry as point colors.

I made the example with 2 groups because that way i can define a clean 0 or 1 value, with nose there are always some small values(inspect the vopsop in details view), so when you multiply it with 50k, there will be a significant viscosity on those points.
daniel bukovec | senior fx td | weta digital
qLib -- http://qlab.github.io/qLib/ [qlab.github.io]
User Avatar
Member
57 posts
Joined: Feb. 2014
Offline
ok starting to get somewhere now ( as in being able to control the provided examples, not anything original)

however, using owlYzarc's fliptank example, im noticing the very viscous parts are sticking to the sides of the fliptank and not falling. at a later stage, im going to have to look at controlling how the fluids stick to animated geometry, but id assume this was something id have to specifically set up. seems the viscous stuff is sticky by default?
User Avatar
Member
99 posts
Joined: July 2007
Offline
hmm, not sure myself - it is something you have to enable and in this example scene it isn't.

robinlawrie
ok starting to get somewhere now ( as in being able to control the provided examples, not anything original)

however, using owlYzarc's fliptank example, im noticing the very viscous parts are sticking to the sides of the fliptank and not falling. at a later stage, im going to have to look at controlling how the fluids stick to animated geometry, but id assume this was something id have to specifically set up. seems the viscous stuff is sticky by default?
  • Quick Links