To handle technical challenges of filming Adam Sandler opposite himself playing the titular twins “Jack and Jill,” the filmmakers turned first to director of photography Dean Cundey, the cinematographer who shot “Who Framed Roger Rabbit,” “The Parent Trap,” “Back to the Future,” and “Jurassic Park.”

“When an actor plays two characters in the frame at the same time, there are a lot of tricky things that occur – tricky, because the process usually requires you to do a shot with one character in the frame and then repeat the shot with the other character also in the same frame,” Cundey explains. “Sometimes, it’s a fairly simple process, as simple as a split. In those shots, the camera doesn’t move. In those, you film it twice, with the actor playing one character on one side of the frame, and then again, playing the other character on the other side of the frame. Then you go into the computer and put them together, almost like you’re taking two photographs and cutting them in the middle and pasting them down.”

From those simple shots, the process can get increasingly complicated. “We’ll move the camera, have them touch each other, hand each other objects – it’s a great way to keep the audience engaged,” Cundey continues.

Cundey describes a typical shot: “We’d shoot Adam as Jack. Then he’d go and get made up as Jill; we’d relight the set and we’d have to make sure that the lighting was right for where Adam would be standing as Jill. Adam would come in and we’d give him a little ear bud, so he could hear his performance as Jack, which he’d just done. We had a monitor set up so he could see what Jack was doing. Dan DeLeeuw, the visual effects supervisor, would make sure that the shots were going to work. The motion control technicians made sure we were getting the exact camera movement over and over again. Finally, the on-set compositor could put it together as we did it – show us how it’s going together so we could evaluate it and judge it. It was a very team-heavy process.”

“We used a computer-controlled camera – the computer is programmed to do the exact same move multiple times,” says DeLeeuw. “We could shoot once for Jack and do the same move again with Jill.” A good example, he notes, is the scene in which Al Pacino falls for Jill at a basketball game. “Not only do you have Jack and Jill, but the basketball players and the crowd behind them. As the setting gets bigger, so does the difficulty.”

It fell to DeLeeuw to create the illusion that Adam Sandler really does have a twin sister. “These effects took a lot of planning, right from the storyboard stage – but it’s also a comedy, so we all had to stay on our toes,” he says. “For many shots, we’d shoot Adam with a body double for Jill – the double would wear a green hood over his head, which we could remove later and replace with Adam, as Jill.”

Cundey explains how he worked in tandem with DeLeeuw: “The on-set process is the gathering of the pieces of the puzzle – the mosaic that is later put together by the compositors and post-production team. I had to make sure that the pieces are the right pieces – as the audience gets more and more sophisticated, you can’t do anything simply. You have to give them the pieces so they can do something interesting and unique.”

Cundey says that the production had a great asset in Adam Sandler. “As we got through the process, Adam learned more and more about how to do what we wanted to do, and he was a fast learner,” says Cundey. “The great thing about Adam and his creative process is that every new shot is an invention. We’d rehearse a shot and have a very good idea of what we wanted to do, but everything was subject to rehearsal and seeing how it played. The coolest thing about this production was being able to think on your feet – there’d be a new idea, and it would be up to [director] Dennis [Dugan], me, and the assistant director to figure out how we were going to do it.”

Opening across the Philippines on February 22, “Jack and Jill” is distributed by Columbia Pictures, local office of Sony Pictures Releasing International.