Fluid Refraction Rendering + Advanced Masking - Please Help!

Hey guys, I am trying to set up a pretty complicated scene, and I need your help! So basically I have a camera clip motion tracked, and I am trying to add in water to the scene - http://gyazo.com/15e7b98488b0d8204975d2b84ac29f78 . So far so good, but what I need help with is 1: The fluid partially passes in front of, and behind a wall in the clip, so I need a way to delete the fluid when it is behind a plane (or something similiar) and 2: To render the fluid with all the valid reflections and refractions, but without rendering the background or any other elements, so I can easily add in my fluid later :slight_smile: Thank you for reading this far, as I really know nothing about Blender. A reply would be GREATLY Appreciated, and if you need any more information, feel free to ask!


I am using the Cycles renderer, as it works better with fluid and stuff.

Please in the future use the support forums for support questions rather than not scrolling down on the page dumping your question in ‘Blender & CG Discussion’

I’d also suggest using a more appropriate thread title. ‘Please Help’ gives no indication to your problem and may cause other users to waste their time or not bothering to read it since you yourself couldn’t be bothered to use a useful title.

It takes less than 30 seconds to decide on a thread title and the correct place to post your thread. Use that time more wisely

Do you mean somthing like this?

Exactly, but I also need a way to occlude some of the water, so that it doesn’t show up behind the wall when I render - http://gyazo.com/ba86b14a61547b953e217ff8b6a54c06

You can create a mask for the original footage (and track it if need be) on the movie clip editor (press tab and you can enter mask mode). Draw the mask you need. Then add a mask node in the the compositor to mask the render layers.

hmm I know what you are saying, but the only problem is, if you look in some parts, there is fluid in front of AND behind the wall, so I don’t think a regular mask will turn out very good :confused: Is there any way to mask JUST what’s behind a plane or something? Other than that, how would I render out the fluid with reflections/ light without rendering out emitters and such? Thanks for your time :slight_smile:

The way to do this is to make a 3d model of that wall, texture it by “project from view” and put it on the shadow catcher layer. This way it wont show up in the render, it will mask the water behind the wall and you will get corretct refractions and reflections on the water in front of the wall. This is what i did. Those icospheres and water were rendered at the same time, the tree is modeled in 3d and textured.

Sorry I don’t know much about Blender: When you say ‘Shadow Catcher Layer’ what do you mean by that? And also how would I get my reflections/refractions correctly? Use Lamps? Thanks :slight_smile:

They’re called ‘mask layers’, you can find them under the render layers tab. So recreate the wall, put it on a separate layer, and enable that layer as a ‘mask layer’, disable it as a regular ‘layer’ to not render it and only render the water.

You also want to check ‘transparent’ under the render settings, ‘film’ section to create a transparent background.

If you want to match the lighting, you should create some sort of an environment around the water to reflect/refract off of. For example, recreating the room and cameraprojecting the footage on top of it. If there are (bright) lights in the scene, model them with emitting meshes or area lights with multiple importance sampling enabled.

Good luck with the shot :slight_smile:

Thanks for all the help guys! This is the final shot!!!


Nice :slight_smile: Short but sweet!