Logics

Color And Counter

Instruction:
此範例可與「FIFO」作一個比較。使Ball產生自動變色的效果,且利用計數器記錄變色的次數。

Building Blocks
(a) Counter-Logics/Loops/Counter
(b) Text Display-Interface/Text/Text Display
(c) Sequencer-Logics/Streaming/Sequencer
(d) Parameter Selector-Logics/Streaming/Parameter Selector
(e) Set Diffuse-Materials-Textures/Basic/Set Diffuse
(f) Set As Active Camera-Cameras/Montage/Set As Active Camera

製作構想
利用Building Blocks-Set Diffuse配合Sequencer和Parameter Selector產生自動變色的效果,且利用Building Blocks-Counter和Text Display顯示變色的次數。

製作步驟
(a) Ball

Counter:設定計數的次數MaxCount-'5';設定計數器記錄的起始值Start Index-'1';設定計數器每次所增加的數字Step-'1'。由pOut輸出變數CurrentCount且經過數值型態的轉換Convert(如圖示),由Integer(整數)轉換為(字串)。

Text Display:設定偏移位置Offset(X,Y)-以左上角為基準點;設定Color(Red, Green, Black, Alpha);設定對齊位置Align-Left;設定字體大小Size-12,且由pIn輸入字串變數。

Sequencer:使Building Blocks-Parameter Selector可以依次執行,產生自動變色的效果。
Parameter Selector:首先於pOut/Edit Parameter/Parameter Type更改為Color(r, g, b, a);Selected可以先忽略不必設定;設定依次變化的顏色(Red, Green, Black, Alpha)。

Set Diffuse:由pIn輸入產生擴散效果的顏色Diffuse Color,再勾選Keep Transparency-使其保持透明度。
Text Display:由pIn輸入目前所顯示的顏色,其他設定與上述Building Blocks-Text Display相同。
 
(b) Camera

Set As Active Camera:設定現在所使用的Camera。

愛迪斯科技股份有限公司版權所有,本網站各連結標題,商標及連結內容歸原權利人所有.
台北市內湖區民權東路六段16011樓之
2 Tel:(02)2791-2917 Fax:(02)2791-2916
CopyRight 2001-2002 Axis 3D Technology,inc. All rights reserved.