Don't Have a Brick, Man: The Inside Story of the 'Simpsons' Lego Episode (and Why It's Not a Movie Copycat)

There's a perfectly good explanation for why we're getting a Lego-ized episode of "The Simpsons" on Sunday night, only three months after we got the box-office hit "The Lego Movie": These things happen.

Sometimes, you get back-to-back biopics about Truman Capote; sometimes, you get back-to-back odes to Duplo blocks. No conspiracy or purposeful plotting required.

[Giveaway: Enter to Win 16 'Simpsons' Lego Minifigures From Yahoo TV]

In January 2012, "Simpsons" executive producer Matt Selman and co-executive producer Brian Kelley, unaware of what was being cooked up over at Fox rival Warner Bros., pitched a story that would put Homer, Marge, and family into a Lego-style, CGI-animated world.

Around the same time, Selman says, Lego approached "The Simpsons" about getting itself featured in what the show calls the "couch gag" — the ever-changing bit in the opening credits where the Simpson clan gathers on the living-room couch.

[Related: The Story Behind Those Awesome 'Simpsons' Couch Gags]

"It came together like two Lego bricks," Selman says.

Then last year, after the Kelley-written script had gone through a table-reading by the actors, and after the complicated animation process had begun, Team "Simpsons" learned of Team "Lego Movie."

"There's a certain freedom in being totally screwed," Selman says. "We were not not going to do the episode."

And so "Brick Like Me" arrives Sunday night. In addition to being a change of pace for "The Simpsons," it's a milestone: the extremely long-running comedy's 550th episode.

[Photos: Check Out 'The Simpsons' Lego Minifigures]

The installment blends classic "Simpsons" animation with the Lego-look, with the Lego-look getting the edge in screen time. It does a Duplo joke, as does "The Lego Movie"; it goes for the emotional ending, as does "The Lego Movie," although since "The Simpsons" is "The Simpsons," the ending is better described as "emotional-ish."

Selman sees "Brick Like Me" and "The Lego Movie" as by-products of a creative experiment: They're what happen when you give "two different groups of weirdos" the same building blocks — or in this case, Lego bricks — and turn them loose. The results are distinct, but not unrecognizable from each other.

Bart BFF Milhouse scored a cameo as a Master Builder in "The Lego Movie" (see photo at right), and true to "Simpsons" meta-form, "Brick Like Me" works in a dialogue nod to "The Lego Movie" — keep an ear out for it at the end.

In the end, the timing all worked out. Lego has had time to launch a line of "Simpsons" sets… and the show got some breathing room from the $450 million blockbuster.

Says Selman: "I'm glad we didn't air the weekend after the movie opened.

"I would argue that it was better for us to come after 'The Lego Movie.' It's like, 'This is how we would do it.'"

The "Simpsons" Lego episode, "Brick Like Me," airs Sunday at 8 p.m. on Fox.