Juraj 283 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 Share this post Link to post Share on other sites
iamyog 59 Posted January 16, 2017 primuv() should do: http://www.sidefx.com/docs/houdini/vex/functions/primuv Share this post Link to post Share on other sites
Juraj 283 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 Share this post Link to post Share on other sites