Watch how the harrowing ghost shark scene was made for 'Pirates of the Caribbean: Dead Men Tell No Tales'

Johnny Depp spots some dead sharks in "Pirates 5."
Disney

The INSIDER Summary:

"Pirates of the Caribbean: Dead Men Tell No Tales" is on Blu-ray and DVD October 3.

Disney provided INSIDER with a behind-the-scenes look at how the ghost shark scene with Johnny Depp came to life.

Though it looks like he and Brenton Thwaites are fending off dead sharks, the two filmed on a lot of blue screen.

They even had to balance on a moving rowboat that was feet off the ground.

You can watch the clip below.

"Pirates of the Caribbean: Dead Man Tell No Tales" has Captain Jack Sparrow (Johnny Depp) and Henry Turner (Brenton Thwaites) battling a dead pirate army as they go on the hunt for Poseidon's trident. In one scene, the two find themselves on a rowboat surrounded by ghost sharks in the ocean.

While it looks like Depp and Thwaites were fending off some shark ghouls, a lot of clever CGI and blue screen helped bring the scene to life.

"We shot part of that in a location where we were adding the island to the background," says visual effects supervisor Gary Brozenich in an exclusive behind-the-scenes clip provided to INSIDER. "Then we had a small water tank location with a rowboat on a gimbal for direct interaction with people in water."

Thwaites and Depp fish water out of a rowboat in a small water tank.
Disney

But the third location where they shot the scene was the coolest. Depp and Thwaites had to balance themselves on a moving rowboat floating high above the ground as they were surrounded by blue screens.

That's no ocean! Here's a look at the giant blue screen room where Thwaites and Depp filmed parts of the ocean scene.
Disney

For reference, here's how the final scene with Jack Sparrow and Henry Turner looks in the fifth installment of the "Pirates" franchise:

Johnny Depp wasn't really out on the open seas.
Disney

And here's part of what it really looked like being on the rowboat.

This scene was filmed outside.
Disney

The only "sharks" they had to worry about were some crew members on set.

After that, the visual effects team worked their magic to make sure that all of the filmed sequences worked smoothly together.

An early look at the CGI sharks in the water before they were in the finished film.
Disney

"Pirates of the Caribbean: Dead Men Tell No Tales" will be available on Blu-ray and DVD October 3. You can watch the clip below: