这篇教程主要讲述了如何用分层渲染合成的方法来制作无闪烁且更高效的动画。
本日志参考Spot3D-Chaos Group门户网站教程转译,源网页地址:
由于本人经验及水平有限,转译可能有部分偏差。
XI58Cy*!
这种合成方法具有较高的实用性,在包含移动对象的场景使用分离渲染再合成的方法可以大大提高工作效率。
这种方法可以用于:3dsmax+vray下的包含较少部分移动对象的建筑动画和其它类似的情况下。
请注意,这篇教程的分层渲染是借助VR球形褪光 实现的,而非VR无光对象。 相比无光对象有它特殊的优势。 这种方式通过将运动物体和静止的场景分开,用穿行模式渲染背景,用逐帧渲染运动物体。这种方式极大的提高了对于包含运动物体的渲染效率。
请注意,这种方式可能看起来比较繁琐,但是它是无损失的,常规的很多分层方法都会造成影子发虚等损失,这种方式则不会,虽然它看起来要麻烦一点,但是仍然是高效且有意义的。
请注意,它的合成方法是基于图形通道混合运算,节点后期软件支持这些运算,如fusion、nuke,AE则不支持。
-----------------------------------------------------------------------------------------------------------------------------------------------------------
General 概述
Jw)-6WJ!uO In this tutorial we will render an animation with moving objects and GI with V-Ray. The goal is to make the process as efficient as possible. We can always use a high-quality GI solution to render an animation without any special tricks, however this will typically take very long. We would like to optimize this process as much as possible. p-,(P+Np
在本教程中,我们将用VR渲染移动物体(场景中移动的参加渲染GI计算的对象,也就是不包含摄影机,辅助对象等等)的动画。我们的目标是使这一过程尽可能高效。我们可以使用高品质的GI解决方案、没有任何技巧的高参数来渲染高质量的动画(因为场景中包含移动的物体,你必须为每一帧渲染GI,静态场景的渲染方法使用于动画场景会出现黑斑),但是这通常要消耗很长的时间,我们希望尽可能的优化这个过程。 P_Ni
5s)
71!'k>]h
Typically, we have a small number of moving objects (i.e. a few characters) in some more complex environment. Our main optimization idea uses this fact: we can split the animation into a background part, and animation part. h$rk]UM/Q
通常情况下,在我们复杂的场景中只有少数的移动物体。我们的主要优化方案使用了这样一个办法:我们可以分离动画的背景部分和运动部分。 [V _\SQV0
muKCCWy#
Since the background does not move, we can render it using a walk-through animation method, for example as pointed out in this tutorial. Then we can render out the moving objects, and composite these for the final animation. 9Jj:d)E>o
由于背景是不动的,我们可以使用穿行动画的方案来渲染它。然后我们渲染移动物体。最后综合这些动画形成最终的结果。 2r>I,TNHl
.[8g6:> Compositing basics 合成基础知识 2L|)uCb Before we go into details on rendering the animation, we will cover some compositing basics. (|U|>@
在我们进入具体的内容之前,我们将介绍一些合成的基础知识。 J!@`tR-
"6zf-++%
Our task is this: given an object in a 3d scene, we would like to composite it over a given background, taking into account as many effects as possible (shadows, reflections, GI etc). ~#y( ]Xec2
我们的任务是这样的:在三维场景中的对象,我们想将它合成到指定的背景中,并且还要考虑到很多效果(阴影,反射,GI等)。 pA?2UZ
t'im\_$F
This is typically done with the help of two layers with the 3d object, which are then composited over the background. We will call one layer a mask layer, and it determines which parts of the background are altered by the 3d object, and which parts remain the same. The mask layer is multiplied by the background. We will call the second layer object layer, and it determines what color must be added to the masked background in order to get the final image. The object layer is added to the masked background. ^b@&O-&s
通常的做法是在几层图像的帮助下,通过在背景上合成来达到目的。我们将其中一层称为遮罩层,它决定背景中哪一部分是变化的三维对象,以及哪一部分是不变的。遮罩层复合到背景层。我们将二层称为对象层,它决定了哪些颜色被添加到复合背景上,以获得最终的图像。对象层被添加到复合背景层上。 '7(oCab"_
lz88//@gZ
So, in general, the compositing formula is this: Ab/KVB
所以,一般的合成公式是: atmTI`i
I4\
c+f9
final_image = background_layer * mask_layer + object_layer _ !H8j/b
最终图像=背景层*遮罩层+对象层 (*是倍增 +是添加 详细请参考图形通道布尔运算) F vae lB
(Q~(t Our background layer is given, and we don't have to worry about it. It may be a photograph, live footage, or a prerendered image. We must determine only the mask layer and the object layer. We will compute these using three separate renderings of the 3d object: lJ/{.uK 我们不必去考虑背景层。它可能是一张照片、现场录像或者预渲染的的图像。我们必须确定遮罩层和对象层。我们将为三维对象计算独立的渲染。 [y(AdZ0* )3A%Un#B - a render without the object; we will call this "pure" render;
- a render with the object, but with a perfectly black material applied to the object; we will call this "black" render;
- a render with the object with a normal material; we will call this "normal" render.
- 没有对象的渲染,我们称为“pure”渲染。
- 对象的渲染,但是应用纯黑色材质给对象,我们称为“black”渲染。
- 正常材质的对象渲染;我们称为“normal”渲染。
ruK,Z,3Q Given these three renders, we can compute the mask layer and the object layer in this way:
!:|[?M.` 由于这三次渲染,我们可以从中得到遮罩层和对象层: k*Vf2O3${ 2z615?2_U mask_layer = black / pure; (D
<o=Q object_layer = normal - black; ^#)M,.G^ 遮罩层=black/pure; >$dkA\&p