Relative cohomology and projective twistor diagrams