Masoud Posted June 19, 2021 Share Posted June 19, 2021 Hi guys, I need the grains to preserve their basic shape, but after simulation, it starts to shrink. How can I fix this? Thanks for helping. Quote Link to comment Share on other sites More sharing options...
Librarian Posted June 19, 2021 Share Posted June 19, 2021 int n[] = pcfind(0, 'P', @P, @pscale*2, 100); vector change = 0; float weight = 0; foreach (int npt; n) { if (npt == @ptnum) continue; vector op = point(0, 'P', npt); float d = length(op - @P); if (d < @pscale*2) { change += normalize(@P-op) * (@pscale*2-d)/2; weight += 1; } } @P += change / weight; int n[] = pcfind(0, 'P', @P, @pscale*2, 100); vector change = 0; float weight = 0; foreach (int npt; n) { if (npt == @ptnum) continue; vector op = point(0, 'P', npt); float d = length(op - @P); if (d < @pscale*2) { float omass = point(0, 'mass', npt); float ratio = omass / (@mass + omass); change += normalize(@P-op) * (@pscale*2-d) * ratio; weight += 1; } } @P += change / weight; if (i@has_pprevious) @v = (@P - v@pprevious) / @TimeInc; float ratio = omass / (@mass + omass); change += normalize(@P-op) * (@pscale*2-d) * ratio; JEFF LAIT- MASTERCLASS ...I think 1 Quote Link to comment Share on other sites More sharing options...
Masoud Posted June 20, 2021 Author Share Posted June 20, 2021 Thanks "Tesan" for the reply, but sorry I didn't get that Quote Link to comment Share on other sites More sharing options...
Librarian Posted June 20, 2021 Share Posted June 20, 2021 Please post A file @Masoud Quote Link to comment Share on other sites More sharing options...
Masoud Posted June 21, 2021 Author Share Posted June 21, 2021 Hello; Here is my scene. KeepShapeOfGrains.hip Quote Link to comment Share on other sites More sharing options...
Ultraman Posted June 21, 2021 Share Posted June 21, 2021 18 minutes ago, Masoud said: Hello; Here is my scene. KeepShapeOfGrains.hip Here u are Masoud maybe is that ur means KeepShapeOfGrains.hip Quote Link to comment Share on other sites More sharing options...
Masoud Posted June 22, 2021 Author Share Posted June 22, 2021 Hi Ultraman, My simulation is based on the "POP Solver", so I can't use Vellum. Quote Link to comment Share on other sites More sharing options...
Masoud Posted June 23, 2021 Author Share Posted June 23, 2021 (edited) I know I can use the "Awake node", but how can I make the grain pile harder to collapse, without using "Awake"? Edited June 23, 2021 by Masoud Quote Link to comment Share on other sites More sharing options...
Ultraman Posted June 23, 2021 Share Posted June 23, 2021 On 6/22/2021 at 11:55 AM, Masoud said: Hi Ultraman, My simulation is based on the "POP Solver", so I can't use Vellum. POP Grain GrainHold.hip Quote Link to comment Share on other sites More sharing options...
Masoud Posted June 26, 2021 Author Share Posted June 26, 2021 Hi Ultraman, Your "Point Separation " is very low resolution. If you change it from 0.1 to 0.01, then the grain shape will collapse. Quote Link to comment Share on other sites More sharing options...
Ultraman Posted June 27, 2021 Share Posted June 27, 2021 On 6/26/2021 at 3:28 PM, Masoud said: Hi Ultraman, Your "Point Separation " is very low resolution. If you change it from 0.1 to 0.01, then the grain shape will collapse. maybe need to increase stiffness or iteration when u add more point . Quote Link to comment Share on other sites More sharing options...
Masoud Posted June 29, 2021 Author Share Posted June 29, 2021 Hi guys, I found this helpful document on the SideFX help page: https://www.sidefx.com/docs/houdini/grains/stablepile.html 2 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.