The sense of smell (olfaction) allows organisms to perceive their environment through odors via the nasal cavity. This includes both pleasant and unpleasant odors.