Page 1 of 2

fluid dynamic simulation latte art

PostPosted: Sun Sep 06, 2009 7:33 pm
by EspressoSquirrel
in an effort to use 3d graphics for good instead of the usual 'evil' purposes I do from day to day. I thought I would spend some time on a truly useless project i have been wanting to try out for a while. Trying to simulate latte art within the 3d software Maya.

I used to be able to pour an ok rosetta but recently as i have been drinking more espresso straight, i have fallen into a habit of pouring onions...
So this was also a way of working out exactly what i need to do to pour a rosetta again.
It actually did help, because once i had set it all up, the sim was doing onions and hearts and it took a while for me to get it, but the result is this

http://www.platformzero.com/coffee/dynamicCoffee1.mov

its not pretty, but the basics are roughly there, I can easily make it more realistic, but this is the most descriptive ideal simulation i did
I am going to play around and see if i can get a full set of patterns, as i've always found it very difficult to work out how you go about doing more complex patterns.

This is a 2D fluid simulation, so it can't fully simulate milk below the surface.

yes yes i know... it would be a lot quicker to make a coffee...

RE: fluid dynamic simulation latte art

PostPosted: Sun Sep 06, 2009 7:44 pm
by Hugo
Jeeeez... that's awesome. I see the imminent arrival of a latte art pouring robot!

RE: fluid dynamic simulation latte art

PostPosted: Sun Sep 06, 2009 7:46 pm
by bruceb
I just get a Quicktime error "?"

Edit: It worked the second time I loaded it. Probably just my rubbish satellite connection.

Anyway, it's beautiful. I wish I could do that...I mean pour the rosette, not the simulation. Thanks. I'll be looking forward to more of this!

RE: fluid dynamic simulation latte art

PostPosted: Sun Sep 06, 2009 8:10 pm
by charmon
Your milks too hot

RE: fluid dynamic simulation latte art

PostPosted: Sun Sep 06, 2009 10:50 pm
by CakeBoy
That is excellent ES :D

RE: fluid dynamic simulation latte art

PostPosted: Mon Sep 07, 2009 6:58 am
by Jaanus
Mesmerizing, watching it over and over again... Good work!!

PostPosted: Mon Sep 07, 2009 7:52 am
by GreenBean
Very, very impressive. 8) 8)

Re: fluid dynamic simulation latte art

PostPosted: Mon Sep 07, 2009 7:57 am
by GMRK
EspressoSquirrel wrote:in an effort to use 3d graphics for good instead of the usual 'evil' purposes I do from day to day.


What is it that you do from day to day with Maya that is so evil or can you not reveal that???

I'm a Maya user, mainly for videogames, but not evil ones:)

Re: fluid dynamic simulation latte art

PostPosted: Mon Sep 07, 2009 9:36 am
by bruceb
GMRK wrote:
EspressoSquirrel wrote:What is it that you do from day to day with Maya that is so evil or can you not reveal that???


See the Squirrel's post toward the end of this thread. :twisted:

Re: fluid dynamic simulation latte art

PostPosted: Mon Sep 07, 2009 10:09 am
by Gadders
EspressoSquirrel wrote:in an effort to use 3d graphics for good instead of the usual 'evil' purposes I do from day to day. I thought I would spend some time on a truly useless project i have been wanting to try out for a while. Trying to simulate latte art within the 3d software Maya.

I used to be able to pour an ok rosetta but recently as i have been drinking more espresso straight, i have fallen into a habit of pouring onions...
So this was also a way of working out exactly what i need to do to pour a rosetta again.
It actually did help, because once i had set it all up, the sim was doing onions and hearts and it took a while for me to get it, but the result is this

http://www.platformzero.com/coffee/dynamicCoffee1.mov

its not pretty, but the basics are roughly there, I can easily make it more realistic, but this is the most descriptive ideal simulation i did
I am going to play around and see if i can get a full set of patterns, as i've always found it very difficult to work out how you go about doing more complex patterns.

This is a 2D fluid simulation, so it can't fully simulate milk below the surface.

yes yes i know... it would be a lot quicker to make a coffee...


This is quality, could you explain a bit more about how it works?

Phil :)

Re: fluid dynamic simulation latte art

PostPosted: Tue Sep 08, 2009 8:10 pm
by EspressoSquirrel
Gadders wrote:This is quality, could you explain a bit more about how it works?

Phil :)


its a simulation using Maya's 2D fluid solver, the 3D fluid solver is ironically not really up to the job of doing fluids funnily enough only gas. Fluid dynamics isn't my field of expertise, this is fairly simple to do with maya, you just specify a density, viscosity, friction etc. and in this case brown colour. Then you can add emitters to add milk which emits density and colour along with a velocity field. (If that sounds very complex to people not familiar with 3D software, its not, its just lots of buttons that are hidden away in the vast array of features they try and cram in. After that you just animate the position of the milk emitter. The most complex thing i did in this whole thing was write an expression to get a nice sine curve for the oscillating motion.

Its quite easy to do lots of variations of frequency and amplitude, i only posted the nicest one, i hope to do a few more, including tulips and double rosettas etc. but it tends to make my laptop heat up like crazy and my flat is boiling hot already tonight...

i did get a fluids expert at work once to try out a much more advanced fluid sim in 3D, it looked like it would work very well, the milk was sucking in the coffee and then returning to the surface which doesn't happen in my sim, but he didn't really get what you needed to do to get a pattern going and eventually said he had to stop and do some 'real' work.
:roll:

EDIT: ah Gadders i remember now, don't you do some fluid dynamics for engineering, its probably not as realistic as you are used to, its a grid based navier stokes solver (might mean more to you than me)

RE: Re: fluid dynamic simulation latte art

PostPosted: Thu Sep 10, 2009 1:54 pm
by Gadders
Ahh treat, yea did some fairly basic(ish) fluid dynamics last year, think i should have paid a little more attention in lectures however! 8)

PostPosted: Fri Sep 18, 2009 10:12 am
by dr.chris
I am whats laughably called a CFD expert but for whatever reason cant seem to see the video...

PostPosted: Fri Sep 18, 2009 9:19 pm
by CakeBoy
Have you got Quicktime?

PostPosted: Sat Sep 19, 2009 3:22 am
by dr.chris
Yes but it returns an error saying something about quicktime cant do it - 'quicktime is missing software and its not on the server'

All I get is the control bar at the bottom of the animation