Shop Mobile More Submit  Join Login
About Digital Art / Professional Premium Member ShalenFemale/United States Recent Activity
Deviant for 6 Years
13 Month Premium Membership
Statistics 841 Deviations 6,726 Comments 91,106 Pageviews

Newest Deviations

Favourites

Groups

Here is a YouTube video version!


Introduction


Blender has one of the few free fluid simulators out there, a rare treasure when such an add-on can cost thousands of dollars.  This tutorial explores working with it to add fluids to your DAZ Studio scenes.

This is a challenging area, and it is hard on your hardware.  Don't get into this unless you've got some time, you're willing to work in Blender, and you have at least an Intel quad core.  I have one of these in my work machine, and and it's still time-consuming running fluid sims.  AMD made an octo-core a while back.  It performs worse than an Intel quad.

You also need a good amount of system RAM, because the obj files that the fluid sim outputs are high-poly; even a small scene can have millions of polygons.  Iray can handle this just fine in render, better than 3Delight ever could; but to stop your DAZ Studio viewport from massively lagging with this much geometry in a scene, you need lots of RAM.  I have 64 gb and have not yet had issues.

With those important caveats, let's dive right in!  You can download Blender for free and use it commercially.


Setting Up And Exporting Your DAZ Studio Scene


You need to have setup finished for everything with which the fluid will collide - characters, clothes, pose, hair.  Cameras and lights can be finalized afterward, but if you decide to change anything else you would have to redo the sim.

If you want a character to have a "wet skin" effect in Iray, turn the Top Coat all the way up, the roughness far down, and the IOR to 1.33 on visible skin surfaces.

When you are certain you're ready, go to File--Export and choose wavefront/obj.  You can export anywhere as long as you remember where you put it.  I use DAZ Studio scale for fluid simulation because the Blender preset is broken and the Poser one I used to use is too small for Blender to work with in most sims.


Importing And Workup In Blender


Before you import the .obj to Blender, set up your 3D window to accept the larger object you're importing.  Press N to reveal a settings panel to the right of the 3D window.

Scroll down to the Display section, where you can find the Grid Floor settings.  I have mine set to Lines: 200, Scale: 5.00, and Subdivisions: 10.

There is probably a cube in the center of the scene if you're in Blender for the first time.  You can delete this now, or use it as the simulation domain later.  Right-click to select it and/or press A to select all/deselect all when you want to.  

You can also check your familiarity with the movement and manipulation controls before import here.  Move the view by holding down the mouse wheel; holding shift and mouse wheel lets you drag the view in one dimension.  Zoom in and out by scrolling the wheel.

When you've selected an object with right-click, grab it using the G key.  You can move it freely, or drag it on an axis by using G plus X, Y or Z.  Left-click to fix its final position; right-click releases it back to its original one.  Scaling is performed using S and an axis, S and drag, or S and typing a number (you can always type a number after activating movement to move or scale by specific units).

Those are the basics.  At the bottom of the screen is your timeline, which is for animation but will also be used to control the frames of your finished simulation.  It is currently at 1 to 250.  Set it to 1 to 100.

Now click on Blender's File -- Import -- Wavefront/obj.  In general, you want keep vertex order and poly groups checked, although that matters somewhat less with what we're doing now.  You can create a preset by hitting the plus sign above the settings.

Navigate to your exported obj and import it.

Now you may have too much geometry to reasonably be calculated with your sim, if you're using a big set.  You can right-click the fused obj and hit TAB to go into edit mode.  Use B to create a bounding box and left-click to drag it around the area that you want the simulation to include.  I wouldn't start with an ocean as your first project - a lot of machines can't actually handle a sim that large - or a shower, which is much more complicated than you think it will be.

When the desired geometry is selected, hit CTRL+I to invert selection, hit delete, and choose vertices.  All of the unwanted geometry should now be gone.  Tab back into object mode.


Setting Up The Sim


For the sim we need three objects: A sphere for the "inflow" (the source of the water), a cube for the "domain" (the boundary of the sim, also the water itself) and "obstacles" against which the fluid will collide.

First right-click to select your imported obj.  There is a panel on the right side of your 3D window that contains many buttons.  The one we're interested in is on the far right, and looks sort of like a check mark, or a stylized bouncing ball.  Click on that to show the Physics tab.

Now click the word Fluid.  A dropdown appears.  Choose Obstacle.

For the inflow, use the left panel's "Create" tab to add a UV Sphere.  Move and scale it to create the source of your water.  Remember that the smaller it is, the larger your resolution has to be and the longer your sim will take to calculate.  Don't start with multiple small spheres in your very first sim; save that for when you're more used to it.

When the sphere is in place, go to the Physics panel again and click on Fluid, then choose Inflow from the dropdown.  You can start out with no changes to this.  Just be aware that the "Inflow Velocity" options are used to make water travel more powerfully in one direction, and remember that Z is up in Blender (vs. Y being up in DAZ Studio).  You can also create an "outflow" sphere to "drain" water when it hits it, if you wish to create a bathtub or other contained sim; I won't be going into that in detail today.  THIS MUST FIT INSIDE THE DOMAIN AREA OR THE SIM WILL FAIL.

For the domain, either use the cube that came with Blender and use the aforementioned S to scale it up, or create one using the "create" tab on the left side of the screen.  Make sure the "floor" of the cube is at 0 on the axis.  You can check that by looking at that N panel in the main window that I mentioned before; at the top of it is a translation, rotation and scale section.

Right-click on the cube to select it when it is the right size, and go to the Physics panel again.  Hit Fluid.  This time choose Domain from the dropdown.  A large number of options appear.  The important ones for now are:

BAKE: Starts the sim calculation.

Resolution (Final): the final resolution of the sim.  200 is a decent "Preview."  Lower than that is unhelpful, because higher resolutions actually change the behavior of the liquid with regard to force and distance.  I've had to go as high as 900 for very small droplets.

Viewport Display: Set this to Final.

Time: This has a start and end time in seconds.  One second is 25 frames on the timeline, which is why I had you set it to 100 frames (to match the default 4 seconds).  If you're concerned about your system starting with 2 seconds and 50 frames is not bad either.

Below time is the Fluid World area.  Set Real World Size to a ballpark value for how big your cube domain should be compared to the objects it's colliding with - e.g., if it's around an entire room it might be four meters, if it's around a wine bottle it might be one.  I've had sims fail with anything bigger than four meters.

Choose the Viscosity Preset to the right of that.  I found the default Water still too thick at most resolutions, so I created a "water 2" with Base 0.250 and Exponent 10.  You can create presets by hitting the plus sign here, as elsewhere in Blender.


Running the Sim and Sim Failures


Now you're ready to hit Bake and wait!  If you're lucky, you'll see a tiny bar that says "Fluid Simulation" at the very top of your screen, in the gray bar to the right of the words "Blender Render" but to the left of the tiny orange Blender logo.  This will show your sim progress.  It can take hours to calculate a sim at resolution 800 or more.  I've gotten ones that were 500 done in under half an hour.

You can move the view and manipulate the scene while sim is running, but it will ruin your progress if you move objects currently being used in the sim.  You can also dial the sim back and forth using the timeline to check its progress.  It will remain a cube on any given frame if it's not done calculating that frame yet.  Use Z key to toggle wireframe on or off.

Remember that a sim at higher resolution can take five to ten minutes just to start (it will usually speed up at least a little after the first frame).  Even then, sometimes a sim will fail.  The Fluid Simulation bar will just never move, or it will move, but the cube will remain a cube instead of turning into a glob of moving fluid.  I haven't yet discovered what causes all sim failures in Blender, but some common causes for me appear to be:

-The Inflow object is outside the fluid domain.  It needs to be inside that cube.

-The domain is too large for your system to calculate the sim.  On my system I get failure on any domain larger than three meters.  I wouldn't try to render an ocean without a two-CPU mega-system, given my current results.

-The Inflow object (or objects) is too small for the resolution you set.  If you made the inflow as small as an eyeball but the resolution is 100, sim will usually fail.  The higher your set resolution, the smaller the inflows you can work with.

-The Obstacle objects are not fully inside the Domain.  Double-check the bottom level especially, and move the cube down a tiny bit if you need to.

-Random Blender freezes/crashes.  Save the scene even if it says fluid isn't done, crash to desktop with ctrl+alt+delete, and restart Blender to start the sim over.  I've had to fully restart my computer a couple of times when it was running hot from a full day's work, or even had to let it sit turned off all night and come back the next day when it had cooled off (including for the video tutorial scene).

Exporting the Finished Sim


When you've finally got a finished sim, you can move the timeline using the tiny arrows to left and right of the number "1" (and to the right of the 1 and 100 settings).  When you have a frame that you like, save your file first.  Then go to the Modifiers panel on the right-hand side of your screen.  Its icon looks like a little wrench.  Click "Apply" to make the sim permanent.

Now you can export using File--Export--Wavefront/Obj.  This is a highly triangulated, irregular geometry.  I would run it through Zbrush's Zremesher before using it for a commercial project (and indeed, I have done so a lot this week as I work on Rigged Water Iray).  Close Blender without saving again.  This way the saved version has your unapplied sim, so you can get a different frame later if needed.

Import to DAZ Studio using File--Import and navigating to your exported fluid obj.  Now you're ready to add a water shader (or other fluid shader) and render your scene!  I would love to see your fluid scenes in the comments if you manage to pull it off!
  • Mood: Joy
  • Listening to: Roar of the air conditioner
  • Reading: Antagony & Ecstasy
  • Watching: ashens YouTube channel
  • Playing: Morrowind, Minecraft
  • Eating: Sugar Free Fluffernutter (homemade marshmallow!)
  • Drinking: Cheap Diet Root Beer

deviantID

SickleYield
Shalen
Artist | Professional | Digital Art
United States
I'm a 3d modeler, texturer and rigger. I work with making conforming items, characters and props for the Genesis figures in DAZ Studio.

My DAZ store: www.daz3d.com/sickleyield

And at Renderosity: www.renderosity.com/mod/bcs/in…

Regrettably, I am no longer able to accept commissions for models. I just have too many projects going at any one time.
Interests

Comments


Add a Comment:
 
:iconcraigjohn:
CraigJohn Featured By Owner 4 days ago
I always love buying your products and now you have excellent iRay tutorials! Thank you very much!!!! :squee: :+devwatch:
Reply
:iconsickleyield:
SickleYield Featured By Owner 4 days ago  Professional Digital Artist
You're very welcome!  Thank you for the nice words. :)
Reply
:iconsgmarshall:
sgmarshall Featured By Owner Jul 24, 2015  Professional Digital Artist
I admire your your work and your knowledge. DAZ Sudio pro beta is interesting but I have some questions per your tutorials in iRay. Can we chat?
Reply
:iconsickleyield:
SickleYield Featured By Owner Jul 24, 2015  Professional Digital Artist
Please send a note.
Reply
:iconwinberry:
winberry Featured By Owner Jul 23, 2015  Professional General Artist
One last thing (if I might)-- and if this is not appropriate place to ask, my apologies, I won't do it again:

MY PROBLEM: I create a dress around a GEN2 figure in Hexagon 2.5
back in DAZ: I import the dress and it looks exactly like I had created.
HOWEVER, as soon as I fit it to GEN2 via Auto fit or Transfer Utility: it gets wide, as if something made it twice as big. The dress will move with the figure, but it is like twice the size of the figure.  I have tried various dresses (all created with a cylinder.

Any ideas?

thanks again (big fan :-)
Reply
:iconsickleyield:
SickleYield Featured By Owner Jul 23, 2015  Professional Digital Artist
I have no idea?  I've never worked with Hexagon.

Did you make it on the zeroed figure?  You can't really make clothes for a morphed character and have it look right rigging to the base.
Reply
:iconwinberry:
winberry Featured By Owner Jul 22, 2015  Professional General Artist
Not sure if you will get this, but:

I just bought your SickleDressRigGenesis2Female and was wondering if or how the Optional JCMS are now working (as I have been unable to do)

Thanks!
Reply
:iconsickleyield:
SickleYield Featured By Owner Jul 22, 2015  Professional Digital Artist
Hi!

The optional JCM are for when you bend the thighs.  Bend the thighs and then dial in the optional JCM.
Reply
:iconwinberry:
winberry Featured By Owner Jul 22, 2015  Professional General Artist
Thanks!..
Reply
:iconjwlovell:
jwlovell Featured By Owner Jul 19, 2015   Filmographer
Help! I'm lost - how do I use your new Beautiful Skins product? I'm trying to get an M4 model tuned for iRay.
Reply
Add a Comment: