SpongeBob SquarePants is getting the stop-motion treatment for an upcoming Halloween special.

The previously announced SpongeBob SquarePants: The Legend of Boo-Kini Bottom, which airs at 7 p.m. Friday on Nickelodeon, will tell the story of the Flying Dutchman (Brian Doyle-Murray) coming to Bikini Bottom — which is all decked out for Halloween — to make sure everyone in town is scared, but he runs into a challenge with SpongeBob (Tom Kenny), who seems firm in his belief that anything scary is actually funny.

The special was produced at Screen Novelties, a Los Angeles-based stop-motion animation production company. (This marks the second time that Nickelodeon has partnered with Screen Novelties on a stop-motion animation episode, following 2012's SpongeBob SquarePants: It’s a SpongeBob Christmas!)

"We have done stop-motion before, and ever since we did the [Christmas episode], we've been wanting to do another one," says Vincent Waller, co-executive producer of SpongeBob SquarePants. "Almost everybody I know loves Halloween, so we thought, 'Why not Halloween?'"

Adds Marc Ceccarelli, who also serves as co-EP on the series: "We also think that stop-motion works especially well for Halloween because of that creepy factor."

Ceccarelli and Waller say the episode was in the works for nearly a year (most episodes take about nine months from start to finish). The idea was sparked by the desire to do a storyline that included the type of dark rides found at amusement parks, like the Haunted Mansion at Disneyland. In fact, the episode features a sequence in which SpongeBob and Patrick are on such a ride (see the photo below).

Chris Finnegan, producer at Screen Novelties producer, says the process begins when they receive an animatic, storyboard and voice tracks. "The initial phase is design," he says. "We have to figure out how to translate this established, two-dimensional property and sets and characters into 3-D stop motion. And then we bring in a puppet fabrication team and build the sets — it's a pretty complex process."

The team creates skeletons for each character that consist of an intricate "wire and ball" combination "so that the characters can be manipulated," he says, adding that a lot of time also goes into creating the props. "A lot of what we do in stop motion is working with common materials. We're making everything from scratch, so we can use some fun materials and objects in our sets."

Roughly three months are spent on puppet and set fabrication, another three months on the animation and then a couple of more months in postproduction on the visual effects.

In making the episode, the Screen Novelties team incorporated miniature puppets, 27 unique sets across five stages, 15 boxes of breakfast cereal to create texture on Bikini Bottom's coral reefs, eight pounds of glitter to decorate SpongeBob’s Halloween pineapple house, hundreds of popsicle sticks to create the planks of the rollercoaster track that Patrick (Bill Fagerbakke) and SpongeBob ride, black lights to create a fluorescent glow across the puppets and sets, and 315 strips of toupee tape.

The team also created a ship for the Flying Dutchman (see it in its early stages, above) as well as a pinball machine that's part of the ride SpongeBob and Patrick hop on at the Dutchman's behest.

In addition, the special mixes several production techniques including stop-motion puppet animation, marionette puppeteering, hand puppets and 2D hand-drawn animation designed by Sally Cruikshank, who's worked on Sesame Street and created the opening title sequence for Ruthless People, among other credits.

A first for Screen Novelties was a "huge" bag of real onions used in one scene. "That's an example of something you don't do every day," Finnegan quips, adding: "The crew was crying."

Waller and Ceccarelli gave praise to Screen Novelties for avoiding computer-generated imagery as much as possible in favor of getting creative with real materials. For example, Patrick's costume — a knight's suit of armor — was made in part by stretching a stainless steel Brillo pad around the body. "You never would have known that that's what they used," Waller says.

"A couple of things we did on this episode that I am really proud of, and I think would be interesting for viewers to look out for, is that we shot a lot of footage under black lights," Finnegan says, noting the dark-ride inspiration. "We have a lot of puppets with special DayGlo paint and really intense black lights that gave a spooky feel to the whole thing."

Asked if there are plans for a third stop-motion special for SpongeBob and his pals, Waller teases: "We've got some stuff up our sleeve, but we can't really talk about it yet."

SpongeBob SquarePants is executive produced by creator Stephen Hillenburg. The special, directed by Mark Caballero and Seamus Walsh, was written by Mr. Lawrence, who also wrote an original song, "The Scare Song," for the episode, with music by Eban Schletter.

Watch the trailer for the special below.