Home Technical Talk

Pass with an Overlap?

I'll try to explain this as simply as I can.

If I render a scene with a sphere, a plane and an overlapping block, I get the render attached (see All In One Pass). I'm having trouble rendering out exactly the same thing in three passes; Pass 1: sphere, Pass 2: Block, Pass 3: Plane.

Here's how I do it:

- Sphere Pass: I uncheck 'Visible to Camera' for the plane and I apply a M/S/R material to the block. This results in the red block not being present in the reflections???

- Block Pass: I uncheck 'Visible To Camera' for both the block and the plane.

- Plane Pass: I uncheck 'Visible To Camera' for both the block and the sphere.

It's the sphere pass with an overlapping object that is problematic. By applying a M/S/R material I lose the object's reflection but I don't know how to get a render of the sphere, without the overlapped part, otherwise. This is for a more complicated animation so I need to know a proper method of doing this.

All In One Pass:
4639383481_bd31f0d33b_o.jpg
Sphere Pass (missing the reflection of red block):
4639992520_f607916d97_o.jpg
Block Pass:
4639383777_f809b5db73_o.jpg
Plane Pass:
4639383835_043acc522d_o.jpg

Replies

  • Mark Dygert
    I don't have time to dig into and actually do an example, but I'm pretty sure you can get this done with the matte shadow material. At the bare min it could give you a mask that you use to knock out parts of the sphere.
  • Slum
    Offline / Send Message
    Slum polycounter lvl 18
    If you just want separate masks, render them together along with a Material ID pass, which will have unique colors per object, so you can easily key out certain parts. Render that material ID pass at 2x your target resolution with no AA so you can get clean keys.
  • Playdo
    @Vig: As mentioned, by using the matte shadow material, you remove that part of the sphere but you lose the reflected material of the block, as it's been replaced with the M/S/R material.

    @Slum: I don't understand what you mean about material ID passes here? The block and sphere pass would have alpha masks rendered out with them. But to mask out that near corner of the sphere, if I use the block's alpha it will mask out the far side of the sphere too.

    I could remove part of the mask in comp but this wouldn't work well in a complex animation. I guess I could render the sphere again with the block set to 'invisible from camera', then use the alpha from the first sphere to mask out the new one. It just seems like a very complicated way of doing something that must be a common issue in the industry.

    If anyone can do it, please show. I'm interested in knowing what you meant Slum.
  • aniceto
    Offline / Send Message
    aniceto polycounter lvl 18
    just render the Mat ID pass for the whole scene so you can separate the sphere in comp
  • cryrid
    Offline / Send Message
    cryrid interpolator
    The trick isn't to hide them from the camera during render. I'm guessing you're using Max, so I can't be a direct help. But in Softimage I'd throw the other objects into a new pass partition (or a normal group even), and turn off the primary ray visibility. This prevents them from being directly rendered, but their secondary rays still live on (any contributions to reflections/final gathering/ao/etc). Looks for that equivilant.
  • bbob
    Either do a mat ID pass for masking, or use the matte shadow material for everything else than what you want to render, if you still want to have shadows and reflections for the non rendered objects on your render, that is..
  • Playdo
    @Aniceto & Slum: That coloured material ID pass is useful.

    @Cryrid: I'm not sure how to do that but I think it may be the answer to my next question.

    @Perma: Thanks a lot for the image. Yeah, I think I have an inbuilt thing not to read instruction sheets :)

    @Bbob: That's the prob I was having with the M/S/R material; as the M/S/R had replaced the original material I was not getting true reflections.

    The masks for the different object IDs are great. If I was to render out the whole scene, and separate it using these masks, then in comp I would have a load of 'whole scene' layers containing unnecessary masked info. This would mean much bigger file sizes. How can I render out objects separately along with their masks without losing their interaction with other objects?

    Edit: Ok, I think the way to do it is to render out the whole scene with object ID passes for masks and then render out the objects separately with the other objects set to 'invisible to camera'. (Cryrid I think it's the same thing). Is there a way to set all the other objects to 'invisible to camera' without having to do them separately? If anyone has a better way, please say.

    ps. What's up with Polycount, it keeps logging me out?
  • Playdo
    Hi Perna. What I'm trying to achieve is for an animation with many more objects than in this example. I want to have separate passes for all the objects and separate passes for the reflections, shadows etc.

    I'd achieve this result with the matte method given but it would also mean that for every object, the whole scene would be rendered and only one object would be masked out. Wouldn't this be overkill on large animations (file size)?

    Ps. that last question you asked, I want it occluded by other non-rendered objects.
  • Playdo
    I worded that incorrectly. I have one whole scene render of 15 objects. When I bring it into a compositing program (ie A.Effects), I'd have 15 layers per frame, each containing that render of the scene with a different object's mask attached. Does the masked out area not cause extra file size, slowing down A.Effects? But if there's no other option then it's irrelevent.

    Whenever I've seen comping videos in the past, I always thought that individual objects were rendered out on a plain background with their alpha.
  • Playdo
    Thanks for the info. I'm not sure what you mean by outputting a single channel rather than 4 and how I'd do it? What I'd have done is rendered out the main pass and added the matte passes in render elements, as you showed.
Sign In or Register to comment.