Does anyone know of an addon that can set a unique resolution for each camera?

Hey there. My workflow entails taking a lot of still images from different cameras, where each camera has a different resolution, and sometimes I have to go back and forth between the different cameras so I’m constantly adjusting the resolution. I know it’s not that hard, but doing it 30 times an hour can get very frustrating.

Does anyone know of an addon that has the feature of setting a different resolution for each camera?

Thank you in advance for any help/advice!

Is this something where you could use the timeline and keyframe ?

1 Like

Resolution is not keyframable.

1 Like

There might be addons that already do this, but it probably only requires a few lines of Python to do something like:

First name each camera something like frontshot_1280_720, planshot_1920_1080, etc. and then have a little Python script that does:

For each camera in the scene:
   If the camera is enabled:
    Set it to be the active camera
    Extract the resolution values out of the camera name.
    Set the render resolution.
    Set any other per-render differences, like maybe set the output filename to the first part of the camera name.
    Render the frame.

There may be way better ways of associating the resolution with the camera. Embedding them in the name is a cheesy simple idea. You could do some user channels or use any other channel as a source for the rendering parms you want to use. The above does not require animating the selection of the active camera or anything else complex, and you could do other things like embed the frame number you want into the name and then have your Python position the timeline to the appropriate frame, etc.

1 Like

That’s pretty much exactly what I’m looking for, Zoot. Unfortunately, I have no experience with Python.

Try the Photographer Addon…
$$ but real cheap for what it does!!

1 Like

Hello @Xayzer. Im new to blender along with python scripting (but have dabbled with other scripting languages and programing languages); based on @Zoot suggestion i put this together.

Ive only done a little testing on a small scene (just the default cube and three camers) so i have no idea how scalable this “add-on” is, but here you go.

Disclaimer: if your computer starts to dance around and do odd stuff, sorry, your using this at your own risk :slight_smile:

Like suggested, name your camers with a suffix of (hyphen res) -1920x1080 and during render (f12) the script will change the resolution based on the name.

Example: CameraOne-1920x1080
the render resolution will be 1920x1080

the render resolution will be 3840x2160

The add-on only works with still images, not animations.
You can use the timeline and set markers for changing cameras, but again, this add-on only works for still images and not animations. What ever active camera is set will effect the rendered resolution.

If this is what your looking for (and it works for your needs), any feed back is welcome and then ill probably start a new thread for it.

Post back any questions… have fun.


Thank you so very much, Joe! I really appreciate you taking the time to do this!

I tested out the script in 2.82 and 2.9, but unfortunately, I couldn’t get it to work. I ticked the “Change Res Based on Camera” box in the Output Properties, and I added “-3840x2160” at the end of the camera name, but after hitting “Render”, the image always comes out at the default setting (1920x1080). I’ve attached the scene I did the test on in case I’m doing something wrong.

Camera Test Scene.blend (679.1 KB)

Ok, when i get home (6-7 hours from now, im at work) ill see whats going on. It was tested on 2.81, ill check on 2.82 and… this is a good reason for me to download 2.9 :wink:

Will post back with update.

1 Like

Ohh… In the mean time, if you want, you can try and open the System Console and see if any error message prints out when rendering.

1 Like

Oh, yes, I forgot about checking the Console. I copied and pasted the error message from the Console in a .txt file (attached).

I downloaded Blender 2.81 to test the addon in there as well, but I get the same result.

Console Paste.txt (1.2 KB)

Thanks, thats gonna be helpful.

Being new to blender python, thjs will take alittle research but will look into it more when I get home.

Hope i can reproduce the error.

“AttributeError: ‘_RestrictContext’ object has no attribute ‘scene’”

1 Like

Ok, found this and will try and fix when i get home.

If you want the following should would if you feel like it.

1 Go to the addons folder and copy the to desktop (where ever).

2 Remove the addon and restart Blender.

3 Go to the scripts tab and create a new script file.

4 Copy the contents of the file and then hit Run Script (towards the right of creating new file) button.

And it should work after that.

1 Like

Really, thank you very much for taking the time on this Joe! I followed your instructions and it does indeed work now (on 2.9 too).

A quick question - is it possible to set the resolution to change not only when hitting f12 (Render Image), but also when hitting Numpad 0 (Active Camera)?

Your welcome, will try amd get it working properly as an “addon” later today.

Not sure about the Num 0 will have to look onto it.

So when you activate a camera, you want the render size in the output panel to change ?

1 Like

Yes, it would be amazing if when I activate a camera (so that I’m looking through it in the viewport) the resolution changes as well (which will make the “highlighted” square that shows the boundary of the camera when you are looking through it change dimensions too as it is based on the resolution). The reason being is that, in my workflow, I need to match images from a different 3D program with the renders I make in Blender. If I can do that straight from the viewport, based on the “highlighted” square of the camera, it would be incredibly useful.

Either way, the addon is incredibly useful as it is, so thank you once again :slight_smile:

Think i understand, need to have blender in front me to really grasp. Will post back later when i get home.

1 Like

Lets see how this works…
When i first tested this yesterday i was only installing the script file i was working on and never tested the .zip downloaded form the github, hence was not getting that AttributeError: ‘_RestrictContext’ object has no attribute ‘scene’ issue. This time its fully tested from the github (learned alot, thanks for the challange) and its working and can be installed like a normal add-on.

I could not figure out a way to make the resolution change by just hitting Numpad 0 (Active Camera), but i added a button which will do it and also added a keymap to that button (default Ctrl-NUM_0) which can be changed in Blenders keymap settings (search for “Camera Resolution Render Changer”). As of now the keymapping only works in Object Mode, will have to look into it more to have it work in other places.

So here it is, hope its working correctly.
Learned alot from this little thing, thanks for that.

1 Like

Hi there, this is possible with Shot Manager :slight_smile: It works on a per shot basis, each shot can be assigned a camera, resolution , frame range, even render engine…

1 Like

Joe, this is absolutely PERFECT! When I made this thread I thought that, best case scenario, I’d find something that sorta, kinda, almost works the way I need it to. But what you’ve made is exactly what I need and it removes one of the most annoying aspects of my workflow. I can’t thank you enough man, seriously!

1 Like