The past decade has seen the discovery of more than 130 giant extrasolar planets. The masses of these planets range from as small as that of Neptune to ten times bigger than the mass of Jupiter and their orbits show all sorts of eccentricties and mean radii. While NASA and ESA are delivering large ground-based and space-based observational programs to learn more about these giant planets and eventually search for terrestrial planets, these exciting discoveries are producing a revision of models of planet formation that were once suited only to explain the Solar System. One of such new theories, disk instability, will be discussed today. I will describe state-of-the art 3D hydrodynamical (SPH) simulations that study the evolution of gaseous protoplanetary disks formed by the high angular momentum material during the process of star formation. I will show that these disks can fragment rapidly into clumps following the onset of gravitational instability. These clumps are gravitationally bound,long-lasting and have masses and orbits comparable to those of extrasolar giant planets. I will then discuss how the balance of heating and cooling in the disk is crucial for the onset of fragmentation and will also show new calculations which incorporate flux-limited radiation transport.