Jump to content

pack primitives viewport draw (OpenGL Vertex Cache)


Lubas

Recommended Posts

I don't know if I got it correctly, but Pack Primitives run in Houdini as points, and when you pack and and select Display Full Geometry, the original geometry runs only over the OpenGl Vertex Cache.

I have a RBD sim with 7000 pieces, the size of the pack sim is 10Mb for frame, the size of the 7000 Pieces unpacked are around 300Mb, probably not even one million prim. its really not high poly sim... its getting annoying slow to scrobble over the timelime.. like a minute per frame, and there is not much poly to draw..

I run over Performance Benchmark, and the "Geometry setup" under the Viewport/Camera is the one that makes everything get so slow.. I believe this is the GPU work to place each Geomertry at the pack position... I check if the Vertex Cache was full or something like that, and it only uses 600MB.

I'm using a Titax X, there is 11Gb of ram free... My Cache is under a M.2 EVO pro... there is no bottle neck in hardware.. Linux and Windows are getting the same time results. 

There is any way to make it draw fastes?

I have to keep show as Full Geometry, I'm not sure if I understood the workflow of pack prims in the viewport correctly.

Link to comment
Share on other sites

I was using a pack sop inside a for loop for each piece, I don't quite understand why is way faster now,  but I remove the Pack from inside the for each and place a Assemple after... is not RT, but at least 10 times faster..

Link to comment
Share on other sites

Currently, each loop in a for each loop works in serial - one after the other.

You can now "compile" loops to improve things, however not all nodes are supported. 

My guess is the Assemble works in more parallel fashion.

This video is very informative:

https://www.sidefx.com/tutorials/houdini-16-masterclass-compiled-sops/

 

Link to comment
Share on other sites

Assemble creates Packed Fragment primitives, while Pack just creates Packed Primitives. A Packed Fragment refers to a portion of an underlying shared geometry. In this case, all the packed fragments will refer to the same geometry, just different parts of it. The viewport can then draw this as a single mesh.

But when you pack to Packed Primitives, the parts of the geometry you are packing from are extracted into new geometry for each packed prim. When the viewport goes to draw this it sees 7000 separate meshes. This takes much longer to draw as the overhead of sending 7000 batches is a long higher than sending a single batch. It's this overhead that slows things down a lot.

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

1 hour ago, malexander said:

Assemble creates Packed Fragment primitives, while Pack just creates Packed Primitives. A Packed Fragment refers to a portion of an underlying shared geometry. In this case, all the packed fragments will refer to the same geometry, just different parts of it. The viewport can then draw this as a single mesh.

But when you pack to Packed Primitives, the parts of the geometry you are packing from are extracted into new geometry for each packed prim. When the viewport goes to draw this it sees 7000 separate meshes. This takes much longer to draw as the overhead of sending 7000 batches is a long higher than sending a single batch. It's this overhead that slows things down a lot.

That sounds interesting Mark, didn't know about that. Does this translate into the same thing for Mantra? 

Link to comment
Share on other sites

On 13/10/2017 at 1:15 PM, snoot said:

Currently, each loop in a for each loop works in serial - one after the other.

You can now "compile" loops to improve things, however not all nodes are supported. 

My guess is the Assemble works in more parallel fashion.

This video is very informative:

https://www.sidefx.com/tutorials/houdini-16-masterclass-compiled-sops/

 

running the for each was not the issue, but thanks.

 

On 13/10/2017 at 6:07 PM, Skybar said:

That sounds interesting Mark, didn't know about that. Does this translate into the same thing for Mantra? 

I will try both and see.. but probably I will avoid the pack and just use assemble. the RBD sim is also faster.

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