4
$\begingroup$

Following on from this question `Can I use Cycles materials with Blender Internal? When following the instructions the solution worked fine but when i tried to apply it to multiple windows I came across this problem

enter image description here

(larger image here)

When I render the picture (F12) as you can see the glass has no effect on the first picture and the glass can be seen through the mesh of my wall. So I added an add node and I got the effect of the glass to show but no matter what I have tried to do I still cannot get the back windows to be hidden behind the mesh of the front wall. Is there a way to solve this.

$\endgroup$

2 Answers 2

5
$\begingroup$

The issue your having is masking. You have to have a mask of some sort to get the windows behind the rest of the building. I've come up with a (rather imperfect) solution, as long as you assign a different material to the inside of the building. Note that the following is assuming that you have completed the steps in "Can I use Cycles materials with Blender Internal?"

  1. In the outside building material for "scene", scroll down to options and set Pass Index to 1 (or 2 or whatever, as long as nothing else in the scene has the same pass number).pass index

  2. Create a second indoor material and assign it's pass index to something other than 2 (or leave it at the default 0).

  3. Go to your render layers and enable Material Index. enable material index in the render layers

  4. Rerender the scene and go to the compositor. You should now see a new plug output called IndexMA.

  5. Add an IDMask node, plug in IndexMA to IDValue and set Index to whatever value the outdoor material's index is (and check anti-aliasing).

  6. Add an Invert node and plug in the output of the IDMask node.

  7. Plug the output of the of the Invert node into the Fac of the Alpha over node. node setup

$\endgroup$
1
  • $\begingroup$ Thank you worked a treat but I have a question. If you are going to render a scene but have no intention of going onto the house could i insert 2 planes (making them transparent) and call them indoor material and out door material would it still have the same effect or would the transparancy cancel the effect out.:-) $\endgroup$
    – Lindsey
    Commented Jul 11, 2013 at 13:49
4
$\begingroup$

Z-Combine node

The Z-Combine node takes two images and two Z-value sets as input. It overlays the images using the provided Z values to detect which parts of one image are in front of the other. If both Z values are equal, it uses the top image. It puts out the combined image, with the combined Z-depth map, allowing you to thread multiple Z-combines together.

To use Add | Color | Z Combine or Shift+A,CZ and then connect up your render layers.

Minimal basic node setup using z-combine node.

For best results then using BI scenes you'll also want to enable Full Sample (found under Properties window > Render tab > Anti-Aliasing panel).

Full Sample

For every anti-aliasing sample, save the entire Render Layer results. This solves anti-aliasing issues with compositing.

$\endgroup$

You must log in to answer this question.

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