hi_dini Posted January 11, 2019 Share Posted January 11, 2019 Hi I'm just stuyding Houdini and have some problems with VEX function named 'vertexindex'. as I understood, It makes 'a linear vertex' from primitive and its vertex. and so arguments need @prinnum and vertex number. But Look at this screenshot. Pink number on shot is primitive number and the number behind of it is return of vertex number 0. I wrote the VEX code as 'i@hi = vertexindex(0, @primnum, 0);' I put 0 in third argument and I expected the result as 1 in primitive 1. because It's No.0 vertex is 1. isn't it ? but the result was 4. I'm so confused with it T_T Help me wizards !! Quote Link to comment Share on other sites More sharing options...
fsimerey Posted January 11, 2019 Share Posted January 11, 2019 I think you misunderstand what is a vertex. See the documentation here : https://www.sidefx.com/docs/houdini/model/attributes.html#geometry-components You can display the vertex number in the display option panel. Quote Link to comment Share on other sites More sharing options...
anim Posted January 11, 2019 Share Posted January 11, 2019 8 hours ago, hi_dini said: I put 0 in third argument and I expected the result as 1 in primitive 1. because It's No.0 vertex is 1. isn't it ? it is not, 1 that you are seeing and expecting is a point number you can't display linear vertex numbers in the viewport natively, you can just create vertex attribute like i@lvn = @vtxnum; and visualize that to see them essentially they are continuous numbers where first vertex of each primitive is No. of vertices of all previous primitives, second is that +1 etc. so linearly increasing numbers as if you were counting all vertices in the whole geo prim by prim in order if you want to get 1 as you are expecting use primpoint(0, @primnum, 0) or primpoints(0, @ptimnum)[0] 1 Quote Link to comment Share on other sites More sharing options...
hi_dini Posted January 14, 2019 Author Share Posted January 14, 2019 On 2019. 1. 11. at 11:50 PM, anim said: it is not, 1 that you are seeing and expecting is a point number you can't display linear vertex numbers in the viewport natively, you can just create vertex attribute like i@lvn = @vtxnum; and visualize that to see them essentially they are continuous numbers where first vertex of each primitive is No. of vertices of all previous primitives, second is that +1 etc. so linearly increasing numbers as if you were counting all vertices in the whole geo prim by prim in order if you want to get 1 as you are expecting use primpoint(0, @primnum, 0) or primpoints(0, @ptimnum)[0] Thanks for reply I understand !! Thank you !! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.