multi-texture crossfade plus keystone problems

T. A. Gambarotto's icon

I'm trying to combine JKC's multi-texture crossfade (https://cycling74.com/forums/multitextures) with the one of the keystone patches (https://cycling74.com/forums/topic.php?id=18017) and it's not working... texture tex2 is fading to white. Any assistance would be greatly appreciated.

--Rocky G

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

T. A. Gambarotto's icon

Here's another version, where I try to render geometry directly, and I can get movie 2 to fade, but the textures still aren't combined, and also movie 1 is half dimmed.

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

T. A. Gambarotto's icon

Background: I'm trying to crossfade between a title card PNG and my openGL scene--so if anyone has a simpler implementation I'm all ears.

T. A. Gambarotto's icon

I am closer to a solution. Now I can get full keystone functionality, and movie 1 looks fine, but movie 2 fades to white instead of image, although if I set jit.gl.mesh @texture tex2, movie two fades in and out like I'd expect. I'd like to understand why mapping the texture to jit.gl.gridshape in the original crossfade example works, but mapping it to jit.gl.mesh in my version doesn't--isn't it all just geometry?

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

T. A. Gambarotto's icon

OK, I've got it working by applying the combined texture to a gridshape, capturing the gridshape to a new texture via sketch and then applying that texture to the keystone mesh. I don't understand why I don't have to bang the gridshape though... nor do I understand why I couldn't apply the combined texture directly to the mesh as in the previous attempt.

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