Scatter node not passing local variable

   3370   4   1
User Avatar
Member
13 posts
Joined: 10月 2009
Offline
I've been watching this video Rock Genneration Lesson 6 [sidefx.com]
and trying to follow along in Houdini 15.5.
Basically, an attribute create node is applied to a grid, to create a falloff variable. Then a paint node is added to paint values into the created attribute on the points on the grid. However when the attribute created as a local variable and then run through a scatter node the local variable seems to no longer be passed down so when it is run into the copy node it no longer recognizes the $FALLOFF. Does anyone know if there a workaround for this?
Edited by medendog - 2016年12月16日 18:56:29
User Avatar
Member
461 posts
Joined: 2月 2012
Online
Post what you have is easier that way to help you out.
User Avatar
Member
1 posts
Joined: 12月 2015
Offline
I'd suggest using Attribute Transfer node after the Scatter node. In case of the mentioned lesson, you'll need to wire the last Paint node into the right input and the Scatter node respectively and pass your point attributes.

Attachments:
rock_att_transfer.PNG (69.1 KB)

User Avatar
Member
8043 posts
Joined: 9月 2011
Offline
The scatter sop is capable of transferring interpolated attribute values itself. Alternatively, prim num and uv values can be stored to retrieve interpolated values later using the attribute interpolate sop. Attribute transfer should be considered a ‘last resort’ type node due to it's expense.

http://www.sidefx.com/docs/houdini/nodes/sop/scatter.html#stick [www.sidefx.com]
User Avatar
Member
8833 posts
Joined: 7月 2007
Offline
local variables are being phased out and new nodes are not supporting them anymore
there are much more efficient ways to achieve what you are trying to do, especially if you are trying to vary scale or transform of the copies it's always better to use instancing attributes like pscale, orient, … instead of stamping

however to be able to follow the tutorial you can just add a pointwrangle after the scatter with the following code
string attribs[] = detailintrinsic(0, "pointattributes");
foreach(string attrib; attribs){
    addvariablename(0, attrib, toupper(attrib));
}

it will create local variable from every point attribute with the upper case name of the attribute
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links