 Paramount commissioned the film after positive critical and commercial reaction to The Wrath of Khan . Nimoy directed , the first Star Trek cast member to do so . Producer Harve Bennett wrote the script starting from the end and working back , and intended the destruction of the Enterprise to be a shocking development . Bennett and Nimoy collaborated with effects house Industrial Light & Magic ( ILM ) to develop storyboards and new ship designs ; ILM also handled the film 's many special effects sequences . Aside from a single day of location shooting , all of the film 's scenes were shot on Paramount and ILM soundstages . Composer James Horner returned to expand his themes from the previous film . 
