photo morphing point two

atarilover123's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I've been working on photo warping and have come up with this patch which I've bastardised form several tutorials. I'm not really sure how it works though, the image is getting sent to a pwindow with no visible connections or invisible connections that I can find, I want to work out why as my final output seems tied to this pwindow, if I hide the pwindow nothing comes through to my morph pwindow and if i resize this pindow it also resizes my final output anyone know how I can fix this?

dtr's icon

Check the name attribute of the pwindow and the drawto attribute of jit.gl.render. They're the same and have been auto-filled because you didn't explicitly state the render destination. That can be a named window, pwindow or matrix. See jit.gl.render help/reference.

atarilover123's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Thanks. I just tried assigning names to the jit.gl.render and my pwindow. The same problem is occurring for me still though. I went through the reference and help files and haven't quite been able to get my head around it yet and why its not working in my patch, this is the rectified patch so far

Rob Ramirez's icon

the pwindow is the gl drawing destination. every gl context needs one.
you will have much better performance if you can figure out how to keep all your images in the gl context, rather than reading back to a matrix with gl.asyncread.

Max Patch
Copy patch and select New From Clipboard in Max.

also, make sure you update your max 6 to 6.0.8, as there are some bugs related to opengl crashing that have been fixed.

atarilover123's icon

Thanks Rob, this is great.

Andrea Corradi's icon

hi, if I wanted to morph between more than two images, how would you modify the patch to achieve this ?