Visual hallucinations may occur both as formed objects like stars or other recognizable objects or may be unformed as in flashes and spots. The formed images may represent misunderstanding of information in the brain or background "noise" from the disruption of brain tissue that is needed to process the information.
A separate but related cause of visual hallucinations is called Charles Bonnet Syndrome. It occurs in patients with significant loss of vision. The hallucinations from Charles Bonnet Syndrome are often very detailed such as a group of people, a truck or an animal. These are not psychotic in nature but simply represent the brains attempt to interpret the impaired information and find a mental image to match the incoming message.