Convert render borders to Camera view

EDIT : go directly here for my add-on and forget about everything on this thread.

Is there a script or addon to convert the render borders to the actual camera view, which would adapt the focal lentgh, the XY Shift values and the resolution ?
I can’t find how to do it myself since when the aspect ratio passes 1/1, the frame expands/shrinks in the other direction. Or maybe you know the math to do ?

I found the math and made an Excel spreadsheet to automate the process !
You can download it here (works with LibreOffice too).

It works for any camera view and any render borders, no matter their aspect ratio.

Do a ctrl+B and drag a rectagle in the viewport and/or find the render borders values in the outliner, in Datablocks

http://i.stack.imgur.com/2z454.png

under “Scenes > Scene > Render Data > Render Data”

http://i.stack.imgur.com/16SIV.png

You can tweak those values and check the “Border” box above to see it in the viewport if it’s not checked already.

Be sure to have the dot as the decimal separator in Excel :
http://www.solveyourtech.com/change-decimal-separator-excel-2013/or in LibreOffice : right click, format cells, language : English (US)

I’m currently learning Python and writing an addon for Blender to make a “one button” solution.

And as a bonus here’s an addon I just discovered to display the render borders right in the properties panel and give more control over them :
Precise render border adjust

it is not working to me but a nice idea. Maybe the option to jump back in settings or saving renderpresets would be nice.
thanks !

(edit)

sorry… something was wrong with the download. It works ! :slight_smile: Thats cool!

Glad to hear it !

Now here’s my first addon : Camera Crop & Split v 0.1 Pre-Alpha (yeah, it’s really not advanced)
The “Crop” button works unless you repeat the process (which I’ll try to fix)
The “Split” button doesn’t do anything yet (actually it does the same as “Crop”) but in the future it should allow you to simply split the camera view in 4, 16, 32, 64, 128 or 256 by animating the Shift X/Y values each frame in time, which is pretty useful for exporting in renderfarms.
Oh and coding is so cool I wanna do this my whole life now

► New version ◄
This is version 0.2.1. Now the split button works. You can select the number of tiles and Tiling order and then click on “Split” and it will animate the shift X and Y values in order to split your camera over time.

Missing features :

  • You need to set the interpolation mode to “Constant” by yourself (no big deal but don’t forget it)
  • 32 and 128 tiles would be nice to have (but the math formulas with “powers of 2” tiles is very different from “powers of 4” tiles)
  • Being able to repeat the process (or combine cropping and splitting) would be also very useful.

I will work on that but don’t expect a new version in at least a bunch of weeks.

I redirect whoever fell here to this thread which is my official add-on thread.