3D Geographic Information System (GIS) models are increasingly used for planning and analyses on a city level. Defining 3D GIS city models in different levels of detail (LoD) is often needed to browse and handle large models more efficiently. In this paper, a methodology framework for automatic transformation of different LoDs in CityGML is presented and illustrated. A new exterior shell extraction algorithm was developed from the Ray Tracing algorithm for classifying building surfaces as interior or exterior. A transformation framework among each LoD was developed based on the new exterior shell extraction algorithm. The transformation framework also includes an additional LoD called LoD3.5 that the authors proposed in this paper. The new LoD can satisfy the needs of applications which require information about interior rooms while maintaining a small data storage. The results show that the new exterior shell extraction algorithm can help achieve an automatic derivation of LoDs in CityGML.