T-bolt Posted April 5, 2005 Share Posted April 5, 2005 Hi, For a course project, I'm creating a scene in Houdini involving flocking behaviour. The movement is on a 2d plane, with a group of 10-20 made up of 4 types of models following a leader. I know there are techniques to do this in Houdini without scripting, but I have to script this in some way. Would this be possible using VEX? I already have the flocking algorithm figured out in C code, which VEX is similar to (though without an implementation of arrays ). Within my function, what I need is to access the translation & rotation values of the members of the flock, and I'm having a problem figuring out exactly how to do this. I've been fiddling around with VEX SOPs, but I'm realizing that's not the way to go about this so I'm considering using either POPs or CHOPs. Right now I'm leaning towards using POPs, would that be a correct assumption? Any help would be appreciated. Thanks, Paul Quote Link to comment Share on other sites More sharing options...
sibarrick Posted April 5, 2005 Share Posted April 5, 2005 You might be able to use a point cloud as your array in VEX. Look in the VEX html docs for a description. Quote Link to comment Share on other sites More sharing options...
edward Posted April 6, 2005 Share Posted April 6, 2005 You might want to post to the houdini mailing list about this question as well as there's people there who has probably done this before that don't follow the odforce forum. Offhand, I think POPs would be easier if you need to maintain state data from one frame to the next. Finally, per point data (ie. translation/rotation/etc) can just be created as attributes (see AttribCreate and Point in SOPs or the Attributes tab menu folder in POPs). Quote Link to comment Share on other sites More sharing options...
T-bolt Posted April 9, 2005 Author Share Posted April 9, 2005 Thanks for your replies! Hmmm, I'm not finding any information on point clouds, link? I've decided on using POPs. Now with VEX POPs, it seems that the function is run once for each particle each frame, and I can change the position and velocity of the current point - so far so good. I'd like to be able to find the position and velocities of the other particles with respect to the current particle for my calculations. Any ideas? Quote Link to comment Share on other sites More sharing options...
Jason Posted April 10, 2005 Share Posted April 10, 2005 Look in the Odwiki - there is a bit of info there... (Link in banner) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.