Jump to content
Sign in to follow this  
Shalinar

Basic Variable Question (Particles)

Recommended Posts

Hey guys, first post here. I'm extremely noob at Houdini and I've got a very basic question.

I've got a particle system going, and after the POPs system in the Source Particles SOP it creates, I'm trying to use the Y position of each particle to drive a Blend Sequence that is copied onto the particles with a Copy SOP. What I haven't been able to find is how to query the Y position of my particles. I can find their positions with the Geometry Spreadsheet, but the name of the attribute it gives me is "P[y]", and typing that into an expression doesn't seem to work. I had thought it might be "@P.y" but that errors out as well. I think one of the problems is that I'm not telling Houdini WHAT to find the Y position of. But again, not sure how to find that.

I've googled and did a cursory search of the forums here but all the posts I've found are way more advanced than this simple thing I'm trying to find :o 

Can you fine gentlemen/ladies point me in the right direction to find how to query this sort of basic data?

wk2_copy.hipnc

Edited by Shalinar
to attach file

Share this post


Link to post
Share on other sites

It sounds like you might be confusing Houdini expressions with vex. @P.y will give you the y position of the current point. 

But if you are using Houdini expressions you may want to look at the point expression which would be something like point("path_to_node", $PT, "P", 1) or in some cases the $TY local variable will work. 

To some extent local variables have been replaced by vex, but I can never remember exactly where. If you can upload a hip file you might get more answers as people can see exactly what you are trying to achieve and give you a practical example. 

 

Share this post


Link to post
Share on other sites

Hey thank you for the reply! $TY was indeed what I needed. You are right, I was most likely confusing Houdini Expressions with VEX... What is the difference?

That point expression was cool but exhelp seemed to indicate that it was used for geometry whereas I was trying to query the Y values of my particles. Even though I believe I've got it worked out (for what I need), I'll go ahead and upload the hip file, for posterity.

I'll dig into the help files to learn more about local variables. Thanks again for the help!

Share this post


Link to post
Share on other sites

What is the difference?

Houdini supports three languages, HScript, Python and VEX. The difference is syntax. Hscript and Python are not multi-threaded, but VEX is multi-threaded.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×