简介

A material defines the artistic qualities of the substance that an object is made of.In its simplest form, you can use materials to show the substance an object is made of,or to "paint" the object with different colors. Usually,the substance is represented by its surface qualities (color, shininess, reflectance, etc.)but it can also exhibit more complicated effects such as transparency,diffraction and subsurface scattering. Typical materials might be brass, skin, glass, or linen.

../../../_images/render_blender-render_materials_introduction_demo.jpg各种基础材质(单材质,多材质(搭配),透明材质,顶点绘制)。

Blender基础材质(没有贴图)沿物体表面均匀分布(尽管每个面的各个像素由于灯光影响可能有些不同)。不过,物体的不同面可以使用不同的材质(见 多材质)。

在blender里面,材质可以关联(可选)贴图。贴图 描述 物质:例如 光亮的 黄铜, 脏的 玻璃或者 绣花的 亚麻布。 贴图 章节介绍如何为材质添加贴图。

材质如何发挥作用

在理解如何有效设计材质之前,你必须理解在blender的渲染器如何模拟灯光和表面的互相作用和如何设定材质去控制这些作用。你将从深入的了解渲染器中得到帮助。

Blender渲染的图像是场景在一个假想表面上的投影,该表面称作 视平面 。视平面类似于传统相机的胶片,或者人眼的视网膜,不同的是它接收模拟的光线而不是真实的光线。

要将一个场景渲染为图片,我们必须确定场景中到达视平面每一点的光线有哪些。最好的方法是沿通过视平面一点与焦点(相机位置)构成的直线反向追踪,直至该直线击中场景中的可渲染平面,这时就可以确定到达该点的光线了。

该表面的属性和光线的入射角度将决定有多少光线沿观察角度反射至视平面 (渲染器基本原理)

../../../_images/render_blender-render_materials_introduction_basic-principle.svg渲染器基本原理。

光线照射到一个表面的任一点后,会发生两种基础现象:散射和镜面反射。散射和镜面反射的区别主要在于入射角和反射角的关系。

渲染时,物体的着色(或上色)需考虑基色(被漫射和镜面反射现象改变)和光线强度。

使用内置的光线跟踪,会发生其它(更多高级的)现象。光线跟踪反射时,根据材质的反射强度(混合基础颜色和周围环境)和视角角度,被光线照射的表面上的点将会反射它周围环境的颜色。

另一方面,在光线跟踪折射时,根据材质的透明度(混合基础颜色和背景环境颜色连同它过滤掉的值)和材质本身的折射系数(扭曲视角),被光线照射的表面上的点将会返回背景环境的颜色。

Of course, shading of the object hit by a light ray will be about mixing all these phenomenaat the same time during the rendering. The appearance of the object, when rendered,depends on many interrelated settings:

  • 世界(环境颜色,光线传递,环境光遮蔽)
  • 灯光
  • 材质设置(包括环境色,自发光,和各选项卡内其他设置)
  • 贴图及其混合方法
  • 材质节点
  • 相机
  • 视角
  • 阻碍和透明度
  • 从其它不透明/透明物体投射来的阴影
  • 渲染设置
  • 物体尺寸(表面散射与物体尺寸有关系)
  • 物体形态(反射,菲涅尔效应)

使用材质

Tip

检查渲染

设计材质(和贴图和灯光)时,建议频繁检查使用选择的渲染器/着色器设置后场景的渲染效果。实际的效果可能与3D面板显示的贴图大有不同。

如上述,材质设定通常决定了物体表面属性。在blender中有多种设置材质的方法。通常来讲,这些方法相互之间并不兼容。你必须为场景中的每一个物体选定所使用的方法:

  • 首先,你可以在各材质面板设置 属性
  • 其次,可以使用 节点 ; 还可以使用节点编辑器的图形界面.
  • 最后,你可以使用各种特殊效果直接设置物体表面颜色。严格的说,这些并不是材质,不过这里还是提一下,因为这会影响物体的外观效果。这些效果包括 顶点绘制线框渲染体积渲染 ,和 光晕渲染 。The exact effect of Material settings can be affected by a number of system settings.First and foremost is the renderer used:Cycles and the Blender Renderer (aka Blender Internal or BI)require quite different illumination levels to achieve similar results,and even then the appearance of objects can be quite different.Also, the material properties settings can be affected by the texture method used(single-texture, multi-texture or GLSL). So it is recommended to always selectthe appropriate system settings before starting the design of materials.