Cosmic nebula and star formation