spaceship & planet city lights

How does one make city/spacehip lights only render in dark or shaded areas

You could make a stencil texture that has the light texture on top of it so you can control where you see the lights.

This is for stills though, for scenes where the planet or ship revolves and such you may try an animated stencil texture.

THX, I appreciate the response.

…Or select faces (to act as windows) and apply a texture that ‘emits’ to them.

I have been attempting to produce stills.
I tried vertex colors first which worked but seemed to me to be rather indirect.
Next I used GIMP to merge night and day. I found some 8192 maps here
I need to do the cloud layer as well.
THX for the responses.