import attribute into geometry vop

   20917   13   3
User Avatar
Member
238 posts
Joined: Nov. 2013
Offline
how do I get my attributes (from a sopnet)in a geometry vop?
I can specify a sop path for the first input but then I am stuck, cause there is no ‘import attribute’ vex node available.

'get attribute' with the op: syntax does not work too.
http://www.sekowfx.com [www.sekowfx.com]
User Avatar
Member
1799 posts
Joined: Oct. 2010
Offline
what kind of VOP node are you using? is it a vopsop, or an attribVOP, or are you building a separate geometry VOP network?

they all work slightly different depending on the context, but have a lot of common threads
-G
User Avatar
Member
207 posts
Joined:
Offline
Are you looking for the equivalent of an ICE “get data” but for a custom point attribute maybe? If so, “Bind” usually works for me…

-T
User Avatar
Member
238 posts
Joined: Nov. 2013
Offline
I am using the geometry vop dynamics node.
bind is looking up the processed dynamic object (in my case a rbd packed object).
I've prepared some attributes inside a sopnet and would like to use them for my force calculation, by inputing the result into a geometry vop.
But now I can't figure out how I'm supposed to read those optional inputs.

Ive picked up some bits from the POP Attract node, but don't understand how the sopnet input is handled. There are to many param mappings and condition nodes. There is a snippet buried inside making use of opinput:0. I guess its there but have now idea how I can use that.

This is where I run into frustration.. Maybe I did not get some fundamental principles yet, but its simply too complicated.
Get Data ICE node feels so convenient compared to that.
http://www.sekowfx.com [www.sekowfx.com]
User Avatar
Member
575 posts
Joined: Nov. 2005
Offline
Bind is the way to import data from the first input in a geometryvop, if You need data from another input you can use the vex functions point(), prim(), detail() or vertex() as code in a inlinevop (or a wrangle), or the getAttribute VOP as a vop node
User Avatar
Member
238 posts
Joined: Nov. 2013
Offline
sanostol
Bind is the way to import data from the first input in a geometryvop, if You need data from another input you can use the vex functions point(), prim(), detail() or vertex() as code in a inlinevop (or a wrangle), or the getAttribute VOP as a vop node

thanks once again martin.. inline vop and point function did the trick

$myVector = point(“opinput:0”,“P”,0);
http://www.sekowfx.com [www.sekowfx.com]
User Avatar
Member
575 posts
Joined: Nov. 2005
Offline
bind does not work for You on the first input ?
User Avatar
Member
99 posts
Joined: July 2007
Offline
what I've learnt over the years - sharing your hip file (or simplified version of it) is a great way to get fast help
User Avatar
Member
238 posts
Joined: Nov. 2013
Offline
here we go.

Attachments:
attractToPointAverage.hip (263.4 KB)

http://www.sekowfx.com [www.sekowfx.com]
User Avatar
Member
242 posts
Joined: Jan. 2008
Offline
You can use the get attribute VOP to fetch geometry from the inputs in a geometry VOP.

Edit.
Since you are using RBD packed object you can use the pop attract, either by reading in the average position in your sopnet or by averaging the simulation geometry.

Attachments:
attracttopointaverage_117.hip (292.2 KB)

User Avatar
Member
238 posts
Joined: Nov. 2013
Offline
i know about that node, but I am trying to understand houdini principles
http://www.sekowfx.com [www.sekowfx.com]
User Avatar
Member
242 posts
Joined: Jan. 2008
Offline
sekow
i know about that node, but I am trying to understand houdini principles

aah, Ok
Then Im just answering your first question.
The get attribute VOP is the “equalent” of the import attribute but for cvex.

You just need to hook up the file input with the geometry you want to sample.
There are a few ways of doing this.

1. Connect the get Attribute file input to the OpInput on the global node and link that global input to a sop path.

2. You can promote the file input and…
a. referens a sop geometry with the op: syntax… in your case opobj/AutoDopNetwork/sopnet1/OUT_POINT

b. point that parameter to a .bgeo file on disk.


I know this sounds confusing and its not getting better trying to explain in the middle of the night. So 1 file says more then 1000 words.

Attachments:
attracttopointaverage_117.hip (281.7 KB)

User Avatar
Member
238 posts
Joined: Nov. 2013
Offline
doh! i did not noticed the opinput ports on the global params node..
thanks for the help, it is very appreciated.
http://www.sekowfx.com [www.sekowfx.com]
User Avatar
Member
1 posts
Joined: Aug. 2014
Offline
i believe that should do:

string node_absolute_path = @OpInput2; //out of 1 to 4
string prefix_removed = split(node_absolute_path, “:”); //removes op: prefix

f@b_lgth = ch(prefix_removed + “/sizex”); //channel reference of attribute sizex of type float from node @ OpInput 2
  • Quick Links