2、建一個尺子。Create->measure->distance tool..按住x鍵,將第一個locater捕捉到圓點,另一個放置在燈光前,如圖。
3、下麵將燈光和尺子工具連接起來:選擇第1個locater,再選擇spot light,按p,將這個locater作為spot light的子物體。移動燈光,發現尺子工具隨之移動,但燈光並不指向第2個locater。
4、選擇第2個locater,再選擇spot light,切換到animation菜單設置。Constrain->aim->options。
將aim vector 改成0,0,-1。
按下add/remove。
這是移動燈光,發現第1個locater跟隨燈光移動,而燈光總是瞄準第2個locater,而尺子顯示的數據不斷地變化。
5、 打開hypergraph。按住shift,選擇spot light和distance dimension,顯示其上下遊節點。
[page]
6、 打開hypershade,從hypergraph中將spotLightShape1和distanceDimentionShape1用中鍵拖入hypershade工作區中。
7、 打開hypershade。再創建如下幾個節點:兩個multiply divide節點、一個ramp texture節點。
用中鍵將distanceDimentionShape1拖到multiply divede1上。選擇other,開啟connection editor。在左邊選擇distance,右邊選擇input1X。
8、 打開multiply divide的屬性。設置operation為power。Input2X為2(如果是三次方衰減則設為3)。
9、 設置ramp紋理,將其顏色設為h0,s0,v1,無漸變。
10、 用中鍵將ramp拖到multi divide2上。選擇other。左邊選擇outAlpha,右邊選擇input2X。
11、用中鍵將multiply divide1拖到multi divide2上,選擇other。左邊選擇outputX,右邊選擇input1X。
12、打開multiply divide2的屬性,設置operation為multiply。
13、用中鍵將multiply divide2拖到spotLightShape節點上,選擇other。左邊選擇outputX,右邊選擇intensity。
14、這樣隨著燈光位置和目標點的位置不同,燈光亮度被自動調節,如果想更亮或者更暗,更改ramp texture的顏色v值就可以了。
這裏有張圖,燈光的亮度是用這個方法調配的, 大家看一下。模型沒有什麼講究,材質是一個調整過高光的白色blinn。
[page]
這張是renderman渲的。
.END.