pass rendering[solved]

ok my problem is this:
i have static car, inside there are a moving character, i want to render the character and composite it inside the car which is a still how to achieve this render through passes :slight_smile:

thanks for any help in advance

Do you mean passes, as in diffuse, specular, shadow etc.? Or do you mean render layers? You have to be a bit more specific.

check this out :slight_smile:

Attachments


I see. Then we’re talking about Render Layers. Render Passes however, are separate elements from the combined pass, such as the ones I mentioned earlier - diffuse, specular and so on.

To achieve the result you’re looking for, you need to place each object in its own scene layer. In order to do that, select your car, press ‘M’ and click one of the gray buttons. Repeat the procedure (by holding down ‘Shift’) for the camera and the light(s).

Go to the Render menu and open the Layers panel. There you have a single layer called RenderLayer (which you can rename if you want). As you can see (looking at the dark gray buttons) it’s set to render all layers. Click on the first layer to include only the layer where the character is located. Create another render layer and select the scene layer where the car is located. Scroll down to the Output panel and select OpenEXR (it can store Z-depth), click to use RGBA and Zbuf. Finally scroll down to Post processing and select Compositing.

Open the Node editor and click Use nodes. Duplicate the current Render Layer node (or add a new one) and set their corresponding render layer from the drop-down list. Disconnect the Composite node and add two File output nodes. Connect the Render Layer nodes to each of them and set their format to OpenEXR. Set their folder paths (make sure it’s not the same folder) and set an appropriate frame length for the character node. The car node can be left at default.

When rendering is done, open the Node editor, add two Image nodes, and open the character and car frames. Add a Combine Z node, connect the Image nodes (both the ‘image’ and ‘Z’ pass) to it, and finally connect to the Composite node.

I believe I’ve covered it all. Just ask if something’s unclear.

thanks daccy, i know about render layers and passes too but this:

Add a Combine Z node, connect the Image nodes (both the ‘image’ and ‘Z’ pass) to it, and finally connect to the Composite node.
i didn’t know about and it is a good idea but it’s not working :frowning:

i attached a sample file with your steps, can you check if it’s ok??
the composition is in it on another scene

PS:i want to clear something (the car is a still and not animated)

Attachments

test.blend (751 KB)

I see what the problem is, but unfortunately I only have a partial solution for now. Apparently, transparent objects (especially raytraced ones) don’t work very well with Z-Depth, at least when used in conjunction with the combined pass. The current setup might work if you separate the renders into passes - Diffuse, Specular, Shadow, Refraction and Z-Depth (and Environment Lightning?), and then combine it. I haven’t tried it so I can’t say for sure it will work.

Something that did work was to set the glass to Z Transparency. Since you didn’t use the IOR-setting under Raytraced, the end result was pretty much the same. I also separated the glass mesh from the rest of the box and placed it in the same layer as the monkey. When rendered using that setup, it worked as intended. Also, I had to place the camera and the light in the second layer, because they were only covering the first.

I realize it’s a workaround, but that’s all I can offer for now. I’ll get back to this and figure out how to solve it.

I’ve never used it, but you can also use a mist pass in place of the depth pass, I believe it works with transparency.

@daccy & organic i’ll check that and report :slight_smile:

Correct me if I m wrong but i think it would be possible to achieve this like that
1 : render an image of the car, you can use yafa or lux and save it with a alpha support format (png etc)
2 : separate the glass mesh from the rest of the car and place it in the same layer as the character like Daccy said,
3 : render the animation of the character with only the glass (not the whole car)
4 : render an other animation of the car [edit] and the character as a mask layer (you will need to set all the material with alpha = 0, but don’t check Z transparency or ray transparency,
5 : Composite all using the mix node or the alpha over node.

@kala_ndo you’re right man, but here is the thing: the glass adds a big amount of render time (BTW step 3 is not needed ) you can composite it as an image with alpha, i’m rendering in vray addon so there is no render layers :frowning:

so anyway your way works but instead of using layers i need to mask the character with the car and it will be just mixing nodes.

on the other hand my friend has a tut about depth based composting in AE, so i saw it and tried to replicate the process in the blender compositor and it worked :slight_smile: and it is so simple too:

  1. subtract the zdepth, add a luma key to it
  2. mix the images and use the luma as fac parameter

PS: if you want to tune the penetration between layers use a color curve on the zdepth

Great that you managed to solve it!

Could you perhaps post a screenshot of the node set-up?

sorry for being late but the forum going insane, here is the node setup.

@kala_ndo: i found a way to mask the character with the car by using vray object id pass and that makes your way work too :slight_smile:

Attachments


Great thread.

One thing I found out early about “glass that you can see through” is that the best approach (IMHO…) is (a) to use nodes, and (b) to completely forget about “the real world.”

When you “realize that you are looking through a pane of glass,” well… “exactly how do you know?” There are basically two reasons:

  • You perceive the specular reflections of light coming off the glass.
  • You perceive a visual loss of detail caused either by the opacity of the glass, or the overpowering influence of the light that is being reflected into your eyes, or both.

And this calls for … a third (or fourth) layer of visual information, keyed off the location of the pane-of-glass plane in 3D space. The pane of glass does not exist in the rendering of either “the car” or “the passengers.” Instead, it is used (by itself) to generate information that is used to regulate specularity, opacity, and perhaps defocus.

The same “generate this to a separate MultiLayer/OpenEXR file” technique that was described earlier is once again used here.

This is one idea that I (still…) have to hammer into my brain: “You are not dealing with ‘reality’ here. You are making magic. Therefore, your aim is to (very cheaply and quickly, please) create something that plausibly looks like ‘reality.’ Nothing more or less.” Hence…

  • The pane of glass is not “actually there” … but only you 'n me know that …
  • The audience expects a pane of glass to be there, based on their advance knowledge of the real world (which we are now taking shameless advantage of …)
  • We are providing them with at least some of the reinforcing visual cues that they expect, and …
  • (Most importantly) We are providing them with no visual contra-indications.

Within those strict boundaries, you can get away with murder.

That’s great Bat3a !! And this node setting looks good. I’ll test it.
sundialsvc4, you seem to be a professional. And you’re right about forgetting “the real world”. It would be great if you can show us your works, articles or tutorials Thank in advance.

I need to do that …

Edit: I just posted a thread on “cheating a glass window-pane…”

There are limits, though, serious limits, to my “cheating.” I’ve gotten reasonably good at this more-or-less out of necessity, because I have never yet owned the computer system(s) of my dreams.

Another significant influence on me has been, hanging around with a bunch of professional magazine and catalog photographers. Doing so shows you first-hand just how much deliberate effort goes into a “natural looking” shot.

For example, Arizona Highways magazine once featured a centerfold shot of the lobby of a historic hotel … “sunlight streaming through the windows” and all of that … and I happen to know that the shot was taken at two o’clock in the morning on a new-moon night. Absolutely nothing in the lighting of that magnificent photograph was “what it appeared to be.” Even though they walked out of there carrying only boxes of as-yet undeveloped sheet film, they knew they “had the shot,” with no need for digital alteration, and of course they did. There is that much planning going on, quite routinely. Carry whatever they need carrying, shaddup, listen, and watch. Avoid letting the bottom of your jaw hit the floor more often than necessary…

a bit off topic but sundialsvc4’s story captured my interest.
I was wondering whether this picture can be seen/found somewhere on the net.

I have looked online but haven’t seen it. The thing is, you cannot tell that there is anything at all the slightest bit unusual about the picture. I’m pretty sure that a lot of the interiors were shot in exactly this way.

It’s amazing to look at some of the photos by folks like Ansel Adams or O. Winston Link (the famous steam-engine driveby photographer…), but when you subsequently read the textbooks that these people left us about how they did it, and what pure-math they put into it (knowing that they would “only get one shot at this”), it will completely blow you away.

If you are ever in Tucson, AZ, do not miss the Center for Creative Photography (CCP), which is both a museum, and an archive, and a mecca of photographic education.