On a brisk morning in February, the members of the voice cast of Nickelodeon’s flagship animated series “SpongeBob SquarePants” gathered to work on a new episode, like they’ve done most weeks over the past 20 years. But instead of being in a recording booth, this time they’ve assembled at a diner in Castaic, Calif., shooting scenes as live-action versions of their animated characters for the hourlong 20th anniversary special, “SpongeBob’s Big Birthday Blowout.”

While it’s not the first time “SpongeBob SquarePants” has mixed animation and live action, it is the first time key cast members — Tom Kenny (SpongeBob), Bill Fagerbakke (Patrick Star), Rodger Bumpass (Squidward), Clancy Brown (Mr. Krabs), Carolyn Lawrence (Sandy Cheeks) and Mr. Lawrence (Plankton) — have acted together in live-action scenes.

NICKELODEON/ROBERT VOETS

“The voice actors are all playing surface-world doppelgängers of their animated characters,” explains Kenny, the prolific voice actor who not only speaks for the naive sponge but also directs the cast’s voice-acting sessions. “SpongeBob and Patrick come up above the sea and go to a diner that’s very much like the Krusty Krab, but not quite,” says Kenny, “and there’s a human spazzy guy behind the counter that’s almost like SpongeBob, but not quite, and a mean boss like Mr. Krabs and a doofus customer that’s kind of like Patrick. It’s really fun.”

The cast members’ camaraderie is apparent on the live-action set: The actors break up over Fagerbakke’s line readings as an indecisive diner customer and Mr. Lawrence’s turn as an inept robber whose mask boasts a single eyehole. The constant laughter means a few extra takes, but everyone’s smiling.

The idea for the live show, which premieres July 12 at 7 p.m. on Nickelodeon, has been in the works for a while. “We wanted to do something special for the 20th anniversary, and we asked ourselves, ‘What haven’t we done yet? Where haven’t we gone?’” posits Mr. Lawrence, who is also story editor and a writer on the series. “This particular idea of everyone on camera playing themselves was something we’d thought about before. I think people will appreciate this even if you don’t know the show really well. It will be a nice surprise that no one will be expecting.”

The core cast has been together since the pilot, according to Kenny. “We’re really lucky in that it’s all the same actors that played the parts in the pilot are still in the game and still doing it. It’s really a rare, rare opportunity to work on the same show with the same people who are not psychotic … Or I should say are just psychotic enough to be fun, for 20 years. It’s unheard of and it’s just lovely.”

NICKELODEON/ROBERT VOETS

Unlike a lot of animated shows or features, the “SpongeBob SquarePants” voice cast records episodes together. “So this is a little different,” Mr. Lawrence explains. “This is the first time there are cameras. When we’re [recording] with each other live, it’s [like] a play. No takes. You just do it. So this is weird because there are takes. It’s like doing voice work but you’re standing there, you know. I have to figure out what to do with my body when I’m doing this.”

Other cast members described the experience as surreal.

“It would be less bizarre if we’d only been doing this for a year or two,” Fagerbakke says. “But we’ve been doing this for 20 years, and for me, to be looking in the face of the actor who’s the voice of the character, it was very peculiar, and I was really tickled. Clancy [Brown] could not stop calling Rodger ‘Squidward,’ because that’s who he’s been talking to for 20 years. But instead it was Rodger playing a human version of Squidward. So yeah, there were all kinds of interesting scenarios.”

Brown, an accomplished voice actor who may be best known for his acclaimed live-action performances in such films as “The Shawshank Redemption” and the drama series “Billions,” called the experience “dissonant, because we always have our faces buried in the script [when recording ‘SpongeBob’ episodes] and talking into microphones. But then to actually face Bill Fagerbakke, have him do that voice to you and you have to respond, it takes some getting used to.” Brown called the live-action shoot “a little window into our recording sessions. We’re having a ton of fun.”

NICKELODEON/ROBERT VOETS

For Carolyn Lawrence, the longtime voice actor who plays sea-dwelling squirrel Sandy, shooting the live-action scenes took some adjustment. “I’m so used to not being seen,” she says. “But now … we may need to wear our costumes when we record the show from now on.”

The experience was not without its challenges, Bumpass acknowledges. “When you’re working voice, there’s a whole different focus. Here, you have the costumes, the makeup, the gestures, the movement, the inflections, physical interactions. It’s a challenge to be the character in a more extensive manner, but it’s a great exercise, acting-wise.”

It’s something Bumpass would love to revisit. “For 20 years, we’ve seen each other do the voices, but to do it on camera in character on set in that world is a ‘Twilight Zone’ episode,” he explains. “It’s absolutely surreal for all of us. I’d love to redo the show as a live-action show.”

For Kenny, playing a live-action version of SpongeBob wasn’t that much of a stretch. “I’ve always kind of been that,” he says. “I think that’s how I got the gig in the first place. SpongeBob is kind of me to the 1,000th degree.” In fact, Kenny says he thinks that’s why series creator, the late Stephen Hillenburg, gave him the role. Kenny knew Hillenburg when they both worked on Nickelodeon’s “Rocko’s Modern Life” in the 1990s. “He told me he cast me as SpongeBob because he saw personality similarities, God help me, between me and SpongeBob. He said, ‘You know, you work really hard. You’re kind of hyperactive. You can’t sit down. You give 110 percent. You’re a goofball.'”

“SpongeBob’s Big Birthday Blowout” will be dedicated to Hillenburg, who died last year due to complications from ALS.

That the show has lasted for 20 years is no surprise to Kenny. “In 1999, I saw this moment,” he says, chuckling. “No, no. The real answer to that is that in 1997, we did a seven-minute short cartoon about this sponge that worked at a fast food restaurant and he’s got a greedy boss and a dyspeptic co-worker. I knew it was good, I knew it was funny, I knew it was special.”

“SpongeBob SquarePants” did go through some shaky times, but the show, and the cast, hung in there. “At the 10-year mark, we were like, ‘This is already crazy,'” Mr. Lawrence says. “We did a show for the 10th anniversary, and we thought, ‘Alright, time’s up soon. It’s going to be done.’ But people keep discovering it. As long as they keep discovering it, we’ll be here.”