Using VOP nodes to create points...

   2247   2   1
User Avatar
Member
9 posts
Joined: Nov. 2013
Offline
Hi,

I want to create points in a vector's direction using vop nodes. What I already have is a geometry node with 1 points that has “P” and “edge_dir” attributes.

My first try was using a VOP SOP and an Import Attrib node but it seems you cannot create geometry (add points) with it, just modify them.

My second try is using a Attrib VOP. I can create the points but in there but I can't figure out how to get my “edge_dir” attribute. I tried Get Attribute node but it always return {0.000000,0.000000,0.000000}……. And of course, the Import Attrib node is not available in a Attrib VOP…

So I'm stuck between a VOP SOP where I can get my attribute but not create points and a Attrib VOP that can create geometry but can't get my attribute…

So, how would you guys do it? How do you access a custom point attribute inside a Attrib VOP?

What for? I need to create points at random predefined interval 1, 1.5 or 2 meters between 2 points, using the edge direction attribute. Maybe there is a better way but Resample and Refine don't allow you to add points at random interval. (to my knowledge)

Many thx!
C
User Avatar
Member
606 posts
Joined: May 2007
Offline
Christian Sirois
My second try is using a Attrib VOP. I can create the points but in there but I can't figure out how to get my “edge_dir” attribute. I tried Get Attribute node but it always return {0.000000,0.000000,0.000000}……. And of course, the Import Attrib node is not available in a Attrib VOP…

The way one usually uses point attributes in the incoming geometry is by using the Bind SOP. If you want to write to the attribute, use Bind Export.

All in all it feels like maybe there would be simpler ways of achieving what you want, we would just need a bit more information.

E.g. if the 1/1.5/2 meters requirement is not super strict, maybe you could resample with a 0.5m resolution, and then randomly kill some of the points..
User Avatar
Member
9 posts
Joined: Nov. 2013
Offline
Thx, the Bind trick worked perfect…

The idea behind what I'm trying to achieve is to place geometry (houses) along a polygon curve. Each geometry has a length that can change. The length cannot really be predefined that much as it would put a constraint on the artists.
  • Quick Links