henderthing Posted October 20, 2005 Share Posted October 20, 2005 OK-- So if I add normals to my emission geometry w/point SOP, I can access them easily enough in my source (or any other) pop with $NX, etc. However, I've created a vector point attribute called upv, using a VOP SOP, and it is mapped to $UPV. In my source POP, I tell it to inherit all source attributes and create local variables. The attributes show up in the spreadsheet in any pop I select, and their values are valid, yet I get errors any time I try to use $UPV0, $UPV1, etc. So I try poppoint($PT,"upv",0). That works in any POP downstream of source, but it will *not* work in the source POP--where I'd really like to set initial velocity. Why is this? The workaround for now is to create a group using rule $AGE==0, then use the velocity POP on that group. It works, but what is going on in the source POP? How can I access my own attributes as local variables within POPs? Any insight is welcome. Thanks -m Quote Link to comment Share on other sites More sharing options...
sho Posted October 20, 2005 Share Posted October 20, 2005 Hi, Well I'm not sure why we can't use local variable in SourcePOP, but my understanding is, it's not created(cooked?) in SourcePOP its self. So I always use birth group and feed initial velocity using VelocityPOP. Also, you may need to use $UPV1, $UPV2, $UPV3 for three floats... Cheers, Sho Quote Link to comment Share on other sites More sharing options...
henderthing Posted October 21, 2005 Author Share Posted October 21, 2005 Thank you! Still getting used to this stuff. So many things in Houdini index starting at 0, so many others with 1... <sigh> Of course I kept testing with just x (0). Doh. -m Hi,Well I'm not sure why we can't use local variable in SourcePOP, but my understanding is, it's not created(cooked?) in SourcePOP its self. So I always use birth group and feed initial velocity using VelocityPOP. Also, you may need to use $UPV1, $UPV2, $UPV3 for three floats... Cheers, Sho 22033[/snapback] Quote Link to comment Share on other sites More sharing options...
deecue Posted October 22, 2005 Share Posted October 22, 2005 are you sure it was a vector and not maybe just a float of size 3? as edward was pointing out in this thread, a float attribute will have variables $VAR1, $VAR2, $VAR3.. where as a vector attribute will have $VARX, $VARY, $VARZ.. if you are unsure as to what type and size your attribute is, you can click on any sop and select 'extended information'. This will list all your attributes (point, prim, detail, vertex, custom) and their size and type (as well as some other handy info as well).. hth, dave Quote Link to comment Share on other sites More sharing options...
henderthing Posted October 22, 2005 Author Share Posted October 22, 2005 Yeah--it's all working fine now, but I was still a little confused as to when the attribute becomes 3 floats. In the VOPnet it's a vector, the input to the addAttrib node is a vector, the addAttrib node says "vector signature" at the top of the parameter panel, but at the sop level, the attribute is clearly 3 floats. Now I see that this is the default behavior of the addAttrib node, and there is a checkbox called "Vector Qualifier" that can cause the attribute to be a vector at the SOP level. Good times. Thanks -m are you sure it was a vector and not maybe just a float of size 3?as edward was pointing out in this thread, a float attribute will have variables $VAR1, $VAR2, $VAR3.. where as a vector attribute will have $VARX, $VARY, $VARZ.. if you are unsure as to what type and size your attribute is, you can click on any sop and select 'extended information'. This will list all your attributes (point, prim, detail, vertex, custom) and their size and type (as well as some other handy info as well).. hth, dave 22073[/snapback] 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.