The task was to make an animation with a turn of the carpet attached to one of the buildings.
The customer sent a set of footages, of which I chose the most successful – where people were visible. This gave the footage more realistic.

First of all, I made a blank for the simulation – this is the usual plane, folded with the Bend deformer. And I started testing simulations. I used fabric simulation for this. In order for the carpet to be stiffer than ordinary fabric, I tried to make large polygons, they were less deformed. Also, large polygons stretched less. Another plus of such a grid was that the simulation was calculated faster. And so that the carpet was not square, I already made subdivision and gave thickness with the help of generators.

When I prepared a simulation that would suit me, it remained to make 3D tracking of the scene. For tracking, I used PFTrack software.

Automatic tracking was successful except for the incorrect distance determination. Neighboring points were located at different distances from the camera. Therefore, I had to edit the values with my hands, roughly representing the distance to the point. And also added a few points manually to improve the process.
And then he placed the already necessary surfaces in the 3D space of the tracker to use them for the correct location of the carpet.

After the tracking export, it remains for me to set up the scene and transfer my simulation to this project.
But there was one big problem. When simulating, the fabric stretched no matter what parameters I chose. Then I found out that this is a feature of simulation in Cinema4D and even thought about how to simulate Houdini. I found an opportunity to reduce the stretching of the fabric, but still the distortions remained. Before that, I worked with a homogeneous fabric without inscriptions and did not particularly notice such an effect.
So I went the other way and just make distortion in the texture itself so that it compensates for the stretching of the fabric. i.e. I squeezed the top where there was the largest stretch, and stretched it below, where the stretch was almost invisible.

The last step was to render the project and post processing. I noticed on processing that the prospect was slightly distorted and corrected with post-processing in After Effects. Also added the sounds of the fabric and the zoom that would move away from the carpet to show people and the whole scene as a whole:

And also made a color correction to fit the carpet into the environment.
Final result:
Direct link: https://www.youtube.com/shorts/_xbyNYT4BsM
