Microfluidic devices can be used to produce single or multiple emulsions with remarkably precise control of both the contents and size of the drops. Since each level of a multiple emulsion is formed by a distinct fluid stream, very efficient encapsulation of materials can be achieved. To obtain high throughput, these devices can be fabricated lithographically, allowing many devices to operate in parallel. However, to form multiple emulsions using a planar microfluidic device, the wettability of its surface must switch from hydrophobic to hydrophilic on the scale of micrometers where the drops are formed; this makes the fabrication of the devices very difficult. To overcome this constraint, we introduce non-planar microfluidic devices with graduated thicknesses; these can make drops even when their wetting properties do not favor drop formation. Nevertheless, the dependence of drop formation on the device geometry, the flow rates and the properties of the fluids, particularly in the case of unfavorable wetting, is very complex, making the successful design of these devices more difficult. Here we show that there exists a critical value of flow of the continuous phase above which drop formation occurs; this value decreases by two orders of magnitude as the wetting to the device wall of the continuous phase improves. We demonstrate how this new understanding can be used to optimize device design for efficient production of double or multiple emulsions.