Effects of absorption and inhibition during grating formation in photopolymer materials