This thesis is about physically-based modelling of the appearance of materials. When a material is graphically rendered, its appearance is computed by considering the interaction of light and matter at a macroscopic level. In particular, the shape and the macroscopic optical properties of the material determine how it will interact with incident illumination. In this thesis the macroscopic optical properties are connected to the microscopic physical theories of light and matter. This enables prediction of the macroscopic optical properties of materials, and, consequently, also prediction of appearance based on the contents and the physical conditions of the materials. Physically-based appearance models have many potential input and output parameters. There are many choices that must be made: How many material components to include in the model, how many physical conditions to take into account, whether the shape of the material should be coupled to the appearance model or not, etc. A generalised concept of shape and geometry is presented to provide a framework for handling these many degrees of freedom. Constraints between input and output parameters are modelled as multidimensional shapes. This gives the opportunity to use the appearance models not only for prediction, but also for analysis of the contents and the physical conditions of a material given information about its macroscopic optical properties. Since it is possible to measure these properties using camera technology, the presented framework enables analysis of material contents and conditions using camera technology. Three detailed appearance models are presented as to exemplify the applicability of the theory: (1) A model which finds the appearance of water given temperature, salinity, and mineral and algal contents of the water; (2) a model which finds the appearance of ice given temperature, salinity, density, and mineral and algal contents of the ice; and (3) a model which finds the appearance of milk given fat and protein contents of the milk.