Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Liquid in a bottle?

Discussion in 'Shaders' started by Scornz, Apr 13, 2016.

  1. Scornz

    Scornz

    Joined:
    Jun 15, 2014
    Posts:
    27
    Hello,

    I've got a quick question regarding something I've been trying to work out for quite some time. I would like to have fluid in a bottle and turn it into a particle effect when it is coming out (so there are no fluid simulations). I would like to have it very similar to the way Job Simulator handles its liquids (here is some examples:
    and
    around 3:43). If anyone has some source code (or shaders) or could lead me in the right direction, that would be great :):)

    Thanks and hope to hear from you guys soon,
    Mike S.
     
  2. bart_the_13th

    bart_the_13th

    Joined:
    Jan 16, 2012
    Posts:
    485
    I think I've managed to fake that with projector in my some of my old projects
     
  3. Zicandar

    Zicandar

    Joined:
    Feb 10, 2014
    Posts:
    388
    I would suggest a mesh for the water "surface", and then simply move the mesh depending on how "full" the mug is supposed to be.
    As to how to place the particle effect, it's a round opening on the mug, and you can convert that to world space, then simply place the particle system at the bottom of that?