# 运算节点¶

## 范例¶

### 自定义Z深度通道节点设置¶

“使用最小值”功能是依据靠近摄影机的像素将Z深度值选择出来；也可以选择矩形部分的平面Z深度值。背景有个初始的Z深度值，值限定为1.0（显示为白色）。在“使用最大值”范例中，矩形的Z深度值比图像平面要大，因此更靠近左侧，但是图像平面(FlyCam)渲染层Z值初始在右侧（对应于1.0），因此他们被选择。

### 使用正弦功能得到不断循环的变化数¶

This example has a Time node putting out a linear sequence from 0 to 1 over the course of 101 frames. The green vertical line in the curve widget shows that frame 25 is being put out, or a value of 0.25. That value is multiplied by 2 × pi and converted to 1.0 by the Sine function, since we all know that $$sin(2 × pi/ 4) = sin(pi/ 2) = +1.0$$. Since the sine function can put out values between (-1.0 to 1.0), the Map Value node scales that to 0.0 to 1.0 by taking the input (-1 to 1), adding 1 (making 0 to 2), and multiplying the result by one-half (thus scaling the output between 0 to 1). The default Color Ramp converts those values to a grayscale. Thus, medium gray corresponds to a 0.0 output by the sine, black to -1.0, and white to 1.0. As you can see, $$sin(pi/ 2) = 1.0$$. Like having your own visual color calculator! Animating this node setup provides a smooth cyclic sequence through the range of grays.

## 理论¶

Note

### 总结¶

JPGPNG 图像格式依据颜色位深(比如： JPG 是 24位颜色位深)存储每个颜色值，但是生成图像体积非常小的原因是依据 JPEG 压缩算法减少颜色位深和量化颜色范围。