For Star Wars Episode V: The Empire Strikes Back, George Lucas decided that a battle on an ice planet was necessary because he felt that it was easy to “cheat” in space, because the background was black and you could hide errors easily. With a white background, the effects crews would have to work much harder, and the effects would be much more impressive.
The AT-ATs were inspired by the walking machines in H.G. Wells's War of the Worlds and their appearance was based on gantry cranes which are used in most shipping ports in the USA. Walking patterns of elephants were studied to make the movements seem as realistic as possible. The AT-ATs were all animated through classic stop-motion techniques, except for the scenes where they fall, for example the walker which is “tripped up” by cables and falls on its face, or the one that Luke throws a grenade into, which falls on its side. These were filmed in real-time with precision-timed mini-pyrotechnic charges (x).