If you've seen "Doctor Strange," then you know the film added a character to the Marvel mythos -- one that probably took a number of diehard Strange fans by surprise. And oddly enough, that character is not a person -- it's a cloak. Doctor Strange's iconic Cloak of Levitation has a mind of its own in the movie, serving as more than just Stephen Strange's most elaborate fashion accessory. It's also a character in its own right, acting more like a sidekick.

In an interview with IGN visual effects supervisor Stephane Ceretti -- who worked on both "Doctor Strange" and "Guardians of the Galaxy" -- revealed the surprising inspiration for the cloak's attitude.

“For most of the cloak shots we used the same company that did Rocket on 'Guardians,'” said Ceretti, “because we knew that we wanted the cloak to be a real character. They had done amazing work with Rocket on 'Guardians' so we used them for that. I think it turned out pretty well.” That explains where the cloak gets a little bit of its charm.

As to how present the cloak's personality was in the script, Ceretti said it actually wasn't as fleshed out as it was in the final film.

“It was kind of scripted but not as deeply as that,” said Ceretti. “And then as we went along, and started to do pre-viz, then we had a big discussion about the arc of the story of the cloak in the film. It begins like the story of a horse rider and the horse. The first time they meet they don't know each other, right? The horse is kind of crazy and takes over the horse rider, but as they work together they start to learn each other and work together in the end. It's the same kind of story. We went through that and the guys from stunts came up with ideas, so it was kind of a collaborative thing as it always is on these films. There are tons of people with good ideas and we try to make the best out of everything and I think that turned out pretty well.”

But Ceretti also noted that they did hold back in some places, deciding to not let the special effects overwhelm the film. “There's always stuff that we say, O.K., that's taking away too much from the characters and the story so let's just back off a little bit,” he said. “Like initially the effects on the astral projection were very strong. We had lots of effects happening on the bodies and on the faces and everything and the more we looked into it the more we thought, ‘O.K., that's too much.’ We have these great actors and these great characters and the last thing we want is to take away from their performance and the storytelling by putting effects on top of them that is going to distract everybody. It's always about finding that right balance between the effects and the story and the characters and the actors and making sure that everything gels together and does not take the audience away from the film. In the end, it's the story that counts. We're there to serve it. We're not there to take over.”

Directed by Scott Derrickson and starring Benedict Cumberbatch, Chiwetel Ejiofor, Tilda Swinton, Rachel McAdams, Mads Mikkelsen and more, "Doctor Strange" is in theaters now.