Juraj Posted January 16, 2017 Share Posted January 16, 2017 Hello, is there a VEX function for sampling N at arbitrary location in NURBS surface (based on uv location for example)? One way would be to convert NURBS to polys and get normals from them. But I thought that maybe there is easy way of getting N directly from NURBS? Thanks, Juraj Quote Link to comment Share on other sites More sharing options...
iamyog Posted January 16, 2017 Share Posted January 16, 2017 primuv() should do: http://www.sidefx.com/docs/houdini/vex/functions/primuv Quote Link to comment Share on other sites More sharing options...
Juraj Posted January 16, 2017 Author Share Posted January 16, 2017 (edited) Thanks, it works, I can get P and N attributes (even if there is no N attribute at NURBS surface) Is there a list of attributes I can import from NURBS surface? maybe tangent, bitangent? However I am not sure if it is a bug or something, but it is super slow to sample those attributes. It takes 2 seconds to compute very simple wrangle on quite fast pc int prim; vector uv; float dist = xyzdist(1, v@P, prim, uv); vector N = primuv(2, "N", prim, uv); if (dist < chf("tr")) { v@P = primuv(2, "P", prim, uv) + N*dist; } If I use the same wrangle but with NURBS converted to polys, then I have realtime feedback when modifying NURBS surface. Edited January 16, 2017 by Juraj typo 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.