anbt Posted June 24, 2021 Share Posted June 24, 2021 (edited) Hi there, I am growing and instancing a few plants on a surface. The growth animation is done at the SOP level. I am now trying to have them collide with one another. But because everything is done in SOP, I actually don't know how to tackle this issue. Any idea? Thank you Edited June 24, 2021 by anbt Quote Link to comment Share on other sites More sharing options...
anbt Posted June 25, 2021 Author Share Posted June 25, 2021 no one? Quote Link to comment Share on other sites More sharing options...
Whatsinaname Posted June 26, 2021 Share Posted June 26, 2021 Use volumes. a) turn the object you want to collide it with into a VDB. b ) pipe the geo object (your plant...whatever) into a point wrangle. c) pipe the VDB into the point wrangle's 2nd input. float f = volumesample(1, "surface", @P) //samples a volume called "surface" which is fed into the second input as counting starts at 0 if(f<0) { @Cd=set(1,0,0); } else { @Cd=set(0,1,0); } This will colour the collided points red. Depending on your implementation of the growth animation, you can now use this collision information to make your 'plant' do something when it is colliding with that collision object. The reason why you don't get an earlier answer is probably that nobody knows how you implemented that 'animated growth'. Your description is rather murky and there are many ways to do this. 1 Quote Link to comment Share on other sites More sharing options...
anbt Posted June 26, 2021 Author Share Posted June 26, 2021 thanks! ok, I understand that I was quite unclear. I animated the growth of different plants using different techniques. One is a rigged curve fed into a Revolve Sop. The animation is made of keyframes. I am also using a carve node for the stem, and I animate (with keyframes) the u and v. Basically only SOPS and keyframes. I am using some noise on the points to make them move. Then other ones are more or less done in the same way using only SOP nodes and instancing some geometries along the normals of the points of the stem. I am looking for different methods to make SOP based geo collide with each other. It might sound extremely vague, sorry for that, I don't know how to be more specific. So, the method would be to use volumes and some vex? If anyone knows some other ways, even if it doesn't apply to my issue, I'd still love to know. I am looking for directions to experiment with. Thank you very much Quote Link to comment Share on other sites More sharing options...
anbt Posted June 26, 2021 Author Share Posted June 26, 2021 (edited) maybe I could turn those plants into a really stiff vellum and the collisions would be handled there, but with all the remeshing needed to get the geometry to work with vellum, I am not sure I would end up with a satisfying result. And it might be super slow if I instance thousands of plants!!! Edited June 26, 2021 by anbt 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.