Near infrared dust extinction mapping is opening a new window on molecular cloud research. Applying a straightforward technique to near infrared large scale data of nearby molecular complexes one can easily construct density maps with dynamic ranges in column density covering, 3σ~ 0.5 < AV< 50 mag or 1021<N<1023 cm−2. These maps are unique in capturing the low column density distribution of gas in molecular cloud complexes, where most of the mass resides, and at the same time allow the identification of dense cores (n~104cm−3) which are the precursors of stars. For example, the application of this technique to the nearby Pipe Nebula complex revealed the presence of 159 dense cores (the largest sample of such object in one single complex) whose mass spectrum presents the first robust evidence for a departure from a single power-law. The form of this mass function is surprisingly similar in shape to the stellar IMF but scaled to a higher mass by a factor of about 3. This suggests that the distribution of stellar birth masses (IMF) is the direct product of the dense core mass function and a uniform star formation efficiency of 30%±10%, and that the stellar IMF may already be fixed during or before the earliest stages of core evolution. We are now extending this technique to extra-galactic mapping of Giant molecular Clouds (GMCs), and although a much less straightforward task, preliminary results indicate that the GMC mass spectrum in M83 and Centaurus A is a power-law characterized by α~−2 unlike CO results which suggest α~−1.