Search - User list
Full Version: Using motion/orientation from particles in vellum sim
Root » Technical Discussion » Using motion/orientation from particles in vellum sim
AnsonSavage
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.
Jonathan de Blok
raycast downward and get the normal at hit location of the object below should go a long way
AnsonSavage
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
AnsonSavage
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!
merlincg
This is a really cool solution, I'm having the same issue. Would you mind sharing the sop solver?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB