Page 1 of 1

A Basic Fusion Idiom for Showing a Sequence of Images

PostPosted: Sat Feb 27, 2021 4:53 pm
by sridharar
I keep seeing the following base pattern repeatedly for creating YouTube Music Videos.

I use a sequence of images (say Q) and
I want to display each of them for S seconds with fade in/out transitions,
so the length of the video (Q*S) will be the length of music (L).

I would like to create a Single Fusion Component which will display these images in sequence.
I know how to use timeline to do this manually and/or create separate Fusion Composition for each image.

But I would like an elegant way to do this in Fusion (so I can create an automated reusable fusion component).

Any tips for how to accomplish this?

I am thinking in terms of
Using Fusion KeyFrames,
Using Custom Controls providing references to the Images, and durations.


Thanks in advance

Sri.

P.S. I already have a simple python/moviepy code for doing this. But I want to do this in Resolve so I can exploit its full power for all the other things.
I am also ignoring many other factors like FPS etc which are important to consider in the mix.
Ignore those issues, as I am just trying to get a base idiom to start/run with.

Re: A Basic Fusion Idiom for Showing a Sequence of Images

PostPosted: Sat Feb 27, 2021 8:24 pm
by Sander de Regt
The easiest way to do this is put all the images you want to use in a folder. Save them with sequential numbers if you can, or create an ifl file for that folder. Fusion will be able to read that file.
Say you have 20 images, you'll get a 20 frame loader. Then you can use a timespeed set to whatever you need the time to be (say 0.02 for 2 seconds per frame)
Then you can create a fade in/out that loops every 2 seconds and loop that in the spline editor.

If you want to do cross fades from one to the other, do the same as above with two loaders but with one off-set from the other. This way you can fade to/from automatically and you should be all set.

Re: A Basic Fusion Idiom for Showing a Sequence of Images

PostPosted: Sun Feb 28, 2021 12:21 am
by sridharar
Sander

Thanks for the Wonderful insightful guidance. Just the kind I needed. Most of the things you have said here are, of course, new resolve concepts to me, and so really nice. So I will do my diligence and try to figure them out. If you can also point me to any pointers to or fusion code/example it would be a greater delight.

regards Sri.

Re: A Basic Fusion Idiom for Showing a Sequence of Images

PostPosted: Sun Feb 28, 2021 1:45 am
by sridharar
Sander

I guess there is more to the meaning of these constructs which I am somehow missing.

A)
I created an ifl using a notepad

D:\VideoProjs\DilKiNazarse\Anari1.jpg
D:\VideoProjs\DilKiNazarse\Shail1.jpg
D:\VideoProjs\DilKiNazarse\NutanRaj5.jpg


I gave the full path (windows format) for each image file.

I called the file Dil.ifl and placed it in that directory.

B)
In Resolve 16 Free Version, I created a New Fusion Composition.
Opened it in the Fusion Tab.

I created a Loader node. It opened a file dialog box for selecting the ifl file.
I navigated and selected the Dil.ifl file,

C)

I am not sure what I need to do next.. unclear about the micro details.

D)
Is the loader node just a free standing node, unconnected to anything else?
Or it needs to be connected to something else? Feed something else?
Where will I see the "3 loaders" for each of the files in the Dil.ifl?

E)
Do I need to create a Saver node?
When I added this niode, no dialog popped up asking for File Name/Location??

Does it needs to be connected to anything in or out?

F)

I do not see any "Render" node in the list (when I do control+space) only Render3D niode.
Does render here means Playing the Fusion Composition (in Fusion tab or add it to the Timeline and Play it there)?
Or create a render task in the queue and execute that task? (what is done to create a movie file and uploading to YouTube, for example).

G)

I think I understand TimeSpeed/Delay Node.. I think. I will hold that step for now.


Thanks in advance for a bit more hand holding here.

br Sri.

Re: A Basic Fusion Idiom for Showing a Sequence of Images

PostPosted: Sun Feb 28, 2021 2:16 am
by sridharar
Sander

Just for your info...

I was able to use Timespeed as follows to.

Image1->Transform->TimeSpeed1-> to Merge1
Image2->Transform->TimeSpeed2> to Merge2
Image3->Transform->TimeSpeed3-> to Merge3

and
Background->Merge1->Merge2->Merge3->Media Out.


Here is the .comp file of the Fusion Graph (removed Transforms for clarity)
(due to naming the sequence became
Background->Merge2->Merge1->Merge3->Media Out.
)


{
Tools = ordered() {
TimeSpeed1 = TimeSpeed {
Inputs = {
Delay = Input { Value = 11.1, },
Input = Input {
SourceOp = "MediaIn1",
Source = "Output",
},
},
ViewInfo = OperatorInfo { Pos = { 413.386, 69.5001 } },
},
MediaIn1 = MediaIn {
CustomData = {
MediaProps = {
MEDIA_FORMAT_TYPE = "JPEG",
MEDIA_HEIGHT = 720,
MEDIA_LAYER_DESC = {
},
MEDIA_MARK_IN = 0,
MEDIA_MARK_OUT = 0,
MEDIA_NAME = "LataMukesh1.jpg",
MEDIA_NUM_FRAMES = 1,
MEDIA_NUM_LAYERS = 0,
MEDIA_PAR = 1,
MEDIA_PATH = "D:/VideoProjs/DilKiNazarse/LataMukesh1.jpg",
MEDIA_SRC_FRAME_RATE = 24,
MEDIA_START_FRAME = 0,
MEDIA_WIDTH = 1280
},
},
Inputs = {
GlobalOut = Input { Value = 359, },
MediaID = Input { Value = "554640f0-f121-40cb-a8b2-ad2f7d79ca57", },
Layer = Input { Value = "", },
ClipTimeEnd = Input { Value = 0, },
HoldLastFrame = Input { Value = 359, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
},
ViewInfo = OperatorInfo { Pos = { 247.055, 69.5001 } },
},
Merge1 = Merge {
CtrlWZoom = false,
Inputs = {
Background = Input {
SourceOp = "Merge2",
Source = "Output",
},
Foreground = Input {
SourceOp = "TimeSpeed1",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 412.581, 128.837 } },
},
Merge3 = Merge {
Inputs = {
Background = Input {
SourceOp = "Merge1",
Source = "Output",
},
Foreground = Input {
SourceOp = "TimeSpeed2",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 548.582, 128.758 } },
},
Merge2 = Merge {
Inputs = {
Background = Input {
SourceOp = "Background1",
Source = "Output",
},
Foreground = Input {
SourceOp = "MediaIn2",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 296.699, 128.758 } },
},
MediaOut1 = MediaOut {
Inputs = {
Index = Input { Value = "0", },
Input = Input {
SourceOp = "Merge3",
Source = "Output",
},
},
ViewInfo = OperatorInfo { Pos = { 703.954, 127.047 } },
},
Background1 = Background {
Inputs = {
GlobalOut = Input { Value = 359, },
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
UseFrameFormatSettings = Input { Value = 1, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
},
ViewInfo = OperatorInfo { Pos = { 185.894, 129.49 } },
},
TimeSpeed2 = TimeSpeed {
Inputs = {
Delay = Input { Value = 42, },
Input = Input {
SourceOp = "MediaIn3",
Source = "Output",
},
},
ViewInfo = OperatorInfo { Pos = { 550.441, 203.379 } },
},
MediaIn2 = MediaIn {
CustomData = {
MediaProps = {
MEDIA_FORMAT_TYPE = "JPEG",
MEDIA_HEIGHT = 165,
MEDIA_LAYER_DESC = {
},
MEDIA_MARK_IN = 0,
MEDIA_MARK_OUT = 0,
MEDIA_NAME = "NutanRaj5.jpg",
MEDIA_NUM_FRAMES = 1,
MEDIA_NUM_LAYERS = 0,
MEDIA_PAR = 1,
MEDIA_PATH = "D:\\VideoProjs\\DilKiNazarse\\NutanRaj5.jpg",
MEDIA_SRC_FRAME_RATE = 24,
MEDIA_START_FRAME = 0,
MEDIA_WIDTH = 250
},
},
Inputs = {
GlobalOut = Input { Value = 359, },
MediaID = Input { Value = "9c4ee458-f232-4964-a688-e55ca9886d9c", },
Layer = Input { Value = "", },
ClipTimeEnd = Input { Value = 0, },
HoldLastFrame = Input { Value = 359, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
},
ViewInfo = OperatorInfo { Pos = { 298.558, 202.648 } },
},
MediaIn3 = MediaIn {
CustomData = {
MediaProps = {
MEDIA_FORMAT_TYPE = "JPEG",
MEDIA_HEIGHT = 480,
MEDIA_LAYER_DESC = {
},
MEDIA_MARK_IN = 0,
MEDIA_MARK_OUT = 0,
MEDIA_NAME = "NutanRaj3.jpg",
MEDIA_NUM_FRAMES = 1,
MEDIA_NUM_LAYERS = 0,
MEDIA_PAR = 1,
MEDIA_PATH = "D:\\VideoProjs\\DilKiNazarse\\NutanRaj3.jpg",
MEDIA_SRC_FRAME_RATE = 24,
MEDIA_START_FRAME = 0,
MEDIA_WIDTH = 640
},
},
Inputs = {
GlobalOut = Input { Value = 359, },
MediaID = Input { Value = "47e0fd49-2f88-4784-bac4-371f2c5788a7", },
Layer = Input { Value = "", },
ClipTimeEnd = Input { Value = 0, },
HoldLastFrame = Input { Value = 359, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
},
ViewInfo = OperatorInfo { Pos = { 418.464, 204.842 } },
}
}
}

P.S. I could code easily generate this type of .comp file using Windows Powershell, Mako or Perl (taking the Image List and the Length of Music..). It is an option. But your method of Loader/Saver sounds more elegant, resolve-ish, parsimonious and staying within Resolve.

Re: A Basic Fusion Idiom for Showing a Sequence of Images

PostPosted: Sun Feb 28, 2021 3:17 am
by sridharar
Just noticed that it is not possible to use an expression for

TIMESPEED speed.

But allows expression for TIMSPEED Delay. Good.

Sri.

Re: A Basic Fusion Idiom for Showing a Sequence of Images

PostPosted: Sun Feb 28, 2021 3:51 am
by sridharar
Concluded too quickly.

Any expression I put for TimeSpeed delay, that is not a simple number, is treated as an error.
The TimeSpeed node and the Merge Node it feeds become red, meaning there is an error.

Just do not know why. In every step, however simple and logical it appears, there is some unknown challenge and one is exposed to some perplexing error !!!