Multimodal AI Coding in Practice: From Web Development to 3D Space Construction
This article examines how multimodal AI coding models are moving from code generation toward end-to-end task completion. Using a browser-based 3D restaurant scene as a test case, it covers spatial coordinate systems, functional zoning, modular components, visual inspection, unfinished and finished state switching, camera and interaction design, and a five-part evaluation framework. It also outlines a staged workflow for developers working with such models on complex 3D development tasks.
1. From “Writing Code” to “Completing Tasks”
In the past, intelligent coding tools were mainly used to generate functions, pages, or APIs from text descriptions. For example, a developer could enter “create a login page,” and the model would quickly output the page structure, styles, and interaction logic. In real projects, however, tasks rarely stop at code itself. They also involve understanding visual goals, managing spatial relationships, organizing resources, validating runtime results, and continuously revising based on those results.
This means developers do not really need a simple code generator. They need an intelligent development assistant that can understand task goals, break down implementation steps, call development tools, observe execution results, and complete iterations.
This capability can be summarized as “broad programming”:
- It can generate webpages, scripts, and API logic.
- It can understand spatial and visual information in images, screenshots, and videos.
- It can convert positions, dimensions, materials, and interaction rules in a 3D scene into program structures.
- It can identify layout errors, occlusion issues, and interaction defects from runtime results.
- It can continuously debug around the final effect instead of producing code in a single pass.
Therefore, the criteria for evaluating models also need to change. Beyond whether the code runs, we should also consider whether the model accurately understands requirements, maintains complex constraints, detects visual problems, and moves a prototype into an interactive and acceptable state.
2. Test Task: Building a Browsable 3D Dining Space
To test this type of model’s comprehensive capability, we can design a scenario with clear constraints: given an approximately 450-square-meter shell space, the model must use browser-based 3D rendering technology to build a browsable restaurant storefront from scratch.
The task is not simply about placing a few cubes. It must simultaneously satisfy the following requirements:
- Preserve the existing load-bearing columns, doors and windows, and main circulation path.
- Complete the overall layout of the storefront facade, main hall, private dining rooms, dining tables, and service areas.
- Provide switching between unfinished and finished states.
- Support multiple fixed camera positions.
- Support free viewing through mouse or touch dragging.
- Ensure there is no obvious clipping between walls, slatted partitions, tables and chairs, and decorative objects.
- Keep proportions, circulation, and visual hierarchy consistent across different areas.
The difficulty of this task is that it involves geometric modeling, scene organization, visual expression, interaction programming, and quality inspection at the same time. If any part deviates, the final result will be affected.
For example, if the load-bearing columns shift, the unfinished and finished states cannot align accurately. If a private room doorway is blocked by a decorative wall, users will find that the spatial circulation does not work during actual browsing. If the divider in a split hot pot is not placed according to visual logic, the model may still run correctly, but the details will look unnatural.
3. How the Model Breaks Down a Complex Spatial Modeling Task
For requirements like this, a more reliable process is usually not to output an entire codebase directly, but to first establish the scene hierarchy and then implement and verify it step by step.
3.1 Establish a Spatial Coordinate System First
A 3D scene must first define a consistent coordinate convention, for example:
- The horizontal axis represents spatial width.
- The longitudinal axis represents spatial depth.
- The vertical direction represents height.
- The origin is located at the center of the entrance or the geometric center of the site.
- All building components use the same unit of length.
Next, the model needs to convert load-bearing columns, doors and windows, and circulation paths into immutable constraints. These can be treated as “hard boundaries” in the scene. Walls, tables and chairs, and decorative elements can only be placed in the remaining areas.
An illustrative data structure is as follows:
const sceneRules = {width: 30,depth: 15,ceilingHeight: 3.2,fixedElements: [{ type: "column", x: 4.5, y: 2.8, width: 0.45, depth: 0.45 },{ type: "column", x: 12.5, y: 2.8, width: 0.45, depth: 0.45 }],circulation: [{ x: 0, y: 0, width: 2.6, depth: 15 }]};
The key here is not the specific code, but structuring the spatial constraints first. For complex tasks, structured constraints are easier for the model to maintain consistently than natural language descriptions.
3.2 Then Divide the Space into Functional Zones
After fixed elements are determined, the space can be divided into several functional areas:
- Street-facing entrance and storefront facade
- Central main hall
- Dining areas on both sides
- Private dining rooms at the rear
- Food preparation or service area
- Primary circulation routes
A reasonable zoning plan should consider area, circulation, and visual relationships at the same time. The entrance must not be blocked by tables and chairs, the main circulation path must not be compressed by decorations, private room entrances need to remain visible, and the rear area should have a certain degree of privacy.
If the model generates objects one by one based only on text, it is easy to create a situation where “individual objects are correct but the overall space is unbalanced.” A better approach is to generate the floor plan first, then gradually add height, materials, and decoration.
3.3 Generate the Scene with Modular Components
Many elements in a 3D scene are repetitive, such as tables, chairs, partitions, walls, lighting fixtures, and decorative cabinets. Encapsulating these objects as reusable components can reduce code complexity and make later unified modifications easier.
function createTable(options) {const table = createBox(options.width, options.height, options.depth);table.position.set(options.x, options.y, options.z);table.material = createMaterial(options.color);return table;}function createPartition(options) {const group = createGroup();for (let i = 0; i < options.count; i++) {const panel = createBox(options.panelWidth,options.height,options.thickness);panel.position.x = i * options.gap;group.add(panel);}group.position.set(options.x, options.y, options.z);return group;}
The value of modularization is that the model does not need to repeatedly write similar underlying logic. Instead, it can focus on layout decisions. When a user asks to “add two sets of booth seating” or “adjust partition spacing,” only parameters or call counts need to be changed.
4. The Practical Value of Visual Capabilities in 3D Development
Relying only on code inspection to check a 3D scene usually makes it difficult to find all problems. Many errors are not syntax errors or runtime errors, but visual errors.
For example:
- A doorway is blocked by slatted partitions.
- The spacing between tables and chairs is too small for users to pass through.
- A decorative wall overlaps with a column.
- The camera angle is too low, making the space look cramped.
- Material colors are too similar, so the area hierarchy is unclear.
- The internal structure of a pot is oriented incorrectly.
- Cups do not show container thickness and the relationship with the liquid surface.
With visual inspection, the model can use screenshots or rendering results to make secondary judgments against the original requirements. This process is closer to the “run–observe–fix” loop in real development.
A relatively complete closed loop usually includes:
- Generate the base scene.
- Start a local preview.
- Capture key viewpoints such as the entrance, main hall, private rooms, and dining tables.
- Check proportions, occlusion, clipping, and circulation.
- Modify problematic components.
- Re-render and compare.
- Finally add materials, lighting, and interactions.
This approach is more stable than generating complete code in one pass because the model can connect abstract descriptions with actual images.
5. Implementing Unfinished and Finished States
Switching between “before and after renovation” looks simple, but it actually requires maintaining the same spatial coordinates. The most important principle is that the building structure remains unchanged, and only the visibility of variable objects is switched.
The scene can be divided into three layers:
baseLayer: load-bearing columns, floor, doors and windows, and fixed walls.unfinishedLayer: unfinished walls, exposed ceiling, and basic infrastructure.finishedLayer: decorative walls, slatted partitions, lighting fixtures, tables and chairs, and soft furnishings.
When switching, only the visibility of the latter two layers is adjusted:
function switchScene(mode) {unfinishedLayer.visible = mode === "unfinished";finishedLayer.visible = mode === "finished";}
This implementation has three benefits.
First, the two states share the same set of coordinates, avoiding position drift after switching.
Second, fixed camera positions can remain unchanged, allowing users to directly observe differences before and after renovation.
Third, when the model modifies the scene later, it only needs to adjust the corresponding layer rather than rebuilding the entire scene.
If two completely independent models are used, the initial implementation may be faster, but it is easy to create inconsistent proportions, misaligned columns, and deviations in door and window positions.
6. Interaction Design Cannot Be Ignored
The value of a 3D scene is not only whether it “looks right,” but also whether users can browse it naturally.
At minimum, the following interaction capabilities should be provided:
- Drag with the mouse to rotate the view.
- Zoom with the scroll wheel.
- Pan the camera.
- Quickly switch between fixed camera positions.
- Switch between unfinished and finished states.
- Restore the default view when necessary.
Fixed camera positions are especially important. Free viewing is suitable for exploration, while fixed viewpoints are suitable for acceptance. Through positions such as the entrance, central main hall, private rooms, and close-up dining tables, the completion level of different areas can be checked quickly.
Camera settings also need to match observation habits. The entrance viewpoint should be close to human eye height and should show both the storefront facade and the interior depth. The main hall viewpoint needs to reflect the relationship between circulation paths and seating. The dining table viewpoint should highlight pots, tableware, and material details.
If the camera is too high, the space looks like a floor plan. If the camera is too low, tables and chairs block major areas. Therefore, the camera itself is part of scene expression.
7. How to Evaluate a Generated Result
For complex intelligent coding tasks, “whether the code runs” cannot be the only evaluation criterion. It is recommended to review results from five dimensions.
7.1 Functional Completeness
Whether the page loads normally, and whether state switching, camera control, and drag-based browsing are available.
7.2 Spatial Consistency
Whether load-bearing columns, doors and windows, circulation paths, and major structures are fully aligned between the unfinished and finished states.
7.3 Visual Plausibility
Whether materials, colors, lighting, hierarchy, and proportions match the scene goals, and whether there is obvious clipping or occlusion.
7.4 Interaction Smoothness
Whether camera control matches user habits, and whether state switching causes flickering, jumping, or loss of viewpoint.
7.5 Engineering Maintainability
Whether the code is organized by components, data, and scene hierarchy, and whether adding tables and chairs, adjusting area, or changing materials later requires large-scale rewriting.
Engineering maintainability is often overlooked. A demo can be completed with a large amount of temporary code, but if it is to be extended into a formal project, clear data structures, component boundaries, and state management logic must be retained.
8. How Developers Should Use These Models
For developers, the most effective approach is not to mix all requirements into one paragraph, but to collaborate in stages.
In the first stage, describe the goals and immutable constraints, and ask the model to output a spatial plan and implementation approach first.
In the second stage, implement only the basic geometric structure, and confirm dimensions, coordinates, and circulation.
In the third stage, add decoration, materials, lighting, and interactive objects.
In the fourth stage, ask the model to generate multiple key viewpoints and perform visual inspection.
In the fifth stage, focus on clipping, occlusion, proportions, and interaction issues.
In the sixth stage, organize the code, abstract components, and optimize performance.
Prompts should also be as explicit as possible, for example:
- Which structures cannot be moved
- Which areas must remain connected
- Which camera positions need to be fixed
- Which details need close-up display
- Which problems must be checked through screenshots
- Which interaction features the final deliverable must include
This way of working can reduce context drift when the model handles complex tasks and make the result of each step easier for humans to review.
9. Conclusion
The value of a new generation of multimodal intelligent coding capabilities is not just faster code generation. It is that the model begins to participate in the complete software implementation process: understanding requirements, breaking down tasks, creating structures, running previews, observing results, and continuously correcting them.
In 3D space construction scenarios, this change is especially obvious. The model needs to handle geometric relationships, visual expression, interaction logic, and engineering structure at the same time. The final result is no longer an isolated piece of code, but a complete prototype that can run, be browsed, and be validated.
Of course, this does not mean developers can completely abandon design and acceptance. For spatial dimensions, business rules, interaction experience, and engineering quality, humans still need to set boundaries and make final confirmations. A more reasonable positioning is to let the model handle a large amount of repetitive implementation, initial layout, and visual inspection work, while developers are responsible for goal definition, constraint design, quality judgment, and key decisions.
When code generation and visual understanding are truly combined, the application scope of intelligent coding tools will no longer be limited to webpages and APIs. It can also extend to 3D displays, digital spaces, interactive prototypes, visualization applications, and more development tasks that require “understanding the result and continuing to modify it.”
