Jump to content

Linear Vertex - Help


Recommended Posts

Hello,

Can someone please explain to me what a linear vertex is properly? I thought I understood it when I was initially trying with lines but once I applied the function on the grid, everything seems wrong.

I understood it as, primvertex points to the point number, so vertex 2 of primitive 1 should return 2 but instead it is returning 6. Not sure why?

image.thumb.png.0290d0fe5766618a9d1a08a77fd80990.png

 

 

The same function with lines give me the correct answer.

image.thumb.png.701f24ebd873d49f4b46fa4af81e1959.png

Link to comment
Share on other sites

11 hours ago, dolexd said:

Hi Ultraman,

Thanks for the reply. I saw this but it's still a little confusing.

Why is @vtxnum returning a single value, instead of 4 values for each vertex?

 

image.thumb.png.d2ca95ada0e57b45723346dfc7f15e0e.png

I'm not sure why,  Houdini vertex always is a little confusing for me - but if u want to get all vertex u can use primvertices[] . 

  • Like 1
Link to comment
Share on other sites

Hi,

the linear vertex number is useful, if you want to loop over all vertices at once (without looping over the prims). The linear vertex is independent from the primitive, where the vertex belongs to. Each prim has multiple vertices but each vertex has only one prim. Or lets say, if you put all vertices of all primitives into one list with unique identification (increasing numbers) you will get the linear vertices.

Just put this source code into a vertex wrangle, to see the differences (you can also see, that each point can have several vertices aswell but each (linear) vertex is exactly one point reference)

i@vn = @vtxnum;
i@pv = vertexprimindex(0, @vtxnum);
i@prim = @primnum;

or just a file

 

linear_vertex.hipnc

Edited by Aizatulin
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...