Optimise images and ray positioning