Porosity is the fraction of a rock occupied by voids or pores. It can be primary (original) developed during deposition or secondary (induced) developed after deposition through diagenetic processes like dissolution. Factors that affect porosity include particle size, shape, sorting, cementation, compaction, and fractures. Porosity is important for reservoir rocks as it provides space for fluids like hydrocarbons to be stored and transmitted. Different rock types have different pore types, with clastic rocks having intergranular and fracture pores and carbonates having interparticle, intraparticle, intercrystal, moldic and other pores.