How to superimpose a region-rendered image into another image?

I need to re-render some frames of an animation sequence due to update of some static objects in a scene.
I want to reduce the rendering time by rendering only the affected region. It can be done by using enable “Render Region” in “Scene” tab.

How can I superimpose the new (region-rendered image) and old images (whole image) so that only the newly rendered region cover the old image and do it in a batch way?

Can “ImageMagic” handle image superposition?

Isn’t it possible to mount it on the video sequencer? if it is an animation and you put those parts in a superior layer, souldn’t it work?

Thank you for your suggestion.

I am not sure whether it can be done via video sequencer or not because I seldom used this function.

The source file of the original video is a series of 8-bit RGB PNG image files. If using your method of putting the required objects to a superior layer, the corresponding shadow on the original image are still visible. Will it result in slightly overlapping shadows?

Sadly, I am not sure. Just trying to see.

Would this node setup in the compositor achieve the desired effect?

Probably it will work, but did you render the region images cropping them, or they have the same background size?

If they have the same dimensions you don’t need the translation node.

I only tried to superimpose two images of different dimensions.

Oh, ok. But if you render both images with the same dimensions that will not be necessary. I did not suggest to use the compositor because you will need to do it to each frame you rendered. If your animation is too big it will be a lot of work.

You can read in image sequences and videos in the compositor, though.

1 Like

Still need to process each frame. I thought about the video sequencer because since you can work with chroma keys there, I thought it would be easier to deal with animations but anything that does the job is a good solution.

The camera is moving and hence the (x, y) translation values has to be changed for each frame. It is impossible for me to know the exact values of (x, y) values for each frame.

I have tried using the “Render region” and marked a larger region to account for the camera movement. Then saved the images in 8-bit RBGA png

Then use ImageMagick’s "convert . . . -composite . . . " command to merge the two images together. It worked but when I viewed the composite image in ACDSee, it seems to have shifted a row of pixels.