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?
Parenting cameras to soft body?
Re: Parenting cameras to soft body?
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.
Cheers,
Thomas
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.
Cheers,
Thomas
You do not have the required permissions to view the files attached to this post.
Thomas Schlick | Next Limit Technologies
Re: Parenting cameras to soft body?
Great, this works perfect - thank you!
Re: Parenting cameras to soft body?
Hi,
Could you please post the scene or the script for the Learning Edition?
Thanks
Could you please post the scene or the script for the Learning Edition?
Thanks
Re: Parenting cameras to soft body?
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
RealFlow Team
Next Limit Technologies