reading attr data in POPs

   3637   2   0
User Avatar
Member
8 posts
Joined: May 2009
Offline
Hi

Just having great fun with this apprentice licence, ive been usng maya for too long and guess my mind needs a bit of a wash to understand how attr data flows in houdini…

Im talking in POPS world here:

As I understand, everitime I need an attr value to be called in an expresion i must be very careful to see if it can be called as a Local variable (by checking the nodes local variable)otherwise i must “create” one using an attribute node or use the “point” command (not sure if this is the way in POPS)

My problem is, I have created a VOP POP node which makes an effect, it works fine and I want to access the output values of an attr created inside that VOP POP in another node (in my case its the creep node) later in the network.

now if i Check the detail panel I can see my attr with the different values flowing for each particles,the way it appears is (lets call the attr “uvpos”):
uvpos uvpos uvpos

so when i try to load the values to the u and v of the creep node, im having a bit of a hell.
obviusly i just need the first 2 attr values and .
the attr was created as a vector inside my VOP POP node,the way I call the attr inside the vop node is by using an invisible parameter with the same name and by piping the result of a chain of operations to an “add attr” node also with the same name, so i get the attr values that I want.
Now
creep doesnt know anything about this “uvpos” attr ,so I create a new attr with EXACTLY the same name as the attr I want to use (in this case “uvpos”) as a vctor, but what i got is:
uvpos uvpos uvpos
worst of all, when i try to pipe the values Hudini wont recognize the variable definition as:
$UVPOS1 $UVPOS2 $UVPOS3

and if I use

$UVPOSX $UVPOSY $UVPOSZ
it does recognize but pipes to itself the values (obviusly) of uvpos uvpos uvpos and i need uvpos uvpos uvpos


the “point” command was not succesful either… not sure what do i need to use instead of “$PT”

so to summarize and apologize for the long text, how can i read those values in to the creep node?

this is very frustrating and i belive the way attr and local variables work is not helping with the learning proccess

as a quick challenge:

make some particles collide to a geo ad the “Add Hit position UV” attr , and split some particles out of them, then try to call this “hitposuv”in vop pop by using a parameter node or an “Import attribute” with the same name, no mater what signature i select it wont load the values with other attr i works fine…
just need to be careful with the signatures…

finally, im sure there is a way when i use an import attr node to change the “adata” to something that makes more sense! this is the reason why i use parameter nodes instead.


thanks guys!

love the program.
User Avatar
Staff
1072 posts
Joined: July 2005
Offline
miko3d
As I understand, everitime I need an attr value to be called in an expresion i must be very careful to see if it can be called as a Local variable (by checking the nodes local variable)otherwise i must “create” one using an attribute node or use the “point” command (not sure if this is the way in POPS)

In POPs you'll want to use the poppoint() function instead.

miko3d
Now creep doesnt know anything about this “uvpos” attr ,so I create a new attr with EXACTLY the same name as the attr I want to use (in this case “uvpos”) as a vctor, but what i got is:
uvpos uvpos uvpos
worst of all, when i try to pipe the values Hudini wont recognize the variable definition as:
$UVPOS1 $UVPOS2 $UVPOS3

and if I use

$UVPOSX $UVPOSY $UVPOSZ
it does recognize but pipes to itself the values (obviusly) of uvpos uvpos uvpos and i need uvpos uvpos uvpos

There is no practical difference between $UVPOS1 and $UVPOSX . They both refer to the first component of the attribute. The former is used for float attributes and the latter for vector attributes.

What you'll want to do is set the attribute POP to create an attribute of type Float and Size 3, and toggle Write Values off.
User Avatar
Member
8 posts
Joined: May 2009
Offline
thanks alot Ondrej

I was not aware that in Houdini a vector and a float3 makes 2 attributes different even when they both have the same name

the tip about being or explains now how I can learn the way they have been declared

It worked fine.

  • Quick Links