 " Dream Logic " was written by co @-@ executive producer Josh Singer and was directed by cinematographer Paul A. Edwards . It was filmed in August 2009 . Shooting partly took place in the basement of a semi @-@ functioning mental hospital in Vancouver , leading actress Anna Torv to remark during filming , " I heard this is where they kept dead bodies . Bad vibes in this place . " Actor Joshua Jackson noted that the hospital 's " patients are known to wander through a shot . This has the potential for being a very interesting day . " 
