SOP -> POP values.

   5351   6   0
User Avatar
Member
1104 posts
Joined: Aug. 2008
Offline
If I create myValue in a AttribCreate at SOP level, i can use $myValue inside SOP's but how do make such a value available inside POP ?

/M
/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
User Avatar
Member
1529 posts
Joined: July 2005
Offline
All SOP attributes are automatically inherited into the pop context.

Sadly, the mapping of ‘myValue’ to the $MYVALUE shorthand is not.

The quickest way to regain access to it is by putting down an attribute pop, setting the name to ‘myValue’, and for value input ‘$MYVALUE’. You should now be able to refer to it by name anywhere you like.

There are RFEs in place to eliminate the need for this step…

G
User Avatar
Member
1104 posts
Joined: Aug. 2008
Offline
I think I got lost, did you mean a ‘attribute’ node in the popnet ? not sure where they have value inputs unless it's the value1 ?

and if RFEs are a better way todo this I probably should learn todo it like that anyway But when I search houdini help for RFE it found nothing?

/M
/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
User Avatar
Member
1529 posts
Joined: July 2005
Offline
RFE is Request For Enhancement.

It means that a ‘feature’ has been requested from SESI (it does NOT however mean that it will get implemented).

yes, the ‘attribute’ node in POPs context is exactly what you want.

if you have an attribute in sops, called myvalue, in sop context you can refer to it as $MYVALUE, and it'll get mapped correctly. However, this mapping does not inherit to pops, so you need to re-establish it using the attribute pop node.

Creating a new attribute called myvalue (using the attribute node in pops), and assigning it the existing value, in this case, $MYVALUE. It's a little counter intuitive. Clearly, the attribute POP can see ‘$MYVALUE’ but other pops cannot. Hence the RFE.

G
User Avatar
Member
1631 posts
Joined: July 2005
Offline
MagnusL3D
I think I got lost, did you mean a ‘attribute’ node in the popnet ? not sure where they have value inputs unless it's the value1 ?

and if RFEs are a better way todo this I probably should learn todo it like that anyway But when I search houdini help for RFE it found nothing?

/M
Hi there,

To answer your question, you have to use an Attribute POP to “recreate” the myValue attribute so you can use $MYVALUE in the pop network. So, in the Attribute POP, set the Name to myValue and in the value1 parameter, you type in $MYVALUE so the attribute is the same as what you created in POPs.

RFE means “Request For Enhancement”. What keyframe means is there are outstanding RFEs to improve the workflow of attributes going from SOPs to POPs and not the extra setup you currently have to do as described above.

Hope the above helps!

Cheers!
steven
User Avatar
Member
1104 posts
Joined: Aug. 2008
Offline
Ah! haha, RFE's ..well aint I the noob

Im doing what you both say but since I want to use $myValue as my “Impulse Birth Rate” I guess I should connect the attribute node some how but I can't realy connect it infront of the source node now can I ?

Well actually what I want todo is to take the velocity calculated by my trail node in SOP's and use it to drive the Brith Rate, maybe there is a simpler way todo this ?

/M
/M

Personal Houdini test videos, http://vimeo.com/magnusl3d/ [vimeo.com]
User Avatar
Member
1529 posts
Joined: July 2005
Offline
in this case you need to look at the poppoint expression.

Here's why:

When you create an attribute using an attribcreate two things happen:
- a attribute is created
- a convenient shortcut is created (called a varmap) which maps your attribute (myvalue) to a ‘global’ ($MYVALUE).

This allows you to refer to this attribute by using the shortcut $MYVALUE in expression fields.

When attributes are created using other means (point sop, addattribute vop), this varmap isn't always created – and to confused things even more, some SOPs (and pops) for that matter, expect certain attributes, and will accept them in shorthand form regardless of whether the varmap exists.

Having said that, when you DON'T have a varmap, you need to use the long form of accessing attributes. in sop context, you use the ‘point’ expression, and in pops, you use ‘poppoint’.

point(“../mysop”, $PT, “attribname”, 0)

so…. to look up the value of $V (velocity), of a point in a sop (xform2) you type:

point(“../xform2”, $PT, “v”, 0)
The above will look up at the X-component of velocity (since it's a vector – change the 0 to 1 for y, and 0 to 2, for z)

the poppoint expression has a slightly different form which I don't remember offhand since I don't have houdini in front of me. Should be very similar – and it's likely the expression you want to use in your ‘birth rate’ field.

G

ps: now that I think about it, I dont know if you can actually do what you are thinking about doing in those terms. My guess is that you'll need to create a prim attribute, and animate that (in sop) then use that attribute and a multiplier to control the emission.
  • Quick Links