Try this.
1m^3 = 1,000,000,000mm^3
The specific gravity of steel = 7.85
The formula for a piece of steel in kilograms is - ((volume in mm^3) x 7.85) / 1,000,000)
The mass of a cubic meter of steel is 7,850kg - I.E. 7850kg/m^3
The formula for a piece of steel in grams is - ((volume in mm^3) x 7.85) / 1,000)
The mass of a cubic millimetre of steel is 0.00785g - I.E. 0.00785g/mm^3
To get the weight of any other material - substitute the specific gravity of that material for the number 7.85 in the calculations above.
Does this solve your problem?
Brett