Transition using asset by index

good morning.
Is there the possibility of creating a structure in a layer using Asset by index that when changing the Asset makes a transition with the Asset that is at that moment and gives a transition time?

So we could use a single layer to make a transition between different Videos.

Thank you so much

E.Cueto

Hi,

I created this template

Please download it here:
testingForCueto.la (262.6 KB)

You can see how it works in this short video. As you will see, I used 3 video assets, so the indices go from 0 to 2.

The idea is this:

  • there is an incomingIndex integer variable which tells which is the next video asset
  • 2isNext? boolean variable determines whether we are transitioning from index1 to index2 or viceversa
  • index1 and index2 integer variables hold the values of the 2 asset indices we are switching between
  • opacity1 and opacity2 float variables determine the opacity of assets at index1 and index2
  • transition? boolean variable determines whether we are in transition or not.
  • transitionSpeed determines the duration of the transition

Please have a look and let me know if it helps you or not.

All the best,
Mitja

Thank you very much for your solution.
I will study it carefully because the transition when changing assets in a layer interests me, because if not in our way of working, we would need twice as many layers to make any transition from one asset to another.
Now other questions arise, for example: how to handle the opacity of the layer or if it is necessary to duplicate the entire structure of nodes of the color control, Position, Scale, etc.
A good solution would be for Transition Time to be integrated in the “Play Video or Image sequence” node or better still in the “Render to Canvas” node.
Greetings and thank you very much for your work.

E.Cueto