Answer: Usually well in advance of the work involving the actors.
Explanation: The stages of creative process are Preparation, Incubation, Illumination and Implementation. The preparation phase is a raw mundane process which is followed by the incubation phase where ideas of the conscious and sub conscious mind segregate the ideas into what is needed and what is not, which is followed by the Eureka stage where the idea is nurtured and matured and finally comes out as a finished product. So the director works on the metaphors at an every early stage and nurtures it to have his finished product.