What does it take to elevate the common ant from picnic pest to household pet?

To thousands of children and many adults, the answer is a bit of soil and a see-through enclosure that, in these modern times, can be made from an extra CD case or bought tricked out with special projection lights.

Ant farms, the narrow glass or plastic containers filled with soil that mimic ant colonies, have been popular among generations of children, and marketers say they remain in-demand even in the age of computers and video games.

Uncle Milton Industries, a Los Angeles-based company that has been in business for six decades, has sold more than 20 million ant farms. Company founder Milton Levine and his brother-in-law invented the ant farm nearly 60 years ago, and the company continues to update its main product, such as with a version that includes a light that projects the ants’ shadows on the ceiling.

“As the world gets more complex, some of these classic toys become more popular,” said Ken Malouf, vice president of marketing and product management.

Thousands of people, not just children, enjoy insects as pets and are willing to spend the time and money on them, said Lila Higgins, manager of the Citizen Science and Live Animals exhibit at the Los Angeles County Natural History Museum.

“We have 16,000 people come to our bug fair every year, and a lot of them buy or collect insects as pets. As long as we’re buying from responsible traders and collecting responsibly, I think the benefit (of taking queen ants) can far outweigh the cost to our environment,” Higgins said.

Ant farms can be an easy way to help nurture a child’s interest in insects, since they can be homemade or purchased. Uncle Milton Industries’ ant farms come with 12 to 20 harvester worker ants, which are chosen because “they are diggers, strong and robust,” Malouf said.

Queen ants are not included, so the colony will last about three months, he said. A colony reproduces because of the queen, its sole fertile member.

Noah Shryack of Stanton, Texas, “has loved ants since he was 1 or 2, and he put them in his bucket and tried to bring them in the house,” said his mom, Lana. She promised he could get an ant farm “when he was old enough,” which was last Christmas, when he was 5.

“He loves it. He checks every morning to see what the ants have done overnight,” said Shryack, who likes taking a look too. “I was almost as excited as him,” she said.

Rachael Estanislao, an Atlanta blogger and mother of a 6-year-old boy, treats her son’s ant farm as an educational toy.

“It’s definitely like learning to have a pet. It’s about learning to respect their environment and helping them live healthy,” she said.

Those who want to build their ant farms can do so with a handful of CD cases and instructions that are readily available online. The trickiest part is filling the colony with harvester ants — the best type for keeping as pets — and catching a queen, since she has a lot of worker ants protecting her, Higgins said.

The best time to catch a queen, which is bigger than the worker ants, is after the mating flight, Higgins said. Once a colony is settled, it will become “quite a yearslong investment,” Higgins said.