Cg Integration – 3 – Plan B
September 26, 2017
Just because I’m not totally sure if the grains simulation will turn out, it’s proven tough to look dev and simulate, a Plan B will be enacted. For my Plan B I have chosen something that isn’t much simpler but is just as cool looking and works a lot more smoothly. The idea is inspired a tutorial uploaded to FX Hive in which an Angel is melted in a FLIP Simulation. The idea is you transfer an attribute “temp” to FLIP particles and have it relate to the viscosity of the FLIP sim. The value of temp deprecates each frame so that the FLIP particles slowly firm up.
DOP Net defines some colliding Geo, an RBD Object to collide, and a FLIP solver for the object to “melt”. Note the POPVOP, POP Wrangle, and SOP Solver nodes.
It’s a simple thing but not something you would think about (or at least I wouldn’t) until it actually happens. If I am going to transfer the attribute from the RBD sphere to the FLIP object, it has to be done after the simulation occurs in the first place so that the sphere actually gets closer to the FLIP rather than just sitting still. I just merge the sphere into the SOP solver in my DOP net after the DOP import. Seems like it would put itself into a loop but it works. I definitely need to learn more about how the DOP net runs.
Simple Attribute Transfer from the RBD to the FLIP. Distance threshold is set to 0 and Blend Width is used to transfer as close to the object as possible.
Each frame this little POPVOP deprecates the value of “temp”, therefore deprecating “viscosity” in return. I’ll have to change this to a POP Wrangle, but for now it makes it easy to look at.
The final piece of the puzzle, I wrote 2 brief functions defining the relationship between “temp” and “viscosity”. “Temp” ranges from 0-100 and “viscosity” ranges between 0-1,000,000. This absurd number allows the particles to stick together in a solid. Both functions are inverse relationships, the first being a linear relationship, when “temp” is 0 “viscosity” is 1,000,000 and when “temp” is 100 “viscosity” is 0. The second relationship is basically the same except with a slight curve to keep the particles less viscous for longer. Just a slight change even if subtle. Other interesting graphs could create many interesting interactions.
The next thing if this is going to be the final is add materials that vary with the viscosity, add UV data, and do a high quality sim. Pretty cool effect that is currently working quite smoothly, changing transfer methods or FLIP geo source is pretty straight forward!