MR的基础节点连接方法
作者:网友整理连接节点安卓手机版(益智连线手游) v0.10 免费版 51.64M / 简体中文
点击下载Mr成功免费版(Mr Success) v1.2.1 安卓版 28.17M / 简体中文
点击下载Mr成功v1.2.3 3.29M /
点击下载俺的理解(仅限于俺的理解,不能保证是不是正确的),MR集成在MAYA中,可以支持MAYA自身的大部分节点,6。5的好像还能正确渲染LAYER SHADER了,但LAYER SHADER材质网络不能使用MR的CUSTOM SHADER。试过。大部分的效果都可以用MAYA的自有SHADER来完成,比如折射/反射/BUMP/置换,但使用CUSTOM SHADER有个好处就是可以让MR在计算GI和焦散时速度快些而且效果更加精准。有些特效还得必须是MR的才行,这方面有体积焦散,3S效果,一些灯光效果。MR有一些基本属性并没有作为材质本身的属性集成,而是单独作为节点存在,比如它的SAMPLE COMPOSITING下的东东,折射/反射/透明/半透明/双面等,MR本身还具有很好的SUB功能,但对模型有要求有点高,渲染时再在全局框中设定一下可以得到一个很好的SUB效果。MR不 支持MAYA的HAIR,不支持PE,不支持硬件渲染型粒子。(HAIR可以渲染,但要用到另一个节点,而且速度暴慢)。
MR的材质网络中可以MR CUSTOM SHADER和MAYA自己的SHADER混用。好了,说了这么多,开始吧。这篇教程中只会说到MR的一些基本节点的使用,有MR的文件纹理连接和BUMP,非集成的反射和折射效果。并不会涉及到怎么调GI和焦散,FG等。这方面资料太多了。
随便创建一个场景,几个圆球就可以。然后开始我们的MR节点连接。打开超图,找到TEXTURES标签,点击MIB_TEXTURE_LOOKUP,它的参数很简单,然后在TEX后点击按钮,这时会创建一个MENTALRAY TEXTURE节点,这个节点的作用是可以指定贴图。它的参数也比较简单,比较重要的是FILTER,可以设定图片的过滤值还有WRITABLE可以指定图片的纵横像素比。接下来在IMAGE NAME后单击按钮指定一张贴图。这时基本的连接完成,创建一个mib_illum_lambert,这里因为要学反射节点所以用它。要不可以直接使用DGS的。把MIB_TEXTURE_LOOKUP与mib_illum_lambert的DIFFUSE连接,连接完所节点如图:
[page]
如果这里渲染,你得到的图将会是黑色一片,注意mib_illum_lambert的参数下有个MODO,这个是设置材质的光照模式,说明一下,0为接受所有灯光(ALL),1为接受灯光列表中的灯光(包括),2是排除模式(排除列表中的灯光)可以看看帮助文件。所以创建两个点光源,移动位置,并且要把它们连接到mib_illum_lambert的LIGHTS中,把MODO设为1,完成后材质如图:
再次渲染,可以看到光照是有了,但是有个问题,为什么指定的贴图无法显示出来呢?因为MR无法取得模型的贴图坐标,所以当然无法显示啦。俺表达能力有限,无法准确表达出来,反正可以理解就行了。接下来让MR取得MAYA的贴图坐标,打开超图,新建两个节点,如图:
[page]
这两个节点的作用比较重要,其中mib_texture_remap接受纹理顶点的缩放,旋转,变换,剪切,合并纹理,运算顺序为首先变换,然后重复,交替,环状和最后最小/最大剪切。结果被返回,简单理解就是和MAYA的二维贴图坐标差不多的。原文件帮助这是样的:
vector "mib_texture_remap" (
vector "input",
transform "transform",
vector "repeat",
boolean "alt_x",
boolean "alt_y",
boolean "alt_z",
boolean "torus_x",
boolean "torus_y",
boolean "torus_z",
vector "min",
vector "max")
input is a texture vector from a generator such as mib_texture_vector that returns texture vectors. input is overridden when this shader is called with a nonzero arg parameter in mi_call_shader_x. This is useful for remapping multiple texture coordinates when the remapping parameters are identical for all of them.
transform is a general transformation applied to the texture vector before the remaining parameters are applied. If transform[3][3] is 0.0, the matrix is ignored (normally transform[3][3] is 1.0).
repeat contains repetition factors in X, Y, and Z that the texture vector is multiplied with. A value of 2, for example, shrinks the texture such that it fits twice in the [0, 1) interval. Repeating has no effect outside this interval. After the multiplication by the repetition factor, the integer part is removed. This algorithm allows finite repetition in an interval determined by the transform parameter. A repetition value of 0 turns off repetition in the corresponding component, as if the value were 1.
alt_* specifies whether every other copy of the repetition would be reversed such that successive copies of the texture are traversed in alternate, back-and-forth directions. Alternate flags have an effect only if the corresponding repetition component is greater than 1, and also work only in the [0, 1) interval.
torus_* maps the texture space into the range [0, 1) such that values less than 0 and equal to or greater than 1 are put into this range by cutting off the integer part.
min and max implement image or volume cropping by specifying the range of the texture to be considered. Portions of the texture outside this range are trimmed off. If repetition is used, the max point of one copy joins the min point of the next copy (unless alternation is turned on). min is inclusive, max is exclusive. If a min component is equal to the corresponding max component, both are ignored.
参数意义相信熟悉MAYA操作的兄弟都能明白。mib_texture_vector的作用更重要,它是贴图坐标数据产生的基础。可以解释一下参数:纹理向量产生,输出值连接到SHADER,产生不同投影模式)
Return a texture vector derived from orthographic projections of the 3D point in space (XY, XZ, YZ), non-orthographic projections (spherical or cylindrical); or return a numbered texture vector from the texture vector list. Optionally, this shader can base its calculations on object, camera, world, or screen space.
从3D顶点空间返回正投影纹理顶点(XY,XZ,YZ),非正投影(球体或者圆柱)。或者从纹理列表返回纹理向量编号,这些SHADER能够计算物体,摄像机,世界或者屏幕空间坐标。
vector "mib_texture_vector" (
integer "select",
integer "selspace",
integer "vertex",
integer "project")
select specifies the value to look up, as described above.
selspace allows choosing the source space for projections, as described above. Space conversion is done before the projection specified by the select parameter. If selspace is 4 (screen space), select, vertex, and project are ignored.
vertex specifies the location of the vertex: 0 is the intersection point, and 1, 2, and 3 are the vertices of the intersected triangle. It has no effect if select is -10.
project specifies a projection that is performed after selection and space conversion. It has no effect if select is -10.
如果是要用MAYA的默认UV SET,记得参数保持默认啊,别乱输入其它数字,其实就是可以用它来指定不同的贴图坐标,比如屏幕空间,视图空间,摄像机空间或者正投影模式不过都得用数字代码来表示。这里发发牢骚,MR的这种数字模式有时候气死人,谁记得了这么多不同数字代表什么东东啊?用过RAT的兄弟就知道RAT的坐标处理多直观,S T .MAYA UV SET等一目了然。mib_texture_vector连接到mib_texture_remap的INPUT上,方式如图:
[page]
接下来把mib_texture_rema连接到mib_texture_lookup的COORD上。
整个材质网络连接完成后如图。
[page]
这时开渲染就会有效果的了,这里只是学MR的节点,因为文件贴图也可以直接使用MAYA的,还少了连来连去的麻烦。
这是BUMP的效果。
[page]
这个是LAMBER材质的反射效果,不是很明显,参数是默认的。
这是它的节点网。
加载全部内容