Building a Rainy Night Convenience Store 3D Scene with Large Language Models
Learn a practical five-step workflow for using large language models to generate a rainy night convenience store 3D scene: structured requirements, iterative rounds, scale calibration, performance optimization, and layered atmosphere effects. Includes a troubleshooting checklist and reusable code examples.
Why a Rainy Night Convenience Store Is a Good Practice Scene
A rainy night convenience store is an excellent test case for evaluating a model’s generation capability. The scene combines indoor warm lighting, cool outdoor ambient light, mirror-like reflections on wet ground, continuously falling rain, a flickering neon sign, and neatly arranged shelves and freezers. It has clear geometric structure while also demanding atmosphere, so it exercises proportion control, material handling, lighting design, and animation logic at the same time.
Breaking these elements down one by one gives you a clear acceptance checklist. Each item can be verified independently, which makes problems easy to locate.
The Overall Workflow
The recommended workflow has five steps:
- Requirement breakdown: Convert visual elements into describable structures and dimensions.
- Round-based collaboration: Modify only one category of issue per round to avoid full rewrites.
- Scale calibration: Unify units and coordinate systems, and verify against real-world dimensions.
- Performance control: Limit draw calls, particle counts, and shadow overhead.
- Detail and atmosphere: Layer in lighting, materials, and weather effects in that order.
The key principle is to get the main structure right first, then add visual effects. If you chase rain and reflections from the start, lighting problems tend to mask proportion problems, and debugging costs multiply.
Step 1: Break Ideas into Structured Requirements
Asking the model to “build a rainy night convenience store” typically produces only a rough outline. A more effective approach is to list the structural components first, specifying dimensions, position, material category, and interaction requirements for each.
| Component | Size reference (meters) | Position | Material | Interaction |
|---|---|---|---|---|
| Storefront exterior wall | 8 wide, 12 deep, 3 high | Along one side of the street | Matte coating | None |
| Door frame and glass door | 0.9 wide, 2.1 high | Center of the exterior wall | Metal and transparent glass | Open/close animation |
| Shelves | 1.8 high, 1.2 wide | Rows inside the store, 0.6 apart | Metal and plastic | None |
| Freezer | 1.9 high, 1.5 wide | Against the back wall | Metal and glass | Door opens/closes |
| Sign | 4 wide, 0.8 high | Above the door lintel | Emissive material | Neon flicker |
| Road surface and puddles | Same width as the street | In front of the store | Low-roughness material | Reflections change with lighting |
The more specific the dimensions, the easier it is for the model to produce verifiable results. Without dimensions, the model can only guess, and those guesses accumulate errors across every subsequent round.
Step 2: Collaborate with the Model in Rounds
Asking for a “complete scene” in one shot often leads to structural errors and large-scale rework. Three rounds work better:
- Round 1: Generate the static structure and a runnable base framework; confirm the page loads correctly.
- Round 2: Adjust proportions and placement, checking each item against the dimension list.
- Round 3: Add animation, rain effects, and lighting atmosphere.
Each prompt should make two things clear: which existing content to keep, and which part to modify. Also include runtime errors or a description of screenshots from the previous round, so the model knows the actual current state. Example prompt:
Keep the existing code structure unchanged and make only these changes:1. Change the door frame width to 1.2 meters and the door height to 2.4 meters;2. Change the spacing between shelves to 0.6 meters;3. Do not modify the camera or lighting settings.
Note that the API names and parameter names the model provides may not match the actual version. When errors occur, trust the runtime output and the relevant documentation. Send the exact error messages back to the model so it can correct itself based on real information, rather than accepting its own descriptions of the interfaces.
Step 3: Unify Scale and Units
Scale problems are the most common issue in 3D scenes. The solution is to agree on a single unit at the start of the project and encode that convention in code constants:
- Use meters throughout: 1 scene unit = 1 meter.
- The ground sits at height 0, and all components are measured from the ground up.
- The camera eye level is set to that of an average adult, about 1.6 meters.
Example code:
const UNIT = 1; // 1 scene unit = 1 meterconst STORE = {width: 8 * UNIT, // storefront widthdepth: 12 * UNIT, // storefront depthheight: 3 * UNIT // storefront height};const DOOR = { width: 0.9 * UNIT, height: 2.1 * UNIT };const SHELF = { width: 1.2 * UNIT, height: 1.8 * UNIT, gap: 0.6 * UNIT };
Writing real-world dimensions as comments next to the constants gives the model a baseline for later modifications. After each round, verify every item against the dimension list and fix any deviation immediately—don’t leave it for a final cleanup pass.
Step 4: Control Performance
The main performance costs in a rainy night scene typically come from four sources: large numbers of repeated product models, particle counts, shadow calculations, and mirror reflections. Countermeasures:
- Instanced rendering: Draw identical products or shelf components with instancing to reduce repeated draw calls.
- Merge static geometry: Combine immovable components like walls and floors into fewer meshes.
- Limit shadows: Enable shadows only for the main light source and cap the shadow map resolution.
- Reuse particles: Use a fixed-size rain particle pool that cycles, instead of creating and destroying objects at runtime.
- Level of detail: Use simplified models for distant objects and switch to full models up close.
Example logic for the rain particle pool:
const RAIN_COUNT = 2000; // particle pool size, allocated once at init// per-frame updatefor (const drop of rain) {drop.y -= drop.speed * deltaTime; // fall by frame intervalif (drop.y < 0) drop.reset(); // recycle to the top after landing}
There is no universal standard for particle counts or shadow resolution—use the frame rate on your target device as the benchmark. If frame rate drops, reduce shadows and particles first, then model detail.
Step 5: Layered Rainy Night Atmosphere
Build atmosphere in layers, each of which can be toggled independently for easier debugging:
- Ambient light: Cool blue ambient light establishes the overall tone of a rainy night.
- Indoor lights: Several groups of warm point lights under the ceiling create contrast between inside and outside.
- Neon sign: Emissive material with a subtle bloom effect makes the sign stand out in the wet environment.
- Puddle reflections: Low-roughness ground materials, combined with reflection or environment mapping, simulate the mirror effect of standing water.
- Rain curtain: Thin elongated line segments or semi-transparent particles with a slanted velocity, so rain falls in the direction of the wind.
- Glass streaks: Overlay water streak textures on door and window glass and reduce their transparency, so the glass doesn’t look too clean.
The benefit of layering is that when the scene looks too dark or too bright overall, you can switch off one light layer at a time to isolate the source of the problem.
Common Issues and Troubleshooting
| Symptom | Likely cause | How to diagnose |
|---|---|---|
| Screen is completely black | Missing light source, or materials not receiving light | Check whether lights are added to the scene and whether materials have lighting enabled |
| Objects have wrong sizes | Inconsistent units, or unhandled import scaling | Check the unified unit constants and measure each item against the dimension list |
| Frame rate drops noticeably | Too many objects, or excessive shadow/reflection overhead | Disable shadows, particles, and reflections one at a time and watch the frame rate |
| Unknown interfaces or parameters | The model’s memory of versions or APIs is inaccurate | Correct against the official documentation and send the error messages back to the model |
| Rain drops pass through walls | Particle spawn area extends beyond the building | Restrict the spawn region and clip or recycle particles at walls |
| Door is misaligned after opening | Rotation pivot set at the model’s center | Move the pivot to the hinge edge of the door |
When troubleshooting, change only one variable at a time. If you modify several things at once, it becomes hard to tell which change caused a new problem.
Delivery and Reuse
Split the finished scene into independent modules by function—for example, building, shelves, weather, lighting, and interaction. Each module exports its own creation function, and the main program only assembles them. This way, changing the rain effects won’t affect the store interior.
Additional recommendations:
- Consolidate all tunable parameters—dimensions, particle counts, light intensity—into a single configuration object for easy adjustment later.
- Keep the requirement notes and change records from each round to form a traceable iteration history.
- Deploy the page as a static site; no backend is needed. Keep loaded textures and models small to avoid long initial load times.
Conclusion
The core value of using large language models to generate 3D scenes is shortening the distance from idea to runnable prototype. Four things are key: structure your requirements and make dimensions specific; iterate in rounds, changing one category of issue per round; verify scale with unified units and real-world dimensions; and judge results by actual runtime behavior. Following this workflow, a rainy night convenience store prototype can stabilize within a small number of iterations, and later polish becomes far more focused.
