Pharrell Williams, as he appears in Piece by Piece (Focus Features)

If there’s anything that has caught me most off guard at the movies this year, it’s when I began tearing up slightly while watching the genesis of the beat for Snoop Dogg’s “Drop It Like It’s Hot.” This was one of many endearing moments in Morgan Neville’s documentary about the life and career of musician Pharrell Williams, relayed entirely through animated Legos. The film traces Williams’s youth, playing drums on pillows with kitchen utensils in Virginia Beach, through his meteoric rise in the music industry to his present day as a husband and father.

As a young teen, Pharrell befriends Chad Hugo, who later becomes his key collaborator, and they form the Neptunes. (Their eventual 2020s break-up is a bit skirted over here; they are sadly currently in legal disputes over the use of the Neptunes moniker.) By working with hit music producer Teddy Riley and shopping beats around the country, they eventually break through by producing N.O.R.E’s “Superthug” and Jay-Z’s “I Just Wanna Love U (Give It 2 Me),” who appears in Lego form, humorously droll.

The Neptunes rapidly become one of the most successful producing duos of the early aughts and 2010s. Watching their career bloom and hearing those idiosyncratic, spare, pulsating percussive patterns of their rousing hits is a sugar high. (For those reared on those beats in their twentysomething dance club days, it may especially evoke fond memories.) Their glowing, earworm songs were played to death on the radio—from Gwen Stefani’s “Hollaback Girl” to Nelly’s “Hot in Herre”—but are invigoratingly fresh again in the film. Perhaps the documentary’s aural pleasures would have been less impactful if it hadn’t been mixed with so much vibrant, high-spirited animation.

Neville (20 Feet from Stardom, Won’t You Be My Neighbor?) employs a traditional format by using interviews with Williams as a vehicle to tell his story, but, like Williams’s music, the use of Lego animation is a unique, colorful, and off-center, albeit commercial, choice. An accomplished documentarian who has covered subjects from Muddy Waters to Brian Wilson, Neville, in his animated film debut, creates a visually astonishing picture through an appealing multitude of blazing color, especially in Williams’s years growing up in the neon haze of the 1980s and early ’90s. The aesthetics, hairstyles, and period clothing of his family and high school friends (including Missy Elliott) are wonderfully captured. The locations range from oceanic backdrops to dynamic music studios to an existential crisis in starry space with Carl Sagan.

Williams, who has synesthesia—seeing colors in music in his mind’s eye—remarks that he can be his “purest self” through Legos, and that it is his vision for how his story should be told. This idea of one’s “purest self” envisioned through commercialism could be applied to the multi-hyphenate star’s artistic pursuits, including fashion (currently, he is the men’s creative director at Louis Vuitton), and even co-writing the “I’m Lovin’ It” McDonald’s jingle. (McDonald’s, where Williams was once employed, gets conspicuous advertising here and there.) Under the gloss, there are rawer, moving moments too, such as when a Neptunes’ beat lifts up a downtrodden Pusha T to record a comeback hit or when Kendrick Lamar’s brilliant “Alright,” co-written by Williams, becomes a Black Lives Matter anthem.

The original Pharrell songs written for the soundtrack are noticeably less crackling than past hits, but the pulsating title tune is a trippy, upbeat way to close the picture. It seems tricky to market this film in the current Hollywood environment, as it’s not really a mainstream film for kids (even though it taps into important ideas of young creative expression), nor does the Lego imagery seem a likely draw for a music bio adult audience. Still, it’s ultimately a fairly inspiring and pleasing ride.

Directed by Morgan Neville
Written by Neville, Oscar Vazquez, Aaron Wickenden, and Jason Zeldes
Released by Focus Features
USA/Denmark. 93 min. PG