ParticleSkull Posted February 3, 2015 Share Posted February 3, 2015 (edited) Hey guys. I've just noticed that "Viscosity by Attribute" field inside of the Flip Solver and I'm wondering how can I work with it. I know exactly what it does but, how can I create this attribute so then i can work with a variable viscosity?Here's an image of it, just in case : https://www.dropbox.com/s/yn0600cjlzfaz2w/ViscAtt.jpg?dl=0If, in case it's too hard to explain, can anyone just point me what should i have to study to understand it better?Edit: Btw, I'm on H14.Thx!! Edited February 3, 2015 by ParticleSkull Quote Link to comment Share on other sites More sharing options...
rafaelfs Posted February 3, 2015 Share Posted February 3, 2015 (edited) It's actually pretty simple: you have to create a viscosity attribute on your particles (point attribute, float) and enable the viscosity by attribute in the solver. You can use an attribute create SOP or a wrangle, but if you want to manipulate the viscosity or change it over time, these changes have to be done with the use of a sop solver, but even then it's not too hard. CMIvfx has a great tutorial on variable viscosity fluids, by Mr. Tonkas. Peter Quint also has some stuff on FLIP, but I'm not sure if he covers viscosity by attribute... Cheers Edited February 3, 2015 by rafaelfs 1 Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted February 3, 2015 Author Share Posted February 3, 2015 Thx Rafael! In fact i'm pretty new to houdini so i didn't really got it.How can I create a viscosity attribute on my particles? Should I do it inside of the AutoDopNetwork or somewhere else? Cos it looks like I can't create "attribute nodes" inside of the AutoDop. Quote Link to comment Share on other sites More sharing options...
rafaelfs Posted February 3, 2015 Share Posted February 3, 2015 here's a quick'n dirty setup... viscosity_attrib.hip 1 Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted February 3, 2015 Author Share Posted February 3, 2015 Awesome, thx! I'll dissect it Quote Link to comment Share on other sites More sharing options...
eetu Posted February 3, 2015 Share Posted February 3, 2015 (edited) Here's a quick hip with two ways of doing it. If you use the "flip fluid from object" shelf tool, in H14 it will not create the particles in the source object, so you will have to create the your custom viscosity attribute within the DOP network. Here I did it inside a Sop Solver behind an Intermittent Solve DOP set to Run Once. Another way to go about it is to create the particles in SOPs within the source object, e.g. with a Fluid Source SOP, and set the Initial Data -> Input Type to Particle Field inside your flipfluid DOP. This way you can set the viscosity attribute within SOPs before they are sources into the sim, which can be a bit less cumbersome. (This is the second netbox inside the .hip) edit: Ohh, Rafael beat me to it ee_viscosity_by_attribute.hip Edited February 3, 2015 by eetu 1 Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted February 3, 2015 Author Share Posted February 3, 2015 Thank you so much eetu, I had indeed created my fluids using the "Flip Fluid from Object" shelf tool. I'll dissect it as soon as I understand exactly what is going on inside Rafael's example Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted February 3, 2015 Author Share Posted February 3, 2015 (edited) eetu, just "copied" your first example and it worked just fine. Although, for some reason, I had to change the "transform type", inside the Object Merge node, to "Into this OpHere's the image showin' it: https://www.dropbox.com/s/k5nk9epsyuos10b/into.jpg?dl=0Also, by default in my scene, the Viscosity Scale (on the flip solver) was set to something else (not sure now) and on your scene it's 1e+006 and it worked just fine this way. Do you know what does it means? It's something like a really low value?Here's the image showing it exactly: https://www.dropbox.com/s/rjushiz3mhp20i4/VS.jpg?dl=0And thx man. Now i'll have a look on the other case. Edited February 3, 2015 by ParticleSkull Quote Link to comment Share on other sites More sharing options...
eetu Posted February 3, 2015 Share Posted February 3, 2015 That scale parameter is a multiplier on the point attribute. It can be convenient to work on a 0..1 range in the point attributes and only adjust this value to change the overall viscosity scale. 1e+006 is so-called scientific notation, and equals one million. Xe+Y means X*10+Y so 1e+006 is 1*106 which is 1000000 1e-006 on the other hand is one millionth. Similarily Xe-Y means X*10-Y so 1e-006 is 1*10-6 which is 0.000001 1 Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted February 3, 2015 Author Share Posted February 3, 2015 Nice. Just wondering, the "6" on "1e+006" is basically the number of zeros? Like, 1e+004 would be 10000?And 2e+004 would be 20000? Quote Link to comment Share on other sites More sharing options...
rafaelfs Posted February 4, 2015 Share Posted February 4, 2015 (edited) Nice. Just wondering, the "6" on "1e+006" is basically the number of zeros? Like, 1e+004 would be 10000? And 2e+004 would be 20000? yup, it's kinda like scientific notation. Edited February 4, 2015 by rafaelfs 1 Quote Link to comment Share on other sites More sharing options...
ParticleSkull Posted February 4, 2015 Author Share Posted February 4, 2015 Dudes, thank you so much. Now everything is much clearer.Best,Alvaro Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.