Artificial intelligence (ai) night scene effect drawing intelligent generation system based on physical optics

CN122820973APending Publication Date: 2026-09-25PUTIAN XINGLIXING TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202610937902.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-26
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

现有技术CN112507444A公开了一种基于AI构建的数字城市建筑夜景生成方法及系统,该技术包括:收集楼体外立面的图片集,手动标注出窗户所在的位置;利用所述图片集构造训练集和测试集;利用所述训练集拟合图像识别模型,利用所述测试集测试图像识别模型泛化性能;将待识别的背景贴图输入所述图像识别模型,输出标记后的背景贴图;利用所述背景贴图对目标建筑模型进行贴面,生成建筑模型的外立面;根据目标建筑物所在区域的人口热力图建立亮窗比函数,求出亮灯数量;根据所述亮灯数量在外立面上随机点亮窗户;本发明用于解决现有技术中需要投入大量的时间和人力进行建模,耗费大量的人力成本,且不能根据真实情况动态调节夜景灯光的技术问题

Benefits of technology

1.本发明采用物理光学参数条件嵌入的Latent Diffusion Model(LDM)进行夜景效果图生成,将传统多软件协作的串行工作流转化为基于物理参数自动编码与AI模型推理的并行自动化流程,从根本上缩短了夜景效果图的制作周期。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122820973A_ABST
    Figure CN122820973A_ABST
Patent Text Reader

Abstract

The application discloses an AI night scene effect drawing intelligent generation system based on physical optics, relates to the cross technical field of computer graphics and artificial intelligence, and comprises a physical optical parameter input and standardization module, a physical optical parameter coding and constraint space construction module, a physical constraint embedded night scene effect drawing generation module, a physical simulation verification and deviation detection module and a feedback iteration optimization and output module. The application adopts a Latent Diffusion Model (LDM) embedded with physical optical parameter conditions to generate a night scene effect drawing, converts a traditional serial workflow of software cooperation into a parallel automatic process based on automatic coding of physical parameters and AI model reasoning, and fundamentally shortens the production cycle of the night scene effect drawing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the interdisciplinary field of computer graphics and artificial intelligence, specifically to an AI-based intelligent generation system for night scene renderings based on physical optics. Background Technology

[0002] Currently, there are two main methods for generating night scene effects. One is generative AI tools, which have the advantages of rapid generation, diverse styles, and strong visual expression, but lack physical optical parameters, and the generated results cannot be directly implemented in engineering. The other is physical precision calculation, which uses lighting calculation software. It has the ability to perform precise photometric calculations based on IES light distribution curves and radiance methods, and can output parameters such as illuminance, UGR, and color temperature that can be implemented in engineering. However, it lacks AI generation capabilities and cannot quickly produce diverse and artistic high-quality night scene effect images.

[0003] The existing AI-powered night scene rendering production system has the following shortcomings: Existing technology CN112507444A discloses a method and system for generating digital city building night scenes based on AI. This technology includes: collecting a set of images of building facades and manually marking the locations of windows; constructing a training set and a test set using the image set; fitting an image recognition model using the training set and testing the generalization performance of the image recognition model using the test set; inputting a background texture to be recognized into the image recognition model and outputting a marked background texture; applying the background texture to the target building model to generate the building facade; establishing a bright window ratio function based on the population heat map of the target building's area to calculate the number of lights; and randomly illuminating windows on the facade according to the number of lights. This invention addresses the technical problems of existing technologies that require significant time and manpower for modeling, incurring substantial labor costs, and failing to dynamically adjust night scene lighting according to real-world conditions.

[0004] The aforementioned technologies do not involve combining AI technology with physical constraint parameters to generate night scenes. Overly pursuing physical accuracy may result in night scene images that are stiff and lack artistic appeal; on the other hand, overly pursuing artistic expression may cause the design scheme to deviate from engineering feasibility, resulting in insufficient illumination or excessive glare. Therefore, a physically optics-based AI night scene rendering intelligent generation system is needed to solve this problem. Summary of the Invention

[0005] One objective of this application is to provide an AI-based intelligent generation system for night scene renderings based on physical optics, which can solve the technical problems raised in the prior art.

[0006] To achieve the above objectives, the present invention provides the following technical solution: an AI-based intelligent generation system for night scene effect images based on physical optics, comprising a physical optics parameter input and standardization module, a physical optics parameter encoding and constraint space construction module, a night scene effect image generation module with embedded physical constraints, a physical simulation verification and deviation detection module, and a feedback iterative optimization and output module; The physical optical parameter input and standardization module is used to receive and standardize the three-dimensional geometric model of the scene to be illuminated, the physically based rendering surface material properties, the luminaire layout scheme, and the physical optical parameters including the light distribution curve file conforming to the IESNA LM-63 standard format, color temperature, luminous flux, beam angle and color rendering index. The physical optical parameter encoding and constraint space construction module is used to encode the physical optical parameters into a condition constraint vector containing a light distribution curve feature vector, an illuminance distribution condition representation, a color temperature field condition representation, and a unified glare value constraint representation, and to map the condition constraint vector to the condition latent space of the generative artificial intelligence model through a constraint space mapping network.

[0007] Preferably, the physical optical parameter input and standardization module is also used to establish an index association table between each lamp model and its corresponding light distribution curve file in the lamp layout scheme. The index association table records the lamp's unique identifier, lamp model, manufacturer information, and the storage path of the light distribution curve file to support the automatic parsing and verification of batch lamp parameters.

[0008] Preferably, the physical constraint-embedded night scene rendering generation module is used to embed the physical optical parameter constraints of the conditional latent space into the generative artificial intelligence model through a cross-attention layer and an adaptive instance normalization layer during the denoising and diffusion generation process, and to generate a night scene rendering that conforms to the physical optical parameter constraints. The physical simulation verification and deviation detection module is used to input the generated night scene rendering into a ray tracing or path tracing-based physical simulation engine to perform optical accuracy verification, extract illuminance distribution, brightness distribution, uniform glare value and brightness uniformity index, and calculate the comprehensive deviation between the generated result and the physical optical parameters.

[0009] Preferably, the feedback iterative optimization and output module is used to generate a feedback signal based on the comprehensive deviation, and to generate the result through conditional injection weight adaptive adjustment and post-processing calibration iterative optimization, and output a night scene effect image and lighting design parameter report that conform to the physical optical parameter constraints. The feedback iterative optimization and output module is also used to generate multiple night scene effect image variants with different artistic styles under the same physical optical parameters by adjusting the classifier-free guided scaling factor and random seed, and to retain metadata records for each variant containing a set of physical optical parameters, a deviation report and an optical index summary. The lighting design parameter report includes a lamp selection list, a physical optical parameter summary table, a physical simulation verification report and a design effect image. The lamp selection list records the lamp model, quantity, three-dimensional spatial position coordinates, installation height, orientation angle and rated power; the physical optical parameter summary table records the total installed luminous flux, scene average illuminance, design color temperature, maximum uniform glare value and brightness uniformity.

[0010] The AI-based method for intelligently generating night scene renderings based on physical optics includes the following steps: S1. Obtain the 3D geometric model of the scene to be illuminated and the physically based rendering surface material properties; S2. Obtain the lighting layout scheme and corresponding physical and optical parameters, including light distribution curve files conforming to the IESNALM-63 standard format, color temperature, luminous flux, beam angle and color rendering index; S3. Encode the physical optical parameters into a conditional constraint vector, which includes a light distribution curve feature vector, an illuminance distribution condition representation, a color temperature field condition representation, and a unified glare value constraint representation. S4. Construct a physical optical parameter constraint space, and map the conditional constraint vectors to the conditional latent space of the generative artificial intelligence model through a constraint space mapping network, so that the physical optical parameters and the noise latent space of the generative artificial intelligence model establish a cross-attention interaction interface. S5. During the noise reduction and diffusion generation process, the physical optical parameter constraints of the conditional latent space are embedded into the generative artificial intelligence model through a cross-attention layer and an adaptive instance normalization layer to generate a night scene effect image that conforms to the physical optical parameter constraints. S6. Input the generated night scene rendering and the corresponding scene geometric parameters and lighting parameters into the physical simulation engine, perform forward physical rendering based on ray tracing or path tracing, and extract illuminance distribution, brightness distribution, uniform glare value and brightness uniformity index to perform optical accuracy verification. S7. Calculate the overall deviation between the generated result and the physical optical parameters, wherein the overall deviation includes illuminance deviation, color temperature deviation, uniform glare value deviation and brightness uniformity deviation; S8. Generate a feedback signal based on the comprehensive deviation, and iteratively optimize the generated result through conditional injection weight adaptive adjustment and post-processing tone mapping calibration until the comprehensive deviation meets the preset convergence condition. S9. Output night scene renderings and lighting design parameter reports that conform to physical optical parameter constraints.

[0011] Preferably, the acquisition of the luminaire layout scheme and corresponding physical optical parameters includes parsing the light distribution curve file conforming to the IESNA LM-63 standard format, extracting the light intensity distribution matrix of the luminaire at the vertical and horizontal angles, and converting the discrete sampling data into a light intensity distribution function through bilinear interpolation.

[0012] Preferably, encoding the physical optical parameters into a conditional constraint vector includes expanding the light intensity distribution function into a compact light distribution curve feature vector using a spherical harmonic function. The spherical harmonic function expansion obtains the expansion coefficients by projecting the light intensity distribution function onto spherical harmonic basis functions and truncating it to a finite order to form the light distribution curve feature vector. Based on the luminaire layout scheme and the light distribution curve, the target illuminance distribution is calculated. The target illuminance distribution is mapped into an illuminance distribution condition map that matches the resolution of the output night scene effect image and encoded into the illuminance distribution conditional representation using a convolutional neural network. A color temperature distribution map is generated based on the color temperature parameters and spatial positions of each luminaire. The color temperature distribution map is mapped into a color conditional field through a color temperature to CIE chromaticity coordinate conversion and encoded into the color temperature field conditional representation using a convolutional neural network.

[0013] Preferably, the process of generating a night scene effect image that conforms to physical optical parameter constraints during the denoising and diffusion generation includes adopting a multi-scale progressive generation strategy, which gradually injects physical optical parameter constraints of different granularities at different stages of denoising. The multi-scale progressive generation strategy includes at least an overall atmosphere generation stage, a local illumination generation stage, and a light source precision generation stage. Each stage dynamically switches the constraint conditions through a stage function. The process of denoising and diffusion generation also includes introducing a physical consistency regularization loss to constrain the generation process. The physical consistency regularization loss includes illuminance consistency loss, color temperature consistency loss, and energy conservation loss. Each sub-loss is weighted and combined to form a total physical consistency loss.

[0014] Preferably, the forward physical rendering based on ray tracing or path tracing includes using a Monte Carlo path tracing algorithm to perform physically accurate optical simulation of the scene's 3D geometry, physically based rendering surface materials, lighting spatial positions, and light distribution curves; calculating radiance through pixel-by-pixel multisampling and multi-importance sampling; and outputting a physical reference rendering map, a pixel-by-pixel illuminance distribution map, and a luminance distribution map.

[0015] Preferably, the comprehensive deviation between the calculated result and the physical optical parameters includes illuminance deviation, color temperature deviation, uniform glare value deviation, and brightness uniformity deviation as sub-items of deviation. The comprehensive deviation is calculated by weighted summation. Each sub-item deviation is calculated in the form of relative error between the generated result and the physical simulation result. The step of adaptively adjusting the conditional injection weights and iteratively optimizing the generated result through post-processing calibration includes calculating each sub-item deviation and identifying the dominant deviation factors, adaptively adjusting the conditional injection weights of the corresponding physical parameters, performing pixel-by-pixel gain map illuminance calibration and color temperature white balance adjustment on the generated image, and re-executing the night scene effect image generation, physical simulation verification, and deviation calculation until the comprehensive deviation meets the convergence condition or reaches the maximum number of iterations.

[0016] Compared with the prior art, the beneficial effects of the present invention are: 1. This invention uses Latent Diffusion Model (LDM) with embedded physical optical parameters to generate night scene renderings, transforming the traditional serial workflow of multi-software collaboration into a parallel automated process based on automatic encoding of physical parameters and AI model inference, fundamentally shortening the production cycle of night scene renderings.

[0017] 2. This invention employs a triple guarantee mechanism—IES light distribution curve spherical harmonic function encoding, illuminance / color temperature condition diagram constraints, and physical simulation verification—to ensure that the generated night scene renderings are not only visually credible but also engineering-feasible at the physical photometric level. Through differentiated processing strategies for hard physical constraints and soft aesthetic constraints, as well as a multi-version rendering output management mechanism, it empowers designers with ample creative freedom while ensuring physical accuracy, achieving a synergistic unity between two traditionally contradictory design goals.

[0018] 3. This invention significantly reduces the reliance on photometric expertise of professionals in night scene lighting design by automatically encoding physical optical parameters and generating one-click verification reports, thereby effectively controlling the technical threshold and labor costs of lighting design.

[0019] 4. This invention constructs a three-in-one digital design asset management system of "renderings - physical parameters - verification reports" by establishing a structured record of all physical parameters, generated versions and verification reports through a complete closed-loop system, fundamentally solving the industry pain point of design decisions being difficult to trace and reproduce in the traditional design process. Attached Figure Description

[0020] Figure 1 This is a diagram of the overall system architecture of the present invention; Figure 2 This is an overall flowchart of the method of the present invention; Figure 3This is a schematic diagram of the physical optical parameter encoding and constraint space construction of the present invention; Figure 4 This is a structural diagram of the generation module for physical constraint embedding in this invention; Figure 5 This is a flowchart of the physical simulation verification and deviation detection process of the present invention; Figure 6 This is a schematic diagram of the feedback iterative optimization closed loop of the present invention; Figure 7 This is a pseudocode diagram of the present invention. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] Please see Figure 1 The present invention provides an embodiment of an AI-based intelligent generation system for night scene effect images based on physical optics; 1. Module Overview: This system is designed for the fields of architectural lighting engineering, landscape lighting design, and urban planning. It aims to solve the technical contradiction that existing AI image generation methods lack physical optical accuracy and traditional physical lighting calculation software cannot quickly generate diverse artistic effects. The core innovation of the system lies in the construction of a complete closed-loop architecture of "physical parameter encoding → constraint space mapping → generation condition embedding → physical simulation verification → feedback iterative optimization". It embeds real physical optical parameters such as IESNA standard light distribution curve, target illuminance distribution, color temperature field, and unified glare value (UGR) as hard constraints into the reasoning process of artificial intelligence generation model, so as to achieve the unity of physical accuracy and artistic aesthetics in night scene renderings. The system consists of five core functional modules, which form an orderly data flow through standardized data interfaces: Module 1 (Physical Optical Parameter Input and Standardization Module) is responsible for receiving and standardizing various physical optical parameter inputs, establishing unified data specifications; Module 2 (Physical Optical Parameter Encoding and Constraint Space Construction Module) encodes heterogeneous physical parameters into constraints that the generative model can understand, constructing a mapping from physical parameters to the latent space of the generative model; Module 3 (Physically Constrained Embedded Night Scene Rendering Generation Module) generates night scene renderings based on a pre-trained diffusion model, through physical optical parameter condition injection and a multi-scale progressive generation strategy; Module 4 (Physical Simulation Verification and Deviation Detection Module) verifies the optical accuracy of the generated results through a forward physical rendering engine; Module 5 (Feedback Iterative Optimization and Output Module) iteratively optimizes the generated results based on the verification deviation feedback and outputs the final rendering and lighting design parameter report. The system interacts with external 3D modeling software (such as Autodesk Revit, SketchUp, Blender), lighting manufacturer databases, and engineering lighting calculation software through standardized API interfaces, supporting common 3D formats such as OBJ, FBX, and glTF, as well as IESNA. Importing the LM-63 standard photometric curve file.

[0023] Please see Figure 1 , Figure 2 and Figure 7 This invention provides an embodiment of an AI-based intelligent night scene rendering generation system based on physical optics, comprising a physical optics parameter input and standardization module, a physical optics parameter encoding and constraint space construction module, a physical constraint-embedded night scene rendering generation module, a physical simulation verification and deviation detection module, and a feedback iterative optimization and output module. The physical optics parameter input and standardization module is used to receive and standardize the three-dimensional geometric model of the scene to be illuminated, the physically based rendering surface material properties, the luminaire layout scheme, and physical optics parameters including a light distribution curve file conforming to the IESNA LM-63 standard format, color temperature, luminous flux, beam angle, and color rendering index. The physical optics parameter input and standardization module is also used to: establish an index association table between each luminaire model and the corresponding light distribution curve file in the luminaire layout scheme. The index association table records the unique identifier of the luminaire, the luminaire model, the manufacturer information, and the storage path of the light distribution curve file to support the automatic parsing and verification of batch luminaire parameters. The Physical Optical Parameter Input and Standardization Module (hereinafter referred to as the "Input Module") is the system's data entry layer. It is responsible for receiving heterogeneous physical optical parameter data from external devices, software, and databases, parsing, verifying, standardizing, and storing them in a structured manner, and providing input data in a unified format for subsequent encoding modules. This module ensures that physical optical parameters of different types and from different sources can be processed consistently by the system, avoiding information loss or semantic ambiguity caused by differences in data formats.

[0024] 2.1 IESNA LM-63 Photometric Profile Resolution Unit: The IESNA LM-63 photometric profile analysis unit is the core sub-unit of this module. It is used to analyze photometric data files (referred to as "IES files") that conform to the Illuminating Engineering Society of North America (IESNA) LM-63 series standards. IES files are a standard photometric profile data exchange format commonly used in the lighting industry, which records the light intensity distribution information of luminaires in different spatial directions. Input data: Standard IES format text file, usually with the extension .ies or .iesna, conforming to IESNA LM-63-1986, LM-63-1991, LM-63-1995 or LM-63-2002 standard versions. Different versions differ in file header information format, angle definition method and test condition record field. The parsing unit needs to automatically adapt the parsing rules according to the version identifier. Parsing process: The parsing unit processes the IES file according to the following process: (1) Read the header area of ​​the file and extract the lamp model, manufacturer, test report number, test date, test conditions (test temperature, test voltage, stabilization time, etc.) and photometric test equipment information; (2) Read the photometric parameter line and extract the luminous flux of the lamp (unit: lumen lm), number of lamps, photometric type identifier (Type A / B / C), and number of photometric test angles; (3) Read the angle data block, which includes the vertical angle sequence (usually 0° to 180° or 0° to 90°) and the horizontal angle sequence (usually 0° to 360°); (4) Read the light intensity data block, which is a two-dimensional matrix. ,in For vertical angle indexing, The horizontal angle index is used, and the matrix elements are relative light intensity values ​​(unit: candela cd). A typical IES file data structure can be described as follows: Figure 7 The pseudocode form in the text; Output data: Structured light intensity distribution function ,in Vertical angle (unit: radians, range) ), which is the horizontal angle (unit: radians, range). The parsing unit uses bilinear interpolation to make discrete matrix data continuous, ensuring accurate light intensity queries in any direction.

[0025] 2.2 Luminaire photometric parameter database: The luminaire photometric parameter database uses a relational database management system (such as PostgreSQL or MySQL) to store standardized luminaire photometric parameter records, providing the system with fast retrieval and batch import capabilities; Each database record contains the following fields: Basic information fields: Unique Identifier (UUID), Model, Manufacturer, and Series; Optical performance fields: Rated luminous flux. (Unit: Lumens (lm), typical range 500–50000 lm), rated power (Unit: Watts (W), typical range 3–1000W), Color Temperature (CCT) (Unit: Kelvin (K), typical range 2700–6500K), Color Rendering Index (Ra) (dimensionless, typical range 80–98), Beam Angle (Unit: degrees °, typical range 8°~120°), light distribution type (floodlight / focused beam / wall washer / buried / linear, etc.); File association fields: IES file storage path, IES file hash check value, file version identifier; Timestamp fields: record creation time, last update time; The database supports batch import of data from the open data interfaces of mainstream lighting manufacturers. It is compatible with Philips / Signify's Lightolier series data format, Osram's Light Portal data format, Cree SmartCast data format, and the general CSV / JSON exchange format. The import process includes field mapping verification, numerical range verification (such as whether the color temperature value is within a reasonable range), and duplicate record detection (based on a joint unique index of model + manufacturer).

[0026] 2.3 Scene 3D Geometry and PBR Material Property Input Interface: The scene 3D geometry and PBR material property input interface is responsible for receiving the 3D model data of the scene to be illuminated and the physically based rendering (PBR) material properties, providing the geometric and material basis for the generation module and the physical simulation module. Supported 3D file formats: (1) FBX format (Autodesk Filmbox): supports geometry, materials, hierarchical structure and animation data; (2) OBJ format (Wavefront Object): a general geometry exchange format that supports vertex, normal, UV coordinates and basic materials; (3) glTF format (GL Transmission Format): a Khronos Group standard optimized for Web and real-time rendering, fully supporting the PBR material pipeline; (4) DAE format (COLLADA): supports complex scene structures and multiple material bindings. Geometric Information Extraction: Extracting Vertex Coordinates from 3D Files (Unit: meters (m)) Vertex normal UV texture coordinates (scope And the mapping relationship between faces and material indexes. ; PBR Material Property Extraction: Base Color: The intrinsic reflective color of the material, represented by RGB four channels (including transparency alpha), with a value range of... Metallicity: A parameter that distinguishes metallic from non-metallic surfaces; its value range is... Where 0 represents a completely non-metallic material (insulator) and 1 represents a completely metallic material; Roughness: a parameter describing the degree of microscopic unevenness of a surface, with a value range of... 0 represents an ideal specular surface, and 1 represents perfect diffuse reflection; Normal Map: Stores surface microscopic normal offset information in texture form, used to simulate bump details; Emission: A parameter describing the intensity of the material's own light emission, with a value range of... Unit: candela per square meter (cd / m²) 2 ); Material and Light Source Interaction Parameters: The system further derives the physical parameters of light-material interaction from the PBR material properties, including: surface reflectivity. (dimensionless, range) ), transmittance (dimensionless, range) ) and absorption coefficient (dimensionless, satisfies) For diffuse surfaces, reflectivity is calculated by weighting the base color and metallicity: ,in This is the metal reflectivity correction function.

[0027] Please see Figure 1 , Figure 2 and Figure 3An embodiment of the present invention is provided: an AI night scene effect image intelligent generation system based on physical optics. The physical optics parameter encoding and constraint space construction module is used to encode physical optics parameters into a condition constraint vector containing a light distribution curve feature vector, an illuminance distribution condition representation, a color temperature field condition representation, and a unified glare value constraint representation, and to map the condition constraint vector to the condition latent space of the generative artificial intelligence model through a constraint space mapping network. The Physical Optical Parameter Encoding and Constraint Space Construction Module (hereinafter referred to as the "Encoding Module") is a key bridge connecting the physical optical parameter space and the latent space of the artificial intelligence generative model. This module encodes the heterogeneous physical optical parameters (including IES light distribution curve, illuminance distribution target, color temperature field, UGR constraint and PBR material parameters) from the input module into constraints that the generative model can understand, and constructs a mapping relationship from physical parameters to the latent space of the generative model conditions. The core design goals of the Encoding Module are: (1) to maintain the accurate semantic information of physical parameters and avoid physical distortion caused by encoding compression; (2) to achieve compatibility and fusion between different physical parameter dimensions to form a unified constraint representation; and (3) to ensure that the encoding results can be seamlessly embedded into the condition injection mechanism of the pre-trained generative model.

[0028] 3.1 Vectorized encoding of IES light distribution curves: The IES light distribution curve vectorization encoding subunit is responsible for encoding the resolved light intensity distribution function. It is converted into a compact and information-preserving high-dimensional feature vector, which serves as a constraint on the directionality of the light source in the generative model; Encoding method: Spherical Harmonics Expansion (SHE) is used. It is a complete orthogonal basis function system defined on a sphere, similar to the expansion of a Fourier series on a circle, and is suitable for representing any scalar field on a sphere, such as the distribution of light intensity. As a scalar field defined on the unit sphere, it can be expanded into a finite series using spherical harmonic functions: ; in It is the spherical harmonic order (degree, a non-negative integer). For order (range of values) ), To expand the truncation order, For expansion coefficients, basis functions Satisfying orthonormality on a sphere: ; Calculation of expansion coefficients: expansion coefficients The light intensity distribution function is obtained by projecting it onto each spherical harmonic basis function: ; In practical calculations, since the IES file provides discrete sampled data rather than continuous analytic functions, the above integral is approximated using Gauss-Legendal numerical integration or Monte Carlo sampling. Specifically, suppose the IES file provides discrete sampled data on a sphere. Light intensity value at each sampling point and the corresponding solid angle element Then the expansion coefficients are approximately: ; Truncation order and output feature vector: expansion order The choice requires a trade-off between information fidelity and feature dimensions, with a typical value being... The corresponding feature vector has a total dimension of . (when When the time is 25 dimensions, (At 81 dimensions), experiments show that, (49-dimensional) It can achieve reasonable computational efficiency while maintaining the main directional characteristics of the IES light distribution curve, and the output is a compact feature vector: ; The feature vector is normalized to the unit norm to eliminate the influence of the absolute luminous flux amplitude, so that the encoding result retains only the directional distribution characteristics of the light distribution curve.

[0029] 3.2 Illuminance distribution condition map coding: The illuminance distribution condition diagram coding subunit is responsible for encoding the target illuminance distribution of the lighting design. Encode it into a condition map that the generative model can process, providing spatialized illumination intensity constraints for the generation process; Encoding process: First, the 3D scene is projected through the camera projection matrix. Mapping onto the 2D camera view plane to establish 3D scene coordinates with two-dimensional image coordinates The correspondence is then established, and the target resolution (typical value) of the night scene rendering is generated and output. , or Matching two-dimensional grid, each grid cell Enter the target illumination value for the corresponding pixel location. (Unit: lux lx), forming an illuminance distribution condition map. ; For areas where illuminance targets are not defined (such as the sky or distant views), enter a special marker value. The region is designated as "unconstrained area". The illumination generation of the generative model in this region mainly relies on pre-trained prior knowledge rather than physical constraints. Conditional latent representation generation: via a learnable lightweight convolutional neural network encoder Mapping the illuminance distribution condition map to a conditional latent representation: ; in It is a 4-layer convolutional encoder, each layer containing Convolution, ReLU activation and Max pooling, with 1 input channel (illuminance value) and 1 output channel. (Typical values ​​are 64 or 128), and the network parameters are jointly optimized with the generation module during the system training phase.

[0030] 3.3 Color Temperature Field Condition Coding: The color temperature field condition coding subunit is responsible for encoding the target color temperature distribution. The color constraints of the generated model are encoded to ensure that the color temperature of the generated night scene rendering meets the lighting design requirements. Encoding process: First, generate a color temperature distribution map with the same resolution as the illuminance distribution condition map. (Unit: Kelvin K, typical range 2000~8000K), and then the color temperature value is mapped to the CIE 1931 xy chromaticity coordinate system to establish the correspondence between color temperature and visible color. The mapping from color temperature to chromaticity coordinates adopts the McCamy approximation formula or the interpolation method based on the blackbody radiation trajectory. The McCamy approximation formula maps correlated color temperature (CCT) to CIExy chromaticity coordinates: ; ; The above formula has good accuracy in the color temperature range of 2000K to 10000K; for applications outside this range or requiring higher accuracy, the system uses a lookup table method based on CIE standard blackbody radiation trajectory and isotherm interpolation. Obtain chromaticity coordinates Then, it is converted to an RGB color space representation and encoded via a network. Generate conditional latent representation: ; in To and A lightweight CNN encoder with symmetrical structure.

[0031] 3.4 Multi-parameter fusion and constraint space mapping: The multi-parameter fusion and constraint space mapping subunit is responsible for fusing the conditional latent representations of each physical optical parameter into a unified constraint vector, and constructing the interaction interface between the constraint vector and the noise latent space of the generated model. Multi-parameter fusion strategy: The system receives conditional latent representations from each coding subunit. (IES photometric characteristics) (Illuminance distribution conditions) (Color temperature field conditions) (Unified glare value constraint, one-dimensional scalar expanded into vector) and (PBR material attribute encoding), combined into a joint conditional representation through vector concatenation operation: ; in This indicates a vector concatenation operation, where the dimension of the concatenated joint condition vector is the sum of the dimensions of each sub-condition vector (typically a total dimension of 256~512). Subsequently, the joint conditional vector is passed through a fusion network. Compression and interactive fusion: ; in This is a 2-layer Multilayer Perceptron (MLP) with the hidden layer dimension being the same as the input dimension. The activation function is GELU (Gaussian Error Linear Unit), and the output layer dimension is... (Typical value 128), matching the conditional dimension of the cross-attention layer in the generative model; Constraint Space Construction: Fusion of Conditional Latent Representations The conditional latent space constituting the physical optics parameters, in the generation module, With the noisy latent space of the generative model Fusion is performed in the cross-attention layer, allowing physical optical parameters to continuously influence the generation process in each denoising step, in the conditional latent space. With noise potential space The dimensions are independent of each other; the former is determined by physical parameters, while the latter is fixed by the model architecture (typical value). The two interact through an attention mechanism rather than by directly splicing information together.

[0032] Please see Figure 1 , Figure 2 and Figure 4 The present invention provides an embodiment of an AI-based night scene effect image intelligent generation system based on physical optics. The night scene effect image generation module with embedded physical constraints is used to embed the physical optics parameter constraints of the conditional latent space into the generative artificial intelligence model through a cross-attention layer and an adaptive instance normalization layer during the noise reduction and diffusion generation process, and to perform night scene effect image generation that conforms to the physical optics parameter constraints. The physical constraint-embedded night scene effect image generation module (hereinafter referred to as the "generation module") is the core functional module of the system. It is responsible for generating night scene effect images that conform to the laws of physical lighting and have artistic beauty based on the pre-trained diffusion model, through the injection of physical optical parameters and multi-scale progressive generation strategy. The core technology of this module is: (1) embedding physical optical parameters as structured conditions into the denoising process of the pre-trained diffusion model; (2) designing a multi-scale progressive generation strategy to coordinate the global atmosphere and local lighting details; (3) introducing physical consistency regularization loss to ensure that the generation result meets the basic optical laws.

[0033] 4.1. Pre-trained diffusion model base network: The generation module uses the Latent Diffusion Model (LDM) as its basic generation architecture. LDM moves the diffusion process from the high-dimensional pixel space to the low-dimensional latent space, significantly reducing computational costs while maintaining generation quality. The network consists of three core components: VAE encoder The encoding part of a variational autoencoder converts the input RGB image... (Value range) Compression into a low-dimensional latent space representation : ; The ratio factor between the potential space size and the pixel space size is: (typical value) ), number of potential channels With a typical value of 4, the VAE encoder achieves spatial compression through a combination of convolutional layers and attention layers, and the training objective is to balance the reconstruction loss with the KL divergence constraint. U-Net Denoising Network : in potential representation The U-Net architecture, which is a denoising diffusion probabilistic model (DDPM) for the object being denoised, comprises an encoder path (downsampling), a bottleneck layer, and a decoder path (upsampling). It preserves multi-scale spatial information through skip connections. During training, the network learns the inverse denoising process. During the inference phase, the network extracts random noise. Departure, Passing Step (typical value) or Iterative denoising to generate the final latent representation ; VAE decoder The decoding part of the variational autoencoder converts the denoised latent representation... Reconstructed as an RGB image: ; The decoder achieves spatial upsampling through transposed convolutional layers and residual blocks, outputting a range of image values. It can be mapped to via post-processing. An 8-bit integer value; Pre-training data: The base network of LDM is pre-trained on a large-scale architectural night scene image dataset with more than 1 million images, covering various night scene scenes such as urban buildings, garden landscapes, bridges and roads, and commercial districts. Each training image is accompanied by physical parameter labels, including scene type, typical illumination range, color temperature distribution, etc., so that the pre-trained model has prior knowledge of night scene scenes. 4.2 Physical Optical Parameter Condition Injection Mechanism: The physical optical parameter conditional injection mechanism is a core technological innovation of the generation module, responsible for injecting the physical conditional latent representation output by the encoding module. Injecting the U-Net denoising network ensures that each step of the denoising process is guided by physical optical parameters. Conditional injection of cross-attention layers: The U-Net network contains multiple self-attention and cross-attention layers. The standard cross-attention calculation method is as follows: given the query feature matrix... (From U-Net intermediate features), key matrix Sum matrix (All from conditional representations), the attention output is: ; in Let be the dimension of the key vector. To prevent excessively large inner products due to scaling factors, and to enable physical condition injection, the system implicitly represents the physical conditions. As an additional source of keys and values: ; in This indicates a splicing operation. and For a learnable linear projection matrix, the conditional latent representation is derived from... Projecting the dimension to the dimension that matches the attention head, the modified cross-attention calculation is as follows: ; This injection method enables each spatial location of the U-Net to reference physical optical parameters when calculating attention weights, thereby achieving spatialized physical constraints. Adaptive Instance Normalization-Assisted Injection: In addition to cross-attention injection, the system injects global style / illumination conditions into the residual blocks of the U-Net using AdaIN (Adaptive Instance Normalization). AdaIN then modulates the intermediate feature maps. Perform channel-level normalization and modulation: ; in and Feature maps Mean and standard deviation along the channel dimension and To represent the potential from physical conditions AdaIN injection, through channel-wise scaling and translation parameters generated by a small MLP network, enables the physical optical parameters to globally modulate the statistical distribution of features, directly affecting global properties such as color temperature and overall brightness. Classifier-Free Guidance: During the inference phase, the system employs Classifier-Free Guidance (CFG) technology to enhance the adherence strength of physical conditions. CFG is achieved through interpolation between conditional and unconditional generation. ; in To conditionally predict noise, For unconditional prediction of noise (by conditional) (Zeroing implementation) CFG Scale Guided Strength (Typical Value) The system dynamically adjusts the range based on the strictness of physical constraints. ).

[0034] 4.3 Multi-scale progressive generation strategy: The multi-scale progressive generation strategy is an important technical innovation of this module. In order to address the scale contradiction between global atmosphere and local lighting details in the generation of night scene renderings, the generation process is divided into three stages, and physical optical parameters with different levels and precision are introduced for each stage. Phase 1: Overall Atmosphere Generation (Noise Reduction Steps Range) This stage is performed early in the denoising process, determining the overall layout, sky background, building outlines, and global brightness and darkness of the generated image. The injected physical constraint is the global average illumination value. and sky / ambient color temperature The global mean illuminance is calculated by the area-weighted average of the target illuminance in each region of the scene: ; in For pixels The corresponding 3D scene projection area, the latent representation of the constraints at this stage is denoted as... It only includes global parameter encoding; The second stage involves local illumination generation (range of denoising steps). This stage is performed during the middle stage of denoising, introducing a local illuminance distribution map. Based on the spatial constraints of lighting fixtures, the light and shadow relationships and transitions of local areas such as building facades, landscape elements, and road surfaces are generated, and the latent representation of the constraints is updated to... ,exist Based on this, add local illuminance map encoding and luminaire location mask encoding; The third stage involves precise generation of the light source (range of noise reduction steps). This stage is performed in the later stages of noise reduction, introducing precise directional constraints on the IES light distribution curve. With precise positioning of point light sources, the fine-grained generation of details such as the shape of the light spot for each luminaire, the attenuation at the edge of the light cone, and the reflected highlights from the illuminated surface is achieved. The latent representation of the constraints is then updated. It contains complete physical optical parameter encoding; Phase switching mechanism: The constraints of each phase are dynamically updated through a phase function. ; in The complete constraint representation output by the encoding module. The current denoising step index, the stage function. The implementation method is based on Soft handover: when When crossing stage boundaries, linear interpolation is used to achieve a smooth transition of constraints, avoiding image discontinuities caused by stage switching.

[0035] 4.4 Physical consistency regularization loss: Physical consistency regularization loss is a constraint mechanism that plays a role in both the training and inference phases of this module. Its design aims to embed the fundamental laws of photometry into the optimization objective of the generative model, forcing the generated results to conform to the laws of physical optics in a statistical sense. The loss function consists of a weighted sum of three sub-losses, and the total loss is defined as: ; in The weighting coefficients for each sub-loss are typically set to a value of [value to be filled in]. , , ; Illuminance uniformity loss : Measures the deviation between the predicted illumination distribution and the target illumination distribution of the generated image, using a differentiable illumination estimation network. Extract the predicted illumination map from the generated image. : ; Illuminance estimation network A lightweight fully convolutional network structure is adopted, which takes the luminance channel of the generated image as input and outputs pixel-wise illuminance estimates. The network is pre-trained on a synthetic dataset through supervised learning before training. The dataset contains physically rendered synthetic night scene images and corresponding accurate illuminance map ground values. Color temperature uniformity loss : Measures the deviation between the predicted color temperature distribution and the target color temperature distribution of the generated image: ; Color temperature prediction is achieved by converting the generated image from RGB space to chromaticity coordinate space, and then inversely mapping it to color temperature values. Energy conservation loss : Ensure that the generated image satisfies the law of conservation of optical energy. For diffuse reflective surfaces, the emitted light brightness With incident illuminance The relationship is constrained by Lambert's law of reflection: The energy conservation loss is defined as: ; in It is the sum of all emitted brightness in the scene. The sum of the brightness of all incident light. To correspond to the reflectivity of the surface, this loss ensures that the reflected light energy does not exceed the upper limit constraint of the incident light energy multiplied by the reflectivity.

[0036] Please see Figure 1 , Figure 2 and Figure 5 The present invention provides an embodiment of an AI-based night scene effect image intelligent generation system based on physical optics. The physical simulation verification and deviation detection module is used to input the generated night scene effect image into a physical simulation engine based on ray tracing or path tracing to perform optical accuracy verification, extract illuminance distribution, brightness distribution, uniform glare value and brightness uniformity index, and calculate the comprehensive deviation between the generated result and the physical optical parameters. The physical simulation verification and deviation detection module (hereinafter referred to as the "verification module") is a quality assurance link in the closed-loop architecture of the system. It is responsible for quantitatively verifying the optical accuracy of the night scene effect image output by the generation module. This module reconstructs the optical scene corresponding to the generation result through the forward physical rendering engine, compares the physical simulation result with the generation result, quantifies the deviation between the generated image and the physical optical parameters, and provides numerical basis for feedback iterative optimization.

[0037] 5.1 Forward Physical Rendering Engine: The forward physical rendering engine is the core computing component of the verification module. Based on ray tracing and path tracing algorithms, it performs physically accurate optical simulation calculations on the input 3D scene, PBR materials, lighting positions, and IES light distribution curves. Engine type and algorithm: The engine adopts the Monte Carlo path tracing algorithm. This algorithm calculates the amount of light radiation reaching the camera / observation point by simulating the random propagation path of photons in the scene and based on the laws of physical optics (reflection law, refraction law, energy attenuation law). Unlike the rasterization method commonly used in real-time rendering, the path tracing algorithm mathematically converges to the exact solution of the radiative transfer equation, which is suitable for verification scenes with high optical accuracy requirements. Input data: The engine receives the following inputs: (1) the scene's 3D geometric mesh and PBR material properties (from the input module); (2) the lighting fixture spatial arrangement scheme, including the position coordinates of each lighting fixture. Orientation (in Euler angles or quaternions), light source type identification; (3) IES light distribution curve associated with each luminaire. (The parsing results from the input module); (4) Camera parameters, including position, orientation, field of view (FOV), and resolution; Output data: The engine outputs three types of data: (1) Physically accurate reference renderings (1) The ideal night scene effect that should be presented under the real physical optical laws; (2) Pixel-by-pixel illuminance distribution map (Unit: lx); (3) Pixel-by-pixel brightness distribution map (Unit: cd / m³) 2 ); Key rendering parameters: To ensure simulation accuracy, the engine's key parameters are set as follows: Samples Per Pixel (SPP) is typically 4096 to ensure sufficiently low variance in Monte Carlo integration; a Multiple Importance Sampling (MIS) combined with a light source importance sampling strategy is adopted, prioritizing dense sampling of the solid angle region of the luminaire to accelerate convergence; a Russian Roulette path termination strategy is adopted, dynamically determining whether to terminate the ray path based on the cumulative contribution of the path, balancing computational efficiency and accuracy.

[0038] 5.2 Calculation of Illuminance / Brightness / UGR / Uniformity: Based on the output of the forward physical rendering engine, the verification module calculates the core optical evaluation indicators in the field of lighting engineering. Illuminance calculation: Illuminance on any receiving surface in the scene. It is obtained by superimposing the direct contributions of all the luminaires to this surface element: ; in For lighting fixture index, For the first The luminous intensity of each luminaire in the direction pointing to the surface element (obtained by interpolation of the IES light distribution curve). The angle between the incident ray and the normal to the surface element (angle of incidence). The distance from the luminaire to the surface element (unit: meters, m). The formula, which is weighted by the Lambert cosine of the incident angle, is the basic inverse square law for calculating the illuminance of a point light source in lighting engineering. Brightness calculation: For an ideal diffuse (Lambertian) surface, its surface brightness... With received illuminance The relationship is: ; in Surface reflectivity (dimensionless). As a normalization factor, this formula is derived from the radiometric definition of the Lambert surface, ensuring physical consistency between luminance and illuminance; Uniform Glare Ratio (UGR) Calculation: UGR is an international standard index for evaluating uncomfortable glare in lighting engineering. The calculation formula is as follows: ; in Background brightness (unit: cd / m²) 2 ), calculated from the average ambient brightness; For the first The brightness of the glare source; For the first The solid angle of the glare source relative to the observer's eye (unit: spheradequates sr); For the first The Guth position index (UGR) of a glare source depends on the angle of deviation of the glare source from the line of sight. The evaluation criteria for the UGR value are: UGR < 16 is no glare discomfort, 16 ≤ UGR < 19 is acceptable glare, 19 ≤ UGR < 22 is uncomfortable glare, and UGR ≥ 22 is severely uncomfortable glare. Brightness uniformity calculation: Brightness uniformity Defined as the ratio of minimum illuminance to average illuminance: ; in To assess the minimum illuminance value within the area, To assess the average illuminance value within a region, the closer the uniformity value is to 1, the more uniform the illuminance distribution.

[0039] 5.3 Constraint Deviation Measurement: The constraint deviation metric subunit is responsible for summarizing the differences between the generated image and the physical simulation results into comparable numerical metrics. Comprehensive Deviation Formula: System-defined comprehensive deviation The weighted combination of the deviations of each item: ; in The weighting coefficients for the deviation of each item are typically set to a value of [value to be filled in]. , , , The weighting settings reflect the primary importance of illuminance indicators in lighting engineering practice; Definition of deviation for each item: The deviation for each item is calculated using the form of relative error. The illuminance deviation is defined as follows: ; in The illumination map extracted from the generated image. This is an illuminance map output from a physical simulation. For the number of effective pixels, For numerical stability, color temperature deviation UGR deviation and uniformity deviation A similar definition of relative error is adopted.

[0040] 5.4 Verification Report Generation: The verification report generation sub-unit automatically summarizes the verification results and generates a structured verification report document, providing a basis for decision-making for lighting designers and engineers; The verification report includes the following: (1) a comparison table of illuminance in each region, listing the target illuminance value, the illuminance value extracted from the generated image, the physical simulation illuminance value, and the relative deviation between the three for each evaluation region; (2) a color temperature distribution comparison heatmap, which visually displays the spatial distribution differences between the target color temperature field, the generated color temperature field, and the physical simulation color temperature field; (3) a UGR value and glare risk assessment table, listing the calculated UGR value for each observation point and its comparison with the target threshold; and (4) a comprehensive deviation score. and the deviation of the items Numerical summary; (5) Improvement suggestions based on deviation results, such as “suggest reducing the power of luminaires in a certain area to reduce illuminance deviation” or “suggest adjusting the luminaire angle to improve uniformity”.

[0041] Please see Figure 1 , Figure 2 and Figure 6 This invention provides an embodiment of an AI-based intelligent night scene rendering system based on physical optics. The feedback iterative optimization and output module generates a feedback signal based on a comprehensive deviation, iteratively optimizes the generated result through conditional weighting and post-processing calibration, and outputs a night scene rendering and lighting design parameter report that conform to physical optics parameter constraints. The feedback iterative optimization and output module is also used to: generate multiple night scene rendering variants with different artistic styles under the same physical optics parameters by adjusting the classifier-free guided scaling factor and random seed, and retain metadata records for each variant containing a set of physical optics parameters, a deviation report, and a summary of optical indicators. The lighting design parameter report includes a luminaire selection list, a physical optics parameter summary table, a physical simulation verification report, and a design rendering. The luminaire selection list records the luminaire model, quantity, three-dimensional spatial coordinates, installation height, orientation angle, and rated power. The physical optics parameter summary table records the total installed luminous flux, average scene illuminance, design color temperature, maximum uniform glare value, and brightness uniformity. The feedback iteration optimization and output module (hereinafter referred to as the "output module") is the final execution link of the system closed-loop architecture. It is responsible for receiving the comprehensive deviation feedback signal from the verification module, generating results through conditional weight adaptive adjustment and post-processing calibration mechanism, and outputting the final night scene effect and lighting design parameter report after meeting the physical optical parameters.

[0042] 6.1 Adaptive Adjustment of Conditional Weights Based on Deviation and Post-processing Calibration: The deviation-based conditional weight adaptive adjustment and post-processing calibration subunit is the core closed-loop component of the output module, responsible for receiving the comprehensive deviation output by the verification module. The deviation of each component is used to improve the physical accuracy of the generated result through a two-layer optimization mechanism. The input of this sub-unit is the deviation vector. and overall deviation The output is either a night scene rendering with adjusted conditional injection weights or a post-processed calibrated rendering. Optimization objective: Minimize overall deviation ; Optimization variables: (1) Weight parameters of the conditional injection layer (including cross-attention projection matrix) (2) Post-processing calibration gain diagram and AdaIN modulation parameters); ; Optimization method: Iterative improvement is carried out using a two-layer optimization mechanism; First layer: Conditional weighting and adaptive adjustment. In each iteration, the system identifies the dominant deviation factor (such as illuminance deviation). (Maximum), Execute: ; in Adjustment factor (typical) After enhancing the conditional injection weights of the corresponding physical parameters, DDIM is used for rapid sampling and regeneration (25~30 steps). Second layer: Post-processing tone mapping calibration, if the first layer is optimized... Still exceeding the limit, construct a pixel-by-pixel gain map: ; The illuminance channel of the generated image is used to perform illuminance calibration, and color temperature and white balance adjustment is performed in the CIE Lab space. After calibration, physical simulation verification is performed again. Iteration control: Maximum number of iterations (Ensure real-time performance), early stop conditions .

[0043] 6.2. Adaptive adjustment of generated results: The adaptive adjustment subunit of the generated results achieves rapid correction of deviations from specific physical constraints by dynamically adjusting the injected weights of the conditions. Adaptive weight adjustment mechanism: When a certain type of deviation (such as illuminance deviation) is applied... When the threshold is exceeded, the system automatically increases the weight of the corresponding condition-injected branch. Taking the illuminance condition injection weight as an example, the weight of the first branch is increased. Weight of the next iteration According to the Deviation of the next iteration Adaptive update: ; in For adaptive learning rate (typical value) ), The initial weights (typically 1.0) are used to adjust the constraint dimensions with larger deviations, giving them stronger condition injection strength and accelerating the convergence of those dimensions. After the weights are updated, the generation process is re-executed, forming an adaptive iterative loop. To prevent excessive weight growth from degrading image quality, the system sets a weight cap constraint: (Typical upper limit When the weight reaches the upper limit and the deviation still has not converged, the system triggers the exception handling process, prompting the user to check the feasibility of the input physical parameters.

[0044] 6.3 Management of Multiple Version Rendering Output: The multi-version rendering output management subunit supports generating multiple rendering variations with different artistic styles under the same set of physical optical parameters, providing lighting designers with diverse design options; Variant generation mechanism: Diverse generation is achieved by adjusting the Classifier-Free Guidance Scale (CFG Scale) parameter and the random seed. Higher CFG Scale values ​​(such as...) This makes the generated results more strictly follow physical constraints, but may reduce the naturalness of the image, and a lower CFG Scale value (such as...) This allows for more degrees of freedom in generation but may deviate from physical constraints. Different random seed values ​​control the random noise sampling during the denoising process, producing variants with the same content but different lighting details and atmospheric tones. Version Management: Each generated variant retains complete metadata records, including: (1) generation timestamp; (2) CFG Scale value and random seed used; (3) corresponding set of physical optical parameters; (4) complete deviation report output by the verification module; (5) numerical summary of each sub-optical index (illuminance, color temperature, UGR, uniformity). Users can sort and filter variants by deviation score, and give priority to the scheme with low deviation and visual effect that meets expectations.

[0045] 6.4 Automatic generation of lighting design parameter reports: The automatic generation sub-unit for lighting design parameter reports is responsible for summarizing all technical information of the project and automatically generating standardized lighting design report documents; Report Structure: Basic Project Information: Project Name, Scene Type, Design Date, Version Number, Designer Information; Lighting Fixture List: A table listing the model, manufacturer, quantity, and 3D spatial coordinates of all lighting fixtures. Summary of installation height, orientation angle, rated power, and total power; Summary of physical and optical parameters: Total installed luminous flux. (Unit: lm) Average illuminance of the scene (Unit: lx), Design color temperature (unit: K), Maximum UGR value, Brightness uniformity Verification Report Summary: Overall Deviation Score 1. Deviation of each item, explanation of the main deviation areas and optimization suggestions; 2. Preview of the final version: including thumbnails of the final selected version and corresponding variant thumbnails; Output format: The report is output in two formats: (1) PDF document for design review and archiving; (2) editable Excel table containing a list of luminaires and parameter details, which is convenient for importing into lighting calculation software for further design. The system supports custom report templates, and users can adjust the report chapter structure and data display method according to project requirements.

[0046] Please see Figure 1 , Figure 2 and Figure 3 This invention provides an embodiment of an AI-based intelligent generation method for night scene renderings based on physical optics. This method achieves physically accurate generation and verification of night scene renderings by encoding physical optical parameters into structured constraints of an artificial intelligence generation model. The method comprises nine main steps (S1–S9), with the core logic chain being: physical parameter acquisition → parameter encoding and constraint embedding → night scene rendering generation → physical simulation verification → constraint deviation calculation → feedback iterative optimization → final output. Specifically, the method first obtains standardized physical optical parameters from the scene's 3D model and lighting layout scheme; then, it encodes multi-dimensional physical parameters such as the IES light distribution curve, target illuminance distribution, and color temperature field into conditional constraints. The parameters are calculated and mapped to the conditional latent space of the diffusion model. Then, during the denoising diffusion process, physical constraints are dynamically injected through a Cross-Attention mechanism, combined with a multi-scale progressive strategy to generate night scene renderings. The generated results are then optically accurate using a ray tracing physics simulation engine, calculating the overall deviation. If the deviation exceeds a threshold, the generated results are optimized through adaptive adjustment of conditional weights and post-processing calibration until the physical accuracy requirements are met. Finally, a night scene rendering and lighting design parameter report that meet engineering feasibility are output. These nine steps correspond to system modules M1–M5, forming a complete technical closed loop of "input–encoding–generation–verification–optimization–output," including the following steps: S1. Obtain the 3D geometric model of the scene to be illuminated and the physically based rendering surface material properties; This step corresponds to the input interface unit of system module M1, which is responsible for receiving and standardizing the basic scene data required for night scene lighting design; The input data types include 3D geometric model files and physically based rendering (PBR) material property data. The 3D geometric model adopts a common 3D exchange format, such as FBX, OBJ or glTF. The model data contains four core components: (1) Vertex coordinate set , describes the spatial position of each object in the scene; (2) triangular facet index set, defines the topological connection relationship between vertices to form a renderable continuous surface; (3) UV texture coordinate set, establishes the mapping relationship between three-dimensional surface and two-dimensional texture image; (4) normal vector set, used to characterize the local orientation of each surface, which is the basis of lighting calculation. PBR surface material properties are provided in the form of texture maps, containing five physical material channels: (1) BaseColor texture, which defines the base reflective color of the surface, with a typical resolution of 2048×2048 or 4096×4096; (2) Metallic texture, which describes the metallicity of the surface in the form of a grayscale image, with a value range of [missing information]. , where 0 represents non-metals (such as concrete, stone) and 1 represents pure metals (such as aluminum alloys, stainless steel); (3) Roughness texture, which describes the roughness of the surface, with a value range of . The smaller the value, the smoother the surface and the more obvious the specular reflection; (4) Normal map, which records the micro-geometric normal deviation of the surface in the tangent space, is used to present the surface bumps and details without increasing the geometric complexity; (5) Emission self-illuminating texture, which marks the areas in the scene that have self-radiation characteristics, such as existing lights, luminous signs, etc. The following operations are performed during the scene preprocessing stage: First, coordinate normalization is performed, and the scene bounding box is scaled to a unit cube. Within the range, it facilitates the stability of subsequent numerical calculations; secondly, it performs a normal consistency check to ensure that the normals of all triangles facets are oriented in the same direction (outwards), and automatically flips and corrects any facets found to have reversed directions; finally, it establishes a material ID mapping table to establish a one-to-one correspondence between the triangle facet index and the material texture index, which facilitates fast material lookup in subsequent rendering and simulation calculations. After preprocessing, this step outputs a standardized scene data structure, denoted as: ; in, For vertex set ( (vertices) For the triangular patch index set ( (a piece of dough) For material property set ( (a type of material) For texture mapping sets (containing the five PBR channel textures mentioned above).

[0047] Please see Figure 1 and Figure 2 The present invention provides an embodiment of an AI night scene effect image intelligent generation method based on physical optics, S2, obtaining the lighting layout scheme and corresponding physical optical parameters, the physical optical parameters including the light distribution curve file conforming to the IESNALM-63 standard format, color temperature, luminous flux, beam angle and color rendering index; Obtaining the luminaire layout scheme and corresponding physical and optical parameters includes: parsing the light distribution curve file conforming to the IESNA LM-63 standard format, extracting the light intensity distribution matrix of the luminaire at the vertical and horizontal angles, and converting the discrete sampling data into a continuous light intensity distribution function through bilinear interpolation.

[0048] Please see Figure 1 , Figure 2 and Figure 3 An embodiment of the present invention provides: an AI-based intelligent generation method for night scene effect images based on physical optics, wherein S3, physical optics parameters are encoded into condition constraint vectors, and the condition constraint vectors include light distribution curve feature vectors, illuminance distribution condition representations, color temperature field condition representations, and unified glare value constraint representations; Encoding physical optical parameters into conditional constraint vectors includes: expanding the light intensity distribution function into a compact light distribution curve feature vector through spherical harmonic function expansion. The spherical harmonic function expansion obtains the expansion coefficients by projecting the light intensity distribution function onto spherical harmonic basis functions and truncates it to a finite order to form the light distribution curve feature vector. Encoding physical optical parameters into conditional constraint vectors includes: calculating the target illuminance distribution based on the lighting layout scheme and light distribution curve, mapping the target illuminance distribution into an illuminance distribution conditional map that matches the resolution of the output night scene effect map, and encoding it into an illuminance distribution conditional representation through a convolutional neural network; Encoding physical optical parameters into conditional constraint vectors includes: generating a color temperature distribution map based on the color temperature parameters and spatial location of each lamp; mapping the color temperature distribution map into a color conditional field through a color temperature to CIE chromaticity coordinate conversion; and encoding it into a color temperature field conditional representation through a convolutional neural network. This step corresponds to the lighting parameter input unit of system module M1, which is responsible for obtaining the lighting configuration scheme and its complete physical and optical parameters in the night scene lighting design; The lighting layout plan includes the following information: lighting type identification (e.g., LED wall washer lights, floodlights, garden lights, etc.), and the number of lighting fixtures. 3D spatial coordinates of each lamp (Unit: meters) ), and the orientation parameters of the lighting fixtures—pitch angle (Angle of inclination relative to the horizontal plane) and azimuth (Horizontal rotation angle relative to true north); The acquisition of physical optical parameters is divided into two levels. The first level is the parsing of the IES light distribution curve file: each luminaire is associated with an IES file conforming to the IESNA LM-1995 or LM-63 standard format. This file records the luminous intensity distribution data of the luminaire in polar coordinates. The IES file is read using a standard analytical algorithm to extract the luminous intensity distribution matrix. ,in For vertical angle sampling points, For horizontal angle sampling points, the typical sampling resolution is... or Simultaneously extract the maximum light intensity from the file header. (Unit: cd) and total luminous flux of luminaires (Unit: lm); The second level involves obtaining the luminous parameters of the luminaire, including: rated power. (Unit: W) Correlated color temperature (Unit: K, typical value 2700K–6500K), general color rendering index (range of values) Half-peak beam angle (Unit: °, representing the angular range at which the luminous intensity of the lamp decays to 50% of its maximum value). In addition, a maintenance factor is introduced. (Typical value 0.7–0.8), used to compensate for the attenuation of luminous flux caused by aging, dust accumulation, and other factors. Select from the preset maintenance factor table according to the type of lighting fixture and the usage environment; Finally, this step establishes a mapping table between the luminaire and its physical optical parameters: ; This association table serves as input for subsequent coding steps, ensuring that the physical characteristics of each luminaire are accurately tracked during the subsequent generation and verification process. Step S3: Encoding of physical optical parameters: This step corresponds to system module M2, which encodes the multi-dimensional physical optical parameters obtained in step S2 into a unified conditional constraint representation for use by subsequent generation modules. The encoding process is divided into four sub-steps. S3.1, IES photometric curve encoding: The input is the light intensity distribution function. The function is obtained through the light intensity distribution matrix in step S2. A continuous representation is obtained through bilinear interpolation, and encoding is performed using the spherical harmonics (SH) expansion method. ; in Let be real spherical harmonic basis functions. For expansion coefficients, The truncation order (typical value) For details on the calculation of the spherical harmonic expansion coefficients, please refer to Core Algorithm 1; The output is the IES feature vector. ,when When the dimension is 49, the feature vector preserves the three-dimensional spatial light intensity distribution characteristics of the lamp in a compact form and has the excellent mathematical property of rotation invariance.

[0049] S3.2 Generation of target illuminance distribution map: Based on the three-dimensional spatial position of each luminaire and its IES light distribution curve, a target illuminance distribution map is pre-generated through simplified illumination calculations. The simplified calculations use a point light source approximation model and follow the inverse square law of light intensity attenuation with distance. ; In the formula, These are sampling points on the surface of the scene; Index for lighting fixtures; For lighting fixtures to sampling point The Euclidean distance; The angle between the light ray from the luminaire pointing to the sampling point and the optical axis of the luminaire; The corresponding azimuth angle; From lighting fixtures The intensity distribution of the IES light was obtained by bilinear interpolation; The term is the cosine factor of the incident angle, which characterizes the attenuation of effective illuminance when light is incident at an oblique angle; To maintain the coefficients, this formula omits multiple reflections and ambient light components, focusing on the rapid pre-calculation of the direct light contribution, making it suitable for generating conditional constraint diagrams rather than accurate physical simulations; Projecting the scene surface onto the camera's view plane yields a 2D target illumination map aligned with the rendering viewpoint. The resolution is consistent with the target generated image (typically 1024×1024 or 2048×2048), and the unit is lux (lx). S3.3, Color Temperature Field Generation: According to the color temperature parameters of each lamp Based on spatial location, a target color temperature distribution map is generated. In areas with overlapping illumination from multiple luminaires, a weighted mixing strategy based on illuminance contribution is adopted. ; In the formula, For lighting fixtures At the sampling point The illuminance value generated at the location (obtained from the individual calculation in S3.2) is weighted according to a strategy that ensures that the greater the contribution of illuminance, the stronger the color temperature influence of the corresponding luminaire, which conforms to the physical principle of energy weighting. The output is a color temperature distribution map. The unit is Kelvin (K); S3.4, Constraint Vector Concatenation: The encoded physical parameters, along with UGR constraints, material constraints, and other multi-dimensional information, are concatenated into a unified condition constraint vector: ; In the formula, This represents a vector concatenation operation; The spherical harmonic eigenvector (49-dimensional) of the IES light distribution curve; The potential representation of the target illuminance distribution map after dimensionality reduction by a lightweight encoder (typically 256 dimensions). Dimensionally reduced representation of the color temperature field (typically 256 dimensions); To unify glare values, constrain scalars or vectors (typically 64-dimensional). The scene material statistical feature vector (typically 128-dimensional) is generated by concatenating the components after each component is reduced to a fixed dimension through its respective encoding network, resulting in the final conditional constraint vector. The typical value of the total dimension is The dimension is used as the input to the subsequent constraint space mapping network, which bridges the physical parameter space to the condition space of the generative model.

[0050] Please see Figure 1 , Figure 2 and Figure 3 An embodiment of the present invention provides: an intelligent generation method for AI night scene effect images based on physical optics, S4: construct a physical optics parameter constraint space, and map the condition constraint vector to the condition latent space of the generative artificial intelligence model through a constraint space mapping network, so that the physical optics parameters and the noise latent space of the generative artificial intelligence model establish a cross-attention interaction interface. This step corresponds to the constraint space mapping unit of system module M2, which is responsible for mapping the condition constraint vectors obtained in step S3. Mapped to a conditional latent space compatible with diffusion models; The processing is achieved through a constraint space mapping network. To achieve this, the network employs a two-layer Multi-Layer Perceptron (MLP) structure: the first layer is a fully connected layer, with the input dimension... (Typical 753 dimensions), output dimension 512 dimensions, using the ReLU activation function; the second layer is a fully connected layer with an input dimension of 512 dimensions and an output dimension equal to the latent space dimension of the diffusion model (typically 753 dimensions). (4-dimensional, corresponding to a latent representation with a spatial resolution of 64×64), the forward propagation formula of the network is: ; In the formula, , These are the parameters for the first layer; , For the second layer parameters; This is the conditional latent representation of the output; In the denoising process of the diffusion model, the conditional latent representation The noise latent representation of each denoising step is obtained through the Cross-Attention mechanism. To enable interaction, specifically, in the attention layer of each U-Net denoising network, Using the current noise features as the query, the conditional attention response is computed as the key and value: ; in From the latent characteristics of noise, , From conditional latent representation , The dimension of the Key; To further enhance the effectiveness of the constraints, this step introduces a dynamic fusion weight strategy, defining constraint weights that change with time steps: ; In the formula, For the current denoising time step ( , (Total number of steps) Initial weighting coefficients (typical values) The physical meaning of this dynamic strategy lies in: in the initial stage of denoising ( near In a highly noisy state, the generated results are still in the stage of coarse structure formation. At this time, the conditional constraints are introduced with relatively weak weights, allowing the model to explore the global layout with a large degree of freedom; as denoising progresses ( As the image details gradually emerge (by reducing the size of the image), the weight of the conditional constraints increases accordingly, thereby achieving precise embedding of physical parameters in the later stages of denoising. This progressive constraint strategy, "from coarse to precise," effectively balances the contradiction between generation diversity and physical accuracy.

[0051] Please see Figure 1 , Figure 2 and Figure 4An embodiment of the present invention provides: an AI night scene effect image intelligent generation method based on physical optics, S5, in the noise reduction and diffusion generation process, the physical optics parameter constraints of the conditional latent space are embedded into the generative artificial intelligence model through a cross attention layer and an adaptive instance normalization layer, and the generation of night scene effect images that conform to the physical optics parameter constraints is executed. The process of generating a night scene image that conforms to physical optical parameter constraints during the denoising diffusion generation includes: adopting a multi-scale progressive generation strategy, gradually injecting physical optical parameter constraints of different granularities at different stages of denoising. The multi-scale progressive generation strategy includes at least an overall atmosphere generation stage, a local lighting generation stage, and a light source precision generation stage. Each stage dynamically switches the constraint conditions through a stage function. The denoising diffusion generation process also includes: introducing physical consistency regularization loss to constrain the generation process. The physical consistency regularization loss includes illuminance consistency loss, color temperature consistency loss and energy conservation loss. The sub-losses are combined by weighting to form the total physical consistency loss. This step corresponds to system module M3, which generates night scene renderings under physical constraints based on the Latent Diffusion Model (LDM), and is the core generation stage of the method; The generation process follows the inverse sampling process of the Denoising Diffusion Probabilistic Model (DDPM). First, initial latent noise is sampled from a standard Gaussian distribution: ; In the formula, Dimensions and Conditional Latent Representations Consistent, then executed. Step-by-step iterative denoising (typical) The update formula for each step is: ; In the formula, The diffusion process parameters are determined by a preset noise scheduling scheme, such as linear scheduling or cosine scheduling. ; For a conditional U-Net denoising network, the input is the current noise latent representation. Time step and conditional latent representation The output is the predicted noise residual; For the first The noise standard deviation of the step; To handle randomly sampled noise, Conditional U-Net uses a Cross-Attention mechanism during the denoising process. By integrating feature maps at various resolutions, physical constraints can be injected. Building upon standard DDPM denoising, this step introduces a physical consistency regularization mechanism, which applies every... One noise reduction step (typical) ), will the current potential representation Decoded into pixel space image by VAE decoder Input a differentiable illuminance estimation network to estimate the illuminance distribution of the current intermediate results and calculate the physical consistency loss. (See core algorithm 3 for details), this loss is fed back to the algorithm through gradient information. To correct the potential representation direction in a guided manner: ; In the formula, Gradient step size (typical) This regularization mechanism ensures that even during the intermediate stages of denoising, the generated results gradually converge to a physically reasonable state. Furthermore, this step employs a multi-scale progressive conditional injection strategy, applying physical constraints of different granularities at different denoising stages: Phase 1 ( (Global Structure Formation Phase): Only global constraints are injected, including scene average illuminance, sky color temperature, and overall atmosphere style. During this phase, the Classifier-FreeGuidance (CFG) scaling factor is set to... This gives the model a greater degree of freedom in style exploration, allowing for the generation of diverse overall night scene compositions; Phase 2 ( (Local detail revealing period): Inject local constraints, including illuminance distribution map. Color temperature distribution map CFGScale guides the direction of light intensity and color temperature in local areas, improving it to [specific level]. This strengthens the influence of conditional constraints on the generated results; Phase 3 ( (Fine light source characterization period): Inject precise constraints, including IES light distribution curve feature vectors. By precisely controlling the position of the luminaire's point light source, beam angle parameters, etc., the CFGScale further enhances the control of the light spot shape, projection range, and glare effect of each luminaire. This enables precise embedding of physical parameters; Complete all After the first denoising step, the final denoised latent representation is obtained. The night scene effect image is decoded by the pre-trained VAE decoder: ; Output image The typical resolution is or (pixel), color space is sRGB, including physically reasonable illuminance distribution, color temperature variation and light source characteristics.

[0052] Please see Figure 1 , Figure 2 and Figure 5 An embodiment of the present invention provides: an AI night scene effect image intelligent generation method based on physical optics, S6, inputting the generated night scene effect image and the corresponding scene geometric parameters and lighting parameters into the physical simulation engine, performing forward physical rendering based on ray tracing or path tracing, extracting illuminance distribution, brightness distribution, uniform glare value and brightness uniformity index, in order to perform optical accuracy verification; Forward physical rendering based on ray tracing or path tracing includes: using Monte Carlo path tracing algorithm to perform physically accurate optical simulation of scene 3D geometry, physically based rendering surface materials, lighting spatial position and light distribution curve, calculating radiance through pixel-by-pixel multisampling and multi-importance sampling, and outputting physical reference rendering map and pixel-by-pixel illuminance distribution map and luminance distribution map. This step corresponds to system module M4, which will generate the night scene effect image in step S5. The scene parameters obtained in steps S1–S2 are input into the physical simulation engine to perform optical accuracy verification; The verification process includes the following sub-steps: 1. Physical Scene Reconstruction: Utilizing the scene data structure output in step S1 The association table of lighting fixture parameters established in step S2 The complete 3D lighting scene is reconstructed in the physical simulation engine. The light intensity distribution of the lamps uses the complete light distribution curve data in the original IES file, rather than the simplified code in step S3. 2. Path Tracing Rendering: Performs high-precision forward physical rendering based on Monte Carlo path tracing to generate a physical reference image. The number of samples for path tracing is set to a typical value. Each ray / pixel ensures the convergence accuracy of radiance calculations, and the global illumination effects of direct light, primary reflection, secondary reflection, and indirect ambient light are considered during the rendering process. 3. Illuminance distribution extraction: from the physical reference image Extracting illuminance distribution The extraction method utilizes known camera exposure parameters and image brightness values ​​for conversion: ; In the formula, From Extracted physical brightness (unit: ), output directly through path tracing; Calibration coefficients (typical values) for camera response function ); Exposure time (in seconds); The sensitivity index; For the generated image, the exposure value is... Using the same camera parameter settings, the implicit illuminance value is inferred from the image brightness. This is used for subsequent deviation comparison; 4. Brightness distribution calculation: Obtain the brightness distribution of the scene surface directly from the path tracing output. The unit is ; 5. UGR value calculation: Based on the preset observer position and line of sight, combined with the brightness, position and solid angle of each light source, the Unified Glare Rating (UGR) is calculated according to the CIE117-1995 standard. 6. Brightness uniformity calculation: Calculate the brightness uniformity index. ,in The lowest brightness in the observation area. Average brightness; The output of the physical simulation verification is a set of physical measurement values. This serves as the baseline true value for subsequent deviation calculations.

[0053] Please see Figure 1 , Figure 2 and Figure 5 An embodiment of the present invention provides: an AI-based intelligent generation method for night scene effect images based on physical optics, S7, calculating the comprehensive deviation between the generated result and physical optics parameters, the comprehensive deviation including illuminance deviation, color temperature deviation, uniform glare value deviation and brightness uniformity deviation; The overall deviation between the generated results and the physical optical parameters includes: illuminance deviation, color temperature deviation, uniform glare value deviation, and brightness uniformity deviation as sub-items of deviation, and the overall deviation is calculated by weighted summation. The deviation of each sub-item is calculated in the form of relative error between the generated results and the physical simulation results. This step corresponds to the deviation detection unit of system module M4. By quantitatively comparing the difference between the generated result and the physical simulation benchmark, the physical accuracy of the night scene rendering is evaluated. Define the overall deviation The weighted sum of the deviations from the five physical dimensions: ; In the formula, For each weight coefficient, satisfying Typical configuration value Illuminance deviation Color temperature deviation is given the highest weight as a primary indicator. Secondly, the remaining weights are evenly distributed among UGR deviation, uniformity deviation, and energy conservation deviation; The specific calculation methods for each deviation item are as follows: Illuminance deviation The average value of the point-by-point relative illuminance deviation is used to characterize the degree of deviation between the implicit illuminance of the generated image and the physically simulated illuminance. ; In the formula, This represents the number of pixels sampled. and The first The generated image illumination estimate and the physical simulation illumination value for each sampling point; To prevent extremely small positive numbers from being divided by zero (typically...) ); Color temperature deviation The average value of the relative color temperature deviation at each point is used. ; In the formula, For the local color temperature values ​​estimated from the generated image, The corresponding value in the target color temperature distribution map; UGR deviation Relative deviation using the global UGR metric: ; Uniformity deviation : Absolute deviation is used (because the uniformity itself has been normalized to) ): ; energy conservation deviation Evaluate the energy conservation relationship between output luminous flux and input luminous flux: ; In the formula, This is an estimate of the total output brightness in the generated image; The total input luminous flux of all luminaires; The average reflectance of the scene; Deviation threshold set to (Configurable), when If the generated result meets the physical accuracy requirements, it can directly proceed to step S9 for output; otherwise, the feedback iterative optimization of step S8 is initiated.

[0054] Please see Figure 1 , Figure 2 , Figure 5 and Figure 6 An embodiment of the present invention provides: an AI night scene effect image intelligent generation method based on physical optics, S8, generating a feedback signal based on the comprehensive deviation, and iteratively optimizing the generation result through conditional injection weight adaptive adjustment and post-processing tone mapping calibration until the comprehensive deviation meets the preset convergence condition; The optimization of the generated results through conditional injection weight adaptive adjustment and post-processing calibration iteration includes: calculating the deviation of each component and identifying the dominant deviation factors; adaptively adjusting the conditional injection weights of the corresponding physical parameters; performing pixel-by-pixel gain map illuminance calibration and color temperature white balance adjustment on the generated image; and re-executing the night scene effect image generation, physical simulation verification, and deviation calculation until the comprehensive deviation meets the convergence condition or reaches the maximum number of iterations. This step corresponds to the feedback optimization unit of system module M5. When the comprehensive deviation calculated in step S7... Exceeding the threshold At that time, a two-level iterative optimization mechanism is initiated to improve the physical accuracy of the generated results; First layer: Conditional injection weights are adaptively adjusted; 1. Off-source identification: comparison , , , Deviation of each item, determine the dominant factor of deviation, such as illuminance deviation If the maximum value is reached, it is determined that the illuminance constraint is insufficient. 2. Weight Adjustment: Enhance the conditional weighting of corresponding physical parameters, taking illuminance as an example: ; In the formula Adjustment factor (typical) ), synchronously adjust the post-processing calibration gain coefficient ; 3. Fast Regeneration: Using the adjusted conditional weights as parameters, re-execute steps S5 to S7 in fast mode: reduce the number of denoising steps to 25-30, use DDIM deterministic sampling instead of DDPM random sampling, and keep CFGScale unchanged; 4. Deviation Assessment: Calculate the new overall deviation. ; Second layer: Post-processing tone mapping calibration; 5. Gain Map Construction: If the first layer is optimized... The limit is still exceeded. Based on the ratio of the target illumination map to the brightness distribution of the generated image, a pixel-wise gain map is constructed: ; In the formula To prevent small amounts of division by zero (typical) ); 6. Illuminance Calibration: Apply the gain map to the luminance channel of the generated image and perform pixel-by-pixel multiplication calibration. After calibration, the pixel value is clamped to Valid range; 7. Color Temperature Calibration: Adjust the white balance parameters in the CIELab space to make the average color temperature of the calibrated image approach the target color temperature. ; 8. Recalibration: Repeat steps S6-S7 on the calibrated image to calculate the final deviation. ; Iteration control parameters: Maximum number of iterations: (Practical setup to ensure real-time project performance); Early stop conditions: or reach ; After the iteration is completed, the generated result with the lowest deviation is taken as the optimal output, and the process proceeds to step S9.

[0055] Please see Figure 1 , Figure 2 and Figure 6 An embodiment of the present invention provides: an AI-based intelligent generation method for night scene effect images based on physical optics, S9, outputting a night scene effect image and a lighting design parameter report that conforms to the constraints of physical optics parameters; This step corresponds to the output management unit of system module M5, which is responsible for outputting the final night scene rendering and related lighting design documents that have passed physical verification and iterative optimization to the user end. The output consists of the following five components: 1. Final night scene rendering: High-resolution rendered image (typical resolution) or (pixels, PNG format) is the optimal generated result after physical constraint embedding and iterative optimization, possessing rationality in the sense of physical photometry and visual aesthetic quality; 2. Annotated rendering: Overlay the final night scene rendering with light fixture location markers, key area illuminance values, color temperature markings, and observer position indicators (JPEG format, resolution similar to the main rendering). Figure 1 (This facilitates design review and engineering communication); 3. Lighting Design Parameter Report (PDF format): Includes basic project information, scene description, luminaire selection list, optical parameter summary table (IES file name, color temperature, luminous flux, color rendering index, beam angle, and power for each luminaire), physical simulation verification conclusions (including deviation values ​​for each item), final rendering thumbnail, and design description text. 4. Lighting Fixture Selection List (Excel format): A structured data table that can be imported into the procurement or construction management system, containing fields required for project implementation such as lighting fixture model, quantity, estimated unit price, installation coordinates, orientation angle, and circuit allocation suggestions; 5. Physical Simulation Verification Report: A data document that records the complete verification process, including forward rendering parameter settings, path tracing sampling configuration, illuminance distribution comparison chart (generated image vs. physical simulation image), UGR calculation process, brightness uniformity analysis, and energy conservation verification conclusions. The output files are packaged into a unified project delivery folder, realizing a complete technical loop from AI-generated design to engineering feasibility.

[0056] Please see Figure 1 , Figure 2 , Figure 3 , Figure 4 , Figure 5 and Figure 6 The present invention provides an embodiment of an AI-based intelligent generation method for night scene effect images based on physical optics, with detailed description of the core algorithm; Core Algorithm 1: Spherical Harmonic Function Encoding Algorithm for IES Photometric Curves This algorithm is a detailed implementation of step S3.1, responsible for encoding the IES light distribution curve of the luminaire into a compact spherical harmonic feature vector, realizing the conversion from discrete angle sampling light intensity to a continuous, differentiable conditional representation; Input: IES light intensity distribution ,in It is a vertical angle. Horizontal angle; sampling resolution Typical value (Corresponding to a 5° interval); Algorithm steps: 1. Preprocessing: The original IES data is imputed (using linear interpolation to fill in missing sampling points) and smoothed and denoised (Gaussian filtering, standard deviation). (to suppress measurement noise and numerical instability). 2. Normalization: Normalize the light intensity value to... scope: ; In the formula, Normalization eliminates the influence of differences in power levels between different luminaires by recording the maximum light intensity value in the IES file, allowing the encoding to focus on the shape of the light intensity distribution rather than absolute brightness. 3. Calculation of spherical harmonic coefficients: The spherical harmonic expansion coefficients are calculated using numerical integration methods, employing Lebedev numerical integration or uniform sampling Monte Carlo integration. ; In the formula, The number of sampling points (Lebedev integral typically uses) or Point scheme; Monte Carlo method adopts (one uniform spherical sampling point); The integral weights for the corresponding sampling points; Let be the values ​​of the real spherical harmonic basis functions at the sampling points, and be their order. ,frequency ; 4. Truncation and Output: Truncate to the specified value. Order, output IES feature vector: ; The total dimension of the vector is ,when hour, ;when hour, ; Reconstruction Verification: To evaluate coding accuracy, the light intensity distribution is reconstructed using coefficients. ; Calculate the relative reconstruction error: ; Experience shows that when the truncation order is... Typical reconstruction error ; hour In practical applications, take To balance encoding precision and vector dimension; Core Algorithm 2: Algorithm for fusing illuminance distribution map and diffusion model condition map: This algorithm provides a detailed implementation of integrating the illuminance condition map into the diffusion model in steps S3.2 and S4, solving the problem of how to effectively encode the two-dimensional physical illuminance distribution map into a latent conditional representation that the diffusion model can understand. Problem Definition: [This appears to be a question or statement related to a physical illuminance map.] Transformed into a conditional latent representation compatible with the noisy latent space. And it is effectively integrated into the multi-resolution layers of U-Net; Algorithm steps: 1. Illuminance Map Normalization: Normalize the target illuminance map to... scope: ; In the formula, The maximum illuminance value in the target illuminance map (typical) Range of values lx); 2. Logarithmic Compression: To simulate the nonlinear perception characteristics (approximate logarithmic / power-law response) of the human visual system to luminance signals, a logarithmic compression transformation is performed on the normalized illuminance map. ; In the formula, Compression factor (typical value) This transformation maps high dynamic range illuminance values ​​to a distribution more suitable for neural network processing, while preserving detail resolution in low-illuminance areas. 3. Latent encoding: via a lightweight convolutional encoder The log-compressed illuminance map is encoded into a latent representation. The encoder structure is a three-layer convolutional neural network: the first layer has 1 input channel and 16 output channels, with convolutional kernels... The second layer has a stride of 2 for downsampling and 16 input channels and 32 output channels, with a convolutional kernel of 2. The step size is 2 for downsampling; the third layer has 32 input channels and 64 output channels, and the convolution kernel... The step size is 2 for downsampling, and ReLU activation and batch normalization are used in each layer. The input resolution is... When, output resolution is 64 channels; 4. FiLM Conditional Integration: At each resolution level of the U-Net denoising network, the FiLM (Feature-wise Linear Modulation) mechanism is used to integrate... The FiLM operation, which incorporates feature maps, is defined as follows: ; In the formula, This is the feature map of the current layer of U-Net; and From pass Channel-wise scaling and translation parameters generated by convolution; This represents element-wise multiplication. and Spatial resolution and Consistent, resolution matching is achieved through bilinear upsampling. The FiLM mechanism modulates on a feature channel-by-feature basis, enabling illumination conditions to influence denoising features in a spatially adaptive manner. It enhances brightness-related feature responses in areas with high illumination targets and suppresses overexposure tendencies in areas with low illumination targets. Core Algorithm 3: Design of Physical Consistency Loss Function This algorithm is a detailed implementation of physical consistency regularization and loss calculation in step S5, aiming to embed photometric physical laws into the training and inference process of the diffusion model. Design goal: To make the generated image not only visually realistic and believable, but also "reasonable" in a physical photometric sense, that is, its implicit light distribution, color temperature distribution and energy balance conform to the basic laws of optics; Physical consistency loss during inference phase (used in step S5): ; In the formula, Illuminance consistency loss (MSE, the deviation between the estimated illuminance of the generated image and the target illuminance map); This is due to the loss of color temperature consistency. Loss due to energy conservation For the weight of each item (typical) ); Total losses during training: ; In the formula: For the standard diffusion model loss, a denoising loss in the form of mean squared error (MSE) is used: ; The aforementioned physical consistency loss is calculated during the training phase using a differentiable estimation network. To combat the loss, a PatchGAN discriminator structure is used to judge the local realism of the generated image, thereby enhancing the naturalness and detail sharpness of the generated result. Typical training weight configuration is While maintaining the training stability of the standard diffusion model, the physical constraints and the impact of adversarial realism are appropriately enhanced. Differentiable illuminance estimation network: for achieving To ensure computability during the training phase, a small U-Net architecture illumination estimation network is designed, with the generated image as the network input. (3-channel RGB) and scene depth map (1 channel) Output pixel-by-pixel illuminance estimation map through a dual-branch encoding-fusion-decoding structure. The network training data consists of pairs of physically rendered images. Precise illuminance map ),in The training loss is the mean square error between the estimated illumination and the true illumination, directly output by the path tracing renderer (excluding absolute illumination values ​​from camera exposure changes). ; The estimation network is also used in the inference phase for intermediate supervision of denoising in step S5 and illuminance extraction in steps S6-S7, ensuring consistency of illuminance estimation behavior in the training and inference phases.

[0057] Please see Figure 1 , Figure 2 , Figure 3 , Figure 4 , Figure 5 and Figure 6 This invention provides an embodiment of an AI-based intelligent generation method for night scene renderings based on physical optics; and a night scene lighting design for the facade of an urban commercial complex. 6.2.1 Scenario Description: This example illustrates the nighttime lighting design project for the south facade of a commercial complex in a core urban business district. The building is a modern-style high-rise commercial complex with a total floor area of ​​approximately 80,000 square meters. 2 The building has a total height of 85m, and the design scope is limited to the south facade of the building. The facade is 120m wide and 85m high. The exterior is mainly composed of Low-E insulated glass curtain walls, with light gray aluminum decorative lines in some areas. The overall design presents a simple and modern commercial building image. The design goal is to highlight the material reflective characteristics and vertical volume of the building's glass curtain wall through night lighting, create a high-end and refined commercial atmosphere, and at the same time ensure that the lighting effect meets the physical and optical index requirements of national standards. 6.2.2 Steps S1–S2: Input Preparation: Scene 3D model and PBR material properties (step S1): The scene's 3D data was exported from the Building Information Modeling (BIM) system, using FBX format as input. The model includes the complete geometric mesh of the building's south facade, and the hierarchical structural information of the podium and tower. PBR material properties were specifically measured and calibrated, and the main material parameters are as follows: Glass curtain wall: Metallic Roughness Light transmittance Basic color reflectance (Dark gray glass), normal map resolution is 2048, used to simulate the subtle ripple reflection effect of the glass panel; Aluminum decorative trim: metallic finish roughness The base color is silver-gray; Stone base of podium building: metallic finish roughness The base color is warm gray; After coordinate normalization, the bounding box of the scene is scaled to a unit cube. Within the specified range, all surface normals have been corrected to face outwards after a consistency check. Lighting fixture layout scheme and physical optical parameters (step S2): The lighting solution uses an LED linear wall washer system, arranged in two rows: First row: Eaves line at the top of the podium (height) Twelve LED wall washer lights are evenly arranged horizontally along the facade (m), with an installation spacing of [m]. m; Second row: Tower top cornice (height) Similarly, 12 LED wall washer lights are arranged at intervals of m. m; Each luminaire is associated with an IES light distribution profile file. The model is Philips BCP38448LED4000K. After parsing the IES file in step S2, the key physical and optical parameters extracted are as follows: Photometric type: IESTypeC, Vertical angle range (37 sampling points, spaced at 5° intervals), horizontal angle range (73 sampling points, spaced 5° apart); Maximum light intensity: cd; Rated luminous flux: lm; Related color temperature: K; General color rendering index: ; Beam angle: vertical direction Horizontal direction (Half-peak light intensity); Rated power: W; Maintenance factor: (Outdoor environment, annual cleaning and maintenance); Target physical optical parameters: According to the E2 standard for commercial building facade lighting in GB50034-2013 "Standard for Lighting Design of Buildings", the following target constraint values ​​are set: Average illuminance on facade: lx; Facade illumination uniformity: ; Unified Glare Value: (To avoid causing uncomfortable glare to pedestrians and street vehicles); Color temperature deviation: K; 6.2.3 Step S3: Coding of physical optical parameters: IES photometric profile coding (step S3.1): The IES light distribution curves of 24 lamps were obtained by bilinear interpolation to obtain the continuous light intensity distribution function. Since all luminaires in this project are of the same model, the light distribution characteristics of a single luminaire are uniformly encoded using spherical harmonic function expansion (SHE) or other equivalent parametric encoding methods (such as PCA dimensionality reduction and RBF interpolation). This is then replicated and applied to all 24 luminaires, with the truncation order taken as... The spherical harmonic expansion coefficients were calculated using Lebedev numerical integration (590-point scheme). Output IES feature vector After reconstruction and verification, the truncation order is... Relative error of time-distribution curve reconstruction This meets the engineering accuracy requirements; Pre-calculation of target illuminance distribution map (step S3.2): Based on the three-dimensional spatial position of 24 lamps Its IES light distribution curve, and the target illuminance distribution at the facade sampling points are pre-calculated using a point light source approximation model, following the inverse square law: ; In the formula, For lighting fixtures to sampling point Euclidean distance, Let be the angle between the incident ray and the normal of the sampling point. Pre-calculation results show that in the lower part of the facade (height 20–60m), the peak illuminance can reach approximately 320lx due to the cross illumination of the two rows of lights. In the top and bottom edge areas of the facade, the illuminance drops to approximately 120lx due to the limitation of the lighting angle. Projecting the three-dimensional illuminance distribution onto the camera's view plane generates a two-dimensional target illuminance map aligned with the rendering viewpoint. The resolution is set to 2048 pixels. Color temperature field generation (step S3.3): This embodiment adopts a unified color temperature scheme, with all 24 lamps having a color temperature of 4000K, thus the color temperature field is uniformly distributed. K, mapped to CIE1931 xy chromaticity coordinates using the McCamy formula: , ; Constraint vector concatenation (step S3.4): Concatenate the coded components into a joint condition constraint vector: ; in, (Spherical harmonic eigenvectors) (Illuminance distribution map via lightweight encoder) (latent representation after dimensionality reduction) (Color temperature field dimension reduction representation). (UGR constraint scalar expanded into vector). (Scene material statistical features), the total dimensions after splicing are 753; 6.2.4 Steps S4–S5: Constrained Space Mapping and Diffusion Generation: Constraint space mapping (step S4): constraint vector Through constrained space mapping network Mapping to the conditional latent space of the diffusion model, the network employs a two-layer MLP structure: the first layer maps 753 dimensions to 512 dimensions (ReLU activation), and the second layer maps 512 dimensions to 16384 dimensions (i.e., (Latent representation dimension), output conditional latent representation Meanwhile, a dynamic fusion weight strategy is introduced to constrain the weight changes with the denoising time step: ,in , ; Generation of night scene renderings with embedded physical constraints (step S5): The basic generative model uses a fine-tuned version of StableDiffusionXL, with a latent space size of [missing information]. The noise reduction process uses DDPM sampling, with a total of [number] steps. The multi-scale progressive conditional injection strategy is implemented in the following three stages: Phase 1 ( Global Atmosphere Formation Period: Only global constraints (average illuminance) are injected. lx, sky color temperature 6000K→4000K gradient), CFGScale set to This allows the model to explore the overall night scene composition with a greater degree of freedom, with the sky background smoothly transitioning from deep blue twilight (dominated by 6000K ambient light) to a nighttime commercial atmosphere (dominated by 4000K artificial light). Phase 2 ( (Local Illumination Development Period): Local Illuminance Distribution Map And the spatial location mask of the luminaire, CFGScale is improved to This guides the precise matching of the light and shadow relationships in each section of the building facade with the pre-calculated illuminance distribution. During this stage, the vertical light and shadow transition of the glass curtain wall and the highlight outline of the aluminum plate lines gradually emerge. Phase 3 ( (Fine light source characterization period): Precise directional constraint of injected IES light distribution curve (49-dimensional spherical harmonic feature vectors) and precise point light source location encoding, CFGScale further improves to Precise control over the shape of the light spot, the attenuation at the edge of the light cone, and the details of the reflected highlights on the glass surface of each wall washer light; Physical consistency regularization: Every 5 denoising steps, the current latent representation is... Decode the image into pixels, estimate the illuminance distribution using a differentiable illuminance estimation network, and calculate the physical consistency loss. : ; Where the weight is taken , , This physical consistency loss is fed back to the gradient information. Perform guided correction: Guide step size ; The generation process is performed on an NVIDIA RTX 4090 (24GB VRAM) or equivalent GPU, and the generation time for a single image is approximately 4 minutes. 6.2.5 Steps S6–S8: Verification and Iterative Optimization: Physical simulation verification (step S6): Input the night scene rendering generated in step S5 and the original scene parameters into the Mitsuba3 physics simulation engine, and perform forward Monte Carlo path tracing rendering. Rendering parameters are set as follows: Samples per Pixel (SPP). A multi-importance sampling (MIS) combined with a light source importance sampling strategy is employed, prioritizing dense sampling of the solid angle regions of 200 light fixtures to render and output a physical reference image. Pixel-by-pixel illuminance distribution map and pixel-by-pixel brightness distribution map ; The following verification indicators are calculated based on the simulation output: Illuminance verification: From Extract the average illuminance of the south facade area of ​​the building. lx, relative deviation compared to the target value of 200 lx ; Color temperature calibration: From Extract the average color temperature of the facade area K, relative deviation compared to the target value of 4000K ; UGR verification: Calculate the UGR value at a typical observation point on the sidewalk (20m horizontal distance from the building facade, 1.5m eye height): ,satisfy Constraints and requirements; Uniformity verification: From Extract the minimum illuminance of the facade area lx, calculate uniformity , and target value Comparison, deviation ; Constraint deviation calculation (step S7): Overall deviation Calculate using the following formula: ; The weight configuration is as follows: , , , , Substitute the deviation of each item: , , , , Overall deviation The physical accuracy requirement is not met. Feedback Iterative Optimization (Step S8): because The system initiated a two-level iterative optimization. Analysis of the deviation revealed that the main source of deviation was low illuminance. Perform the following optimization operations: First layer: Adaptive adjustment of conditional weights: 1. Weight Adjustment: Incorporate illuminance conditions into the weights. Upgraded from 1.0 to 1.3: The value is rounded down to 1.3 to enhance the influence of illuminance constraints on the generation process. 2. Quick Regeneration: Using the adjusted weights as parameters, the generation process is re-executed using DDIM deterministic sampling (25 steps); 3. Deviation assessment: Re-verify after generating new renderings; Second layer: Post-processing tone mapping calibration: 4. Gain Map Construction: If the illumination is still too low after the first layer of optimization, a pixel-by-pixel gain map is constructed based on the ratio of the target illumination map to the brightness distribution of the generated image. ; 5. Illuminance calibration: The gain map is applied to the luminance channel of the generated image, and pixel-by-pixel multiplication calibration is performed, clamping the pixel value to the range [0,1]. 6. Re-verification: Repeat steps S6-S7 on the calibrated image. Verification results after one iteration: Average illuminance: lx, deviation ; Color temperature: K, deviation ; UGR: (constant); Uniformity: ,satisfy ; Recalculate the overall deviation: The physical accuracy requirements are met, the iterative optimization terminates, and the total optimization time is approximately 3 minutes (Fast DDIM mode). 6.2.6 Step S9: Output: Final Night View Rendering: The final rendering, after iterative optimization, has a resolution of 4096 x 2730 pixels (approximately 4K), is in PNG format, and uses the sRGB color space. The image accurately depicts the light strip effect created by 24 LED wall washer lights on the glass curtain wall surface: a row of lights at the top of the podium forms a bright horizontal light strip at a height of 12m, illuminating the lower part of the facade upwards; a row of lights at the top of the tower forms a second horizontal light strip at a height of 80m, illuminating the upper part of the facade downwards; the intersection area between the two light strips has uniform illumination and a natural transition; the aluminum decorative lines exhibit a subtle silver-gray metallic sheen under the lighting. Lighting Design Parameter Report: The system automatically generates a PDF lighting design report, which mainly includes: Lighting Fixture List: 24 Philips BCP38448LED4000K LED wall washer lights, each with a rated power of 54W, total installed power. W kW; single unit luminous flux 4800lm, total installed luminous flux lm; Summary of verification data: Average illuminance 195 lx (target 200 lx, deviation) ), color temperature 4100K (deviation) UGR17.3 (satisfied) Uniformity 0.62 (satisfies) Overall deviation ; Energy consumption estimate: Based on 8 hours of operation per night and 365 operating days per year, the annual electricity consumption is... kWh; Multiple version renderings output: Under the same physical constraints, by adjusting the random seed and CFGScale parameters, the system generates three additional art style variations: Modern Cool Tone Version: Adjust the overall color temperature to 5000K to enhance the blue-gray tone of the glass curtain wall, creating a more technologically advanced and austere atmosphere. Physical verification confirms that the average illuminance is 198lx and the color temperature deviation is within the allowable range. Warm Tone Version: The overall color temperature is adjusted to 3000K, giving the facade a warm golden hue, suitable for holidays or specific commercial events. Physical verification confirms an average illuminance of 192 lx and minimal color temperature deviation. (Accepted under relaxed constraints); Dynamic Gradient Version: Simulates dynamic lighting scenes through RGB flowing light effects. Physical verification confirms that the peak illuminance of each frame does not exceed 240lx and the UGR does not exceed 19, meeting safety constraints.

[0058] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention, and no reference numerals in the claims should be construed as limiting the rights involved.

Claims

1. An AI-based intelligent generation system for night scene renderings based on physical optics, characterized by: It includes a physical optical parameter input and standardization module, a physical optical parameter encoding and constraint space construction module, a physical constraint embedded night scene effect image generation module, a physical simulation verification and deviation detection module, and a feedback iterative optimization and output module; The physical optical parameter input and standardization module is used to receive and standardize the three-dimensional geometric model of the scene to be illuminated, the physically based rendering surface material properties, the luminaire layout scheme, and the physical optical parameters including the light distribution curve file conforming to the IESNA LM-63 standard format, color temperature, luminous flux, beam angle and color rendering index. The physical optical parameter encoding and constraint space construction module is used to encode the physical optical parameters into a condition constraint vector containing a light distribution curve feature vector, an illuminance distribution condition representation, a color temperature field condition representation, and a unified glare value constraint representation, and to map the condition constraint vector to the condition latent space of the generative artificial intelligence model through a constraint space mapping network.

2. The AI-based night scene rendering intelligent generation system based on physical optics according to claim 1, characterized in that: The physical optical parameter input and standardization module is also used to establish an index association table between each lamp model and its corresponding light distribution curve file in the lamp layout scheme. The index association table records the lamp's unique identifier, lamp model, manufacturer information, and the storage path of the light distribution curve file to support the automatic parsing and verification of batch lamp parameters.

3. The AI-based intelligent generation system for night scene renderings based on physical optics according to claim 1, characterized in that: The physical constraint-embedded night scene rendering generation module is used to embed the physical optical parameter constraints of the conditional latent space into the generative artificial intelligence model through a cross-attention layer and an adaptive instance normalization layer during the denoising and diffusion generation process, and to generate a night scene rendering that conforms to the physical optical parameter constraints. The physical simulation verification and deviation detection module is used to input the generated night scene rendering into a ray tracing or path tracing-based physical simulation engine to perform optical accuracy verification, extract illuminance distribution, brightness distribution, uniform glare value and brightness uniformity index, and calculate the comprehensive deviation between the generated result and the physical optical parameters.

4. The AI-based night scene rendering intelligent generation system based on physical optics according to claim 1, characterized in that: The feedback iterative optimization and output module is used to generate a feedback signal based on the comprehensive deviation, and to generate the result through conditional injection weight adaptive adjustment and post-processing calibration iterative optimization. It outputs a night scene effect image and a lighting design parameter report that conform to the physical optical parameter constraints. The feedback iterative optimization and output module is also used to generate multiple night scene effect image variants with different artistic styles under the same physical optical parameters by adjusting the classifier-free guided scaling factor and random seed. For each variant, metadata records containing a set of physical optical parameters, a deviation report, and a summary of optical indicators are retained. The lighting design parameter report includes a luminaire selection list, a physical optical parameter summary table, a physical simulation verification report, and a design effect image. The luminaire selection list records the luminaire model, quantity, three-dimensional spatial coordinates, installation height, orientation angle, and rated power. The physical optical parameter summary table records the total installed luminous flux, scene average illuminance, design color temperature, maximum uniform glare value, and brightness uniformity.

5. A method for intelligently generating AI night scene renderings based on physical optics, applicable to the AI ​​night scene rendering intelligent generation system based on physical optics as described in any one of claims 1-4, characterized in that: Includes the following steps: S1. Obtain the 3D geometric model of the scene to be illuminated and the physically based rendering surface material properties; S2. Obtain the lighting layout scheme and corresponding physical and optical parameters, including the light distribution curve file conforming to the IESNA LM-63 standard format, color temperature, luminous flux, beam angle and color rendering index; S3. Encode the physical optical parameters into a conditional constraint vector, which includes a light distribution curve feature vector, an illuminance distribution condition representation, a color temperature field condition representation, and a unified glare value constraint representation. S4. Construct a physical optical parameter constraint space, and map the conditional constraint vectors to the conditional latent space of the generative artificial intelligence model through a constraint space mapping network, so that the physical optical parameters and the noise latent space of the generative artificial intelligence model establish a cross-attention interaction interface. S5. During the noise reduction and diffusion generation process, the physical optical parameter constraints of the conditional latent space are embedded into the generative artificial intelligence model through a cross-attention layer and an adaptive instance normalization layer to generate a night scene effect image that conforms to the physical optical parameter constraints. S6. Input the generated night scene rendering and the corresponding scene geometric parameters and lighting parameters into the physical simulation engine, perform forward physical rendering based on ray tracing or path tracing, and extract illuminance distribution, brightness distribution, uniform glare value and brightness uniformity index to perform optical accuracy verification. S7. Calculate the overall deviation between the generated result and the physical optical parameters, wherein the overall deviation includes illuminance deviation, color temperature deviation, uniform glare value deviation and brightness uniformity deviation; S8. Generate a feedback signal based on the comprehensive deviation, and iteratively optimize the generated result through conditional injection weight adaptive adjustment and post-processing tone mapping calibration until the comprehensive deviation meets the preset convergence condition. S9. Output night scene renderings and lighting design parameter reports that conform to physical optical parameter constraints.

6. The AI-based night scene rendering intelligent generation method based on physical optics according to claim 5, characterized in that: The process of obtaining the luminaire layout scheme and corresponding physical and optical parameters includes parsing the light distribution curve file conforming to the IESNA LM-63 standard format, extracting the light intensity distribution matrix of the luminaire at the vertical and horizontal angles, and converting the discrete sampling data into a continuous light intensity distribution function through bilinear interpolation.

7. The AI-based night scene rendering intelligent generation method based on physical optics according to claim 6, characterized in that: The process of encoding physical optical parameters into conditional constraint vectors includes expanding the light intensity distribution function into a compact light distribution curve feature vector using spherical harmonic functions. The spherical harmonic function expansion is achieved by projecting the light intensity distribution function onto spherical harmonic basis functions to obtain expansion coefficients, and then truncating it to a finite order to form the light distribution curve feature vector. Based on the luminaire layout scheme and the light distribution curve, the target illuminance distribution is calculated. The target illuminance distribution is mapped into an illuminance distribution condition map that matches the resolution of the output night scene effect image, and encoded into the illuminance distribution condition representation using a convolutional neural network. A color temperature distribution map is generated based on the color temperature parameters and spatial positions of each luminaire. The color temperature distribution map is mapped into a color condition field through a color temperature to CIE chromaticity coordinate conversion, and encoded into the color temperature field condition representation using a convolutional neural network.

8. The AI-based night scene rendering intelligent generation method based on physical optics according to claim 5, characterized in that: The process of generating a night scene effect image that conforms to physical optical parameter constraints during the denoising and diffusion generation includes adopting a multi-scale progressive generation strategy. Different granular physical optical parameter constraints are gradually injected at different stages of denoising. The multi-scale progressive generation strategy includes at least an overall atmosphere generation stage, a local illumination generation stage, and a light source precision generation stage. The constraint conditions of each stage are dynamically switched through a stage function. The process of generating a denoising and diffusion also includes introducing a physical consistency regularization loss to constrain the generation process. The physical consistency regularization loss includes illuminance consistency loss, color temperature consistency loss, and energy conservation loss. The sub-losses are combined by weighting to form a total physical consistency loss.

9. The AI-based night scene rendering intelligent generation method based on physical optics according to claim 5, characterized in that: The forward physical rendering based on ray tracing or path tracing includes using the Monte Carlo path tracing algorithm to perform physically accurate optical simulation of the scene's 3D geometry, physically based rendering surface materials, lighting spatial positions, and light distribution curves. Radiance is calculated through pixel-by-pixel multisampling and multi-importance sampling, and a physical reference rendering map, pixel-by-pixel illuminance distribution map, and luminance distribution map are output.

10. The AI-based night scene rendering intelligent generation method based on physical optics according to claim 5, characterized in that: The overall deviation between the calculated result and the physical optical parameters includes deviations in illuminance, color temperature, uniform glare, and brightness uniformity as sub-items. The overall deviation is calculated by weighted summation. Each sub-item deviation is calculated as the relative error between the generated result and the physical simulation result. The optimization of the generated result through conditional injection weight adaptive adjustment and post-processing calibration iteratively includes calculating each sub-item deviation and identifying the dominant deviation factors, adaptively adjusting the conditional injection weights of the corresponding physical parameters, performing pixel-by-pixel gain map illuminance calibration and color temperature white balance adjustment on the generated image, and re-executing the night scene effect image generation, physical simulation verification, and deviation calculation until the overall deviation meets the convergence condition or reaches the maximum number of iterations.

Citation Information

Patent Citations

  • Digital urban building night scene generation method and system based on AI construction

    CN112507444A