Problem with foreach sop

   7561   3   1
User Avatar
Member
10 posts
Joined: Oct. 2009
Offline
Hai,
I have taken a grid sop and tried to clip it using a foreach sop.I made it for each number for range 1-10 and the stamp name is FORVALUE.Inside the foreach sop I have appended a clip sop after each sop.In the clip sop I have made the direction
x=sin(rand(stamp(“..”,“FORVALUE”,“”))*180)
y= 0
z=cos(rand(stamp(“..”,“FORVALUE”,“”))*180)

and then keep all primitives.
After doing that the whole network turns red.

I clicked the middle mouse button on the grid.It says
“the sub-network output operator failed to cook.”
/obj/geo1/foreach1/clip1.

I am on mac and houdini 10.0.528 apperentice version.

Attachments:
foreachProb.hipnc (35.6 KB)

User Avatar
Member
1908 posts
Joined: Nov. 2006
Offline
From just looking at your expressions the problem is most likely that your stamp() expressions are using a string default value. stamp() expects a number.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
27 posts
Joined: Nov. 2009
Offline
you can change the expression to
sin(rand(stamp(“..”,“FORVALUE”,0))*180)
cos(rand(stamp(“..”,“FORVALUE”,0))*180)
Houdini is a big thing!
User Avatar
Member
10 posts
Joined: Oct. 2009
Offline
Thanks a lot Graham and Chan.After changing the default value to 0 in stamp function,it started working.
  • Quick Links