Rendering a three-dimensional model