Philip Morris began sponsoring F1 in 1972 with the creation of ‘Marlboro BRM’, and was probably the first F1 sponsor to recognize the importance of leveraging this involvement by creating ‘marketing projects’.
For example, in 1972 the company flew journalists to the team's French launch, at which the racing car emerged from a giant Marlboro cigarette packet, achieving widespread media publicity.
In 2005 tobacco wasn't allowed to advertise on F1 race cars anymore, so Marlboro switched tro a bar code design. https://tobaccocontrol.bmj.com/content/21/6/529
the legal loophole was exploited with the following genius defense argument:
When challenged by a series of media reports in early 2010 that the barcode design was in reality a Marlboro logo, Ferrari responded that ‘the so called barcode is an integral part of the livery of the car and of all images coordinated by the Scuderia, as can be seen from the fact it is modified every year, and, occasionally even during the season. Furthermore, if it was a case of advertising branding, Philip Morris would have to own a legal copyright on it’.