The formation of bone by the action of special cells (osteoblasts). A meshwork of collagen is first laid down, followed by a cementing polysaccharide. The cement is finally impregnated with tiny crystals of calcium. On completion of bone formation, the osteoblasts become trapped within the matrix as osteocytes. Osteogenesis may be encouraged as part of a planned surgical procedure (distraction osteogenesis).