|
Section4
这 3 个 locators 与 2 个 Distance Between 节点连接 .Distance Between 节点是用来计算聚光灯和另外两个 locator 的距离的 .
Distance Between 节点输出的是 3D 空间上两点间的距离 . 是通过下面的公式计算的 . 
(x1,y1,z1) 和 (x2,y2,z2) 分别是两个 locator 的坐标 .
注意 : 必须用 MEL 命令来创建 Distance Between 节点 , 输入 createNode distanceBetween; 命令 . 这个节点不会在 Hypershade 出现 . 你必须在 Outliner 中用鼠标中键把它拖到 Hypershade 中去 .

Section5
然后把聚光灯到两个 locator 的距离连接到 plusMinusAverage Utility 节点上 . 并将此节点设为 Subtract 方式 . 这是一个将聚光灯到两个 locator 的距离相减的工具 . 我们可以了解到两个距离之差 ( 注意这里是遵循矢量加减法则 )
这个距离上的差值将决定两个 Ramp texture 节点如何影响 dmap shadow 的 Filter Size 和 Shadow Color.
Section6
为了确定聚光灯到某个点的距离 , 必须使用 Light Info Utility 节点 . 和 Sampler Info 节点相似 ,Light Info 节点与其他节点连接时能提供某个被渲染点的信息 .
Light Info 与 Sampler Info 不同之处在于需要将一个灯光信息连接到 Light Info 上 . 你会注意到在渲染网络中 dmapSoftShadow 聚光灯的 worldMatrix[0] 属性连接到了 Light Info 节点的 worldMatrix 属性上 . 它告诉了 Light Info 从场景中的什么地方计算输出属性 Sample Distance.
Sample Distance 是从聚光灯中心到某个被渲染点的距离 .
注意 :Light Info 节点在确定 Sample Distance 时十分有用 .



上一页 [1] [2] [3] 下一页
|