Jump to content

Prevent collision within SOP based 'dynamics'

Recommended Posts

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 by anbt
Link to comment
Share on other sites

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

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. 

  • Like 1
Link to comment
Share on other sites

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


Link to comment
Share on other sites

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

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