1
$\begingroup$

Currently I'm trying to render my scenes by making use of subframes to save on rendertimes through rendering on multiple nodes.

But when I do this I'm having problems combining the chuncks from the Z pass. As you can see in the combined image below the Z pass does not show correctly. It seems to reset the nearest and farest point of each individual subframe.

How should I go about fixing this? I'm all out of ideas.
Any help would be greatly appreciated!

Combined Z pass chuncks:

enter image description here

Example of the python script I'm using:

cat >subframe.py <<EOF
import bpy
bpy.context.scene.render.border_min_x = $SF_MIN_X
bpy.context.scene.render.border_max_x = $SF_MAX_X
bpy.context.scene.render.border_min_y = $SF_MIN_Y
bpy.context.scene.render.border_max_y = $SF_MAX_Y
bpy.context.scene.render.use_border = True

def add_subframe_to_fo_path(scene):
    scene.node_tree.nodes['File Output'].base_path = '$OUTDIR'
    for file_slot in scene.node_tree.nodes['File Output'].file_slots:
        file_slot.path=file_slot.path + '_X-' + str($SF_MIN_X) + '-' + str($SF_MAX_X) + '-Y-' + str($SF_MIN_Y) + '-' + str($SF_MAX_Y)

bpy.app.handlers.render_pre.append(add_subframe_to_fo_path)
EOF
blender -b *.blend -P subframe.py -F PNG -o $OUTDIR/frame_######_X-$SF_MIN_X-$SF_MAX_X-Y-$SF_MIN_Y-$SF_MAX_Y -s $START -e $END -j $STEP -t 0 -a

Node setup:

enter image description here

Hardware/software specifications:

Blender version nr: 2.78a
Render engine: Cycles
OS: Linux Ubuntu

$\endgroup$
2
  • 2
    $\begingroup$ The first question is why are you normalizing? If you must normalize then normalize the combined image not parts with different ranges. Use the EXR fomat for saving your images so that you can keep the z values unaltered and linear. $\endgroup$
    – user1853
    Commented Apr 7, 2017 at 16:56
  • $\begingroup$ @cegaton I'm normalizing because I want to use the output image as a custom mist effect to overlay on my renderlayers. and also to use as a lens blur alpha in photoshop. Leaving out the normalize node seems to resolve the issue I'm having. But now however I'm not able to stitch the EXRs $\endgroup$
    – Delagone
    Commented Apr 10, 2017 at 11:41

1 Answer 1

1
$\begingroup$

Your Normalize Node is scaling the values so they range from minimum to maximum for each part individually. Leave it out and you should be fine. You could use a custom normalization scaling that is predefined and does not depend on the maximum and minimum of one subframe, or scale the Zpass of the whole image after merging.

$\endgroup$

You must log in to answer this question.

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