Problem accessing attribute from a different point

   308   3   0
User Avatar
Member
24 posts
Joined: Sept. 2019
Offline
Hi,

I am running a little test where I am trying to access the attributes of the next and previous points in a point cloud.

This might be a dumb problem since I've probably neglected something but why doesn't this work?

I am attaching the hip file.

Thank you in advance.

Edit: You can ignore the "distance" line. I forgot to remove it from the file as I am not using it.
Edited by TheoK - March 28, 2024 00:20:27

Attachments:
screenshot.png (169.5 KB)
test.hip (107.3 KB)

User Avatar
Member
8554 posts
Joined: July 2007
Offline
the point(0, ...) function is looking for the attribute on first input geo and in your case that geo doesn't have "pos_dir" attribute

so you may need to split your code int 2 wrangles
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
24 posts
Joined: Sept. 2019
Offline
Splitting it into two wrangles works.

Thank you!
Edited by TheoK - March 28, 2024 00:39:09
User Avatar
Member
4515 posts
Joined: Feb. 2012
Offline
If you are creating new attributes, you can't access these in the same wrangle node for other elements as they are not created yet.

So like tamte said, you have to use 2 wrangle nodes.

If you compile them, you would get the same performance as if they were one node.

Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
  • Quick Links