Hello everyone. In the making of a broader toolset addon, I stepped into this little feature that is often needed (as users coming from the other software that ends with “StudioMax” know… yeah, “Camera Correction Modifier” sort of…)
there was a perspective correction camera script, to correct tilt on tall buildings introduced by low camera angle or use of wide angle lenses, but not anymore, or at least i cant find it; someone can help either right a script or point me in the right direction, thanks.
but it looks like it’s hard to find a solution or a script: so I made one, and now I’m sharing it.
This little addon adds a panel in the camera properties. It just has a “Perspective correction” button that makes exactly what you think: the camera X Rotation and Y Shift are changed so that the horizon doesn’t move, but the vertical lines become straight, as often needed in architectural shooting.
Here it is:
Perspective_correction.py (2.7 KB)
Hope you find it useful, cheers!
cool thanx ! make a github for your scripts. maybe the addon ui would be better in the camera settings instead of sidepanel
You’re right. I prefer your solution too, so here is the update (see first post)
this is a great little Timesaver. Many thanks.
I have a Warning Message in the Console, how can I fix it?
Warning: 'PT_perspective_correction' does not contain '_PT_' with prefix and suffix
Oh that’s nothing too bad, just a warning about not respected naming convention in Blender coding.
Fixed and updated in 1st post
And by the way
how can I fix it?
I renamed that class
Many thanks lsscpp.
this is also good for cartoon backgrounds … often you dont wanna have the heavy 3 point perspective but just a 2 point perspective
Perfect working for version 3.1.1，so I guess it’s okay for 3.1.2 too.
So how does it know what angle it needs to correct?
Perhaps you should append it to the main camera panel vs using its own panel
Have you actually tested this with multiple angles? When I look at the code, it has one hardcoded value. I wonder if this works on different angles because it will use the same value on all
Ow i see now, it check the rotation angle and use this in the shift value. That’s clever!
that magic number, which i guess it’s arbitrarily hardcoded in Blender. No digging in the code, i swear: it was just a matter of trial and error.