You are on page 1of 8

English Wikibooks has installed Flagged Revisions, which shows a stable version to anonymous users where possible.

You can choose to see newer versions if there are any; login to see the newest version all the time. Give feedback at Help talk:Article validation

aD

Blender 3D: Noob to Pro/Realistic Water using Fluid Sim and Yafray
From Wikibooks, the open-content textbooks collection < Blender 3D: Noob to Pro There are no reviewed revisions of this page, so it may not have been checked for quality. Jump to: navigation, search Next Page: BBB's Particles -- New 2.46 Particle System
Previous Page: Creating a Light Probe

[edit] Using the Fluid Simulator and Yafray to create realistic looking water
(This was written using Blender v2.43) This tutorial will (hopefully) successfully walk you through creating semi-realistic looking water using the Fluid Simulator in Blender, then rendering in Yafray.

[edit] Getting Started


When you first open blender there will be nothing but a blank cube. 1. Make sure you are in object mode, and scale the cube up to about 5. Do this by pressing S in the 3d view and holding ctrl, move your mouse until the numbers in the bottom left of the screen are 5. Or select the object and press S then 5.

1. Next, in the viewport shading box select wireframe. This lets you see through the cube.

1. We are now going to enable the cube for Fluid Simulation. With the cube still selected in object mode, press F7 (object button) and then press the "Physics Button".

1. You should see a tab labeled "Fluid Simulation" press Enable and then Domain. After pressing Domain several buttons will pop up, these will be used later.

1. Make sure you are in top view now, if not just press NUMPAD7. Next press space>Add>Mesh>Cylinder. 32 vertices is ok. 2. Now middle click and drag in the 3d view to see the cylinder inside your beautiful box. (yay!) What's going to happen is the cylinder is going to be turned into

liquid, and the big box is where the liquid can flow about. (it is the "invisible wall") 3. Move the cylinder to a corner of the cube, you can give it some height if you like. Now with the cylinder still selected press Shift-D to duplicate it. Move the new cylinder to the opposite corner.

1. On both of the cylinders go the fluid sim. tab and press Enable then Fluid. This tells blender that these cylinders are fluid. 2. IMPORTANT!!! After this, you MUST subsurf both of the cylinders, but don't apply it. Instead, when the cylinder shows a preview of the subsurf, click the "X" in the top-right of the subsurf preferences. 3. Switch to Object Mode then Right click on the big box (the domain) and press the big BAKE button. A little box will pop up and just click on the top option. 4. Now you should see a blob looking thing appear in the cylinders, and it will fall to the ground and splash around. Your computer is "baking" the liquid. (Calculating where it should go)

1. As you see now, the liquid isn't very realistic looking. If you do a render, you will see. You would also see that the cylinders are appearing in the image. This is not wanted, so with both of the cylinders selected, press M then click on one of the little boxes that isn't already pressed. This moves them to another layer. 2. Now we are going to move the camera to a different position for a better view. Move the viewport around until it's where you think will give you the best view and press SHIFT-NUM0 to make the camera match your current view. 3. Drag the newly placed camera back a bit, so the when NUMPAD0 is pressed most of the scene is in view. You should now have something that looks similar to this:

1. Now we are going to rebake the water at a higher resolution for a more detailed result. Select the goo looking mesh, (both blobs should turn purple if either is

2. 3. 4. 5. 6.

clicked) and go the fluid simulation tab again. Turn the resolution up to about 100 (or whatever you want) this rebakes the fluid for more detail. If you turn preview mesh up too, you will see it more detailed before rendering. Baking now may take a while. After it's done baking, you are ready to change the material of the water to something better looking. First change the renderer to YafRay. Press F10 then under the big Render button select YafRay. Make sure Yafray is installed first, the option still appears if you don't. Change the backround white by pressing F5 then click on the box that has world buttons appear when the cursor is hovered over it. You will see HoR, HoG, and HoB. Turn these all the way over to one. The preview should turn white. Now go to the material buttons (red sphere) and make everything look like the following: (I think I circled all the changed options, but maybe not.)

1. After this is completed look through the frames by pressing right arrow, find one that looks cool then press render and you may get something like this:

Hopefully you got something like that :) (that's all folks...) If the render does not look smooth, apply a subsurf.

[edit] Extra Practice


This YouTube tutorial on fluids might also help: Link and this Realistic Water Texture

User Question: When I click Bake there is no box that shows up, I cannot get it to bake my fluids at all, all it does is add a bunch of files to my hard drive and take a long time, What should I do? Answer: Be sure to set the directory that you would like the files to be saved to, the option to do so is in the area where you changed the box to a domain very bottom there is a folder. Chose a directory and all will be good. User question: When i click the bake button it says there can't be more then one domain object. I did everything you said to do but i don't understand why it says that. Answer: The only solution I have found around that is to go to the top header and where it says "SR:2-Model" change that to actor and select the different objects until you find something that doesn't highlight. Delete those. I found that occasionally a domain "disappears" and when you make a new one causes this problem. I have also found it better to set up the domain last around your scene to prevent this annoyance as well. Next Page: BBB's Particles -- New 2.46 Particle System
Previous Page: Creating a Light Probe

Retrieved from "http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Realistic_Water_using_Fluid_ Sim_and_Yafray"


Views

Module Discussion Edit this page History

Personal tools

Log in / create account

Navigation

Main Page Help Cookbook Wikijunior Browse Featured Books Recent changes Donations

Search

Random book

Go

Search

Community

Bulletin Board Community portal Reading room Help cleanup Policy discussions and votes Contact us

Create a book

Add wiki page Collections help

Toolbox

Search this book What links here Related changes Special pages Printable version Permanent link PDF version

This page was last modified on 10 December 2008, at 17:00. All text is available under the terms of the GNU Free Documentation License (see Copyrights for details). Wikibooks is a registered trademark of the Wikimedia Foundation, Inc. Privacy policy About Wikibooks Disclaimers

You might also like