Dalian Works
aifilm

One Begets Two, Two Begets Three: The Recursive Logic of Splitting a Book into Shots

Published 2026-11-02 · Translated from the Chinese original
One Begets Two, Two Begets Three: The Recursive Logic of Splitting a Book into Shots
One Begets Two, Two Begets Three: The Recursive Logic of Splitting a Book into Shots

"One begets two, two begets three, three begets all things." This saying originates from the *Tao Te Ching*, describing the evolutionary path in cosmology from the Way to one, to two, to three, and then to all things. The CloudKude system's process of decomposing a novel into storyboards happens to map perfectly onto this recursive logic. In the practical execution of *First Avenue*, one person using three computers completed a two-hour-and-twenty-minute AI film in eleven days. The 93,000-word source text was first rooted, then split into a body, and finally broken down into 1,029 shots. Throughout this process, each step is not an isolated operation but strictly follows a top-down hierarchical recursion: first the root name, which derives the article body, which in turn derives the two primitives of characters and locations, and finally these two primitives collide to produce the third entity—the storyboard. The necessity of recursion lies in the fact that no film's core information can be disconnected from its source material, and the information density of the source material is massive and chaotic. It must be progressively abstracted, sinking the non-computable semantics down into enumerable records.

The first layer is fixing the root, corresponding to the `bookcode` in `dbvideo_bookidx`. This step is extremely simple in the system: you merely enter the book title and obtain a unique code that can be referenced across the entire universe. This code contains no specific plot, characters, or locations—it is only an identifier, like the root of a tree: it doesn't determine the shape of the branches and leaves, but it determines the ownership of the entire tree. Taking *First Avenue* as an example, once the `bookcode` is generated, all subsequent table records will carry this code in one column of every row, serving as the genealogical ancestor of the data. Without this root, the subsequent 69 chapters and 1,029 shots would be water without a source—unclassifiable and unisolatable. The operation of fixing the root may seem redundant, but it sets the first anchor in the data lineage chain. Its significance is that every record generated by each subsequent recursive step can trace back to a common origin, thereby guaranteeing the integrity of the entire recursion tree. At this level, no images or storyboards are generated—only one row of code clearly declares: a work named *First Avenue* now exists, possessing an immortal, immutable identity credential.

The second layer is the complete body, corresponding to `dbvideo_article`. At this layer, the 93,000-word source text is entered article by article, one row per chapter, 69 rows in total, each carrying the `bookcode` from the previous layer. The essence of this step is to discretize the continuous text stream into enumerable chapter units—splitting from one body into multiple bodies. The novel as a physical whole is transformed in the database into 69 records, each storing all the text of one chapter along with metadata such as chapter number and title. This layer performs no computation related to images or shots; it merely faithfully preserves the completeness and order of the text. But it is precisely this layer that provides the minimum operable unit for subsequent recursion. Without this per-chapter segmentation of the original text, the system could not initiate decomposition tasks at chapter granularity, nor could it support concurrent scheduling where multiple machines each process different chapters. The whole body splitting into multiple bodies is a necessary precondition for "two begets three," because the appearance of characters and the appearance of locations must be extracted from specific text passages—they cannot be born out of thin air detached from the original context. So the article layer is both the storage layer for the body and the input source for recursive decomposition.

The third layer is decomposition, corresponding to the `funx.atctoscene` function. This is the most critical step in the recursive logic: it accepts one chapter's text from the article layer as input, performs natural language analysis, extracts all explicit and implicit character names and location names, and deposits them into `dbvideo_roles` and `dbvideo_places` respectively. Taking *First Avenue* as an example, when the function reads chapter 50's text, it may recognize the character "Wise Sage" and the location "Five Elements Dragon Flag Formation." It then looks up or creates a "Wise Sage" record in the character table, looks up or creates a "Five Elements Dragon Flag Formation" record in the location table, and then performs a Cartesian match between characters and locations, writing the character-location binary combinations that actually appear in the text into the `dbvideo_process` table. Each process record is one storyboard. This layer reveals the core characteristic of recursion: the same processing logic is applied to every chapter, but each chapter's input differs, and therefore the outputs differ as well. Characters and locations are separated at this moment—they are the two, the primitives from which all subsequent image generation derives. Separation is necessary because only by separating into independent records can you guarantee that an adjustment to one scene affects only that scene without implicating the entire script, thereby supporting the engineering promise of "swap actor, edit one row." From a data lineage perspective, the rows in roles and places are children of the article text—they inherit from specific chapters, yet they exist in the database tables as persistent identities independent of any single chapter.

The fourth layer is shot formation, corresponding to the output of `funx.atctoscene`: `dbvideo_process`. This layer is automatically triggered by the third layer and is not an additional independent step. Once the system has established two concrete individuals in the character table and location table, it executes the formula "scene equals character plus location" and generates a new storyboard record. The essence of this record is a triple: character ID, location ID, and a prompt-text field describing the dynamic content of the shot. For pure landscape shots with no characters, only the location ID is associated and the character ID is left empty; these shots are classified under the "empty roles" branch and generate imagery through pure text-to-image. Shots with characters follow the "with-characters branch," referencing both the character image and location image in the compositing words, performing image-to-image synthesis. Therefore, each shot's generation method is definitively determined by its lineage: if the shot's lineage tree contains both character and location branches, it necessarily follows the image-to-image synthesis path; if it contains only the location branch, it follows the pure text-to-image path. The "three-in-one" form truly manifests at this layer: characters and locations—the two—collide in the storyboard's table structure to produce a third thing: the scene. This process appears at the database level as the birth of a `dbvideo_process` row, whose foreign keys point to the primary keys of the character table and the location table. These two foreign keys are its ancestors, and it is itself a new-generation entity.

The necessity of recursive decomposition is that no storyboard can emerge out of nowhere—it must trace upward to find its textual source and character source, and this process is strictly enumerable. Each chapter's text is broken into several characters and several locations; these characters and locations are then combined into several storyboards. The total number of storyboards is not equal to the number of characters plus the number of locations, but equal to the number of actual interactions between characters and locations. In *First Avenue*, the 69 chapters uniformly call `atctoscene`, ultimately producing 1,029 storyboard records. This number is neither 600 nor 3,000—it is the precise value determined by the actual character-location collisions appearing in the text, just as "three begets all things": the quantity of all things is not predetermined but is a countable result derived from combinations of twos. This design naturally supports parallel processing, because the 69 chapters are independent of one another, and each chapter's text does not depend on any other. Any machine can independently fetch one chapter's text, execute `atctoscene`, generate that chapter's subset of storyboards, and await no other chapter's completion—finally merging all subsets into the full output of 1,029 shots. The root of concurrency is precisely the nature of recursion itself: whenever a problem is recursively decomposed into mutually unrelated subproblems, those subproblems are inherently equipped with the conditions for parallel solving.

Viewing the full pipeline from a data lineage perspective, you can trace from `dbvideo_bookidx` to `dbvideo_article`, then derive `dbvideo_roles` and `dbvideo_places` from it, and finally generate `dbvideo_process` from the combination of the two. Every step is reversible, traceable, and also re-executable. If a chapter's text is modified, then the character, location, and storyboard records descended from that chapter will all trigger new recursive calls, updating their descendants, while the branches of other chapters remain completely untouched. This lineage-driven update mechanism is precisely the elegance of recursion: it relies not on any global coordinator but on each record's own source relationships. Ultimately, when the system re-processes the 69 chapters of *First Avenue* with the same recursive function, even if the visual style switches from realistic to period costume, as long as the input articles remain unchanged, the set of characters and locations remains unchanged, and the total number of storyboards holds steady at 1,029—only the image-to-video parameters under each storyboard are renewed as a result of the altered style field. One begets two, two begets three, three begets all things. The total quantity of all things remains constant within the logic of recursion, but the appearance of all things can change with the environment. This two-hour-and-twenty-minute film is, within such a constant recursive structure, projected as one developed manifestation among countless possibilities.