这是一个用于 Blender 的轻量级、高效率相机反求与透视匹配插件。它允许你直接在相机视口中对照着背景参考图,通过手动绘制 X、Y、Z 三个维度的透视消失线,来实时、自动地解算出相机的精准焦距、位置与旋转角度。
在 CameraMatch 侧边栏中点击最显眼的 Draw Reference Line (绘制参考线) 按钮,此时你会进入沉浸式的交互绘制模式(观察屏幕顶部的操作提示栏会改变):
左键点击并拖动,即可拉出一条透视参考线。左键拖拽 即可重新修改端点位置。(悬停在线段中间圆点上点击则可以激活该线段)X 键即可删除这条线。Esc 或是单击鼠标 右键 随时退出绘制模式。绘制透视线时,你需要告诉插件你这根线代表什么空间朝向。
1 (或小键盘 1):切换进入 X 轴向(红色,通常代表物体的宽度或左右深度)。2 (或小键盘 2):切换进入 Y 轴向(绿色,通常代表物体的另一侧深度)。3 (或小键盘 3):切换进入 Z 轴向(蓝色,通常代表垂直于地面的高度)。(建议:找准相片中的建筑、盒子等直角参照物,分别顺着它们的边缘画出 X、Y 和 Z 轴) *单点透视*:只绘制一个轴向的透视线段,当你需要物体时正确朝上的的时候,只推荐绘制Y轴(键盘2)绘制
Shift 键,鼠标的移动速度将被减弱,非常适合用来将线点完美贴合到背景图的像素边缘。X 键,可强制让线段保持绝对水平;按一次 Y 键,可让线段保持绝对垂直。(再次按下对应按键即可解除锁定)Ctrl + Z (Mac 为 Cmd + Z) 撤销上一步线段编辑。 也可以配合 Shift 进行重做。Alt + X 将瞬间清空当前相机的所有相关透视线以及全部解算偏移缓存,相当于对当前视角来一张完美的纯净“白纸”,在匹配陷入混乱想要重新开始时极其好用!在绘制面板的下方,你能看到一个 Horizon Constraint(地平线约束)模块。
当地平线被开启后,插件会根据你画出的 X 轴、Y 轴自动推测并展示出一条蓝色的天际线。
👉 拖拽地平线把手:
<br><br><br>
This is a lightweight and highly efficient plugin for camera reconstruction and perspective matching in Blender. It allows you to automatically and precisely solve the camera's focal length, location, and rotation in real-time by manually drawing X, Y, and Z vanishing lines directly within the camera viewport, using a background image as reference.
Make sure you have at least one camera tracking your scene. Navigate to Camera View (Numpad 0) and add your reference images via the Camera Properties -> Background Images panel.
Click the prominent Draw Reference Line button in the CameraMatch sidebar to enter the immersive interactive drawing mode:
Left Click and Drag in an empty area of the viewport to create a perspective reference line.Left Click and Drag to modify its position. (Clicking the middle dot of a line makes it active).X to delete that line.Esc or Right Click to exit drawing mode at any time.When drawing perspective lines, you must tell the plugin which spatial direction the line represents.
1 (or Numpad 1): Switch to the X Axis (Red, usually represents width or lateral depth).2 (or Numpad 2): Switch to the Y Axis (Green, usually represents the other side's depth).3 (or Numpad 3): Switch to the Z Axis (Blue, usually represents height perpendicular to the ground).(Tip: Find orthogonal references like buildings or boxes in the photo, and draw X, Y, and Z axes along their edges respectively.)
*Single-Point Perspective: Draw perspective lines for only one axis. When you need reconstructed objects to orient perfectly upright, it is strictly recommended to only draw the Y Axis (Key 2)*.
Shift while dragging an endpoint to decrease mouse movement speed. This is perfect for perfectly aligning points to pixel edges of the background image.X once to force the line to be absolutely horizontal; press Y once to force it to be absolutely vertical. (Press the key again to unlock).Ctrl + Z (Cmd + Z on Mac) to undo the last line edit. Use with Shift to redo.Alt + X to instantly clear all perspective lines and solve caches for the current camera. This provides a perfectly clean "blank slate" for the current view. It is extremely useful when your match becomes messy and you want to start over!Below the drawing panel, you will find the Horizon Constraint module.
When enabled, the plugin automatically infers and displays a blue horizon line based on your drawn X and Y axes.
👉 Drag the Horizon Handle:
If you are immersed in matching lines for one camera and suddenly switch to another camera in the Outliner—Don't worry! The plugin instantly detects the viewport change and automatically wipes all the messy history from the previous camera. You can immediately start drawing your new camera with zero errors or interruptions!
添加Linux支持. Add Linux support.
This extension does not require special permissions.
A very useful addon with easy controls and a clear interface!