Using motion/orientation from particles in vellum sim

   2045   4   2
User Avatar
Member
134 posts
Joined: Sept. 2021
Offline
Hi!

I'm working on simulating dollar bills falling and flying around in the wind.

My first approach was to use a vellumsource node to instance a bunch of little cloth pieces. This works great, but I had trouble getting the dollars to spin properly.

So, I wrote some code that applies spin to them after the vellum sim. It also interpolates the piece rotation such that the rotation ends up on a multiple of 2PI when it hits the ground and is thus still able to use the collision from the vellum solver without the orientation during collision being incorrect:

Image Not Found
(see attachment)


However, I now need to get the money to collide with more complex objects than a ground plane. Using this setup which applies spin to the pieces after the simulation, if the money collides with any other objects, the collision will look wrong because the money isn't oriented at that moment in time like it was oriented during the simulation.

Two potential solutions come to mind, but I'm not sure how to approach either of them:
  1. Come up with a better system for applying angular velocity throughout the vellum simulation so that I don't have to spin each piece after the simulation. (I tried this but I could never get it to play right with air resistance.)
  2. Or, use a particle simulation that uses a pop spin node to generate spin on the particles due to some rule and then use that motion to drive the translation and orientation of the dollars within a vellum simulation so that I can get proper cloth collisions (the issue I'm running into now is that after doing a particle simulation, copying money to the points, and then starting a vellum simulation is that the vellum simulation overrides the motion of the pop simulation).

If I could get any pointers on how to approach either of these two solutions, that would be great! Thanks.
Edited by AnsonSavage - May 25, 2023 13:09:21

Attachments:
money_out_window_moving_on_ground.mp4 (184.4 KB)

User Avatar
Member
293 posts
Joined: July 2013
Offline
raycast downward and get the normal at hit location of the object below should go a long way
More code, less clicks.
User Avatar
Member
134 posts
Joined: Sept. 2021
Offline
Jonathan de Blok
raycast downward and get the normal at hit location of the object below should go a long way
Hey, that's a great thought!

One issue with applying rotation post sim is that it creates self collisions. This wouldn't be fixed by the pop sim approach (I don't think, unless maybe I can figure out how to use a multisolver?)



I guess the issue with only raycasting downward is that a lot of the collision geo will be hit horizontally.

Really great thought though...

Thanks,
Anson
Edited by AnsonSavage - May 25, 2023 16:54:46

Attachments:
2023-05-25_14-44_1.png (164.9 KB)

User Avatar
Member
134 posts
Joined: Sept. 2021
Offline
I figured out the best of both worlds!

Inside the vellum solver, I plopped down a sopsolver:





Then inside the sopsolver, I use a for each connected piece to rotated each piece around its local axis.



The great thing about doing it here is that each frame, it is then fed into the vellum solver for collisions!
Edited by AnsonSavage - May 26, 2023 13:02:27

Attachments:
2023-05-26_10-59.png (61.4 KB)
2023-05-26_11-00.png (119.8 KB)

User Avatar
Member
1 posts
Joined: Oct. 2023
Offline
This is a really cool solution, I'm having the same issue. Would you mind sharing the sop solver?
  • Quick Links