Jump to content

Swaping Low res pieces with high res


temzy

Recommended Posts

Hey there,

I'm doing brick house destruction,  I want to simulate with low-resolution pieces and then swap them with high-resolution pieces. But the problem is If I use Voronoi fracture on Hires pieces the fracture will be different than on low res pieces. How Can I fracture my geometry to have the same pieces just with more detail? So the "transformpieces" node will work properly. I'm also attaching scene file.

 

 

lowres_bricks.png

hires_bricks.png

Setup.hipnc

Link to comment
Share on other sites

10 hours ago, bunker said:

The voronoi fracture SOP will create different amount of pieces for the lowres and hires geo,
even if you use the same voronoi cell points, so that won't work.
A better way is to take your hires pieces and create lowres pieces from them for simulation.

Setup2.hipnc

 

This is great, thanks a  lot! The only problem which I have with this is If I use unpack SOP and connect adjacent pieces SOP with connection type "Adjacent Pieces from Surface Points"  there won't be any connections, only "Adjacent Pieces from Points" works. Is there anything I can do about that?

Link to comment
Share on other sites

2 hours ago, bunker said:

awesome!

I noticed that if I remove "pack" and "attribute wrangler" from the for each loop and add "assemble node" in the end, the amount of pieces changes and the" transform pieces node" won't work correctly. Also If the "pack node" is left in the for each loop the sim is much slower even if the pieces are low resolution. In general, the sim works faster with high-resolution pieces than low resolution, which doesn't make sense. I'm trying to solve this but I'm not getting it to work properly. 

Link to comment
Share on other sites

Just needed to promote the "name" attribute from point to primitive :D Setup3.hipnc
there seems to be a small bug (or feature?) in the connectAdjacentPieces, the connection type modes are inverted.
maybe someone else knows what's going on? I usually create my constraints in a wrangle, it's a lot more clear IMO.

hope that helps
 

Link to comment
Share on other sites

12 hours ago, bunker said:

Just needed to promote the "name" attribute from point to primitive :D Setup3.hipnc
there seems to be a small bug (or feature?) in the connectAdjacentPieces, the connection type modes are inverted.
maybe someone else knows what's going on? I usually create my constraints in a wrangle, it's a lot more clear IMO.

hope that helps
 

Yes, constraints are working now, but if you enable all 4 brick walls in the setup and then reduce their resolution, I'm getting longer simulation time with low resolution pieces than high resolution pieces. But if you don't pack every piece in for each loop and use assemble node outside the loop simulation will be 3x faster but then "transform pieces node" won't work.
 

Setup3_02.hipnc

Link to comment
Share on other sites

the DopImport node has an Object Mask, that's where your RBD object name should be set, in your case HIGH_RES_PIECES or LOW_RES_PIECES, so
*_RES_PIECES will work.

if you simulate with hires pieces, the collision shapes (convex hulls) are created automatically in DOPs, you can see them if you toggle on "Show Guide Geometry" (blue shapes). That might work OK in some cases but you don't have any control over the collision shapes/details. I ran 2000 frames simulations for lowres and hires, both are very similar ( lowres: 56s hires: 58s). Those times are for simulation + writing the points to disk only. Displaying objects in DOPs or in SOPs is a completely separate thing, that's much slower. Also you shouldn't turn on "Show Guide Geometry" while simulating and displaying the objects inside DOPs, it makes everything much slower too. I feel like I should make some tutorials :D

Setup3_03.hipnc

 

Link to comment
Share on other sites

the Assemble SOP is a digital asset so you can have a look, it's using a Pack SOP inside.
I fixed the issue by creating the name prim attribute inside the forloop but left the pack SOP after the loop.
Something got changed since H17.0.416, I couldn't see that at home since I have a slightly older build.


 

Edited by bunker
Link to comment
Share on other sites

  • 2 weeks later...
On 2019-01-02 at 3:59 AM, temzy said:

I still don't get it why is the simulation "inside dops" much faster If I use assemble node at the end of for each loop than without? I really want to understand this because it bothers me too much :D

Houdini bullet uses packed primitives. I guess you have 'create packed geometry' checked on the assemble node. So your geometry now is represented by point which uses the name attribute to reference the original geometry. When you import these points inside a top using a RBD packed Object node, it creates proxy mesh for your geometry. This is actually the base of bullet. This makes things faster as you only have convex hull for your geometry. When you use an unpack node, it recreates the initial geometry back to your points referencing the name attribute.

Cheers!

Link to comment
Share on other sites

9 hours ago, XRM said:

Houdini bullet uses packed primitives. I guess you have 'create packed geometry' checked on the assemble node. So your geometry now is represented by point which uses the name attribute to reference the original geometry. When you import these points inside a top using a RBD packed Object node, it creates proxy mesh for your geometry. This is actually the base of bullet. This makes things faster as you only have convex hull for your geometry. When you use an unpack node, it recreates the initial geometry back to your points referencing the name attribute.

Cheers!


Yes, I know that. Please check out the hip file. I left some notes there, Its easier to explain what I mean. 

Setup3_06.hipnc

 

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