Carbon is the best material on paper, in terms of strength, stiffness, mass, fatigue life etc. The exception is impact damage - but can be repaired better than aluminium can.
Aluminium is fantastic too, imo, and on a mtb with fat tyres and suspension, how much will you notice the frame material properties, anyway? Down side is more mass compared to carbon.
Im not a fan of steel, although I have had steel road and mountain bikes - just does not work for me. Also, On a mtb the frame sees a lot more water, which is not always great for steel, unless you get a stainless steel frame, but that costs a lot.
Ti is not worth the cost imo, but it has the expensive, exclusive retro thing going for it.
Some figures; the top steels ( reynolds 953, columbus XCR) have a tensile strength of over 2000 MpA. My frame, a zero replica from Dedacaia ( sic) has 1400 MpA. The most you will get out of Ti is around 1000MpA. Carbon is far below this, (Alu is around 700 MpA) and is used mainly for Cat 3 and above racers. Lightweight non racers generally use them for weekend blasts, never or seldom as a daily beater, unless they live in a part of the world with baby smooth roads.
Strong carbon/epoxy has a tensile strength of 3000 MPa, plus the density is low, so you can use as much as is needed and still have a light frame. Black magic?