Koepp's screenplay was inspired by news coverage in 2000 about panic rooms. The film was Fincher's fifth feature film, following Fight Club (1999). Fincher and Koepp brought together a crew of people with whom each had worked before. The house and its panic room were built on a Raleigh Studios lot. Nicole Kidman was originally cast as the mother, but she left after aggravating a previous injury. Her departure threatened the completion of the film, but Foster quickly replaced Kidman. The filmmakers used computer-generated imagery to create the illusion of the film camera moving through the house's rooms. Foster became pregnant during the shooting schedule, so filming was suspended until after she gave birth. The film's production cost $48 million.