'Hiding' (Masking) rocks under a surface

Hi there,

A have a scene where a slightly modeled plane is being used as an emitter. It’s emitting simple rocky particles randomly selected, sized and rotated from a small group of simple rock models. The Emitter is hidden from the render - just the particles are rendering.

The rocks are being added onto a movie clip (there’s camera tracking involved). That’s not the problem. The problem is that the rocks are meant to be semi-submerged below the emitting plane, yet they appear to be transparently floating on top of it.

The emitting plane is not being rendered, as I mentioned. I’m looking for a way to use the plane, or a duplicate of the plane, to act as a mask, to mask out the parts of particles below the surface level.

Any tips, or pointers to video tutorials covering this would be gratefully appreciated :slight_smile:


If you are using BI: enable rendering of the plane, enable transparency in the plane material, set type to “mask” and alpha to 0.

If you are using Cycles: make a copy of the plane (we’ll need to so we can set the objects to reflect each other, but not the plane). Set the copy’s material to the “holdout” node, then go to the object tab, scroll down to the “ray visibility” rollout, and uncheck everything but “camera”.

Cycles alternate method: Enable the plane to render in the particle settings, then add a shader that mixes between the holdout and transparent shaders based on the “light path > use camera ray” socket. Upside of this method is that you don’t have to deal with a copy of the plane, and if your emitter happens to be high poly, you don’t have to load it twice. Downside is that it renders somewhat slower (unlike the copy method, it requires the shader to be run for non-camera rays). It’s up to you which method you find easier. Note that if you make the copied mask a linked copy (alt+D) and parent it to the emitter, it makes living with the copy a bit easier.

Ooh, sooo close J, thanks for your help! (And it’s a BI render; sorry for not clarifying.)

This gives me a rocks semi-submerged on a white plane. So technically the rocks are masked, but the background film clip doesn’t show through the whited-out floor. I do follow your reasoning… as much as making something visible in order to make it invisible goes… But for some reason the emitter-plane is now visible and white. I’ve tried altering the color of the emitter in Materials (even though it should have no effect) but it stays white.

I’ll keep on it.

Sorted. Just needed to add an Alpha Over at the right point and it all looks great- Well, good enough :slight_smile: