...
Megastructures adds a new branch to the Engineering Tech tree, with a sequence of new Techs unlocking access to a new resource called Gigamass and all that can be made from it.
...
Gigamass is harvested from Dead Worlds (those with a Class of 0), by the new Planet Harvester ship.
...
...
One crucial point to note: Gigamass is a highly limited resource and once all the Dead Worlds on the map have been harvested, aside from some very small amounts generated through Events, that’s all there is. Gigamass is valuable but the AI may be willing to trade their own stocks if you have something they want in return, but generally speaking, it would be wise to carefully examine your own Gigamass stocks and the costs of each Megastructure (or other feature) when planning what you want to spend it on.
...