Layermix TOP cropping behaviour

First of all, the Layermix TOP is great. It makes compositing much easier. But one thing bothers me and that is the cropping behaviour.

The way it crops changes with the Prefit mode. It mostly just zooms in, which can also be achieved using scale and pivot. It looks like the cropping is applied before the prefit and scaling. The order seems to be:

  • Crop
  • Prefit
  • Scale
  • Translate

It would be great to be able to control the order in which cropping is applied. In my opinion, for most use cases you want cropping to happen after scaling, so it does not affect the scale of the image but simply trims the edges. Like this:

  • Prefit
  • Scale
  • Crop
  • Translate

More users that have the same issue as me?

Hey @metmen

The behaviour you’re seeing between crop and pre-fit is the expected result since pre-fit determines how the layers fill the composite. That being said, I do see the issue you’re describing, and I agree that it can feel unintuitive.

To help us scope out this RFE, can you provide us with more examples of what you’re looking for? If we were to change the cropping behaviour so that it trims the layer after all operations, would that suffice? In your suggested order, how do you see the other parameters playing out such as horizontal and vertical justify?

Thank you Daniel,

I think there are two solutions.

Option 1: See attached project. The order stays the same, but the cropping keeps the original resolution of the content. So it blanks out the image instead of doing a real crop. (It would be great to have this mode inside the Crop TOP as well.) The GLSL TOP in my example handles the cropping, and the Fit TOP handles the rest.

Option 2: Have the cropping happen at the very end, using the LayerMix TOP’s output resolution to trim the layer.

Does that make sense?

layermix.toe (7.7 KB)

Hey @metmen

Thanks for the options and the example toe file.

If I understand it correctly, is option 1 more of a mask operation? This seems reasonable, so I can create an RFE to discuss this further internally with the team.

Can you clarify a bit more about option 2? If you’re cropping relative to the Layer Mix TOP’s output resolution, are you cropping the entire output or just the layer? If the latter, how would it work if a layer’s resolution is different from the Layer Mix TOP’s resolution?

Thanks Daniel.

I took a look at how some NLEs handle this. In Final Cut Pro there are three options inside the Crop properties:

  • Trim (default) — masks the image, just as in my proposal.
  • Crop — crops the image, just as the LayerMix TOP and Crop TOP currently do.
  • Ken Burns — not relevant for TD.

In Resolve, the default behaviour is to trim the image, just like FCP’s default and my Option 1. There is also a “Retain Position” checkbox that, when enabled, changes the order from Crop > Zoom > Position > Rotation to Zoom > Position > Crop > Rotation, which is close to my Option 2.

Conclusion: My suggestion would be to follow the same approach as FCP, since it is closest to the current behaviour in TouchDesigner. Add a crop mode parameter with two options: Crop (default, for backward compatibility) and Trim. Crop stays as it is. Trim keeps the input resolution and masks the image instead.

This could also be implemented in the Crop TOP.

Hi @metmen

Thanks a lot for your notes. I’ll add them to the RFE.

I’ll keep you updated.