Raman Siddhartha
raman.siddhartha
About Me
Connect
LOCATION
Not Specified
WEBSITE
Houdini Skills
Availability
Not Specified
Recent Forum Posts
Linear Vertex March 27, 2021, 10:10 a.m.
Hi Tomas,
Thanks for the detailed explanation. This really helps. I understand it now.
My confusion was each primitive was showing vertex number 0 - 3 in the scene view, so I was getting confused why @vtxnum was showing values that were 4 8 12 and so on. Your explanation clears it up.
Thanks a ton.
Thanks for the detailed explanation. This really helps. I understand it now.
My confusion was each primitive was showing vertex number 0 - 3 in the scene view, so I was getting confused why @vtxnum was showing values that were 4 8 12 and so on. Your explanation clears it up.
Thanks a ton.

tamteraman.siddhartha@vtxnum in primitive mode contains just linear vertex number of the first vertex of that primitive
So does @vtxnum have the same value for each vertex of the same primitive?
the same way as @ptnum will contain just point number of the first point that the primitive is attached to
since your code is run per primitive you will only get one value per primitive, so it's usually the first one
if you run per vertex however @vtxnum will contain linear vertex number of current vertex
its called linear vertex number cause the numbers are organized in a linear way, so if you have 2 primitives, each has 3 vertices then primitive 0 will have vertices 0 1 2 and primitive 1 vertices 3 4 5
if you add another primitive, let's say quad, then that primitive 2 will have vertices 6 7 8 9, let's say another primitive 3 with vertices 10 11 12
etc.
if you then run wrangle over primitives, as mentioned @vtxnum for each primitive will return linear vertex number of the first vertex of that prim so for primitive 0 it will be 0, for primitive 1 it's 3, for primitive 2 it's 6 and for primitive 3 it will be 10 , ...
if you want to get all vertex numbers for the prim you have to get them using primvertices() function
Linear Vertex March 26, 2021, 7:07 p.m.
Hi jsmack,
Thanks for the reply. So does @vtxnum have the same value for each vertex of the same primitive?
Thanks for the reply. So does @vtxnum have the same value for each vertex of the same primitive?
Linear Vertex March 26, 2021, 3:11 p.m.
Hello,
I am having a little hard time to understand linear vertex and @vtxnum. Why is @vtxnum returning a single value instead of a value for each vertex?
How does the @primvertex function work? (vertex.png)
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? (second image - vertex2.png)
I am having a little hard time to understand linear vertex and @vtxnum. Why is @vtxnum returning a single value instead of a value for each vertex?
How does the @primvertex function work? (vertex.png)
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? (second image - vertex2.png)