HExp12-4|Houdini Expression functions全集之Channel屬性類:

1、關于CHOP通道函數(shù)的一切

float chop (string channel)
讀取通道函數(shù)的當前值。<channel>為該通道函數(shù)的通道名稱。示例如下:
> chop("/ch/ch1/wave1/chan1")
string?chopstr?(string?channel)
讀取通道函數(shù)的當前值。該值為字符串型。
float?chopt (string?channel,?float?time)
讀取通道函數(shù)在指定時間的值。<time>以秒為單位。
float?chopf?(string?channel,?float?frame)
讀取通道函數(shù)在指定幀的值。<frame>以幀為單位。
float?chopi?(string?channel,?float?index)
讀取通道函數(shù)在間隔指定幀數(shù)(即采樣值)下的值。<index>以幀為單位。
float?chopct (string?CHOP, float?channel_index, float?time)
讀取通道函數(shù)中指定通道在指定時間的值。
float?chopcf?(string?CHOP, float?channel_index, float?frame)
讀取通道函數(shù)中指定通道在指定幀的值。
float?chopci?(string?CHOP, float?channel_index, float?index)
讀取通道函數(shù)中指定通道在間隔指定幀數(shù)下的值。
float?chops (string?CHOP)
讀取通道函數(shù)的起始幀。<CHOP>為該通道函數(shù)的節(jié)點名稱。示例如下:
> chope("/ch/ch1/wave1")
float?chope?(string?CHOP)
讀取通道函數(shù)的結(jié)束幀。
float?chopl (string?CHOP)
讀取通道函數(shù)的長度,即開始幀到結(jié)束幀的總幀數(shù)。
float?chopr (string?CHOP)
讀取通道函數(shù)的采樣率。
float?chopn (string?CHOP)
讀取通道函數(shù)中的通道數(shù)。
float?chopnames?(string?CHOP)
讀取通道函數(shù)中所有數(shù)據(jù)通道的名稱。
2、關于CHOP通道輸入函數(shù)的一切

float?ic?(float input_index, float?channel_index, float?index)
返回CHOP輸入的指定索引。
float?ics (float?input_index)
返回CHOP輸入的起始索引。
float?ice?(float?input_index)
返回CHOP輸入的結(jié)束索引。
float?icl?(float?input_index)
返回CHOP輸入的長度。
float?icr?(float?input_index)
返回CHOP輸入的采樣率。
float?icn?(float?input_index)
返回CHOP輸入中的通道數(shù)。
float?icmax (float?input_index, float?channel_index)
返回CHOP輸入通道的最大值。
float?icmin?(float?input_index,?float?channel_index)
返回CHOP輸入通道的最小值。
float?oc?(float?output_channel_index, float?index)
返回CHOP輸出的指定索引。
3、關于CH函數(shù)家族的一切

float?ch (string?"path")
獲取參數(shù)的值。可以理解為引用其他參數(shù)值,這樣可以使某些參數(shù)的值自動與其他參數(shù)的值相同或相對。利用這個函數(shù)可以創(chuàng)建自定義備用參數(shù)和數(shù)字資產(chǎn)接口,并讓它們控制其他節(jié)點。<path>是要獲取其值的參數(shù)的路徑。對于同一節(jié)點上的參數(shù),可以只使用參數(shù)的內(nèi)部名稱,例如:> ch("ty"),將鼠標懸停在參數(shù)名稱上時,可以在工具提示中找到參數(shù)的內(nèi)部名稱。?對于不同節(jié)點上的參數(shù),可以通過右鍵復制參數(shù)再粘貼為相對參考,例如:> ch("../geo2/ty")
float?cht (string?"path",?float?seconds)
獲取參數(shù)在某一秒的數(shù)值。
float?chf (string?"path",?float?frame_num)
獲取參數(shù)在某一幀的數(shù)值。
string?chs (string?"path")
獲取參數(shù)的字符串值。
string?chsraw (string?"path")
獲取參數(shù)的“原始”字符串值,即原始信息,不加運算,不帶擴展引號或變量名,如果本身就是原始信息,則返回0值。
string?chsop?(string?"path")
獲取參數(shù)值,該參數(shù)儲存了一個節(jié)點的路徑。返回絕對路徑。
string?chsoplist?(string?"path")
獲取參數(shù)值,該參數(shù)儲存了一個節(jié)點路徑列表。返回絕對路徑。
float?chramp (string?ramp_path,?float?position,?float?component_index)
讀取指定位置的漸變參數(shù)值。當<position>在區(qū)間[0,1)之外時,在使用之前,它將首先被限制在這個區(qū)間內(nèi)。<component_index>是指定要讀取的參數(shù)值中的哪個元素。對于顏色漸變,它必須是0、1或2。對于單值漸變,<component_index>必須為0。示例如下:
> chramp("/obj/geo1/popnet1/color1/rampcolor", 0.33, 1)
float?chrampt?(string?ramp_path,?float?position,?float?component_index,?float?time)
讀取指定位置和時間處的漸變參數(shù)值。
float?chrampf (string?ramp_path,?float?position,?float?component_index,?float?frame)
讀取指定位置和幀處的漸變參數(shù)值。
float?chexpr (string?channel,?string?new_expr_function)
給指定的通道換一個分段函數(shù)。說明:該通道的值由關鍵幀指定,并在各幀之間的不同段落運用分段函數(shù)進行插值,形成連續(xù)變化的曲線,不同分段函數(shù)形成不同形態(tài)的曲線,并可以人為調(diào)節(jié)每一段的形態(tài)(比如貝塞爾曲線)。
float?chexprt?(string?channel,?string?new_expr_function,?float?time)
給指定的通道換一個分段函數(shù),然后讀取指定時間點的值。
float?chexprf (string?channel,?string?new_expr_function,?float?frame)
給指定的通道換一個分段函數(shù),然后讀取指定幀的值。
string?chgroup (string?group_name)
返回組中所有通道的字符串。
float?chexist?(string?channel_name)
如果指定的通道存在動態(tài)值(即函數(shù)變量,包括函數(shù)返回的定值),則返回1,如果不存在,則為0。說明:它檢查參數(shù)是否設置了動畫,而不是參數(shù)本身是否存在。
4、形形色色的分段函數(shù):

float?constant ():常數(shù)值。
float?linear ():線性插值。
float?spline ():同"linear"。
float?qlinear?():線性曲線,同"linear"。
float?cubic ():三次曲線。
float?quintic ():五次曲線。
float?bezier?():貝塞爾曲線,平滑變換,可調(diào)節(jié),其他分段函數(shù)均不可變動。
float?ease ():平滑變換,關鍵幀處曲線斜率為0,即曲線在此處變水平。
float?easep (float?number)
在ease的基礎上增加變量<number>,該值以1為分界點,小于1時,值越小關鍵幀的輸入端(即左側(cè))斜率越早變?yōu)?;大于1時,值越大關鍵幀的輸出端越晚從0變換為非0。
float?easein ():關鍵幀輸出端曲線斜率為0。
float?easeinp (float?number)
在easein的基礎上增加變量<number>,該值以1為分界點,小于1時,值越小關鍵幀的輸入端(即左側(cè))越平坦;大于1時,值越大關鍵幀的輸出端越平坦。
float?easeout ():關鍵幀輸入端曲線斜率為0。
float?easeoutp (float?number)
在easeout的基礎上增加變量<number>,該值以1為分界點,小于1時,值越小關鍵幀的輸入端(即左側(cè))越陡峭;大于1時,值越大關鍵幀的輸出端越陡峭。
float?cycle (float?f1,?float?f2)
重復第f1幀到第f2幀之間的動畫。
float?repeat?(float?f1,?float?f2)
重復第f1幀到第f2幀之間的動畫,同"cycle"。
float?cyclet?(float?t1,?float?t2)
重復第t1秒到第t2秒之間的動畫。
float?repeatt?(float?t1,?float?t2)
重復第t1秒到第t2秒之間的動畫,同"cyclet"。
float?cycleoffset?(float?f1,?float?f2)
重復第f1幀到第f2幀之間的動畫,且區(qū)間首尾相連。
float?cycleoffsett?(float?t1,?float?t2)
重復第t1秒到第t2秒之間的動畫,且區(qū)間首位相連。
float?match?():匹配傳入(首關鍵幀)值和傳出(末關鍵幀)值。
float?matchin?():匹配傳入(首關鍵幀)值和傳出(末關鍵幀)值且保持各關鍵幀輸出(右側(cè))斜度。
float?matchout?():保持各關鍵幀輸入(左側(cè))斜度。注:該函數(shù)未將首末幀匹配。
float?vmatch?():匹配關鍵幀左右兩側(cè)的斜度,即貝塞爾曲線控制柄的長度。
float?vmatchin?():保持各關鍵幀輸出(右側(cè))斜度,同"matchin"。
float?vmatchout?():保持各關鍵幀輸入(左側(cè))斜度,同"matchout"。
raw?():分段函數(shù),功能未知。
4、噪波函數(shù):

float?noise (float?X,?float?Y,?float?Z):生成三維噪波
float?snoise (float?X,?float?Y,?float?Z):生成稀疏卷積三維噪波。
float?turb?(float?X,?float?Y,?float?Z,?float?depth):生成三維噪波。<depth>是對噪波進行的分形處理量。
float?sturb?(float?X,?float?Y,?float?Z,?float?depth):生成稀疏卷積三維噪波。