包含20節(jié)視頻教程
關(guān)注11.8萬次
本系列是MAYA基礎(chǔ)建模教程,會員可以用零基礎(chǔ)學習MAYA的各種建模工具,制作出一個完整的火車模型,老師講解非常細致和耐心,讓會員輕松的學習MAYA建模,一步步變成MAYA建模高手,為之后的MAYA工作打好扎實的基礎(chǔ)。
朱峰社區(qū)在本節(jié)教程中完全地展示了如何創(chuàng)建卡通材質(zhì)(cartoon shader)的實際工作步驟,我們使用ramp節(jié)點,以及其他的幾種工具節(jié)點,對blinn材質(zhì)進行重新分布(remapping),最終,即能達到類似卡通效果的著色方式(shader)。
此外,本課的內(nèi)容能加深對連接編輯器(connection editor)和工具節(jié)點(utility nodes)、創(chuàng)建自制的著色網(wǎ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
在 hypershade 中應該如圖:
blinn 材質(zhì)節(jié)點用于描繪物體上的高光。因為ramp 可以將灰階值重新分布成連續(xù)的色彩,會使灰階 blinn 變成卡通效果。sampler info 節(jié)點獲取物體邊界的信息。
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(xiàn)在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é)點關(guān)系:
09第七步:
可以把 ramp1 調(diào)成你喜歡的色彩。卡通材質(zhì)通常把 ramp 顏色之間的interpolation 設為 none,這樣能產(chǎn)生較為均勻的邊線。下圖為 ramp1最終的外觀。
此外,也可以做一些額外的修改:
1.在surface shader1 屬性編輯器里調(diào)整line thickness 和 colorrgb,這兩個值分別控制邊線的粗細和顏色。
2.調(diào)節(jié) blinn1 參數(shù)能產(chǎn)生不同的高光。
3.甚至可以給 blinn1 添加一個凹凸貼圖,這種方法一般用于運動的小蟲。
4.也可用其他的材質(zhì)代替 blinn1 ,產(chǎn)生各式各樣高光。
總結(jié):
本課闡述了如何創(chuàng)建卡通材質(zhì),通過這一課的學習,掌握了創(chuàng)建卡通著色技術(shù),同時也對各種節(jié)點之間工作原理及建立復雜的著色網(wǎng)絡有了更加清楚地認識。
朱峰社區(qū)網(wǎng)頁版(手機掃描-分享-添加到屏幕)
朱峰社區(qū)微信公眾號(微信掃一掃-關(guān)注)
未知用戶
2005-2025 朱峰社區(qū) 版權(quán)所有 遼ICP備2021001865號-1
2005-2025 ZhuFeng Community All Rights Reserved
VIP