Building a 3D Rainy-Night Convenience Store Scene: From Concept to Interaction

    This article explains how to turn a natural-language idea for a rainy-night convenience store into a real-time 3D scene that is spatially credible, stable, and easy to iterate. It covers scene specifications, graybox validation, layered lighting, wet-road materials, rain particles, controlled interaction, performance budgets, AI-assisted coding workflows, and delivery checks.

    Building a 3D Rainy-Night Convenience Store Scene: From Concept to Interaction

    1. Define the Deliverable Before Generating Code

    A rainy-night convenience store may look like a small 3D scene, but it involves architectural modeling, perspective composition, material response, dynamic particles, lighting, and interaction control at the same time. If the brief only says “rain, lights, and a good-looking image,” the first draft may move in a similar visual direction, but it is difficult to guarantee spatial credibility, runtime stability, and future editability.

    A more reliable approach is to turn the creative idea into a scene specification that can be accepted item by item.

    First, define the viewing method. A fixed camera highlights composition and makes rendering cost easier to control. An orbit view around the target can show the sides of the building, but the visible areas need to be completed. Free roaming involves collision, boundaries, and more asset detail. For a first implementation, a constrained orbit view with the convenience store entrance as the visual center is a practical choice.

    Next, define the scene scope. A small-town atmosphere does not require a complete city. One street corner, a road segment, the convenience store itself, neighboring building silhouettes, and a few street fixtures are enough to establish an effective narrative. Distant buildings can use lower detail, with light-dark layering and fog to express depth.

    Finally, define acceptance criteria, for example:

    • The proportions of the building, doors, windows, and street fixtures are consistent.
    • Warm interior light and the cool environment form a clear hierarchy.
    • Raindrops move continuously, and their speed does not change noticeably with frame rate.
    • The road surface appears wet without becoming a full mirror.
    • After the window is resized, the aspect ratio and interaction still work correctly.
    • With expensive effects disabled, the scene still has a complete visual expression.

    These criteria are more specific than “make it more realistic,” and they are better suited to guiding AI coding tools toward targeted modifications.

    2. Build a Minimal Runnable Version and Validate Spatial Relationships First

    The first stage should not pursue complex materials. It should build a graybox scene. A graybox uses simple geometry to represent buildings, roads, and fixtures, prioritizing validation of the spatial structure.

    Set the ground as a horizontal plane, keep the vertical direction consistently upward, and use a consistent unit of length. The convenience store body, entrance, display window, canopy, and sign should share the same scale system. Door height, canopy projection, and sidewalk width have visual relationships; if any element is out of proportion, the entire building can look like a toy model.

    A practical development order is:

    1. Place the road and sidewalk, and define the scene boundary.
    2. Build the convenience store body and determine the entrance position.
    3. Add placeholder blocks for the display window, canopy, and sign.
    4. Place neighboring buildings and check whether the main subject is occluded.
    5. Adjust the camera position, field of view, and look-at target.
    6. Judge proportions from the actual output image, not only from object parameters.

    Camera configuration and model scale need to be adjusted together. A field of view that is too wide strengthens near-large/far-small perspective and can exaggerate building edges. A field of view that is too narrow can compress spatial depth. Choose an observation distance that matches the intended composition first, then fine-tune the field of view, rather than using extreme lens parameters to hide model problems.

    The graybox stage should also check structural intersections. The entrance should not be blocked by steps, the canopy should connect correctly to the wall, and the base of a streetlight should not float. Fixing problems at this stage costs far less than fixing them after materials and lighting are complete.

    3. Use Lighting to Organize the Narrative, Not Just to Increase Brightness

    The key to a rainy-night atmosphere is the relationship between light and dark. A convenience store easily becomes the focal point because warm, stable interior lighting contrasts with the low illumination of the street.

    It helps to divide lighting into three layers.

    The first layer is ambient base light, which preserves information in shadow areas. It should not be too strong, or the night scene loses depth. It also should not be completely absent, or building sides and street fixtures may become unrecognizable black blocks.

    The second layer is subject lighting, including interior lights, entrance lighting, and fill light near the sign. This layer determines the visual focus and should prioritize readability of the entrance, display window, and the space under the canopy.

    The third layer is auxiliary lighting, such as streetlights or distant windows. Auxiliary light establishes spatial rhythm and should not compete with the main light for attention.

    It is important to distinguish emissive materials from light sources that actually participate in lighting. Making a sign material look bright does not mean nearby walls and ground automatically receive corresponding illumination. Whether that effect occurs depends on the specific rendering implementation. In engineering practice, emissive surfaces are usually paired with controlled local lighting, and the result should be checked for unnatural light leakage.

    Shadows also require tradeoffs. Not every light should cast shadows. Prioritize shadows that are most important for grounding the building and defining the entrance structure; other lights can supplement the atmosphere through lower-cost light-dark variation.

    4. The Core of a Wet Road Is Roughness Variation

    A wet ground is not created by “making the road brighter” or simply increasing reflection strength.

    The microstructure of a dry road scatters reflections. When covered by water, some areas become smoother, and lights and bright parts of the building are more likely to form identifiable reflections. Therefore, the wet feeling comes from a combination of roughness variation, reflected content, and local luminance differences.

    The road can be divided into three types of areas:

    • Normal wet areas: road texture is retained, and reflections are blurred.
    • Shallow puddle areas: the local surface is smoother, and reflections are more visible.
    • Relatively dry areas: reflections are weak and are used to increase contrast.

    Transitions between areas should be smooth, avoiding regular color patches that look pasted on. Puddles should also follow terrain logic, such as collecting at sidewalk edges or low spots, rather than randomly covering every surface.

    Reflection implementation should be chosen according to the performance budget. Planar reflections suit relatively flat ground but add extra rendering cost. Screen-space reflections can only use information in the current frame and may be missing at edges or occlusions. Precomputed environment reflections are easier to control in cost but cannot accurately reflect all dynamic changes.

    For a lightweight scene, start with material roughness, local bright patches, and simplified reflections to establish the wet look, then decide whether more complex real-time reflections are truly needed. More transparent overlay layers are not always better; multiple transparent objects can introduce sorting issues and repeated blending overhead.

    5. Make Rain Part of the Space

    Rain is not a set of decorative lines spread evenly across the image. Credible rainfall needs to connect with viewing distance, lighting, occlusion, and ground contact.

    First, raindrops can be concentrated in a limited area near the camera and recycled after leaving the boundary, instead of covering the entire city. Second, visual representation can be divided into near, middle, and far layers: near rain streaks are more obvious, while distant rain is better combined with fog. Whether raindrops are visible also depends on the background and lighting. Rain against a bright background may not be clear, while rain streaks lit from the side against a dark background are often more prominent.

    Motion updates should be based on elapsed time, not a fixed movement distance per frame. The following is schematic logic independent of a specific rendering tool:

    1. Update time step (dt):
    2. For each raindrop:
    3. raindrop.position += raindrop.velocity * dt
    4. If raindrop is below recycle height:
    5. Move raindrop above the rain volume
    6. Reassign horizontal position
    7. Update a small number of ground ripples
    8. Render current frame

    A real implementation should also clamp abnormally large time steps to avoid raindrops jumping a long distance when the page resumes display. Systems that require precise physical simulation can use a fixed time step; purely visual rain effects can use a lighter-weight approach.

    Canopy occlusion is an easily overlooked detail. If raindrops pass directly through the canopy and fall into the store entrance, the atmosphere immediately becomes unbelievable. A small scene can first exclude raindrops through a simplified occlusion volume, without implementing a full collision system at the start. Ground ripples and splashes should also be used in moderation, avoiding the creation of an independent object for every raindrop.

    6. Design Interaction as a Controlled Experience

    Interactivity does not mean allowing unlimited movement. For a piece focused on atmosphere display, rotation, zoom, rain amount switching, and lighting adjustment usually create a more stable experience than full roaming.

    The camera should have reasonable distance and angle boundaries to prevent entering the building, passing through the ground, or seeing unfinished back sides. Interactive controls need clear state feedback. For example, after rain is paused, the interface should clearly show the current state instead of making users guess whether the action took effect.

    Small-screen touch input, window resizing, and the readability of interaction prompts should also be considered. Sound can be an optional enhancement, but it should not be necessary for understanding the work, and there should be an explicit on/off control.

    7. Constrain Visual Complexity with a Performance Budget

    Performance optimization cannot focus only on model count. Draw calls, transparent area coverage, shadows, reflections, and output resolution all affect runtime cost.

    Troubleshoot by problem type:

    • If many repeated fixtures cause too many draw calls, consider merging static objects or using instancing.
    • If performance drops noticeably when rain is enabled, check transparency blending, particle coverage area, and update method.
    • If shadows become a bottleneck, reduce the lights and objects that cast shadows and shrink shadow coverage.
    • If high-resolution devices are overloaded, limit render resolution or provide quality tiers.
    • If the scene continues to consume more resources after running for a long time, check whether objects, materials, and render targets are released correctly.

    Performance conclusions should come from actual measurements. Record first load, steady-state operation, rain enabled, and reflections enabled separately, and pay attention to frame-time variance rather than only average frame rate. Results can vary greatly across devices, so a single test result should not be described as a universal guarantee.

    8. Make AI-Assisted Coding Follow a Verifiable Iteration Process

    AI coding tools are useful for helping build structures, generate base logic, and propose modifications, but developers still need to validate whether the image looks natural and whether resources are used reasonably.

    Effective collaboration is not about repeatedly adding “more refined” or “more realistic.” It is about providing a clear problem, modification scope, and acceptance criteria. For example:

    “The entrance is obscured by the canopy. Adjust only the canopy height and the camera look-at target, keeping the building width and road layout unchanged. After the change, the entrance steps must be fully visible, and do not add new dynamic lights.”

    This kind of request limits the scope of change and reduces the risk of fixing one problem while introducing several new ones.

    In engineering terms, scene organization, materials, weather effects, interaction, and quality configuration should be managed separately, avoiding all logic being placed in the same initialization code. Keep a runnable version after each modification, and record the purpose of the change, the visual result, and performance changes. For generated code, focus on checking for duplicate resource creation, per-frame temporary object allocation, unreleased listeners, and mixed coordinate systems.

    9. Move from Visual Prototype to Deliverable Work

    Before final delivery, check functionality, visuals, and resources.

    For functionality, confirm that loading, zooming, pausing, resuming, and resetting work correctly. For visuals, check model intersections, shadow flicker, transparency sorting, rain leaking through the canopy, and reflection edge artifacts. For resources, check load failure messages, release after re-entering the scene, and stability during long runs.

    Prepare a degradation strategy as well. When the runtime environment cannot handle complex reflections or high-density rain, reduce effect cost first rather than breaking the convenience store entrance, lighting hierarchy, and main composition. A clear subject, clear feedback, and stable runtime are usually more important than stacking more effects.

    Developing a rainy-night convenience store is fundamentally an engineering conversion from a natural-language idea to a real-time graphics system. AI coding can accelerate prototype formation, but final quality depends on whether requirements are verifiable, whether space is credible, whether visuals have hierarchy, and whether performance has been measured. Build the correct structure first, then gradually add lighting, rain, and interaction, so that an attractive idea can be polished into a work that actually runs, can be experienced, and can continue to be iterated.