Jump to content

Newbie questions about some expressions function of chop.


killdom

Recommended Posts

:lol: hi i am learning houdini,I have some quesionts about some expressions function of chop,such an `ic(input_index, channel_index, index)`.What does input_index, channel_index, and index mean?what's the differents betwine the input_index and channel_index? thanks in advance.
Link to comment
Share on other sites

The expression CHOP is definatly the most powerful CHOP in the CHOPs toolset. Although I hope they eventually get a Python CHOP like the Python SOP definition. Anyway here's how it works.

the expression ic(0,$C,$I) is the same thing as typing in $V

0 means read from the first input of the CHOP

$C means read from the current channel, like tx0 or tx1

and $I means the current sample index, in this case think of it like the current time, although it's more specific than that.

-------------------------

this CHOP will always output the same number of channels as it's 0ith input. So, if you had 3 channels tx0,ty0,tz0 going into the first input, it wouldn't matter how much other stuff was connected to it, you'd still get three channels going out ... what you do with those channels is up to you however. Here's what I mean.

-----------------------

Say you wanted to overwrite those channels with the second input, so instead you'd enter

ic(1,$C,$I) ... then it would essentially copy the second CHOP input onto the output.

or maybe you had three CHOPS and wanted to blend between the second and third inputs ... maybe something cool like this

ic(floor(sin($I))+1,$C,$I)

-----------------------------------

Maybe instead of selective reading you want to time stretch .. so here's how you'd slow it down by half

ic(0,$C,$I/2)

----------------------------------------

The possibilities are numerous, oc() can make CHOPs function recursivly like particles by reading the output channel for the next cook.

--------------------------------------

:lol: hi i am learning houdini,I have some quesionts about some expressions function of chop,such an `ic(input_index, channel_index, index)`.What does input_index, channel_index, and index mean?what's the differents betwine the input_index and channel_index? thanks in advance.
Edited by andrewlowell
Link to comment
Share on other sites

The expression CHOP is definatly the most powerful CHOP in the CHOPs toolset. Although I hope they eventually get a Python CHOP like the Python SOP definition. Anyway here's how it works.

the expression ic(0,$C,$I) is the same thing as typing in $V

0 means read from the first input of the CHOP

$C means read from the current channel, like tx0 or tx1

and $I means the current sample index, in this case think of it like the current time, although it's more specific than that.

-------------------------

this CHOP will always output the same number of channels as it's 0ith input. So, if you had 3 channels tx0,ty0,tz0 going into the first input, it wouldn't matter how much other stuff was connected to it, you'd still get three channels going out ... what you do with those channels is up to you however. Here's what I mean.

-----------------------

Say you wanted to overwrite those channels with the second input, so instead you'd enter

ic(1,$C,$I) ... then it would essentially copy the second CHOP input onto the output.

or maybe you had three CHOPS and wanted to blend between the second and third inputs ... maybe something cool like this

ic(floor(sin($I))+1,$C,$I)

-----------------------------------

Maybe instead of selective reading you want to time stretch .. so here's how you'd slow it down by half

ic(0,$C,$I/2)

----------------------------------------

The possibilities are numerous, oc() can make CHOPs function recursivly like particles by reading the output channel for the next cook.

--------------------------------------

I really appreciate all your help.Thanks very much. ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...