Shadows are essential for realistic image compositing. Physics-based shadow rendering methods require 3D geometries, which are not always available. Deep learning-based shadow synthesis methods learn a mapping from the light information to an object's shadow without explicitly modeling the shadow geometry. Still, they lack control and are prone to visual artifacts. We introduce pixel heigh, a novel geometry representation that encodes the correlations between objects, ground, and camera pose. The pixel height can be calculated from 3D geometries, manually annotated on 2D images, and can also be predicted from a single-view RGB image by a supervised approach. It can be used to calculate hard shadows in a 2D image based on the projective geometry, providing precise control of the shadows' direction and shape. Furthermore, we propose a data-driven soft shadow generator to apply softness to a hard shadow based on a softness input parameter. Qualitative and quantitative evaluations demonstrate that the proposed pixel height significantly improves the quality of the shadow generation while allowing for controllability.
翻译:以物理为基础的阴影转换方法需要 3D 的几何, 这些方法并不总是可用的 。 深学习的阴影合成方法在不明显模拟影子几何的情况下, 从光信息到对象的阴影中学习绘图, 但是它们缺乏控制, 容易被视觉文物所利用 。 我们引入像素 heig, 这是一种新颖的几何表达方式, 将天体、 地面和相机表面的相互关系编码起来。 像素高度可以从 3D 的几何计算出来, 在 2D 图像上手工加注, 也可以通过 监督的方法从 单视 RGB 图像中预测。 它可以用投影几度来计算 2D 图像中的硬影, 提供对阴影方向和形状的精确控制 。 此外, 我们提议一个数据驱动软影子生成器, 以软化的阴影在软化输入参数上应用软软化的阴影。 定性和定量评估显示, 提议的像素高度大大改善了阴影生成的质量, 同时允许控制性 。