Jump to content

Multithreading in Houdini


art3mis

Recommended Posts

3 hours ago, art3mis said:

Came across this long article on multithreading in Houdini.

Can any VEX perts tell me whether this is still relevant? Especially with the H16 release?

http://www.multithreadingandvfx.org/course_notes/MultithreadingHoudini.pdf

That's a chapter from the book https://www.amazon.com/Multithreading-Visual-Effects-Martin-Watt/dp/1482243563

It's written Jeff Lait the Senior Mathematician at SESI.  It's a good book, it's definitely worth reading... and it is definitely still relevant, a lot of it is the theory behind how Houdini works and how multi threading works in Houdini and the challenges thereof. 

However will it really help you with VEX?  Probably not.

 

Link to comment
Share on other sites

I also have a question regarding multithreading in wrangles (or for loops in general in houdini).

I want to create a line between two points in a wrangle node according to their attributes but it creates two lines, one for each point i want to connect. The add SOP does it correctly.

Is there something I'm just obviously missing or doing wrong?

Here's a quick example:

 

 

wrangle_multithread.hipnc

Edited by Gorrod
edited file
Link to comment
Share on other sites

In your Detail mode version you are still looping over two points, that is why you are generating two lines. Instead gather up the two points you want to connect and simply issue one line per set of points.

In your Points version there is no need to wrap the entire logic in an IF statement that filters by group. You have already selected the group using the outer node group field.

 

Edited by Atom
Link to comment
Share on other sites

Thanks Atom, I still have a question though...

I tried to change the connectMe attribute for the condition in the "Points" version so that the twelfth point does not create a line also.

So when the wrangle loops over the point with ptnum == 2 it changes the connectMe attribute and the tweltfth point does no longer meet the requirements for creating another line.

I tryed to break down the problem and probably failed a bit to present it correctly...

 

From my understanding the for loop should go over the point 2 first, change the condition attribute of the 12th point which then no longer meets the requirement and does not get processed at all. 

But the for loop and the point wrangle both process the points at the same time, so they both meet the requirements for the if statement and create two lines instead of one.

 

So basicly what i want to do is go over the points one by one, starting at a point and then moving on to the next one (so I can change an attribute of a point while iterating through another one). I tried that using a for loop and the point wrangle, but neither seems to work that way.

 

 

 

Link to comment
Share on other sites

If you are in running in any mode other than detail mode, the entities do not know about what is processed on the other entities.
I personally like to think of VEX per points or primitives, as a shader language, as it uses a lot of the same logic.

In detail mode, you can basically treat it as most other languages, Java would be a language that is one of the most close to VEX I think.

So if you want have your wrangle do operations based on iterative results of the different objects (points/primitives) you either need to put the wrangle in a forloop,
use detail mode instead, or revise you logic, so it would be compatible with "shading-logic" ;)  

Edited by acey195
grammar
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...