返回资讯中心
外部精选
软件工程
#社区热议

What Heraldry and Mon Can Teach Us About Building Visual-Identity Generators

Even without seeing the shield, someone familiar with heraldry can reconstruct its essential appearance. The field is blue (azure). Upon it is a lion standing in the conventional rampant posture. The lion is gold or yel…

Hacker Newsbovermyer2026/9/28 · 2026/9/2830 分钟阅读

以下正文同步自 Hacker News,版权归原站所有,已转换为易读排版。

Even without seeing the shield, someone familiar with heraldry can reconstruct its essential appearance. The field is blue (azure). Upon it is a lion standing in the conventional rampant posture. The lion is gold or yellow (Or).

More complicated arms add divisions of the field, ordinaries, multiple charges, positional relationships, variations in tincture, and other qualifications, but the basic idea remains the same. The blazon is not simply a name assigned to a picture. It is a structured description of one. That makes blazon interesting from a computational perspective. It behaves somewhat like a constrained natural language: a language with rules that limit which combinations are valid.

A blazon has a vocabulary, morphology, syntax, and an expected ordering of information. Some constructions are valid while others are not. Earlier parts of the description establish a context in which later parts are interpreted. A relatively small collection of rules and terms can describe a very large space of possible images.

This resembles the generative systems studied in linguistics. Rather than storing every possible sentence, a language provides rules capable of generating an effectively unlimited number of sentences. Heraldry does something similar for visual designs.

For a procedural generator, that suggests an obvious architecture: generate a valid heraldic description first, then render it. In principle, the same blazon could even be handed to several different renderers. They might produce stylistically different lions, shields, or fleurs-de-lis, while all producing recognizable representations of the same arms. The underlying identity lies partly in the abstract description rather than in one exact drawing.

Japanese mon and kamon present a rather different problem. Like European heraldry, mon served as visual identifiers and could be associated with families, individuals, institutions, and political relationships. They appeared on clothing, banners, equipment, buildings, and other objects.

But treating mon as simply “Japanese coats of arms” obscures substantial differences between the traditions. Most importantly for procedural generation, there is no direct equivalent to blazon at the center of the system. Mon are generally highly stylized designs constructed from recognizable motifs: plants, animals, celestial objects, tools, geometric figures, and other forms. Those motifs are abstracted into a compact visual vocabulary and arranged according to recognizable compositional patterns. One of the most famous examples is the Tokugawa mitsuba aoi: three stylized hollyhock (or ginger) leaves arranged rotationally around a central point.

The important thing here is not simply that the design contains three leaves. Its identity comes from the combination of a particular stylized leaf form, repetition, orientation, spacing, symmetry, and overall silhouette. A generator approaching this design as though it were a Western blazon might begin with something like “three hollyhock leaves.”

That description contains some of the correct information, but nowhere near enough to reproduce the mon. The geometry matters. This suggests a different procedural model.

Instead of generating a linguistic description and resolving it into an image, a mon generator can operate much more directly on graphical primitives:

Take a base shape. Duplicate it three times. Rotate each copy around a common origin. Scale and position the elements according to a template. Clip or enclose the result within a circle where appropriate.

The resulting system begins to resemble procedural geometry more than natural-language generation.

This gives us two strikingly different models for generating heraldic designs. Western heraldry can be treated as primarily descriptive. Generate a structured description of an object and then render that description. Japanese mon can be treated as primarily compositional. Generate a visual structure by combining and transforming graphical elements.

That distinction is not absolute. Western heraldry obviously contains extensive compositional rules, and mon have names and conventional classifications. Neither historical tradition was invented as a software architecture. Nevertheless, the distinction is useful when deciding how to represent them computationally.

Consider how each system might represent three repeated objects. In Western heraldry, the important information might include the identity of the charge, its tincture, its number, and its arrangement. “Three roundels argent, two and one” communicates an arrangement that a heraldic artist can interpret. A mon generator might instead express a similar concept geometrically:

The Western representation is closer to an abstract syntax tree. The Japanese representation is closer to a scene graph. For procedural generation, both are extremely attractive.

This comparison also demonstrates why simply collecting historical symbols is insufficient. Western heraldry has rules governing tinctures, field divisions, ordinaries, charge placement, repetition, cadency, marshalling, and many other features. The famous “rule of tincture,” for example, generally discourages placing a metal on a metal or a color on a color. The practical effect is strong visual contrast: a gold lion on a blue field is readily distinguishable, while a red lion on a blue field is less so. A generator that chooses a random field color and then independently chooses a random charge color will therefore produce combinations that violate one of the most recognizable conventions of the system.

The better approach is conditional generation. Choosing the field constrains what can come next. If the field is a color, the generator can preferentially select a metal for a major charge. If the field is divided, another set of possibilities becomes available. If an ordinary is present, the possible placement of other charges changes.

Mon impose different constraints. Symmetry, repetition, enclosure, negative space, and the degree of abstraction become particularly important. A randomly selected flower pasted three times onto a circle is no more convincingly a mon than a randomly selected lion pasted onto a shield is convincingly a coat of arms †† Although, you could make the case that this horribly over-simplified version would be an acceptable prototype. I may play around with this. ↩ . In both cases, the generator needs to model relationships rather than merely objects.

Unfortunately for programmers, historical visual systems are rarely as tidy as their introductory rules make them appear. Western heraldry is full of exceptions, disputed conventions, regional differences, historical developments, and arms that appear to violate rules presented as fundamental. The rule of tincture itself has famous exceptions.

The arms traditionally associated with the Kingdom of Jerusalem place gold crosses on a silver field: metal upon metal. That is not a bug in heraldry. It is evidence that the “rule” is a historical convention rather than a law of physics.

A procedural generator therefore has to decide what sort of system it is modeling. Is it attempting to generate arms that would satisfy a modern herald’s expectations? Arms characteristic of fourteenth-century England? A broad fantasy approximation assembled from several European traditions? Those are different generators.

Mon present the same problem from another direction. A clean taxonomy of motif plus repetition plus enclosure is useful for software, but the historical corpus does not exist to make my TypeScript interfaces convenient. Designs can be altered, combined, simplified, differentiated, or used in multiple forms. Families could use more than one mon, related groups could use variations of a design, and similar motifs could appear independently.

Even the idea that a mon corresponds neatly to one family in the same way that a coat of arms belongs to a particular person entitled to bear arms can be misleading. Real heraldic systems contain history, and history produces irregularity. One possible solution is to distinguish between grammar and corpus.

The grammar describes the normal operations available to the generator. The corpus records historically attested forms, including forms that the general grammar would be unlikely or unable to generate. That approach lets the software say, in effect: “This is how designs of this tradition are usually constructed, but these specific exceptional designs also exist.”

This comparison raises a question for Iron Arachne’s existing crest generator. Should a fantasy crest generator really be modeled primarily on Western blazon? Perhaps not.

Blazon is attractive because it provides an unusually rich formal vocabulary. From a programmer’s perspective, it is tempting to reproduce that vocabulary directly. Generate a field, select tinctures, select charges, determine their attitudes and arrangements, and serialize the result as a blazon. But Iron Arachne’s actual goal is usually to produce an interesting visual artifact for a fictional setting. In that context, the compositional logic demonstrated by mon may be more useful.

That changes the question I ask. Instead of asking, “what heraldic sentence should I generate?” I can ask “what visual relationships should I generate?” A crest could begin with a small set of graphical primitives.

Those primitives could then be reflected, rotated, repeated, nested, intersected, or arranged around an axis. Heraldic charges could themselves become primitives in a larger compositional system. The result would not necessarily be historically valid European heraldry or Japanese mon. It would instead borrow a useful procedural insight from both.

Western heraldry provides a grammar of meaningful categories and relationships. Mon, on the other hand, provide a grammar of visual composition. Combining those ideas may produce a better fantasy symbol generator than faithfully implementing either tradition alone.

At first glance, Western heraldry seems easier to generate because so much of its structure has already been formalized in language. A subset of blazon can be represented quite naturally using enums, tagged unions, grammar rules, or an abstract syntax tree. A renderer can walk that structure and produce SVG elements.

The difficulty grows rapidly, however, as the supported vocabulary expands. Charges can have different attitudes. Fields can have complex divisions and treatments. Charges can themselves bear charges.

Marshalling introduces compositions of entire arms. Historical and regional vocabularies differ. Generating some plausible Western arms is relatively easy. Implementing heraldry is not.

Mon have almost the inverse difficulty. A limited mon-like generator is extremely easy to imagine. SVG is particularly well suited to the problem because it already provides paths, groups, transformations, clipping, masks, and reusable definitions. A base motif can be defined once and instantiated repeatedly with transformations.

Reproducing the historical variety of actual mon is much harder. The difficult part is not drawing three rotated copies of a leaf. It is constructing a vocabulary of motifs and transformations that reproduces the visual logic of historical examples without merely tracing and storing thousands of finished designs. The boundary between generating designs and selecting designs from a catalog is where the interesting procedural-generation problem lies.

One of the things I studied in my graduate program this year is the concept of finite state machines. That got me to thinking about how I could apply them to Iron Arachne. In this case, can either visual identity system be represented as a finite state machine?

For a deliberately restricted subset, sure. A Western generator begins with the field and its tincture, may add an ordinary and its tincture, then chooses charges, their tinctures, and arrangement before compl

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →