In the whole souls series there was always an extremely useful category of items that never got the proper consideration lore wise.
The greatest source of information to this subject has been ds3 which enormously extended the info we have about this mineral.
I'm talking about titanite, so easily forgotten. Dark souls 1 and 3 description reads :
"Titanite shards are fragments of the Legendary Slabs.
Titanite is etched into weapons to reinforce."
This description doesn't help to understand the nature of titanite as a material but points out the source of all shards and bigger pieces : slabs.
The Ds2 description instead reads:
:Titanite was discovered in an ancient layer of earth, and is said to be a gift of the gods. Titanite this size has very little power, but it is still a rare find.” and even if ds2 lore isn't always considered it gives way more information about its source and quantity.
Remember “was discovered in an ancient layer of earth” I'll come back to it later.
So now what's the description of slabs
Legendary Slabs are the heirlooms of a
nameless blacksmith deity, who forged the
weapons of other Gods. Weapons forged with
this slab become rare legendary weapons.
Slabs where once the Gods Domain
Again the ds1 description gives little information about the source of titanite but it says the use and names the creator of the slabs.
In fact the nameless bs deity made the slabs from what i think was some kind of raw titanite, it's unlikely ,but not impossible, that the said blacksmith made those slabs from a material he created .
Anyway this is a missing information so for the sake of this theory I'll pick the most probable of the hypothesis, making him just refine a preexisting material that he forged into the slabs.
The slabs were used to forge the weapons of the gods, it’s unclear if before or after the war with the ancient dragons, it’s likely that this happened after the war with the dragons (in the intro cutscene of ds 1 there s no showcase of gods’ weapon except nito’ s sword with is anyway reinforced with twinkling titanite and not slabs, also gwin and the other used lighting and fire , not proper weapons and the silver knight aren't gods so their weapons do not count)
The Ds2 reads
One of the original slabs that provided the world with all forms of titanite.
Titanite slabs were created to smith the weapons of the gods, or so the legends say.
This description may sound in antithesis with what i previously said but in reality titanite is the name given to the final material ,the starting one may had a different name, or it could refer to the shards and chunks we find in the world with “all form of titanite” (we don't know any other type of titanite outside the ones that we use).
This is also ds2 description so it might not be 100% what miyazaki intended
(I know one of my most important points is from ds 2 but we'll come back to it later need that suspense build up).
Ds3 desc gives no new info
We also know that titanite is imbueable (Green titanite imbued with a special power.
Blue titanite has powerful magic energy.
White titanite has powerful magic energy
Red titanite has powerful fire energy.).
The act of imbuing titanite requires also an extreme amount of power from the entity that s trying to infuse the mineral, this is aknowledgable from ds 2 description of the elemental stones:
(Sorcerers at the Melfian Magic Academy once attempted to imbue titanite with various elements, but are said to have failed. Someone must have succeeded though; what else would explain this stone?)
If not even one of the strongest magic schools could imbue titanite what could possibly do it?
The answer is found in ds3 in the gems, specifically in the dark,chaos,crystal and lighting one : “born of disembodiment of humanity, relics of a land scorched by the chaos flame,introduced by the crystal sage, found in the aftermath of dragon hunts.”
Some of the most powerful entities of the known world made this gems (even if only with their presence or influence) by altering titanite (isnt exactly clear if the gems are pre existing (like gems in real world) or titanite becomes such during the alteration i’ll pick the other since the creation of gems requires high temperature and pressure in the RW (explain later)).
So humanity(or the dark souls) can alter titanite, that s the heirloom of the furtive pigmy, one of the 4 ones, the chaos flame was born from the witch of izalith(another 4 one) , the crystal sages continue Logan’s legacy practicing crystal soul magic (which was born from seath that had an part of gwyn's soul) and the last one talk about the rip of the dragon scales with the lighting from gwyn.
(Infusion part useless theory wise still nice)
So those description imply that those gems were formed DURING the age of gods, before ds 1 events, when the Lords were at their strongest moment and when titanite was probably on the surface or not to deep beneath it (the building of city may have also built layer of rocks and earth as a basement for the cities).
Then why was it in the surface?
Because titanite is made from the remaining (fossilized maybe) of the ancient dragons’ stone scales.
Let me explain why.
Lighting was “invented” by gwyn that used it during his war with the dragons to tear the scales apart ( no real destruction just removal) and the lighting gem being found in the aftermath of those hunts may imply that using the sun spear the lighting etched itself in the scales imbuing them or it was anyway a result of the dragon hunts.
In fact where else could he, or his knight, have thrown that lighting ? at some random rocks?
Like this, the huge amounts of scales in the surface, due to the genocide of dragon, came in contact with the other elements of the Lords.
In the ringed city (whose knights fought in the war against the dragons aswell) dark gems are extremely common due to the proximity with the dark soul and are even visible as giant crystalline bodies￼
The crystal ones were made by seath during his researches with the scales, souls and crystals while the chaos ones were formed during the bed of chaos events.
The unchanged scales were still the majority and they where found by the nameless blacksmith deity that understood their power and forged them into slabs naming it titanite.
After the events ages passed and titanite was covered by layers and layers of earth and ended up in that ancient layer of earth(ancient from the age of ancients?)