In this paper we report on a new optical technique to measure in situ the fraction solid during solidification. The technique utilizes the extreme properties of silica aerogels, being optically transparent in the visible and near infrared. From measured brightness time profiles the fraction solid can be derived using a suitable theoretical approach. The technique is tested on a technical AlSiMg alloy (A357) solidified directionally in the furnace facility Artemis. The results are compared with the well known theoretical expressions of the lever rule and the Scheil relation. The measured fraction solid as a function of temperature agrees well with model of Scheil which shows the capabilities of the new technique.