Aug 18

There’s a few sneaky settings in Realflow that I thought I’d share that are fairly fundamental in getting stuff to look right and function right within Realflow. I’m no expert in Realflow, neither have I got in depth into any of the settings so this is a quick and sleazy guide on setting up some fountains, and/ or waterfalls and some general settings you might find useful.

As with all particle sims it will always be a compromise between quality, fidelity and simulation time. If you want a fast sim you’ll have to reduce the particle numbers, but it might look more blobby. However that blobbyness might be acceptable for a camera that is far away from it, so adjust accordingly depending on your time to wait, time to render and required quality.

This assumes you have Realflow and the Realflow importer/ exporter installed in Max.

Here is an example movie showing the final comp of the waterfalls to give you an idea. Not perfect by a long shot, but for a quick process it gets the idea across:

Realflow Tutorial from James Shaw on Vimeo.

 

IMPORTING/ EXPORTING FROM 3DSMAX

It’s a good idea to get this set up first, both for exporting and importing from Max to Realflow and back. I tend to make a stripped down version of the scene, just picking out the key elements that will be involved in the sim. So what is emitting the water, what’s containing it and where the kill zone is. So initially make a Realflow setup Max file and save a Realflow file which will automatically create all the folders you’ll need to save to in the following steps.

Blue= deflector surface
Red= kill zone
Pink= emittor
Orange= reference people for sizing

 

Select these objects and press the “SD file export settings” button. Select the following and export it to the realflow directory/ objects location and save as scene_objects. Click export. As long as you don’t change the naming in Max you can just re-export and import and it’ll just update in Realflow.

 

INITIAL REALFLOW SETUP

Go to import> import object and select that scene_objects.sd file you just created out of Max and setup as below. There are 2 setups shown below here but essentially you will need the following by right clicking on the LHS nodes area:

add> particle emittor> circle or object (if you have an object you want emitting). If it is object click on the emittor and under the “object” tab on RHS select the object you want  emitting.

add> daemon > k collision, k volume or k age. I usually put a box round everything to kill stray particles, or pick an object like a gutter that they are killed by or if it’s a free flowing fountain you can kill by the particle age. Depends on your setup. You may need to click under the settings of the k volume “k volume> inverse” depending on whether you want the particles killed inside or outside the volume.

– add> daemon > gravity. You can leave this on standard settings

– add> mesh > particle mesh (standard). This will mesh over the particles that are created.

Right click on all the particles and meshes and rename them something logical so in Max you know what they are.

 

SIMULATING

Click on the down arrow of the simulate. Change to your frame rate you are rendering, in our case 25fps. The max substeps is how many times it calculates the particle flow inbetween frames. Running this low means faster sim times, but running it too low means you get particles pinging off in random directions. Adjust and find the sweet spot for your scene.

 

REALFLOW SETTINGS

Particle Nodes
Click on the particles nodes and and change the following settings.

simulation active or inactive. Can be really useful to test individual particle systems before sending the whole lot to simulate. For example if you have multiple fountains, activate only one and get some sweet settings then turn the others on, otherwise you’ll be waiting a long time to get a result.

resolution. This is the spacing between the particles. The higher the number the more particles are packed in, but the longer it will take. Run the sim a few times to see where the sweet spot is.

distance threshold. The offset distance the particles will be from the emittor itself.

speed. The speed at which the particles are emitted from the icon or object.

randomness. How much the particles will emit in different, random directions.

 

Deflector objects
Any objects used as defecting objects from Max click on those and check the collision and distance thresholds. I set these pretty low as I want the particles to come right up to the surface and collide with them. If the collisions seem offset it’s here you change it.

 

Particle Meshs
You can right click and add all emittors, or have different particle meshes for different particles. In the waterfalls example I wanted the meshes to be created differently for each one, so created them individually. I also wanted to have them as separate meshes in Max, so I could copy, mirror and outset their animation. This means I only have to create one or two sims to use multiple times within Max; big time saver.

build. If you just want to see what the particles are doing initially turn the build to No, otherwise you’ll waste time if your particles aren’t quite right yet.

polygon size. Depends on your scene scale and distance to the camera. This is when it meshes over the particles how big each tesselated poly is. Just keep an eye on the poly count, as it’ll take longer to calculate, and longer to render in Max.

filters> relaxation. The higher this value the more the mesh will stretch between particles. Too high and it’ll stretch to nothing. Adjust in small increments to get the balance AFTER setting your polygon size.

– click on the emittor under the particle mesh and you have a blend factor and radius. This is a very fiddly function but important with the look of the mesh. The radiius is like a 2nd radius from the main one that the mesh can blend down to. The blend factor is how much it’ll blend into this radius. Adjust gently as this is very sensitive, and connected with the overall radius of the mesh, so if you adjust that, you’ll have to readjust this.

deformation. I find having speed stretching of the mesh is good and just put in a max scale of 2 so potentially it can stretch to twice the distance if the water is really moving.

 

IMPORT INTO 3DSMAX

Once the simulations have been done, or even in the process of being done, you can insert the particles and meshes into 3DSMax. Just click on the create tab> rolldown to Realflow and insert particleloader and meshloader. The 0,0 point in Max and Realflow will match exactly, but you can move the loaders to where ever you want within Max and they will just update with that offset.

These two loaders are basically loading out of the “meshes” and “particles” directories that Realflow automatically set up, so just browse to these locations and link them to the appropriately named particle or mesh.

On the mesh just browse to the BIN sequence and import. You can offset the start time if you want to offset the animation of the mesh, but make sure you use the same values for the particle offset as well.

On the particles select the particle BIN sequence and import. You have the same option for offset. Change the particle size to something logical for the foam, in this case 0.005m and variation. And change the type to standard sphere geometry.

 

 

RENDERING

I find a good way of making these renders convincingly is to apply a glass-like/ water material to the mesh. This is the water “volume”. Sometimes it’s good to put some fog in there as in the settings below. “Affect shadows” will mean the water won’t block the lighting and cause a black shadow underneath it. Checking this will add to your render time, but will look correct.

The foam material is a VRay light override. It has a standard grey material in the GI slot, so it doesn’t emit light, which would look weird. In the base material slot is a light material with a falloff as mask with a custom curve to get some variation across them. Exposure compensation ticked means it’ll always appear as it does in the material slot independent of the camera exposure (nice addition VRay 2.0!).

   

 

Now in order to really pull it off you MUST have some sort of motion blur. This can be done in post (something like Nuke’s furnace MB) or can be done with shutter speed on a VRay camera. If you want to know how to set this up check the post here: http://www.jamesshaw.co.nz/blog/?p=156 Outputting a mask of the particle and mesh will help post blur this more or less.

Done!

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to LinkedIn