Updated

Episode No. 550 of Fox's "The Simpsons" was put together Lego brick by brick, in a CGI manner of speaking.

Using computer-generated special effects, the town of Springfield and its residents have been reimagined in the style of the famed plastic toys for Sunday's episode, "Brick Like Me" (8 p.m. EDT).

It's a tart title — a play on "Black Like Me," the book — for a sweet episode, one that combines CGI and the show's traditional animation to shake up Homer Simpson's world and teach him a lesson about parenting.

Homer (voiced by Dan Castellaneta) has morphed from his familiar pudgy self into a real hard-body: a square-shaped, bullet-headed Lego man. He's still yellow, as are wife Marge (Julie Kavner), the kids and the rest of the town's inhabitants, but all easily and painlessly disassembled.

With the box-office hit "The Lego Movie," a newly launched "Simpsons" Lego toy line and now the TV episode, it could be suspected that much corporate plotting was involved.

"People are probably looking at it going, 'All this fits and it's a plan.' No, it was just the love of Lego" and creativity, not cross-promotion, Al Jean, "The Simpsons" longtime executive producer, told a teleconference this week.

"Yes, so all the cross-promotion was just gravy, delicious gravy," joked Matt Selman, an executive producer and co-writer, with Brian Kelley, of the Lego episode.

Lego was consulted, he said, and a Fox spokeswoman said the toy maker paid for promotional consideration.

In an interview, Selman said he and Kelley started working on the plot in 2012, before they were aware of the movie or the spinoff toys.

"We had to have a story worthy of this much technical ambition. If it didn't have heart, character and feeling, all the jokes about someone taking off their head and kicking it into the distance weren't going to play," he said.

Unlike "The Lego Movie," which employed stop-action animation along with CGI, "The Simpsons" stayed away from three-dimensional figures that would have increased the difficulty of production, Selman said. Its smooth-faced CGI characters also vary from the sculpted ones that are part of Lego's "Simpsons" toy line.

The "old-school" cylinder heads are classic Lego and were right for the show and the story, Selman said. It's an especially family friendly one, he said, since the toy connection is expected to draw a number of younger viewers and there was Lego's image to consider.

"We had to tune down Homer and Marg's amour" in a scene between the characters' Lego incarnations, he said.

A number of other familiar faces make appearances, including the Rev. Lovejoy (Harry Shearer), seen preaching the Lego version of the Bible's creation story. Selman regrets a pair of characters who didn't enter toy land.

"I wish we could have done a Lego Itchy and Scratchy," he said in the phone conference, then tossed it to his colleague. "Al, you think they'll let us do another one?"

"Sure, let me just hold a bake sale," Jean replied.