Nebula formation from matter from space and stars