Parenting cameras to soft body?

Post here anything related to RealFlow that doesn't specifically belong in any of the forums below
Post Reply
FilippS
Posts: 7
Joined: Wed Jan 20, 2016 2:01 pm

Parenting cameras to soft body?

Post by FilippS » Thu Nov 10, 2016 11:04 am

How can you parent a camera (or any rigid object) to a soft body?
Parenting seems to work only for rigid objects, is there a workaround for soft bodies?

User avatar
tsn
Posts: 283
Joined: Fri Jun 11, 2010 7:22 am

Re: Parenting cameras to soft body?

Post by tsn » Thu Nov 10, 2016 2:56 pm

Hi FilippS,

By default that's not possible, because the position of deformable objects is calculated in a different way. When you look at the soft body's position values during simulation you will see that the XYZ remain constant.

The only workaround is a script. The script calculates the soft body's centre of gravity by using the body's vertex positions. The centre of gravity is than transferred to a Null object's position, while the camera itself is parented to the Null. I've attached an example scene for you. To see the script press Ctrl/Cmd + 2 (Simulation Flow) and take a look at the script in the "FramesPost" section. All you have to change is the name of the object you want the camera to follow.
camera_follows_softbody.zip
Cheers,
Thomas
You do not have the required permissions to view the files attached to this post.
Thomas Schlick | Next Limit Technologies

FilippS
Posts: 7
Joined: Wed Jan 20, 2016 2:01 pm

Re: Parenting cameras to soft body?

Post by FilippS » Fri Nov 11, 2016 1:46 pm

Great, this works perfect - thank you!

hmercado
Posts: 38
Joined: Sat Jan 10, 2015 2:48 am

Re: Parenting cameras to soft body?

Post by hmercado » Tue Feb 28, 2017 2:21 pm

Hi,
Could you please post the scene or the script for the Learning Edition?

Thanks

User avatar
Alex
Site Admin
Posts: 143
Joined: Mon Jun 14, 2010 9:35 am

Re: Parenting cameras to soft body?

Post by Alex » Tue Feb 28, 2017 10:22 pm

This one should work:
You do not have the required permissions to view the files attached to this post.
Alex Ribao
RealFlow Team
Next Limit Technologies

Post Reply