Jump to content

Two expressions in one parameter


Recommended Posts


I have a question about putting two expressions in one parameter. Is this possible? See screenshot. I also want to rotate the blue. (maybe even in a different in a different direction like -180)

Somebody said:

you'll need to type two separate lines.

@Cd.r = whatever;

@Cd.b = whatever;

But when I do that in the "Edit expression" thing of my rotation parameter.. (because i can't just type a second line just in the parameter? or can i?) But everything dissapears when i do that :o With ; after the lines and without.. What do i do wrong? 

Thanks in advance!Alien uitwerking-odforce.hipnc

Screen Shot 2018-09-26 at 16.45.55.png

Link to comment
Share on other sites

What you are trying to do is a bit "cheating" : you use the attribute color in your expressions to "filter" the objects you want to rotate. If you want to do it that way, maybe just sum the two expressions : if it is fully blue, red and green will be zero and weight nothing in your sum while blue pieces will have full weight and let you evaluate your rotation parameter to the number of degrees you want.

A better way to do it with the copy stamp is to add an orient attribute on your template points (or an up vector and a normal if you don't know how to build an orient), based on you color, using a point wrangle, where you can put as much expressions and "tests" (if (@Cd.r == 1) {@N = blablabla} ) as you want. Then the copies will be oriented properly.

Help : http://www.sidefx.com/docs/houdini/copy/instanceattrs.html



Edited by StepbyStepVFX
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.

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...