PDA

View Full Version : Water in Blender, Wine in Yafray (fluid warning!)



inktvlek
01-Oct-05, 05:20
Inspired by this thread (http://www.elysiun.com/forum/viewtopic.php?t=51050), I started fiddling with the fluid simulator.

I wanted to pour wine from a bottle into a glass.
At first I encountered problems because the fluid would not get past the bottleneck (how symbolic :)), but then I spoke to N_T on IRC and he discovered it was a bug. A few days later that was resolved, and I could start baking properly.

Because (even at high resolutions) the fluids can't really stay within thin-walled obstacles, I decided to work with thicker dummies for the simulation and the render with the actual objects >> which turned out to work fine. One problem with that was that when I decided it would be fun to let the fluid flow until the glass ran over, I stumbled upon this problem: that would not give the proper results (when the water runs over the edges). When I tried to bake at the maximum resolution of 200, it still leaked through the glass and the bottle. I'll have to wait until N_T enables for even higher resolutions I guess!!!

Anyway, here's the resulting animations. I can't decide whether I like the Blender Internal render or the YafRay one. You can't really compare because the BI render looked horrible when the wine (which is water now) had any color but white. Caustics on the yafray one are a bit too strong.

http://www.student.io.tudelft.nl/io1144677/blender/still-frame-12-yafray.pnghttp://www.student.io.tudelft.nl/io1144677/blender/still-frame-12.png

YafRay rendered simulation (http://www.student.io.tudelft.nl/io1144677/blender/schenkyafray.avi)
Blender Internal rendered simulation (http://www.student.io.tudelft.nl/io1144677/blender/schenk.avi)

And the stats:
Simulation bake: 3 hours at fluid resolution 150, for 100 frames (4 secs, 0.40m size in the fluid tab)
Blender Internal rendertime: 4 1/2 hours at 50% PAL resolution (75 frames)
YafRay rendertime: 12 1/2 hours at 50% PAL resolution (100 frames)

Post-pro (motion blur) & compressed (Xvid) in VirtualDub 1.6.10

If anyone is interested in the .blend, tell me, I'll post a link to it. JUST ASK!

osxrules
01-Oct-05, 05:47
Oddly, I think the Blender one looks more realistic than the yafray one.

I thought the animation looked pretty good but with some better lighting and glass material, it could look real.

If you wanted, you could reflect an environment in the glass and maybe fix the dribble that comes out the end of the bottle.

I know the render times are a pain though. But if you render overnight, it shouldn't matter.

inktvlek
01-Oct-05, 07:27
Oddly, I think the Blender one looks more realistic than the yafray one.

I agree that the water does look more realistic, but a colored fluid definately doesn't look realistic at all like this in blender, because of the colored shadows (whereas you would rather expect a caustic spot)


I thought the animation looked pretty good but with some better lighting and glass material, it could look real.
I experimented a bit with an environment, but in the end I decided it does look better in a studio setup like this, with just a reflecting whitecard. An environment in this case doesn't add a lot to the scene.


If you wanted, you could reflect an environment in the glass and maybe fix the dribble that comes out the end of the bottle.
I really do like the dribble! That's what makes it more interesting to look at and a bit more realistic aswell IMHO.

thanks for your comments!

MassTA
01-Oct-05, 08:02
Simulation bake: 3 hours at fluid resolution 150, for 100 frames (4 secs, 0.40m size in the fluid tab)
1 hour of baking for 1 second of movie? Calculating an hour would take half a year. I doubt anyone is THAT patient. :P

DanBoghean
01-Oct-05, 08:15
That looks great!

I do agree that it takes WAY too long to bake that. Hopefully they'll find a way to speed it up.

MrMuscly
01-Oct-05, 08:31
Neeat!

I'd definetly want to take a look at the blend file of that one, if I may.

*Fires up blender again - "Must .. improve ... now" *

toontje
01-Oct-05, 08:51
Very nice! I had the same problem with the bottle too. I tought I was doing something wrong. I was too embarassed too ask if I was doin g something wrong, or weather it was a bug. Glad to see it is resolved :)

afrosk8er88
01-Oct-05, 09:12
Very nice! I had the same problem with the bottle too. I tought I was doing something wrong. I was too embarassed too ask if I was doin g something wrong, or weather it was a bug. Glad to see it is resolved :)

same thing here. I wanted to make water splashing into a container, but it would hit the top like it hit an invisible plane. i hated that. i hope that was the same bug, because, if so, I'm back in business.

and i also think the blender render looks more realistic then the yaf.

still, very good work, inktvlek. you get two eProps.

PandaChamp
01-Oct-05, 12:30
Nice glass texture you got there man :)

DwarvenFury
01-Oct-05, 13:03
I'd like to see the .blend, if it isn't too much trouble.:D Thanks.

DwarvenFury

_Aorus_
01-Oct-05, 16:34
Very nice. Now all we need is interactions between two fluids :D i.e. gasses and liquids to make bubbles.

Starter
01-Oct-05, 16:35
Very nice! May I get a link to this "fluid simulator" you speak of?

Alistair
01-Oct-05, 18:09
The fuid simulator is part of the test builds. The specific ones can be found here (Windows) (http://www.blender3d.org/forum/viewtopic.php?t=6915&sid=8ce8d8ac8bb84b3bdf35b79b0fe273cc) and here (OSX) (http://www.blender3d.org/forum/viewtopic.php?t=6857&sid=8ce8d8ac8bb84b3bdf35b79b0fe273cc).

toontje
01-Oct-05, 19:49
As long we are talking about bugs in the fluid simulator....
It seems that this fluid simulator is the light version of the real simulator. When I looked at all the on NT's (www.ntoken.com) website, you can see some pretty complex simulations, like bubbles and such.

So it suprises me somewhat that Blender's fluidsolver has bugs and that it hasn't advanced features.


I've seen Zer03D demo for a particle based fluid simulation. It looks very nice in the sense that the fluid flows nicely obeying all the laws of physics in a complex container. This stuff is for Smoothed Hydrodynamics Particles (SHP).

inktvlek
02-Oct-05, 03:43
As long we are talking about bugs in the fluid simulator....
It seems that this fluid simulator is the light version of the real simulator. When I looked at all the on NT's (www.ntoken.com) website, you can see some pretty complex simulations, like bubbles and such.

So it suprises me somewhat that Blender's fluidsolver has bugs and that it hasn't advanced features.


I've seen Zer03D demo for a particle based fluid simulation. It looks very nice in the sense that the fluid flows nicely obeying all the laws of physics in a complex container. This stuff is for Smoothed Hydrodynamics Particles (SHP).
About the advanced features (which I think is just bubbles): these are in his master thesis code, but to implement them into the blender fluid simulator library is a different thing. It is not just drag'n drop :)

Zer03D = delt0r perhaps? His particle fluid system (http://delt0r.blogspot.com/2005/08/blender-fluid-dynamics.html) is far from finished. He'll have something like floating bodies though, which is cool I think! From what I read, it works with java, so I'm not too sure about it's speed!

But floating bodies, animated obstacles and predefined turbulance are definately on my want-list!

btw: .blend is coming. I found out I did not save the yafray settings, so you guys need to fiddle with this yourself!

inktvlek
02-Oct-05, 06:10
I optimised my YafRay settings a bit (or rather re-did them because they were lost), decided for red wine instead of white wine and made the bottle green (like it should be for red wine). I rendered in 00:04:17.42 at full PAL resolution, so that's quite acceptable for an animation even (the last yafray renders took about 6-7 for a frame and they were even at 50% (=1/4)).

http://www.student.io.tudelft.nl/io1144677/blender/rodewijngroenefles.png

and the .blend (http://www.student.io.tudelft.nl/io1144677/blender/bottle%20%26%20glass.zip)
this zip contains 2 .blend files, one with yafray settings, and one for blender's internal renderer. You need to re-bake the simulation, the fluid files are way too big to share... If you want to bake just the first 20 frames for example, make sure you also lower the simulation time in the fluid tab proportionally(I need to talk N_T into making this update automatically according to animation range & fps)

Falgor
02-Oct-05, 09:35
HAA! That is awesome! :P
Blender is supercool!

garphik
02-Oct-05, 13:34
nice work man,
but in the recent yafray render, the wine and bottle should cast shadows with their respective colour in it. You may want to check the caustics.

all in all pretty nice work :D

monofoso
02-Oct-05, 20:05
I dont know if this is ment to be happening or if it was a bug but, i love the way the fluid seems to stick to to glass of the bottle at the rim and a very small amount of wine goes backwards and missed the glass like it does in real life the fluid is acting with the proper surface tension.

inktvlek
03-Oct-05, 02:48
I made another animation! I'm not quite pleased with it; the camera movement is too fast and I forgot to make the wine-label non-reflective. Also, somehow the wine looks too solid in most frames (if you look at them individually it's not as bad). The caustics deserve a higher photonrate (which would have made the caustics a bit more defined), but I could not afford that for an animation :o)
I think this was my last try with this project, rendertimes are high but it was a fun thing!

This last animation was rendered in 9 1/2 hours (about 5:42/frame on average)
http://www.student.io.tudelft.nl/io1144677/blender/rodewijn-72.png (http://www.student.io.tudelft.nl/io1144677/blender/rodewijn.avi)

By the way, before you ask: Charissa is the name of my lovely girlfriend, and yes that is the yafray logo. I had a lot of fun making the label, even though you can't see most of it :o)

iindigo3d
04-Oct-05, 05:19
It looks awesome but one thing bugs me... It's either too thin or it pours out too fast - I can't really put my finger on it. Maybe increase the volume of the liquid? I dunno.

monofoso
04-Oct-05, 07:45
The whole thing seems to be moving too fast, but that doesnt change the fact that its amazing.

juanjavier
31-Oct-05, 04:17
The fuid simulator is part of the test builds. The specific ones can be found here (Windows) (http://www.blender3d.org/forum/viewtopic.php?t=6915&sid=8ce8d8ac8bb84b3bdf35b79b0fe273cc) and here (OSX) (http://www.blender3d.org/forum/viewtopic.php?t=6857&sid=8ce8d8ac8bb84b3bdf35b79b0fe273cc).

---Ooopss!!!! Is there any version for Linux? (just asking)

afrosk8er88
02-Dec-05, 23:13
inktvlek, i've got some probs i think you can help me with.

i'm still getting some major glitches and bugs in my fluid sims.

when i try to have the water falling into a concave surface (bowl, etc) it all stays on the top of the mesh, as if there's an invisible lid on top of it.

I d/led your blend, and i rebaked it, getting no problems. i then tried building my own container in your blend file and re-baked.

still the same problem. did you encounter this? if so, how did you fix this? am i doing something wrong?

rivenwanderer
03-Dec-05, 08:49
I haven't played with the fluid simulator--can it handle moving containers? I think that the animation would work much better with the bottle tipping to pour out the liquid...

rudji
07-Dec-05, 05:53
Hi,
i'm new :-|
someone can explain me what are thicker dummies used to bake fluid into bottle?...please...
I've tryed to do the same, but my fluid fall down through the bottle glass and not pass from bottle neck...

inktvlek, i've download your .blend file...WONDERFUL!!! how fluid can recognize bottle and glass if they are not obstacles....?!?!?

THANK U....
Andrea