Where Multimodal LLMs Fall Short in Code Generation and Light-and-Shadow Rendering

    This article documents a small-scale observation of multimodal large language models across three task types: generating runnable code, rendering 3D light-and-shadow scenes with code, and evaluating composition and color. It explains the test dimensions and limitations, presents two hands-on tests (a dynamic SVG animation and a light-and-shadow scene rendered via path tracing versus WebGL), discusses subjective composition and color issues, and offers practical guidance for developers on which tasks are suitable for models and which require human intervention.

    Where Multimodal LLMs Fall Short in Code Generation and Light-and-Shadow Rendering

    This article records a small-scale observation of multimodal large language models. The tests focused on three types of tasks: generating runnable code, using code to depict 3D and light-and-shadow scenes, and subjective evaluation of composition and color. One caveat upfront: this article only shows single-output results. No multi-sample statistics were collected, and the specific prompts and runtime environment are not disclosed. Therefore, the judgments below should be treated as directional references rather than directly reusable conclusions.

    Test Dimensions and Limitations

    To keep the assessment clear, the observation was divided into four dimensions: whether the code runs correctly, whether the functionality is complete, whether physical details are plausible, and whether the visual atmosphere is coherent. Each dimension was judged solely on directly observable output. The model versions, call dates, and prompts are not published here. Readers who want to reproduce the results should retest in their own environments and record the same parameters.

    Test 1: Dynamic SVG Animation

    The model was asked to generate an animated SVG of “a pelican riding a bicycle.” This task tests both structural understanding of objects (the pelican, the bicycle) and animation logic (wheel rotation, day-night switching, speed adjustment).

    In this observation, the output animation was functionally complete. The animation continued to play normally after disconnecting from the network, which shows the code had no external resource dependencies—a useful property for pages intended for offline distribution.

    The shortcomings in detail were also evident. The wheels showed slight stuttering when stopping, and the scarf’s swinging lacked damping decay, looking more like a loop along a preset path than natural motion under force. This suggests the model can write the surface syntax of animation but still falls short in modeling physical behaviors such as inertia and damping. For comparison, another closed-source model handled center-of-gravity shifts and clothing folds more realistically on the same task. Since each model produced only one output, this difference may be affected by randomness and requires multiple generations before drawing conclusions.

    Test 2: Rendering a Light-and-Shadow Scene with Code

    The prompt for this test asked the model to use any coding technique to render an image with interlaced light and shadow. This is close to the path tracing problem in computer graphics and places higher demands on the model’s overall programming ability.

    The two types of output took different technical routes. One approach implemented a simple path tracer in C++, computing pixel colors by simulating diffuse reflection and refraction of light. This method has a high ceiling for realism but is computationally expensive. Path tracing typically requires a large number of samples to suppress noise, and runtime grows noticeably with resolution and sample count; the exact duration depends on hardware and parameters, and no uniform timing data was measured in this article. The other approach chose WebGL, balancing real-time interactivity while retaining a CPU rendering path—an explicit trade-off prioritizing responsiveness.

    Judging by the visual results, in the path tracing output, window shadows sweeping across the wall, chairs, and wooden floor transitioned softly, with layers close to a real photograph. In the WebGL output, several hard black contour lines appeared at wall corners, which is inconsistent with the gradual falloff caused by diffuse reflection in natural environments. The materials of the potted plant and the floor also leaned toward a staged, set-like appearance, with limited reflection and texture detail.

    These observations point to one conclusion: relying on prompt descriptions alone makes it difficult for a model to automatically produce physically plausible lighting. To handle such scenes well, a model needs to address light transport, material BRDFs (bidirectional reflectance distribution functions), and camera parameters. In this observation, the WebGL solution was more complete in engineering terms but still lagged behind the path tracing solution at the physical simulation level.

    Composition and Color

    Regarding composition and color, the judgments in this article are more subjective and should be taken as reference only.

    First, the model’s output tended to fill the entire canvas, leaving little empty space. Professional art typically uses negative space to guide the viewer’s eye, and this was not evident in the output.

    Second, light-and-shadow contrast was often emphasized with highly saturated colors. As a result, the images looked closer to game scenes, lacking low-saturation transitional tones, and the still-image quality felt weaker.

    Third, objects in the scenes were sometimes stacked to increase information density. For example, plants and a round stool were placed on the floor at the same time without a clear shadow relationship between them, making the composition look uncoordinated.

    The causes of these issues may relate to the distribution of training data, but this article did not verify that experimentally. What can be confirmed is that current outputs are better suited as sketches or inspiration references and are not yet appropriate for demanding art design work.

    Recommendations for Developers

    Based on the observations above, usage can be divided according to task risk.

    Tasks suitable for handing to the model include: template-based page interactions, simple chart visualizations, and small 3D scene prototypes with clear logic. Errors in these tasks are usually easy to spot and cheap to fix.

    Tasks requiring deep human involvement include: refined art direction, physically accurate lighting computation, and scenes involving extensive real-time physical interaction. Model outputs for these tasks typically require multiple rounds of adjustment.

    Before formal adoption, it is recommended to check at least the following items: whether the code runs directly in the target environment; whether functionality works offline or without network access; whether animation or rendering results are stable across multiple generations; and whether the output complies with the project’s visual guidelines.

    Conclusion

    This observation shows that the models performed reliably in code logic correctness and engineering completeness, making them suitable for low-risk automation scripts and prototype validation. However, in physical detail and aesthetic judgment, they still lag behind top-tier solutions. Given the small sample size and the undisclosed prompts and runtime environment, these conclusions should be understood as interim references. With additional multi-sample data in the future, the assessment will become more reliable.