在上一篇文章(渲染基础知识)中我们学习了“环境照明”+”环境吸收“的方式对物体进行打光的操作,这种方式操作简单,渲染速度快,但还是不够真实,如果想要得到更完美的效果,需要使用全局光照(Global Illumination,简称GI)。
全局光照开启前三维软件仅会计算阴暗面以及光亮面,而开启后将会计算光的反射、折射等各种光效,因此更真实,但也更消耗资源。
以下是一种常用的设置方法,先熟悉这种设置过程,需要其它效果时可查询相关资料进行探索。
依然是以之前建模好的鼠标进行操作,将界面调节为两个窗口(Panel-Arrangement-2 Views Side-by-side)
:

在渲染设置中打开GI:

渲染器选择Physical物理渲染器,其中GI的General设置中,主算法选择Quasi-Monte Carlo(QMC),第二算法选Light Maping,并在Light Mapping界面选择Build Radiosity Maps和Prefilter,Interpolation Method选择Nearest,如下图:


这些算法的原理可以参考这篇文章并查阅相关资料,初学者可以先跟着操作走一遍再去弄明白每一步的作用,现在明白这两种算法结合能使光线照在物体上的结果更真实,渲染结果更接近实际物体即可。
由于打开了全局光照,需要关闭默认灯光,在渲染设置的options中取消勾选:

加一个灯光后尝试渲染:

发现由于打开了全局光照,渲染会变慢,这种从中心开始到边缘的渲染不方便观察,可以将采样器(sampler)改成渐进式渲染(progressive),使整体慢慢变得清晰:

添加一个天空:


想要让天空变亮,需要给天空加一个材质,这个材质只打开发光通道,因为天空是包围了整个模型的,所以发光的天空就能模拟实际的充满光线的环境:

为主灯光开启阴影,渲染后结果如下:

上方结果太亮,可以通过调节材质球的颜色、亮度来对天空的颜色、亮度进行调节,例如:




将主光源换为一个区域光,就能模拟摄影棚中的柔光箱,获得更多的效果,可自行探索。
如何将模型置于更真实的环境?可以为天空的材质贴图加上一个HDR贴图,所谓HDR贴图,是一个记录了环境光线分布情况的文件,去下载一张,载入到发光通道,即可将这种贴图中的发光情况引入模型环境:

这样我们的模型就像是进入了这个拍摄的hdr贴图所处的环境:

渲染后发现这样的打光效果更丰富:

如果对hdr贴图的光线效果不满意,比如想要修改色温,将色温修改为更低(偏蓝),可以对贴图进行滤镜处理(贴图就是一张图片,可以像ps一样对其进行修改):

进入filter后,像可以修改其亮度、色相、对比度等参数:

以下是降低亮度和饱和度的渲染结果:

网友评论