Blending images in real time?

Jun 18, 2012 at 1:28pm

Blending images in real time?

Hi,

First of all, apologies in advance for the lack of research on my part into this, Im sure a healthy dose of the tutorials would solve my problem after a bit but I dont have the time and Jitter is a bit confusing to me at the moment.

I need to incorporate images into an installation Im building. I want to be able to control what image is displayed at any given time using a slider for example. So say if the first image is between 1-10, the next between 9-18 etc they would blend as the data input changes and transitions. These are all still images by the way, no movies. My logic for doing this was to have all the images going into a window and then just using the slider info to control their brightness, but using the quicktime object and brcosa object to do this I just got the images flickering over one another.

Can anyone give me help on achieving this? I know im asking for basic information here but I was asked by the commisioner of the piece to implement this and I dont have time to learn more about jitter before I need to install it!

Thanks in advance for any help!

#46157
Jun 18, 2012 at 1:54pm

Take a look at jit.op-xfade.maxpat in Max’s examples folder. Or jit.gl.slab-op3sources.maxpat and jit.gl.videoplane-xfade.maxpat for openGL accelerated methods.

#166258
Jun 18, 2012 at 2:03pm

Right, well that certainly solves my transition problem, its perfect for it. Thanks very much for your response.

Unfortunately though the XFade op seems only suited to blending two images, as they are both absolute only at 0 and 1. Any suggestions on how I could implement this on several images (probably 5-6)?

#166259
Jun 18, 2012 at 2:19pm

Yes. Basically you want to use more than one xfade. You have to build a tree structure if you had 4 images, you have one xfade for A and B and one with C and D. You then use the output of each xfade to feed a third xfade object giving you the final result.

This method will work with any number of video sources and while it seems more complicated to integrate with uneven numbers, all you really need in the end is a modified parameter that will blend the sources as you like.

There might be other ways, if so. I would like to learn too.

#166260
Jun 18, 2012 at 2:23pm

That’s not so hard to imagine, is it? Chain a bunch and apply some scaling and logics to the input xfade value so it maps to the 5/6 ops.

(edit: beat to it by jbl :)

#166261
Jun 18, 2012 at 2:41pm

Yip that makes absolutely perfect sense, thanks a million guys. Should be able to tackle this now. Really appreciate the help and suggestions.

#166262

You must be logged in to reply to this topic.