Hello,
I'm having trouble using & referencing primitive attributes in an expression for a resample sop node and I was wondering if anyone could give me some help or pointers please.
I have a piece of geometry with 52 individual prims and each prim has its own attribute (say the prim's area from a measure sop). I want the “Segments” parameter of the resample sop to use each prim's “area” attribute for its value- i.e. each prim will have its own individual segment value that's calculated from its area attribute.
I've tried using hscript & python but I just can't seem to reference prim attributes… I've tried lvar(), curPoint().attribValue(), even basics such as $PR etc. but nothing seems to work & I'm out of ideas- lil help please!
Thanks in advance.
PS: Kinda unrelated but is there any way of seeing, using or customising the source code for a houdini node so that I could try making a new operator type to do the above?
Use prim attributes in resample sop parameter expression?
7581 4 0- ros888
- Member
- 5 posts
- Joined: June 2008
- Offline
- ros888
- Member
- 5 posts
- Joined: June 2008
- Offline
- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
- graham
- Member
- 1902 posts
- Joined: Nov. 2006
- Offline
This cannot be accomplished using expressions like you wish because the Resample sop does not support local variables, such as $PR. If you look at the help card for it you will see that it lists no supported Local Variables, which appear in something like a Point sop.
This is why it or lvar() won't work. curPoint/curPrim doesn't work because the sop is not cooking on a per point/primitive basis.
What you are attempting to do is best accomplished using the ForEach sop.
Take a look at the attached file.
This is why it or lvar() won't work. curPoint/curPrim doesn't work because the sop is not cooking on a per point/primitive basis.
What you are attempting to do is best accomplished using the ForEach sop.
Take a look at the attached file.
Graham Thompson, Technical Artist @ Rockstar Games
- ros888
- Member
- 5 posts
- Joined: June 2008
- Offline
-
- Quick Links