2
$\begingroup$

Is there a way that i can have a plane set to not render anything beyond it?

What i am trying to do is create custom UI graphics for a java application. I find that blender produces some VERY nice looking UIs with very little effort (relatively speaking). I am getting stuck on making a switch though. My problem is that i need to make the switch disappear as it turns... for clarity here is a basic mesh of the type of switch i am going to use: enter image description here

When the button gets switched from on to off it will need to rotate. when the edge lowers i need it to stop anything below the shadow plane from being rendered. perhaps even have it cut off the actual mesh. Im hoping one of you could tell me if/how this can be done...

QUESTION Can a plane be made to exclude portions objects that it intersects with from rendering? can a plane be made to bisect any mesh that passes through it?

$\endgroup$
2
  • 2
    $\begingroup$ Using BI or Cycles for the render? $\endgroup$
    – DarenW
    Commented Mar 16, 2014 at 4:10
  • $\begingroup$ thank you all for your answers... i dont want to rate or confirm till i try the different answers and fully grasp them. still got a lot to learn about cycles =) $\endgroup$ Commented Mar 25, 2014 at 12:00

4 Answers 4

2
$\begingroup$

Cycles

For cycles you can use a Holdout shader:

enter image description here

Note that you must have Transparent enabled in Rendering > Film for the holdout shader to render as transparency, otherwise it will be black.

To prevent the plane from influencing the lighting casting a shadow, you can either use a node setup like this to disable shadows/indirect lighting for the material:

enter image description here

Or change the settings in Properties > Object > Ray visibility to disable shadows etc. per object.

enter image description here

Modifiers

You can also use a boolean modifier to actually remove the geometry below the plane:

enter image description here

$\endgroup$
4
$\begingroup$

For this I would use a render layer with a mask layer set up.

In the scene I have a plane that will act as a mask on layer 2 and the switch object to be masked on layer 1. When both layers are enabled it looks like this:

Solid View:

enter image description here

Wire view, shows some of the switch object is below the mask object:

enter image description here

In the 'Render Layers' tab of the 'Properties' area I have chosen the first layer to be the layer to render and the second layer to be the mask layer:

enter image description here

Which results in:

enter image description here

This works fine for the internal renderer but for Cycles one additional option is necessary in the 'Render' tab in the 'Properties' area:

enter image description here

$\endgroup$
3
$\begingroup$

A simple way to do this using Blender Render is to set the plane that will cut the other object to use a mask transparency with 0% alpha. You probably want this to be another plane to the one showing the dropshadow.

In the 3dview you have a plane cutting through the switch.

enter image description here

The plane material uses mask transparency.

enter image description here

When rendered you only see the switch visible above the plane.

enter image description here

$\endgroup$
1
$\begingroup$

From playing around a bit, I think this might be what you want. Make a plane to hide part of the object as you like. Give that plane this material in Cycles: Material to render nothing

The color is flat zero black. Whatever is beyond the plane isn't rendered at all, and there's no light bouncing around where you don't want. Note that the background is just black. Not the World color. World emits general light everwhere. I don't know if you want that or not.

An alternative: use only an emit shader and set it for solid red, or green, whatever, and use chroma key techniques to replace that color with alpha zero in the final render PNG. A Diffuse shader's appearance will depend on lighting, and catch shadow. Actually, Emit isn't ideal - it'll cast lighting onto your switch object. Tricks can be done with the Light Path node, but if it's getting to be that much effort, I'll just go with the black Transparent shader node.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .