Mason Jones's profile

Liquid Soda Simulations

    I started this week off by tweaking the settings of my fluid simulation and then running it with a higher resolution.  This took a while, but it was worth it because I also learned how to run the simulation with foam and bubble particles and tweak the effects of said particles.  The only problem I had with my simulation was that I tried running it with an initial velocity, which I underestimated the power of, and accidentally made the water shoot over the glass itself.
    I ran the simulation again, this time I found out that I could optimize it by decreasing the size of the liquid domain in edit mode and lowering the resolution but also adding a smooth modifier to make it look better.  I watched tutorials on youtube because I could not figure out how to change the placeholder sprites of the foam particles into actual objects and I found out how to do so.  I learned that I was supposed to create a sphere separate from the fluid simulation and then apply it to every foam sprite particle.  The computer was already struggling to run the simulation, so I knew if I were to do this it would crash.  Instead I swapped the particles out for a square, which looks worse, but it is a necessary trade off.
    I started applying textures to the liquid.  This was a struggle because the computer was running blender at .03 frames per second and everything was horribly delayed.  I found a forum where people were talking about the settings they used to make coca-cola renders and I started applying similar settings to my own render.  I also added a texture to the foam particles and bubble particles that I think looked realistic.  For the foam I increased transmission a bit and added emission to make it more noticeable.  For the bubbles I made transmission higher so it was more reflective.
    I used the object constraints panel in blender to animate a camera movement that I thought would look good. I used a modified bezier circle as a path, tied an empty to the camera, and animated the empty to follow the path of the circle.  Then I learned that I could add an empty sitting slightly above the cylinder and make the empty parented to the camera always point at that empty.
    I learned how to adjust render settings so that I could render my animation.  I tried using the Evee renderer but it looked very bad so I had to use the Cycles renderer.  This meant it would take very long to render the scene.  I looked online and found out I could use clamping and adjust light bounces and change the resolution so that it takes less time to render.  Even with harshly optimized settings it still could only render one frame per two minutes.  Also the liquid looked different to what it looked like in the editor for some reason.  I canceled the render and I will try again on Monday, because there is not enough time today.
    I started trying to fix the bug I encountered in the render where the fluid itself was not visible.  I first tried swapping the liquid to objects and then creating a sphere that would represent each fluid particle in the scene.  This made the blend too heavy and it also looked bad, so I switched the liquid back to “Halo” and looked back at the other settings for a fix.  I then realized that my inflow sphere was not set as visible during the final render, I set it to visible and then I found that when I rendered again the soda liquid was now visible.  Since there was not enough time on this day I canceled the render and then started using math to figure out how much time I would have to render the burger I made in a previous subcategory and how many frames I could finish.
    I started rendering the soda fluid, I set each frame as a png file so that I could pause the render at any time and resume, and set the output to a folder on my desktop.  One thing I learned was that it is hard to calculate render times by yourself; my initial calculations were wrong, since frames per minute fluctuated greatly based on how many foam and bubble particles were in any given frame.  Sometimes it was rendering one frame each minute or so, then when the foam particles died down it was rendering two frames per minute.  I think the amount of collusions and fluid behaviors might also contribute to changing render times but I cannot really figure out how specifically, which makes it hard to pace myself.
    I rendered the same scene from a different camera position to add variation to my project’s final video.  I changed the resolution of the video to a lower resolution that had less dead space being rendered.  This made the video look bad but I got a full render of the scene done.  I spent the entire day rendering this scene, but since I was bored I also started researching what I could do to speed up the render times.  I think that setting the render to GPU computation lessens the render times but I also read that some things like fluid simulations need to be computed on the CPU regardless.
    I took the pngs of the render and used the Blender image sequence to put them together.  I did this incorrectly because the end video product was reversed, but I think it might look better that way anyway so I left it.  I could reverse it a second time in premiere pro if I want to change it anyway.  Using the timing estimations from day one I rendered the burger image with a moving camera animation from a previous subcategory.  Each frame took around 55 seconds to render, which was a while but it was more stable than the fluid renders, which was good.
    I resumed the burger rendering and sequenced the png renders of the burger scene.  The final product did not look as good as I anticipated.  I think I had too many light bounces for one.  I also think that I should have increased the shiny factor on the meat texture itself.  The other problem I encountered was that the bun did not have a strong enough musgrave texture and it looked too fake, I should have added more roughness.  I learned on this day that light bounces are not always good.
Progress Screenshots:
Liquid Soda Simulations
Published:

Liquid Soda Simulations

Published: