well Loki was working in the movie, and we wanted to do more with him. So it was that kind of thing, it was like, 'Oh, we could do this, we could jam this in here' because he's such a wonderful guy to watch do his stuff." Also in August, IMAX Corporation and Marvel Entertainment announced that the film would be digitally re-mastered into the IMAX 3D format and released into IMAX 3D theaters internationally beginning October 30, 2013. Taylor said Marvel's The Avengers writer/director Joss Whedon rewrote several scenes in the film explaining, "Joss came in to save our lives a couple of times. We had a major scene that was not working on the page at all in London, and he basically got airlifted in, like a SWAT team or something. He came down, rewrote the scene, and before he got back to his plane I sort of grabbed him and said, 'And this scene and this scene?' And he rewrote two other scenes that I thought had problems." In October 2013, Tony Curran tweeted that he would be portraying Odin's father, Bor, in a flashback sequence. In November 2013, Feige stated that the film was intended to be the conclusion of the "Loki trilogy", which examined the relationship of Thor and Loki throughout Thor, The Avengers and this film. Loki was originally intended to die in the film, however, after test audiences did not believe he was actually dead, Marvel Studios decided to alter the character's ending. The film's mid-credits scene was directed by James Gunn, the director of Marvel Studios' Guardians of the Galaxy. The film underwent multiple changes during the reshoots and editing process, with Taylor believing his initial version "had more childlike wonder", including starting the film with children, and an overall "more magical quality". He noted the reshoots "inverted" the original plot in certain ways, such as Loki no longer dying. The film's visual effects were completed by seven special effects studios, including Double Negative and Luma Pictures. Blur Studio was the lead studio behind the film's prologue sequence taking place 5,000 years before the start of the film, on the Dark Elves homeworld of Svartalfheim. The sequence consisted mostly of computer graphics with live-action shots interwoven throughout. The use of CG allowed for greater freedom of movement by the characters as the live-action costumes were too constrictive. Taylor wanted Asgard in this