Cocaine, pot, heroin, ecstasy — pop culture has become like a Saturday night at Charlie Sheen’s house.

Drugs play vital roles in the story lines on many of this season’s TV shows, as well as new releases in theaters. On “Homeland,” Brody (Damian Lewis) has become hooked on smack after being shot. Jessica Lange can be found snorting coke on “American Horror Story: Coven,” while, in the upcoming “Dallas Buyers Club,” Matthew McConaughey also has a fondness for nose candy.

If you’ve watched a character snorting a line or smoking a bong, you probably wondered to yourself, how does that work? How do the behind-the-scenes experts fake drug use?

Turns out that, like with baking a cake, there are lots of different recipes. Some are concocted via trial and error, while others have been handed down from one crew member to another through the years.

Take cocaine, for instance. If it’s just sitting on a table or being cut into lines, the crew might use a combination of powders.

“It’s usually cornstarch, but you have to put a bit of baby powder into it, because starch is too sticky and heavy,” says Gillian Albinski, the property master on “Homeland,” who is responsible for dealing with most of the items the actors touch.

If the actor is going to snort the “coke,” however, a different substance is required.

“I always use powdered lactose,” says longtime prop master Mychael Bates, who worked on 2011’s “Horrible Bosses,” which included scenes of cocaine use. “You can snort it for real, and it doesn’t affect you. It’s just a milk product.”

Warning: Video Contains Graphic Content

Colin Farrell didn’t seem to mind. He was even snorting the powder off-camera in order to stay in character, Bates says.

For the lactose-intolerant, something like a vitamin B powder, available at health-food stores, might be substituted.

Snorting any powder over multiple takes can cause an actor to become congested. (Or just angry.) In that case, the prop masters will sometimes coat the inside of the coke straw with Vaseline. When the powder is snorted, most of it sticks to the straw instead of going up the actor’s nose.

The recipe for powdered heroin on-screen is often similar to cocaine.

“We’ll look online and talk to [drug experts] and ask them what it looks like. A lot of times, heroin and cocaine look like the same thing,” says Kim Slosek, assistant prop master on “The Inevitable Defeat of Mister & Pete,” a new Jennifer Hudson film about the child of a drug addict.

Slosek uses a blend of milk powder and Inositol, a vitamin powder, except in scenes when the heroin is cooked. Inositol doesn’t heat well, so Slosek uses sugar and baking soda instead, which thickens like heroin. Bates has used gelatin or even bouillon.

Custom-made prop needles are used for scenes with injections. When the blunt needle comes into contact with the actor’s skin, it retracts inside the syringe, giving the illusion that it’s being pushed into flesh.

Besides heroin, “Homeland” includes scenes of Morgan Saylor’s character Dana Brody smoking pot.

“I’ve worked on shows where actors have wanted to smoke the real thing, and I was constantly fighting to take away their real bags,” Albinski says. “Oregano smells so much like the real thing, you have to check carefully to make sure they haven’t switched it out.”

Other prop masters do use the real thing — sort of. Companies, including legalbuds.com, sell ganja without the active ingredient THC. It looks and burns like marijuana, but it won’t get anyone high.

Slosek procured faux weed for the Drew Barrymore movie “Going the Distance,” which featured the star doing bong hits. (You can’t just use regular tobacco, because the smoke is less dense.)

The prop master even had to attend to small details, including dirtying the bong water. She added a bit of Coca-Cola to darken it, then crushed a piece of a cigarette to put flecks in the water.

“You have to make it believable,” she says. “There’s probably going to be someone smoking bong hits while watching the movie, and they’ll say, ‘Why did they do it like that? That’s not believable.’”

In the pursuit of authenticity, Slosek has also crafted a multitude of other fake drugs for projects including TBS’s “Are We There Yet?” and USA’s “Political Animals.”

Ecstasy pills begin with sugar placebos bought from a prop house. Each is then marked with a small, custom rubber stamp dipped in food coloring to give it a signature logo, just like many of the real drugs.

Crack rocks are created by dropping globs of Krazy Glue into a pile of baking soda.

For magic mushroom, Slosek simply bought some freeze-dried fungus from, where else? The fake capital of NYC: Chinatown.