At Designstripe I developed this novel procedural generation system that applies traditional constraint satisfaction and wave-function collapse principles to 2D graphic design. The system intelligently generates brand-appropriate advertisements while maintaining design coherence and brand guidelines by defining both hard and probabilistic generation rules over template wireframes.
The heart of the system lies in its procedural generation algorithm. It takes a user’s Brand DNA and a given wireframe as input. The wireframes are developed by designers as a collection of design elements which have metadata encoding their relationships to each other.
The system starts with a high-entropy state where all design elements have multiple possible configurations. Elements that make up a wireframe are weighted by importance (weight) to ensure critical brand elements are prioritized. The algorithm begins by processing elements in order of descending weight to maintain design hierarchy.
For each element, there are multiple possible properties that could be applied such as colors, borders, shadows, shapes, etc. and multiple possible states these could be in, all of which is defined probabilistically. As the algorithm processes each element, it uses the probabilities to randomly select which properties are applied and in what states they end up in.
The constraint system enforces both visual and brand rules by enforcing relationships between elements. As properties and states are collapsed, the probabilities assigned to properties and states of remaining elements are updated according to the generator’s constraint rules. For example, all colors might have equal probability when first selecting a background color, but when moving on to select text color that overlays the background, the probability of selecting a color that has insufficient contrast should be 0.
Key constraints include:
Sometimes, this means we will end up hitting a dead end. For example, we might end up at an element with all possible colors having 0 probability. When constraints fail this way, the system employs a smart backtracking mechanism while progressively relaxing constraints, allowing for exploration of the design space while maintaining design rules and brand integrity.
The color management system uses a brand’s color palette as the foundation for all design elements. Brand palettes are unpredictable. Some brands have a carefully crafted palette that works for many scenarios. Others might have just one primary, or no primary at all.
This system is capable of generating extended palettes from brand colors through tints and shades, allowing for more creative variation for a design while remaining faithful to the brand. It also uses color harmony and contrast scoring on candidate color pairs to ensure higher probabilities are assigned to colors that are more appropriate given an element’s context and other design rules such as accessibility constraints.
This project was a significant improvement over the original approach to the first version of smart layouts, incorporating way more design elements and effects beyond text, blocks, and images. By applying constraint satisfaction and wave-function collapse principles to graphic design, I created a system that was capable of generating thousands of unique, brand-compliant designs while maintaining designer-defined visual hierarchy and composition rules, as well as ensuring accessibility standards.
This project showcases my expertise in both technical implementation and creative problem-solving, resulting in a powerful tool that bridges the gap between programmatic generation and professional design standards.