想問問有關maya ramp shader和Lighting的問題?

有關 Lighting 及 Rendering 技巧討論

版主: h2o

想問問有關maya ramp shader和Lighting的問題?

文章俏女傭 » 4日 6月 2006年, 03:57

想問如何可以將ramp轉為可受Light color變化而作出改變?

因為是近似Toon Shader的關系?thx :(
我是一名俏女傭,人見人愛俏女傭
俏女傭
討論區新秀
討論區新秀
 
文章: 95
註冊時間: 31日 12月 2004年, 12:58
來自: 男主人房

Share On:

Share on Facebook Facebook Share on Twitter Twitter

Re: 想問問有關maya ramp shader和Lighting的問題?

文章stantang » 5日 6月 2006年, 00:28

俏女傭 寫:想問如何可以將ramp轉為可受Light color變化而作出改變?

因為是近似Toon Shader的關系?thx :(


you can use the SurfaceLuminance node to pass out the luminance data to the ramp...
頭像
stantang
討論區主持
討論區主持
 
文章: 1566
註冊時間: 8日 11月 2001年, 08:00
來自: Groom Lake

Re: 想問問有關maya ramp shader和Lighting的問題?

文章俏女傭 » 5日 6月 2006年, 22:57

stantang 寫:
俏女傭 寫:想問如何可以將ramp轉為可受Light color變化而作出改變?

因為是近似Toon Shader的關系?thx :(


you can use the SurfaceLuminance node to pass out the luminance data to the ramp...


thx!stantang兄,但這方法己經采用中,只適合intensity多少的變化,而不是顏色的變化! :mrgreen:
我是一名俏女傭,人見人愛俏女傭
俏女傭
討論區新秀
討論區新秀
 
文章: 95
註冊時間: 31日 12月 2004年, 12:58
來自: 男主人房

文章HammerChugoh » 6日 6月 2006年, 01:14

perhaps you want to tell us more about what do you mean by controlling by light color, basic idea is to extract the difference from your light color (e.g. saturation, how much red or blue)that you want to use as a controller then plug it as a input to V axis of the ramp, use it as a index on picking your ramp color.
Houdini, please do the magic.
www.cgwiki.jot.com
HammerChugoh
CGV討論區會員
CGV討論區會員
 
文章: 272
註冊時間: 27日 7月 2002年, 06:50
來自: La La land

文章俏女傭 » 6日 6月 2006年, 01:59

HammerChugoh 寫:perhaps you want to tell us more about what do you mean by controlling by light color, basic idea is to extract the difference from your light color (e.g. saturation, how much red or blue)that you want to use as a controller then plug it as a input to V axis of the ramp, use it as a index on picking your ramp color.


謝謝你的回應,問題最終是如果能將一個用ramp Toon shader 的character從一個有橙黃燈的環境室內,再走出有藍燈的戶外(maybe..夜晚)!
就像一般用diffuse的shader打燈一樣!

希望可以知道如何能將Light的color or RGB對object的ramp color會產生relationship!

會用到mel or expression嗎?.....當然comp能有方法去解決!

先謝過各位了... :roll:
我是一名俏女傭,人見人愛俏女傭
俏女傭
討論區新秀
討論區新秀
 
文章: 95
註冊時間: 31日 12月 2004年, 12:58
來自: 男主人房

文章HammerChugoh » 6日 6月 2006年, 04:18

okay, then you got to understand how your shader react to your CG lights, I assume you have your shader's diffuse color contribute 100% to your final shading color and that diffuse color is controlled by a ramp. What I mean 100% here is base on your shader's lighting model, e.g you turns your ambient(or whatever) really high so your light color doesn't make any changes to your shader's final color. People do that because they are using only the ramp & facing ratio to represent the 2 tones dark and bright shading color.

So what you want to do is either modify your shader so it takes your light color into calculation, like turn down your ambient a little bit, or do a little shading network that using your light color as the input color of your ramp, teach your ramp to change it's color when it's illuminate by a different light(might need a little bit simple expression).

And I am sure there are more ways for doing this and it depnds on the tone sahder that you are using right now.
Houdini, please do the magic.
www.cgwiki.jot.com
HammerChugoh
CGV討論區會員
CGV討論區會員
 
文章: 272
註冊時間: 27日 7月 2002年, 06:50
來自: La La land

Re: 想問問有關maya ramp shader和Lighting的問題?

文章stantang » 6日 6月 2006年, 10:44

俏女傭 寫:
stantang 寫:
俏女傭 寫:想問如何可以將ramp轉為可受Light color變化而作出改變?

因為是近似Toon Shader的關系?thx :(


you can use the SurfaceLuminance node to pass out the luminance data to the ramp...


thx!stantang兄,但這方法己經采用中,只適合intensity多少的變化,而不是顏色的變化! :mrgreen:


Sorry, didn't read your question carefully...

Just off the top my head, you will need samplerInfo, lightInfo, vectorProduct, etc to get the light facing ratio if you need the light to affect just certain area. Throw in some condition nodes and connect your light RGB to the ramp based color, then you should be ok.
頭像
stantang
討論區主持
討論區主持
 
文章: 1566
註冊時間: 8日 11月 2001年, 08:00
來自: Groom Lake

文章俏女傭 » 7日 6月 2006年, 23:39

謝謝HammerChugoh兄和Stantang兄的詳細解答!

現努力測試中,希望能成功! :P
我是一名俏女傭,人見人愛俏女傭
俏女傭
討論區新秀
討論區新秀
 
文章: 95
註冊時間: 31日 12月 2004年, 12:58
來自: 男主人房


回到 ■ Lighting & Rendering

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 18 位訪客