包含1節(jié)視頻教程
關注2.8萬次
maya在烘培方面最常使用的是海龜渲染器,它在gi渲染方面有獨特的優(yōu)勢,穩(wěn)定而且強大。
詳解maya卡通材質技術
在這一課里,完全地展示了如何創(chuàng)建卡通材質(cartoon shader)的實際工作步驟,我們使用ramp節(jié)點,以及其他的幾種工具節(jié)點,對blinn材質進行重新分布(remapping),最終,即能達到類似卡通效果的著色方式(shader)。
此外,本課的內容能加深對連接編輯器(connection editor)和工具節(jié)點(utility nodes)、創(chuàng)建自制的著色網絡(custom shading networks)的深層理解。
第一步:
在 hypershade 窗口里,選擇 create->create render node.. 分別創(chuàng)建下列節(jié)點:
material nodes:
blinn (no shading group) (無著色系)
surface shader (with shading group) (有著色系)
texture nodes:
ramp (no texture placement, normal) (無貼圖坐標)
utility nodes:
sampler info
clamp
condition
02第二步:
在 hypershade 窗口里,鼠標中鍵拖動blinn1節(jié)點至clamp1 節(jié)點上釋放,選 other… ,彈出連接編輯器(connection editor)窗口,
將左邊 blinn1 節(jié)點的 outcolor 與 clamp1 節(jié)點的 input 相連。
03接下來,讓clamp1 節(jié)點降低灰階值,使這些值小于等于1(<=1),同時會切斷所有灰階大于1(>1)的高光。(superwhite)。
開啟 clamp1 節(jié)點的屬性編輯器(attribute editor),將 max 左邊的輸入框設為1。這個輸入框代表紅色通道(中間=綠色,右邊=藍色),
由于灰色是r,b,g各相等值混合而成的,所以,在此只需要一個通道就可以了。 min 應設為0。
04第三步:
以上述方法,用連接編輯器,將 clamp1 節(jié)點的 output r 與 ramp1 節(jié)點的 v coord 相連。
05請確保 ramp1 節(jié)點的 type 為 v ramp,F在ramp1 的 color output實際上等于 input 的灰階值(0<= clamp1 color r output <=1)。
這種方法稱為重繪(remapping)。
06第四步:
將 ramp1 節(jié)點的 out color 與 condition1 節(jié)點的 color if true (color1) 相連。
將 sample info1 節(jié)點的 facing radio 與 condition1 節(jié)點的 first term 相連。
facing ratio 是表面上點面向攝影機的角度,如果這個點距離攝影機90度,facing ratio =0,
如果表面法線和攝影機射線之間角度是0,facing ratio=1。具體請查閱 maya在線手冊
第五步:
開啟 surface shader1 的屬性編輯器。選 add->add attributes… 添加下列屬性(float,scalar):
linethickness: min 0, max 1, default .2
liner
lineg
lineb
linethickness和顏色都屬于用戶可定(user-definable)的。
07第六步:
將 suerface shader1 節(jié)點的 linethickness 與 condition1 的 second term 相連。
suerface shader1 節(jié)點的 line r 與 condition1 的 color if false (color2 r) 相連。
suerface shader1 節(jié)點的 line g 與 condition1 的 color if false (color2 g) 相連。
suerface shader1 節(jié)點的 line b 與 condition1 的 color if false (color2 相連。
將 condition 的operation 設為 greater than。
08如果 facing ratio (condition1的第一個條件)小于 linethickness (第二條件),condition1 的output = color2 (surface shader1里
設置的linerg,否則 output = color1 (來自ramp1-blinn1 的顏色)。
將 condition1 節(jié)點的 out color 與 surface shader1 節(jié)點的 out color相連。
下圖是 hypershade 中的節(jié)點關系:
09第七步:
可以把 ramp1 調成你喜歡的色彩?ㄍú馁|通常把 ramp 顏色之間的 interpolation 設為 none,這樣能產生較為均勻的邊線。下圖為 ramp1
最終的外觀。
此外,也可以做一些額外的修改:
1.在surface shader1 屬性編輯器里調整line thickness 和 colorrgb,這兩個值分別控制邊線的粗細和顏色。
2.調節(jié) blinn1 參數能產生不同的高光。
3.甚至可以給 blinn1 添加一個凹凸貼圖,這種方法一般用于運動的小蟲。
4.也可用其他的材質代替 blinn1 ,產生各式各樣高光。
總結:
本課闡述了如何創(chuàng)建卡通材質,通過這一課的學習,掌握了創(chuàng)建卡通著色技術,同時也對各種節(jié)點之間工作原理及建立復雜的著色網絡有了更加清楚地認識。
朱峰社區(qū)網頁版(手機掃描-分享-添加到屏幕)
朱峰社區(qū)微信公眾號(微信掃一掃-關注)
未知用戶
未知用戶
贊0
踩0
16年3月10日
2005-2025 朱峰社區(qū) 版權所有 遼ICP備2021001865號-1
2005-2025 ZhuFeng Community All Rights Reserved
VIP