Allegro Posted February 4, 2016 Share Posted February 4, 2016 (edited) Stephen, you mean for a tangent direction? Surely, Polyframe SOP is much easier/faster for that Not exactly the same. Put down a point sop, and turn on "Add Edge Force" under the Force tab and take a look at the edge_dir attribute that gets created. It creates an attribute that points to the next point in the curve as opposed to a tangent. On a curve with 1,000,000 points it also takes 74ms on my computer, whereas the polyframe takes 140ms. So it doesn't break the bank in those very rare situations I've needed it. Edited February 4, 2016 by Allegro 1 Quote Link to comment Share on other sites More sharing options...
mestela Posted February 4, 2016 Share Posted February 4, 2016 (edited) @N = @P - point(0,'P',@ptnum+1); 1,077,794 points wrangle: 0.13ms point sop: 33.5ms No I didn't get the decimal place wrong. Edited February 4, 2016 by mestela Quote Link to comment Share on other sites More sharing options...
Allegro Posted February 4, 2016 Share Posted February 4, 2016 (edited) Right but... When I test it on 100 points (which is much more likely if I'm bothering to create this particular attribute:- the point sop takes 0.16ms- the wrangle takes 0.17ms - it takes more time to type the expression than to click the option from a drop down (maybe you type much faster - Assuming I don't want to overwrite N, but create a new vector attribute I then need to either : -- write additional script to convert my edge_dir to a true v rather than a 3v-- or use an attribute create beforehand to set it up as a true v -- I also have to write a condition in there so that point 0 gets an attribute. Edited February 4, 2016 by Allegro Quote Link to comment Share on other sites More sharing options...
mestela Posted February 4, 2016 Share Posted February 4, 2016 Heh, right, bullet counterpoints: -with performance that close, I'd definitely go the wrangle; the more vex I write, the better I get, and I know performance will never be an issue if shot complexity scales -yeah i type fast. you can also save it in a preset or in the vexpressions.txt file so it appears in the dropdown, but see the previous point. -It's not locked to @N, it was just a lazy way for me to visualise that the expression worked. As such: --type v@name to assign to an arbitrary vector of your choosing: v@myvec = @P - point(0,'P',@ptnum+1); --it doesn't have to be pre-created, the wrangle will create the attribute if it doesn't exist --Edge cases are boring, true. Could throw ^0 onto the group, but again, I like to practice my vex whenever possible, so I'd probably wrap it in an if statement: if (@ptnum != 0 && @ptnum != @numpt-1) { v@myvec = @P - point(0,'P',@ptnum+1); } Quote Link to comment Share on other sites More sharing options...
Allegro Posted February 4, 2016 Share Posted February 4, 2016 (edited) but v@myvec doesn't create a vector, it creates a 3f, so you need to use http://www.sidefx.com/docs/houdini15.0/vex/functions/setattribtypeinfoas well. It's not a matter of practice at this point, it's you creating more work for yourself because you want to. Which is ok, but I personally try not to exert more effort on a task than I save by doing it "the right way". Edited February 5, 2016 by Allegro Quote Link to comment Share on other sites More sharing options...
mestela Posted February 5, 2016 Share Posted February 5, 2016 Yeah, 3f vs 3fv is a little irritating, would be nice to have a @ shortcut for that in future. Practice is one thing, I still prefer wrangles for performance and versatility, but a big thing for me is clarity. Point sops, and even vop networks over 10 nodes don't read at a glance; you have to hope you've named the node clearly, otherwise it takes a bit of hunting to know exactly what you're doing. Worse if it's a hip from someone else. Most wrangles are under 10 lines, and they're quick to read and understand. Well, mine are anyway. Quote Link to comment Share on other sites More sharing options...
Allegro Posted February 5, 2016 Share Posted February 5, 2016 You could request that you be added to RFE ID# 66570 if you'd like to help nudge them into improving the 3f vs v which was originally added by Rob East Quote Link to comment Share on other sites More sharing options...
mestela Posted February 5, 2016 Share Posted February 5, 2016 Done! Quote Link to comment Share on other sites More sharing options...
Netvudu Posted February 5, 2016 Share Posted February 5, 2016 Not exactly the same. Put down a point sop, and turn on "Add Edge Force" under the Force tab and take a look at the edge_dir attribute that gets created. It creates an attribute that points to the next point in the curve as opposed to a tangent. On a curve with 1,000,000 points it also takes 74ms on my computer, whereas the polyframe takes 140ms. So it doesn't break the bank in those very rare situations I've needed it. That´s very nice. I didn´t know this trick. I always used edge Force just for particle situations, specially back with the old POP system. 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.