CG Integration – 5 – Clean Up
October 4, 2017
Its worth noting that this post is being made late, however there are plenty of important advancements made.
I wanted to take some time to talk about a few of the different smaller things I have done to clean up this simulation. The first thing I wanted to go over was something I touched on in my last post, the viscosity functions.
These are just various exponential functions from a linear function to an exponent of 6, with steps of 2. These various functions change exactly how the fluid reacts and how quickly it firms up/stays liquid.
The video above shows these different behaviors. If the exponent is too high the particles seem to fall down and then firm up, if its too low then there isn’t enough interaction. Finding a nice middle allows the particles to pull and create very interesting forms as they firm up mid air.
Another quick wrangle node here thins out stray particles. Any particles that are too far away or too alone will just get deleted so that when the particles are surfaced there are no stray little drops on the ground buzzing around.
I have also figured out the shader. Initially in the material network I would have had to dive into a single shader’s network and manually set each individual parameter. This method would have definitely worked, however, it would have been a pain to change and tweak material settings. Instead I found a way to create a shader in the shop network that just straight blends two materials. This way any material can be interchanged and the whole system work quickly and efficiently. The temp attribute is being used to blend the two so that where Temp is 1, the material is all the second shader, when it’s 0 the material is all the first shader.
This video shows that material in action. As the ball collides a new material fades in and then out. At the time this post is being made the material has been much further developed, the brick mesh has been removed and a new mesh of a bucket has been integrated. However, finally getting this to work was a great step in the right direction.