Special effects (often abbreviated as SFX, F/X or simply FX) are illusions or visual tricks used in the theatre, film, television, video game, amusement park and simulator industries to simulate the imagined events in a story or virtual world.
 Special effects are traditionally divided into the categories of mechanical effects and optical effects. With the emergence of digital film-making a distinction between special effects and visual effects has grown, with the latter referring to digital post-production and optical effects, while "special effects" refers to mechanical effects.
 Mechanical effects (also called practical or physical effects) are usually accomplished during the live-action shooting. This includes the use of mechanized props, scenery, scale models, animatronics, pyrotechnics and atmospheric effects: creating physical wind, rain, fog, snow, clouds, making a car appear to drive by itself and blowing up a building, etc. Mechanical effects are also often incorporated into set design and makeup. For example, prosthetic makeup can be used to make an actor look like a non-human creature.
 Optical effects (also called photographic effects) are the techniques in which images or film frames are created photographically, either "in-camera" using multiple exposure, mattes or the Schüfftan process or in post-production using an optical printer. An optical effect might be used to place actors or sets against a different background.
 Since the 1990s, computer-generated imagery (CGI) has come to the forefront of special effects technologies. It gives filmmakers greater control, and allows many effects to be accomplished more safely and convincingly and—as technology improves—at lower costs. As a result, many optical and mechanical effects techniques have been superseded by CGI.
 In 1857, Oscar Rejlander created the world's first "special effects" image by combining different sections of 32 negatives into a single image, making a montaged combination print. In 1895, Alfred Clark created what is commonly accepted as the first-ever motion picture special effect. While filming a reenactment of the beheading of Mary, Queen of Scots, Clark instructed an actor to step up to the block in Mary's costume. As the executioner brought the axe above his head, Clark stopped the camera, had all of the actors freeze, and had the person playing Mary step off the set. He placed a Mary dummy in the actor's place, restarted filming, and allowed the executioner to bring the axe down, severing the dummy's head. Techniques like these would dominate the production of special effects for a century.
 It wasn't only the first use of trickery in cinema, it was also the first type of photographic trickery that was only possible in a motion picture, and referred to as the "stop trick". Georges Méliès, an early motion picture pioneer, accidentally discovered the same "stop trick." According to Méliès, his camera jammed while filming a street scene in Paris. When he screened the film, he found that the "stop trick" had caused a truck to turn into a hearse, pedestrians to change direction, and men to turn into women. Méliès, the stage manager at the Theatre Robert-Houdin, was inspired to develop a series of more than 500 short films between 1896 and 1914, in the process developing or inventing such techniques as multiple exposures, time-lapse photography, dissolves, and hand painted color. Because of his ability to seemingly manipulate and transform reality with the cinematograph, the prolific Méliès is sometimes referred to as the "Cinemagician."  His most famous film, Le Voyage dans la lune (1902), a whimsical parody of Jules Verne's From the Earth to the Moon, featured a combination of live action and animation, and also incorporated extensive miniature and matte painting work.
 From 1910 to 1920, the main innovations in special effects were the improvements on the matte shot by Norman Dawn. With the original matte shot, pieces of cardboard were placed to block the exposure of the film, which would be exposed later. Dawn combined this technique with the "glass shot." Rather than using cardboard to block certain areas of the film exposure, Dawn simply painted certain areas black to prevent any light from exposing the film. From the partially exposed film, a single frame is then projected onto an easel, where the matte is then drawn. By creating the matte from an image directly from the film, it became incredibly easy to paint an image with proper respect to scale and perspective (the main flaw of the glass shot). Dawn's technique became the textbook for matte shots due to the natural images it created.
 During the 1920s and 1930s, special effects techniques were improved and refined by the motion picture industry. Many techniques—such as the Schüfftan process—were modifications of illusions from the theater (such as pepper's ghost) and still photography (such as double exposure and matte compositing). Rear projection was a refinement of the use of painted backgrounds in the theater, substituting moving pictures to create moving backgrounds. Lifecasting of faces was imported from traditional maskmaking. Along with makeup advances, fantastic masks could be created which fit the actor perfectly. As material science advanced, horror film maskmaking followed closely.
 Many studios established in-house "special effects" departments, which were responsible for nearly all optical and mechanical aspects of motion-picture trickery. Also, the challenge of simulating spectacle in motion encouraged the development of the use of miniatures. Animation, creating the illusion of motion, was accomplished with drawings (most notably by Winsor McCay in Gertie the Dinosaur) and with three-dimensional models (most notably by Willis O'Brien in The Lost World and King Kong). Naval battles could be depicted with models in studio. Tanks and airplanes could be flown (and crashed) without risk of life and limb. Most impressively, miniatures and matte paintings could be used to depict worlds that never existed. Fritz Lang's film Metropolis was an early special effects spectacular, with innovative use of miniatures, matte paintings, the Schüfftan process, and complex compositing.
 An important innovation in special-effects photography was the development of the optical printer. Essentially, an optical printer is a projector aiming into a camera lens, and it was developed to make copies of films for distribution. Until Linwood G. Dunn refined the design and use of the optical printer, effects shots were accomplished as in-camera effects. Dunn demonstrating that it could be used to combine images in novel ways and create new illusions. One early showcase for Dunn was Orson Welles' Citizen Kane, where such locations as Xanadu (and some of Gregg Toland's famous 'deep focus' shots) were essentially created by Dunn's optical printer.
 The development of color photography required greater refinement of effects techniques. Color enabled the development of such travelling matte techniques as bluescreen and the sodium vapour process. Many films became landmarks in special-effects accomplishments: Forbidden Planet used matte paintings, animation, and miniature work to create spectacular alien environments. In The Ten Commandments, Paramount's John P. Fulton, A.S.C., multiplied the crowds of extras in the Exodus scenes with careful compositing, depicted the massive constructions of Rameses with models, and split the Red Sea in a still-impressive combination of travelling mattes and water tanks. Ray Harryhausen extended the art of stop-motion animation with his special techniques of compositing to create spectacular fantasy adventures such as Jason and the Argonauts (whose climax, a sword battle with seven animated skeletons, is considered a landmark in special effects).
 During the 1950s and 1960s numerous new special effects were developed which would dramatically increase the level of realism achievable in science fiction films. Sci-fi special effects milestones in the 1950s included the Godzilla films, The Day the Earth Stood Still (featuring Klaatu), and 3-D films.
 The tokusatsu genre of Japanese science fiction film and television, which includes the kaiju sub-genre of monster films, rose to prominence in the 1950s. The special-effects director Eiji Tsuburaya and the director Ishirō Honda became the driving forces behind the original Godzilla (1954). Taking inspiration from King Kong (1933), Tsuburaya formulated many of the techniques that would become staples of the tokusatsu genre, such as so-called suitmation—the use of a human actor in a costume to play a giant monster—combined with the use of miniatures and scaled-down city sets. Godzilla changed the landscape of Japanese cinema, science fiction and fantasy, and kickstarted the kaiju genre in Japan called the "Monster Boom", which remained extremely popular for several decades, with characters such as the aforementioned Godzilla, Gamera and King Ghidorah leading the market. Tokusatsu films, notably Warning from Space (1956), sparked Stanley Kubrick's interest in science fiction films; according to his biographer John Baxter, despite their "clumsy model sequences, the films were often well-photographed in colour ... and their dismal dialogue was delivered in well-designed and well-lit sets."
 In 1968, Stanley Kubrick assembled his own effects team (Douglas Trumbull, Tom Howard, Con Pederson and Wally Veevers) rather than use an in-house effects unit for 2001: A Space Odyssey. In this film, the spaceship miniatures were highly detailed and carefully photographed for a realistic depth of field. The shots of spaceships were combined through hand-drawn rotoscoping and careful motion-control work, ensuring that the elements were precisely combined in the camera—a surprising throwback to the silent era, but with spectacular results. Backgrounds of the African vistas in the "Dawn of Man" sequence were combined with soundstage photography via the then-new front projection technique. Scenes set in zero-gravity environments were staged with hidden wires, mirror shots, and large-scale rotating sets. The finale, a voyage through hallucinogenic scenery, was created by Douglas Trumbull using a new technique termed slit-scan.
 The 1970s provided two profound changes in the special effects trade. The first was economic: during the industry's recession in the late 1960s and early 1970s, many studios closed down their in-house effects houses. Technicians became freelancers or founded their own effects companies, sometimes specializing on particular techniques (opticals, animation, etc.).
 The second was precipitated by the blockbuster success of two science-fiction and fantasy films in 1977. George Lucas's Star Wars ushered in an era of science-fiction films with expensive and impressive special effects. Effects supervisor John Dykstra, A.S.C. and crew developed many improvements in existing effects technology. They created a computer-controlled camera rig called the "Dykstraflex" that allowed precise repetition of camera motion, greatly facilitating travelling-matte compositing. Degradation of film images during compositing was minimized by other innovations: the Dykstraflex used VistaVision cameras that photographed widescreen images horizontally along stock, using far more of the film per frame, and thinner-emulsion filmstocks were used in the compositing process. The effects crew assembled by Lucas was dubbed Industrial Light & Magic, and since 1977 has spearheaded many effects innovations.
 That same year, Steven Spielberg's film Close Encounters of the Third Kind boasted a finale with impressive special effects by 2001 veteran Douglas Trumbull. In addition to developing his own motion-control system, Trumbull also developed techniques for creating intentional "lens flare" (the shapes created by light reflecting in camera lenses) to provide the film's undefinable shapes of flying saucers.
 The success of these films, and others since, has prompted massive studio investment in effects-heavy science-fiction films. This has fueled the establishment of many independent effects houses, a tremendous degree of refinement of existing techniques, and the development of new techniques such as computer-generated imagery (CGI). It has also encouraged within the industry a greater distinction between special effects and visual effects; the latter is used to characterize post-production and optical work, while "special effects" refers more often to on-set and mechanical effects.
 The use of computer animation in film dates back to the early 1980s, with the films Tron (1982) and Golgo 13: The Professional (1983). Since the 1990s, a profound innovation in special effects has been the development of computer generated imagery (CGI), which has changed nearly every aspect of motion picture special effects. Digital compositing allows far more control and creative freedom than optical compositing, and does not degrade the image as with analog (optical) processes. Digital imagery has enabled technicians to create detailed models, matte "paintings," and even fully realized characters with the malleability of computer software.
 Arguably the biggest and most "spectacular" use of CGI is in the creation of photo-realistic images of science-fiction/fantasy characters, settings and objects. Images can be created in a computer using the techniques of animated cartoons and model animation. The Last Starfighter (1984) used computer generated spaceships instead of physical scale models. In 1993, stop-motion animators working on the realistic dinosaurs of Steven Spielberg's Jurassic Park were retrained in the use of computer input devices. By 1995, films such as Toy Story underscored the fact that the distinction between live-action films and animated films was no longer clear. Other landmark examples include a character made up of broken pieces of a stained-glass window in Young Sherlock Holmes, a shape-shifting character in Willow, a tentacle formed from water in The Abyss, the T-1000 Terminator in Terminator 2: Judgment Day, hordes and armies of robots and fantastic creatures in the Star Wars (prequel) and The Lord of the Rings trilogies, and the planet, Pandora, in Avatar.
 Although most visual effects work is completed during post-production, it must be carefully planned and choreographed in pre-production and production. A visual effects supervisor is usually involved with the production from an early stage to work closely with the Director and all related personnel to achieve the desired effects.
 Practical effects also require significant pre-planning and co-ordination with performers and production teams. The live nature of the effects can result in situations where resetting due to an error, mistake, or safety concern incurs significant expense, or is impossible due to the destructive nature of the effect.
 Live special effects are effects that are used in front of a live audience, such as in theatre, sporting events, concerts and corporate shows. Types of effects that are commonly used include: flying effects, laser lighting, theatrical smoke and fog, CO2 effects, and pyrotechnics. Other atmospheric effects can include flame, confetti, bubbles, and snow.
 One notable example of live special effects in theatre production is in the Bregenz Festival with its use of a large, intricate stage that moves to supplement what's being acted on stage.
 Mechanical effects encompass the use of mechanical engineering to a greater degree. Cars being flipped and hauled over buildings are usually an effect built on specialized rigs and gimbals. Usually a team of engineers or freelance film companies provide these effects to producers. Camera workers, stunt artists or doubles, directors and engineers collaborate to produce the proper effect as the action is recorded against a green screen. It is then edited and reviewed before final release to the public.