Multimodal LLMs for "Broad Coding": A Practical Guide to Code-Driven 3D, Video, and Interactive Demos

    This article explores "broad coding," the practice of turning visual and manual workflows into programmable, version-controlled scripts with multimodal large language models. It explains why visual input is the key incremental capability, then walks through three practical cases: reference-image-to-parametric 3D modeling, audio-driven code-based video production, and code-implemented interactive diagrams. It also covers engineering essentials such as quantifiable constraints, executable outputs, dual-view verification, milestone-based task splitting, and common pitfalls to avoid.

    1. From Writing Code to “Broad Coding”: Redrawing the Boundary of What Can Be Coded

    Over the past two years, code generation models have mostly been evaluated on three things: whether they can produce compilable snippets, whether they can understand context across files, and whether they can stay consistent during long tasks. Once models gained visual understanding, a more practical question emerged: a large amount of “non-code work” that used to be done manually in specialized software can actually be framed as code problems.

    That is what “broad coding” means. It is not about forcing video editing, 3D modeling, or drawing into a code editor. It is about identifying the truly time-consuming parts of those workflows—alignment, positioning, and repeated parameter tuning—and turning them into scripts that are programmable, version-controllable, and reproducible in batches.

    Three typical scenarios stand out:

    • Reconstructing 3D structures from an image: using a reference image as a constraint to output a parametric modeling script;
    • Code-driven video production: given narration audio, using scripts to handle timeline alignment, shot switching, and motion effects;
    • Interactive diagrams: upgrading a static illustration into a demo that can be dragged, shifted, and recomputed.

    2. Architecture and Modalities: Why “Being Able to See Images” Is the Key Increment

    Early solutions mostly reused the same base model and relied only on post-training to improve long-task performance. Newer solutions start to change the model structure and introduce visual input. In engineering terms, this brings two direct changes.

    First, there are more sources of constraints. A text-only prompt can only describe something like “a four-corner pavilion, red columns, steps facing the entrance.” A reference image can constrain proportions, orientation, occlusion relationships, and material distribution all at once, significantly reducing ambiguity.

    Second, the verification loop becomes shorter. The model outputs a script rather than the final artifact, so developers can run it, render it, compare the result, and feed deviations back to the model for iteration. Compared with dragging things frame by frame in a graphical interface, the feedback cycle shrinks from hours to minutes.

    It is worth emphasizing that visual capability does not mean “look at an image and get the correct result immediately.” It is more like an entry point that turns vague requirements into structured constraints; rigorous engineering validation is still required afterward.

    3. Practice 1: From a Reference Image to Parametric 3D Modeling

    The workflow can be broken into four steps: prepare an unobstructed reference image → extract structural elements → generate a parametric script → render, compare, and iterate.

    The key to the prompt is to first state the role and constraint priority, then list quantifiable parameters:

    1. You are a 3D scripting engineer. Output a parametric modeling script based on the reference image.
    2. Constraint priority: outline proportions > component orientation > material color > decorative details.
    3. Must be parameterized: number of columns, column height, roof slope, number of steps, railing spacing.
    4. Prohibited: using undeclared external assets; hard-coding dimensions as magic numbers.
    5. Output: script + parameter table + self-check list.

    The parameter table is the core output of this method. It turns “looks similar” into “verifiable”:

    1. number of columns = 4
    2. column height = 2.4
    3. roof slope = 0.35
    4. number of steps = 3
    5. railing spacing = 0.12

    The self-check list should cover common issues: whether components are floating, whether there is mesh interpenetration, and whether the deviation between the front-view outline and the reference image is acceptable. Rendering both a front view and a side view for dual-view comparison is far more reliable than looking at a single rendered image.

    4. Practice 2: Audio-Driven Code-Based Video Production

    Given a narration audio track and a set of assets, manual alignment usually requires marking sentence by sentence and stretching segment by segment, with most of the time spent on repetitive labor. The code-based approach is to declare the timeline as data:

    1. timeline = [
    2. {"start": 0.0, "end": 6.5, "shot": "intro", "transition": "fade"},
    3. {"start": 6.5, "end": 18.0, "shot": "arch", "transition": "cut"},
    4. {"start": 18.0, "end": 33.5, "shot": "code", "transition": "slide"},
    5. {"start": 33.5, "end": 47.0, "shot": "outro", "transition": "fade"},
    6. ]

    This brings three benefits: when durations change, you only edit the data; the same timeline can be reused for multiple language versions; and shot and motion parameters enter version control, so reviews have a clear basis. In engineering, it is advisable to add a validation layer, such as asserting that each segment connects head to tail and that the total duration matches the audio, to avoid discovering misalignment halfway through rendering.

    5. Practice 3: Code-Based Implementation of Interactive Diagrams

    Take a bicycle drivetrain that can shift gears and be back-pedaled as an example. The real difficulty is not drawing it, but making the gear ratio and direction of motion computable and verifiable. A sound approach is to write the physical relationships as explicit formulas and then drive them with interface parameters:

    1. rear wheel revolutions = front chainring teeth / rear sprocket teeth × crank revolutions
    2. If the gear ratio = 48 / 16 = 3, then one crank revolution turns the rear wheel three times
    3. When back-pedaling, the crank angular velocity is negative, and the sign of the rear wheel angular velocity flips accordingly

    On the interface side, you only need to expose three inputs: number of teeth, crank angle, and direction; the rest is derived by the formulas. The value of such a “recomputable demo” is that the presenter can change parameters on the spot, and what the audience sees always stays consistent with the formulas, avoiding the risk of a good-looking animation that computes the wrong result.

    6. Engineering Essentials and Common Pitfalls

    • Make constraints quantifiable: rewrite “a bit similar” as numeric ranges for proportions, angles, and spacing;
    • Make outputs executable: prefer scripts and configurations over one-off results;
    • Verify with dual views: for visual tasks, cross-check at least a front view and a side view;
    • Split long tasks: break a large goal into milestones, each independently acceptable;
    • Keep resources controllable: manage assets, fonts, and model files through unified storage and version control, with logging and monitoring alerts to locate the failing step.

    The common pitfalls are equally clear: over-trusting a single rendered image, hard-coding dimensions, ignoring coordinate system and unit consistency, and a timeline lacking closure validation. In a purely manual workflow, these issues are avoided through experience; in a code-based workflow, they should be written as assertions and check items.

    7. Conclusion

    The real value of broad coding is not replacing specialized software, but migrating low-value repetitive labor such as “manual alignment” to a pipeline that is programmable, reproducible, and auditable. When a model has both structural understanding and visual constraint capabilities, the developer’s role shifts further toward defining constraints, breaking down milestones, and designing validation. Mastering this method brings more long-term returns than chasing the score of any single version update.