Jump to content

Houdini 15 Point SOP


tveda

Recommended Posts

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 by Allegro
  • Like 1
Link to comment
Share on other sites

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 by Allegro
Link to comment
Share on other sites

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);
}
Link to comment
Share on other sites

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 by Allegro
Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...