In 17th century Madrid two circumstances combined to convert it into a great cultural centre. On one hand, it was the capital of the kingdom and the administrative centre of Spain, and therefore was the seat of the Court and the Church. All the nobles, Royal Family, important civil servants, merchants and ambassadors settled in Madrid and constructed their palaces there. This generated a big demand for both religious and secular art. On the other hand, Madrid was also where all the motherhouses of all the monastic orders settled, in duplicate: the mother-house previous to the Reformation (the "Calzados") and the mother-house subsequent to the decrees of the Council of Trent and submissive to them (the "descalzos" or discalced). This fact doubled the demand for religious paintings to decorate convents and churches. The court portrait, initiated in the 16th century, reached its peak at this time, especially thanks to [Velázquez#PINTOR#3652]. The generic type of court portrait was a full length, life size portrayal, against a grey-brown background with spatial references, such as a piece of furniture, a curtain or pillars. The sitter was depicted facing the front with some attribute that denoted his rank, like a sword, jewels or books. There was often an attempt to capture physiological traits of the person being painted, so that his personality could be understood. All these aspects can be seen in Velázquez's portrait of Pope Innocent X. Regarding other subject matter, Philip IV's reign was the most significant for profane painting. Having constructed the [Buen Retiro Palace#MONUMENTOS#14], he ordered its rooms to be decorated with paintings of the glorious battles of his reign, as well as mythological cycles, unusual in Spanish painting. The immense commission attracted many great Spanish and foreign artists, especially those from Naples, Rome, Genoa, and the Netherlands (Rubens' work and reproductions in print; also Van der Hammen's still lifes and landscapes). The paintings done for this commission were large in size, with many figures and complex compositions. It was common for the triumphant and defeated armies to be featured, as a support for the depiction of the victorious Spanish general and his defeated counterpart. Generally speaking at the beginning, the Madrid school drew on the more realistic and harsh elements of the previous period. However, around 1640 there was a change of direction towards colour, dynamism, and scenographic effects. Saints and mystics were substituted by brilliant triumphs, outbreaks of glory, celestial thrones and angelic choruses. Two main generations made up this school: the first was made up of Florentine painters and their sons, born in Madrid, and a second generation flourished after Veláquez, made up of Francisco Rizzi, Carreño de Miranda, Herrera el Mozo, Claudio Coello... who applied optical illusions to their works, influenced by the false perspectives of Maffei and Cortona, fresco painters of Italian [Idealism#ESCUELAS#77] who left much of their artwork in the churches of Madrid. This generation's paintings were alive with colour, dynamic, with the perspective taken from below, and therefore not designed for a spectator viewing them from the front. There was also a third generation, consisting of the disciples of the two previous groups, a less studied and shorter-lived generation, because for one reason or another many of them died young. The models established by the court painters of the period remained in place until the 18th century when they slowly began to degenerate into a weak and merely decorative form of painting, until the shake up provoked by Philip V's reign.