Community
Bifrost Forum
Welcome to the Bifrost Forum. This is the place for artists using Bifrost to ask and answer questions, browse popular topics, and share knowledge about creating effects procedurally using Bifrost. You can also visit the Bifrost Community on AREA to download an array of ready-to-use graphs, read Bifrost news and updates, and find the latest tutorials.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPM simulate but with a goal object

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
gary.noden
222 Views, 3 Replies

MPM simulate but with a goal object

Hi there, guys

 

I was wondering if any of you have a solution to a problem.  I am simulating a flag for a project and the MPM solver looks better than the nCloth alternative, but I need to be able to morph the cloth back to a flat flag, or as close to that as possible.  I have found a way to simulate a blend shape, by subtracting the points from one mesh from a source mesh then adding the resulting delta back to the base mesh to make a fake blend, but when I try to reconnect the simulation into the base subtract it throws an error.  I think I am missing something between the cloth_mesh output and the get_point_position that makes the cloth output be regarded as a mesh.


This is the blendshape solution which works great.This is the blendshape solution which works great.When I plug the solver cloth_mesh into the set_position_points, I get this responseWhen I plug the solver cloth_mesh into the set_position_points, I get this responseWhen I plug in the cloth_mesh into the get_point_position it seems to break the subtract.  I am assuming I need something between the solver and the get_point_position.

 

Anyone any clues?  I need to a make the flag appear to go back to the original flag shape like a goal object in nCloth.

 

3 REPLIES 3
Message 2 of 4
mjcg91
in reply to: gary.noden

Look at the port shapes. The output from the solver is an array, while your base mesh is a single mesh. What happens is that you are subtracting a 1D array from a 2D array so an error appears. Use get_in_array to get your mesh out from the solver before doing the operation.

This won't work as a goal constraint however. Like this you will blend the result of the simulation with the base mesh so you will not get the behavior you are looking for. You should set a constraint between the source and the solver.

Maxime Jeanmougin - Technical Artist
https://maximejeanmougin.com

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
Message 3 of 4
gary.noden
in reply to: gary.noden

Great, thank you.

 

So you're suggesting to constrain a copy of the flag mesh and use the weight to pull it in or drop it off?  That's exactly how I would do it with nCloth.  Genius!  Sometimes it's right in front of your face, thanks!

Message 4 of 4
mjcg91
in reply to: gary.noden

Yes. You could just constrain the source mesh with the goal mesh itself and it should work. You could even constraint it with the source mesh itself. depending on your setup it should work.

Maxime Jeanmougin - Technical Artist
https://maximejeanmougin.com

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report