Need advice on compositing 2 renders with an alpha...


#1

The main reason for resorting to do 2 passes is because the original environmental conditions are suitable to everything but one element, reason why I need to render that element a second time with different settings.
I know I could isolate this element (which happens to be between the camera and the rest of the scene elements) using an alpha ( a Zmask maybe? ), I just don’t know exactly how. I saw the Zmask Rendering page from the Blender docs, but it doesn’t seem to be quite what I need. As I don’t need to create the illusion of an obj being in front of another (the grass in front of the cube), but rather through compositing, get only my special element to be seen without the rest of the scene, so that I can use the rest of the scene from the second pass.
I hope this was clear enough.
Thank you in advance guys :slight_smile:

JDL


#2

I made a test file.
I have already made 2 renders:

  1. rendered with Blender,
  2. rendered the blue cylinder with YafaRay.

Below you can see 3 inputs:
top: cyl mask, a render layer, (a copy of the blue cyl in its own layer)
middle: image 1, an image input
bottom: image 2, an image input

Obviously this is not working for me :frowning:
Clearly I’m too rookie in compositing matters still
Can anyone please enlighten me?

Should you feel like having a go to the file.

JDL


#3

Just a few points here…

[ul]
[li] Make sure that each image that you are compositing has an Alpha channel, and that the file-format which you are using actually preserves it. You need to be sure that you have clicked the RGBA button, and that you are using a file-format such as OpenEXR i[/i] or TGA, not JPG! [] Z-depth information is not, strictly speaking, an isolation technique: it is, just as the name implies, a representation of three-dimensional depth which can be applied two-dimensionally. [] Alpha is a true mask. Be mindful of the [i]Premul/i option and be certain that you understand well how to consistently use it. (“Google it…”) If you’re getting “shadowy lines” around the edges of your comps, read this bullet-point again.
[/li][/ul]

I freely admit that your example is not “clear enough.” I quite honestly have no idea exactly what it is that you are trying to do. Perhaps if you simply explain, in ordinary plain words (not blender-speak…) what you have, and what you are attempting to do with it…


#4

http://www.pasteall.org/blend/2494

I’ve ‘fixed’ it trough the use of Object Indexes and the ID Mask,
I suggest you seriously read up on this/those as it/they are very useful when compositing. :slight_smile:

http://wiki.blender.org/index.php/Doc:Manual/Composite_Nodes/Types/Convertor#ID_Mask_Node
http://www.blender.org/development/release-logs/blender-243/composite-uv-map-displace-id-mask-and-z-combine/


#5

This is great! Thank you so much to both of you for your replies, sundialsvc4, and fktt :slight_smile:

Just so everyone can benefit from all replies, here’s another one from rawpigeon from BlenderArtists.org:

"Swap the two image inputs around.

In case you’re interested, here’s a .blend file that used Z-Combine to mix your two images. This should work even if your cylinder is occluded by one of the spheres. For demonstration purposes I changed it to generate the image of the spheres at render time, instead of using a saved image. Other changes: 2 render layers used (Background = spheres, backdrop and lights, Foreground = cylinder), full sample antialiasing used to remove compositing artifacts."


#6

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.