Trompe l’œil is an art technique that uses realistic imagery to create the optical illusion that the depicted objects exist in three dimensions. Forced perspective is a comparable illusion in architecture.
Trompe l’œil creates an optical illusion (also called a visual illusion) which is an illusion caused by the visual system and characterized by visually perceived images that differ from objective reality. The information gathered by the eye is processed in the brain to give a percept that does not tally with a physical measurement of the stimulus source. There are three main types: literal optical illusions that create images that are different from the objects that make them, physiological illusions that are the effects of excessive stimulation of a specific type (brightness, color, size, position, tilt, movement), and cognitive illusions, the result of unconscious inferences. Pathological visual illusions arise from a pathological exaggeration in physiological visual perception mechanisms causing the aforementioned types of illusions.
Optical illusions are often classified into categories including the physical and the cognitive or perceptual, and contrasted with optical hallucinations.