The CW’s demon-hunting drama “Supernatural” may have announced its animated crossover episode months ago, but it was actually years in the making.

“In the writers room, Eric Kripke and Ben Edlund would always be like, ‘Can we have an animated character?’ But doing that from scratch is a lot of work,” executive producer Andrew Dabb told Variety at the Paley Center for Media’s PaleyFest event in Los Angeles, Calif. on Tuesday.

When Dabb’s friend Jeremy Adams, who works in Warner Bros. Animation, called and asked if the show had ever thought of crossing over with “Scooby-Doo,” it felt like the idea they had kicked around off-handedly for so long could finally happen.

Warner Bros. owns both of us, so it’s very good corporate synergy, and they were like, ‘Give it a shot,'” Dabb said.

Adams brought the idea to Dabb in November 2016, and in January 2017 the show received its early season 13 pickup. That was all the team behind the show needed to move forward on the special animated crossover, which airs Mar. 29. The writers room began working on the script almost immediately, completing it in early spring, and the cast — Jensen Ackles, Jared Padalecki and Misha Collins — recorded their voiceover for the animated portion in April 2017.

“There was an instant energy that was different than anything we had done before because the three of us had never sat in a recording studio together,” Ackles said. “Obviously we work together a lot, but we’d never been in that situation. And it’s animation, so you know you’ve got to go a little bigger. So over-enunciating words and singing life into words is certainly different than what we normally do.”

Cameras captured the behind-the-scenes of the recording, and Ackles also shared that footage will make the season 13 DVD extras.

The animators created two-dimensional cartoon versions of Dean (Ackles), Sam (Padalecki) and Castiel (Collins) to fit into the “Scooby-Doo” visual style. They were also tasked with animating the show’s fourth series regular — Dean’s beloved Chevy Impala. While producers saw the first animatics around the time the actors were recording their dialogue, the rough cut of the full animation didn’t come until the summer of last year and saw the final animation in January of this year.

The episode centers on Dean and Sam getting transported into the world of “Scooby-Doo” through their television. Once they’re in the world, mega-“Scooby” fan Dean wants to run with the experience, and he and his brother help Fred, Daphne, Velma, Shaggy and the titular Scooby solve a mystery of their own. Castiel joins them later on.

“What we wanted to make clear was our guys are in an episode of ‘Supernatural’ and those guys are in an episode of ‘Scooby Doo,’” Dabb said. “That doesn’t mean there aren’t crossovers and revelations and things like that, but there were certain things, obviously, that Warner Bros. doesn’t want — like Thelma beheading a vampire.”

Dabb noted that although this episode took longer to come together than usual, it wasn’t because they had to go over more studio notes than usual.

“There are more steps to this process — animatics, voice recordings — and you’re getting feedback along the way, but we’ve been along so long that, to their credit, they trusted us and let us have some fun,” Dabb said.

Executive producer Robert Singer directed the episode — or at least the live-action parts. The goal was not to “skimp” on the supernatural elements that make “Supernatural” the show audiences have come to know and love for so many years but also to incorporate classic “Scooby-Doo” imagery — like haunted houses and of course, the Mystery Machine.

As you’ll see, from the very first shot in the episode, it’s light,” Singer said of the tone, “but the idea that our guys hunt real ghosts and [on] Scooby it’s usually a person in a sheet, we’re very true to ‘Supernatural.’ The Scooby gang isn’t quite sure how to deal with it when they [think] it’s a real ghost.”

The event around “Scoobynatural” doesn’t stop with the episode finally airing on the CW, either. Warner Bros. consumer products spent the last year designing special merchandise specifically tied to this episode.

“Warner Bros. Consumer Products, Warner Bros. Television and Warner Bros. Animation work very closely together on all production supported by a merchandise program. When we heard about this special episode, we thought it would be a great opportunity to offer new, fresh product to the fans of ‘Supernatural’ and ‘Scooby-Doo,'” said a representative from WBCP.

Lazy loaded image
Courtesy of WBCP

With the long lead time due to the animation process, Warner Bros. Consumer Products worked tirelessly to make the line available before the premiere through Hot Topic, which is the hub for “Supernatural’s” general licensed merchandise.

I think it’s necessary for a show like this where we’ve all died — I’ve been to hell, I’ve been Lucifer — to be able to goof around. You have to make that yin-yang. There’s so much dark, so much heavy, so having a show like this is a thank you to the audience for sticking with us through all that,” Padalecki said.

“Supernatural” airs Thursdays at 8 p.m. on the CW.