A method and system for three-dimensional spatial shadow ratio analysis

By converting the analysis area into a three-dimensional voxel sampling space and using shadow maps to determine and accumulate the lighting status at multiple time slices, the problem of difficulty in expressing shadow rate differences in three-dimensional geospatial analysis is solved, achieving efficient shadow rate analysis and visualization.

CN123181697APending Publication Date: 2026-11-27XIAMEN JIEN TUZAO INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611430352.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-15
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies are insufficient to effectively represent the differences in shadow rates at different height levels and spatial locations in three-dimensional geospatial analysis, and cannot accurately answer the proportion of a spatial point covered by shadow within a specific time period.

Method used

The analysis area is converted into a three-dimensional voxel sampling space. The lighting state is determined at multiple time slices using shadow maps, and the spatial shadow rate of the three-dimensional voxel unit is determined by the accumulated results of off-screen textures.

Benefits of technology

It enables shadow rate analysis at any location in three-dimensional space, improving analysis accuracy and efficiency, and supports interactive shadow rate query and visualization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123181697A_ABST
    Figure CN123181697A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of three-dimensional geographic space information analysis, in particular to a three-dimensional space shadow rate analysis method and system, which comprises the following steps: acquiring a user-specified analysis area and an analysis time period; converting the analysis area into a three-dimensional voxel sampling space, generating a plurality of three-dimensional voxel units, and assigning corresponding texture coordinates to each three-dimensional voxel unit; advancing a plurality of time slices according to time steps within the analysis time period, and determining the light-receiving state of each three-dimensional voxel unit by using a shadow map of a three-dimensional scene under each time slice; accumulating the determination results of each time slice in an off-screen texture by time slice; and determining the spatial shadow rate of each three-dimensional voxel unit within the analysis time period according to the accumulation results. The application advances a plurality of time slices according to time steps within the analysis time period and determines the light-receiving state by using a shadow map, which converts the shadow map into a cross-time-slice accumulation analysis tool, and can obtain the proportion of a space point covered by a shadow within a specified time period.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of three-dimensional geospatial information analysis technology, and in particular to a three-dimensional spatial shadow rate analysis method and system. Background Technology

[0002] In three-dimensional geospatial applications such as urban design, building shading assessment, park planning, public space comfort analysis, and facility site selection, understanding the shadow distribution of a spatial area on a specified date and time period is of significant practical importance. Traditional solar radiation analysis schemes often use surface pixels or a certain horizontal plane as the analysis object, outputting a two-dimensional solar radiation duration distribution map, which is difficult to express the differences in shadow rate at different heights and spatial locations within the analysis area.

[0003] Existing technologies include schemes that accumulate solar irradiance frame-by-frame using a graphics processor's frame buffer. This approach sets solar irradiance analysis time information in a 3D Earth engine, calculates the solar irradiance of surface pixels in the analysis area frame-by-frame using the graphics processor, accumulates the solar irradiance for each frame, and saves it to the frame buffer using color channel encoding, ultimately outputting a two-dimensional solar irradiance duration analysis map. However, this type of scheme analyzes pixels on a two-dimensional surface area, and the output is a two-dimensional distribution map without height dimension information. It cannot answer the three-dimensional spatial analysis question of "the proportion of a spatial point covered by shadow within a specific time period."

[0004] Furthermore, shadow mapping is a mature shadow rendering technique in computer graphics. Existing technologies include schemes that use it for single-frame viewpoint analysis or video fusion occlusion determination. However, the shadow mapping in these schemes only serves single-frame determination or rendering effects and lacks the ability to accumulate shadow states across multiple time slices. Voxel sampling technology has been applied in areas such as stereo matching and point cloud processing, but it has not been organically integrated with solar time series, shadow mapping, and geospatial analysis region clipping techniques.

[0005] Therefore, how to extend the object of sunlight / shade analysis from a two-dimensional plane to a three-dimensional voxel space, and use shadow maps to efficiently determine and accumulate the light-receiving state at multiple time slices, so as to realize the time-period shadow rate analysis at any location in three-dimensional space, is a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0006] The objective of this application is to provide a method for analyzing three-dimensional spatial shadow rate, comprising: acquiring a user-specified analysis area and analysis time period; converting the analysis area into a three-dimensional voxel sampling space, generating multiple three-dimensional voxel units, and assigning corresponding texture coordinates to each three-dimensional voxel unit; advancing multiple time slices according to a time step within the analysis time period, and determining the lighting state of each three-dimensional voxel unit using the shadow map of the three-dimensional scene in each time slice; accumulating the determination results of each time slice in an off-screen texture time slice by time slice; and determining the spatial shadow rate of each three-dimensional voxel unit within the analysis time period based on the accumulated results.

[0007] By adopting the above technical solution, the analysis area is transformed into a three-dimensional voxel sampling space, expanding the basic unit of shadow analysis from two-dimensional pixels to three-dimensional voxel units, which can express the differences in shadow rate at different heights and spatial locations within the analysis area. By assigning texture coordinates to each three-dimensional voxel unit, a correspondence between three-dimensional space and two-dimensional texture space is established, enabling the parallel computing capabilities of the graphics processor to be applied to voxel-level shadow analysis. By advancing multiple time slices according to the time step within the analysis period and using shadow maps to determine the lighting state, the shadow map is transformed from a single-frame rendering tool into a cumulative analysis tool across time slices, which can obtain the proportion of a spatial point covered by shadow within a specified time period.

[0008] Optionally, converting the analysis region into a three-dimensional voxel sampling space includes: converting the analysis region into a binary clipped texture; generating a three-dimensional sampling mesh in the width, depth, and height directions within the bounding space of the analysis region; determining whether each sampling point is located within the analysis region by sampling the binary clipped texture; and identifying only sampling points located within the analysis region as valid voxel units.

[0009] By adopting the above technical solution, the analysis area is transformed into a binary clipped texture, and the sampling point is determined to be within the area by texture sampling during the voxel generation stage. Regular voxel meshes can be generated efficiently within the analysis area of ​​irregular polygons, retaining only the effective voxel units inside the area, thus avoiding the waste of computational resources caused by generating invalid voxels outside the analysis area.

[0010] Optionally, converting the analysis region into a three-dimensional voxel sampling space includes: establishing a local East-North-Sky coordinate system based on the reference point of the analysis region; converting the vertex coordinates of the analysis region from world coordinates to local planar coordinates under the local East-North-Sky coordinate system; and generating a regular three-dimensional voxel mesh under the local East-North-Sky coordinate system according to preset voxel width, voxel depth, and voxel height parameters.

[0011] By adopting the above technical solution, a local East-North-Sky coordinate system is established and coordinate transformation is performed, so that the voxel mesh is generated under a regular local planar coordinate system. This avoids the influence of the curvature and non-uniformity of the geographic coordinate system on the consistency of voxel size, ensuring that voxels have uniform physical size in the three dimensions of width, depth and height, thereby improving the accuracy of spatial shadow rate analysis.

[0012] Optionally, the three-dimensional voxel unit is expressed in the form of point voxels or cube voxels, and each three-dimensional voxel unit includes spatial coordinates, voxel index, texture coordinates and display attributes.

[0013] Optionally, assigning corresponding texture coordinates to each of the three-dimensional voxel units includes: assigning a unique voxel index to each effective voxel unit according to the index positions of the three-dimensional voxel units in the width, depth, and height directions; and assigning corresponding two-dimensional normalized texture coordinates to each effective voxel unit based on the voxel index, thereby establishing a one-to-one correspondence between the three-dimensional voxel spatial position and the off-screen texture pixel position.

[0014] By adopting the above technical solution, a unique voxel index and corresponding two-dimensional texture coordinates are assigned to each effective voxel unit, establishing a precise one-to-one correspondence between the three-dimensional voxel spatial position and the off-screen texture pixel position. This enables the writing of shadow judgment results, the cumulative reading of shadow rate data, voxel shading rendering, and spatial point query to all share the same data representation, ensuring the consistency and traceability of data between each processing stage.

[0015] Optionally, the step of advancing multiple time slices according to a time step within the analysis period, and determining the lighting status of each three-dimensional voxel unit using the shadow map of the three-dimensional scene in each time slice, includes: determining the total number of time slices based on the analysis start time, analysis end time, and the time step; advancing the current time of the three-dimensional scene sequentially according to the time step, and updating the sun direction and shadow map; projecting the center sampling point of each three-dimensional voxel unit onto the shadow map space of the current time slice in each time slice; determining the lighting status of the three-dimensional voxel unit in the current time slice by depth comparison, and obtaining a lighting determination value.

[0016] By adopting the above technical solution, the lighting determination value of each 3D voxel unit in each time slice is obtained by determining the number of time slices, advancing scene time, updating shadow maps, and comparing projection depth. The lighting / occlusion binary determination is performed by using the depth comparison mechanism of the shadow map, which has native hardware support of the graphics processor and has high determination efficiency.

[0017] Optionally, the step of accumulating the determination results of each time slice in the off-screen texture time slice by time slice includes: accumulating the light-receiving determination value of each three-dimensional voxel unit in each time slice at the corresponding pixel position of the off-screen texture time slice by time slice; saving the cumulative value in floating-point format in the off-screen texture through RGBA color channel encoding; calculating the cumulative light-receiving rate of each three-dimensional voxel unit according to the traversal results of all time slices, and obtaining the corresponding spatial shadow rate from the cumulative light-receiving rate.

[0018] By adopting the above technical solution, the cumulative value in floating-point format is saved in the off-screen texture through RGBA color channel encoding, which enables the cumulative calculation of time slices to be completed directly on the graphics processor side, avoiding the data transmission bottleneck caused by sending intermediate results back to the central processing unit.

[0019] Optionally, it further includes: binding the spatial shading rate data of each of the three-dimensional voxel units to the voxel rendering pipeline; performing color mapping based on the spatial shading rate value of each of the three-dimensional voxel units to perform shading rendering of the three-dimensional voxel units; and supporting the filtering display of the three-dimensional voxel units according to the height layer range or shading rate threshold.

[0020] By adopting the above technical solution, the shadow rate data is bound to the voxel rendering pipeline and color-mapped, so that the three-dimensional spatial shadow rate distribution can be presented in an intuitive three-dimensional voxel form. It supports height layer filtering and shadow rate threshold filtering, which makes it easy for users to observe the distribution of different spatial layers or areas with different shadow levels, and meets the interactive analysis needs in practical engineering applications.

[0021] Optionally, it further includes: receiving a user's picking operation on any point in the three-dimensional space as a picking point; converting the spatial coordinates of the picking point to the same coordinate space as the three-dimensional voxel unit; finding the three-dimensional voxel unit adjacent to the picking point, reading the cumulative shadow rate value corresponding to the adjacent three-dimensional voxel unit from the off-screen texture, and outputting the query result.

[0022] By adopting the above technical solution, the system receives the user's spatial point picking operation and searches for the cumulative shadow rate value of neighboring voxel units, realizing the shadow rate query capability at any position in three-dimensional space. This makes the analysis results not only globally visible but also allow for precise point location queries.

[0023] The second objective of this application is to provide a three-dimensional spatial shadow rate analysis system, characterized by comprising multiple functional modules configured to execute the aforementioned method. These functional modules include at least: a region drawing module configured to acquire a user-specified analysis region; a time parameter module configured to acquire a user-specified analysis time period, including the analysis date, start time, end time, and time step; a spatial sampling parameter module configured to acquire voxel generation parameters, including voxel width, voxel depth, and voxel height; and a voxel generation module configured to convert the analysis region into a three-dimensional voxel sampling space. Multiple three-dimensional voxel units are generated, and corresponding texture coordinates are assigned to each three-dimensional voxel unit; a solar time progression module is configured to advance multiple time slices according to time steps within the analysis period and update the solar direction of the three-dimensional scene; a shadow map determination module is configured to determine the lighting state of each three-dimensional voxel unit using the shadow map of the three-dimensional scene in each time slice; an off-screen texture accumulation module is configured to accumulate the determination results of each time slice in the off-screen texture time slice by time slice; and a shadow rate calculation module is configured to determine the spatial shadow rate of each three-dimensional voxel unit within the analysis period based on the accumulation results. Attached Figure Description

[0024] Figure 1 This is a schematic diagram of the three-dimensional spatial shadow rate analysis method of this application.

[0025] Figure 2 This is a block diagram of a three-dimensional spatial shadow rate analysis system according to this application. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0027] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0028] In this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0029] The technical problem addressed in this application stems from practical needs in 3D geospatial information analysis scenarios. In applications such as urban design, building occlusion assessment, park planning, and facility site selection, users often need to understand the shadow distribution of a spatial area within a specified date and time period. If the analysis tool can only output a 2D map of the surface sunshine duration, it cannot provide effective answers to questions such as "how long are spatial points at a certain height covered by shadows?" or "what are the differences in shadow rates at different heights?" This leads to the consideration: can the basic unit of shadow analysis be extended from 2D surface pixels to voxels in 3D space, so that the analysis results can not only express surface information but also cover the shadow distribution at different heights above the surface? Following this direction, this application proposes an approach that first converts the analysis area specified by the user in the geospatial scene into a three-dimensional voxel sampling space, making each three-dimensional voxel unit an independent analysis object; then, within the analysis period set by the user, multiple time slices are advanced according to the time step, and the lighting status of each three-dimensional voxel unit is determined using the existing shadow map of the 3D rendering engine in each time slice; the determination results of each time slice are continuously accumulated in the off-screen texture, and finally the spatial shadow rate of each three-dimensional voxel unit in the entire analysis period is obtained.

[0030] like Figure 1 As shown in the figure, this application discloses a three-dimensional spatial shadow rate analysis method, which includes the following steps.

[0031] In this embodiment, the method can run in a computing environment equipped with a 3D rendering engine. This computing environment can be a browser-based 3D geospatial application or a desktop-based 3D geographic information system. The 3D rendering engine is responsible for scene rendering, simulation of sunlight, and generation and updating of shadow maps. The 3D geospatial scene data that needs to be analyzed for shadows has already been loaded into this 3D rendering engine.

[0032] At the user operation level, users first specify the analysis area in the 3D scene. This area can be a polygon boundary drawn by the user using interactive drawing tools, or a preset area selected from existing data. Users also specify the analysis period through the time parameter configuration interface, which can include parameters such as the analysis date, start time, end time, and time step. Furthermore, users can specify voxel generation parameters through the spatial sampling parameter configuration interface. These parameters can include voxel width, voxel depth, and voxel height; voxel width and depth determine the spacing of the sampling grid in the horizontal direction, while voxel height determines the spacing of the sampling grid in the vertical direction.

[0033] After obtaining the user-specified analysis area and analysis period, the analysis area can be converted into a 3D voxel sampling space. Within the space defined by the analysis area, a 3D sampling mesh is generated according to preset voxel size parameters. Each sampling unit in the mesh is a 3D voxel unit. Each 3D voxel unit can be expressed as a point voxel or a cube voxel. A point voxel is represented by a spatial sampling point, which represents the center position of the voxel. A cube voxel is represented by a small cube, which represents the spatial range occupied by the voxel. Each 3D voxel unit contains its own spatial coordinates, which are generally the position of the voxel's center sampling point in 3D space. The system can assign a unique voxel index and texture coordinates to each validly generated 3D voxel unit. The voxel index is used to uniquely identify the 3D voxel unit in the 3D voxel set. The texture coordinates are two-dimensional normalized coordinates used to locate the pixel position corresponding to the 3D voxel unit in subsequent off-screen accumulated textures.

[0034] After voxel generation is complete, the total number of time slices to be processed is determined based on the analysis start time, analysis end time, and the set time step. Within each time slice, the system first updates the current time of the 3D scene, adjusting the sun's position and lighting conditions to match the state at that time slice. Correspondingly, the 3D rendering engine updates the shadow map for that moment. This shadow map can be a scene depth map generated from the perspective of the light source (i.e., the sun's position at the current moment), recording the shallowest depth information of each pixel visible from the light source's perspective. Subsequently, the lighting state of each 3D voxel unit is determined. For the center sampling point of each 3D voxel unit, the spatial coordinates of the sampling point are projected onto the shadow map space of the current time slice, obtaining the pixel position and depth value corresponding to the sampling point in the shadow map. By comparing the depth of the sampling point from the light source's perspective with the depth value stored in the corresponding pixel in the shadow map, it is determined whether the sampling point is in a lit state or an occluded state in that time slice.

[0035] Off-screen texture is a texture storage area allocated on the graphics processor side. Intermediate results of accumulated calculations can be written to it via framebuffer objects. The illumination determination result for a given time slice can be accumulated in the off-screen texture. Each 3D voxel unit has a unique corresponding pixel position in the off-screen texture, determined by the texture coordinates previously allocated to the 3D voxel unit. During the traversal of each time slice, the system continuously accumulates the illumination determination value of each 3D voxel unit to that pixel position. After all time slices have been traversed, the off-screen texture stores the cumulative illumination count of each 3D voxel unit throughout the entire analysis period. Based on the relationship between the cumulative illumination count and the total number of time slices, the cumulative illumination rate of each 3D voxel unit is determined. From the cumulative illumination rate, the corresponding spatial shading rate can be obtained. The spatial shading rate characterizes the proportion of time that the 3D voxel unit is in shadow during the analysis period.

[0036] After obtaining the spatial shadow rate of each 3D voxel unit, the system can bind the spatial shadow rate data to the 3D voxel rendering pipeline for visualization. Color mapping is performed based on the spatial shadow rate value of each 3D voxel unit. For example, voxels with higher shadow rates are displayed with darker colors, and voxels with lower shadow rates are displayed with lighter colors, allowing users to intuitively observe and analyze the differences in shadow rates at different spatial locations within a 3D scene.

[0037] After obtaining the user-specified analysis area, if voxels are generated directly in a geographic coordinate system such as latitude and longitude, the physical dimensions of voxels at different latitudes or projection positions may be inconsistent, thus affecting the accuracy of spatial shading rate analysis. Therefore, a local coordinate system can be established using a reference point of the analysis area, allowing subsequent voxel mesh generation to be performed in a regular local planar coordinate system without curvature. The voxels have uniform physical dimensions in the width, depth, and height directions. This reference point can be the geometric center of the analysis area, a vertex on the boundary of the analysis area, or a point specified by the user. This local coordinate system can be a local East-North-Sky coordinate system, where the local East-North-Sky coordinate system is a right-handed Cartesian coordinate system with the reference point as the origin, the east direction as the positive X-axis, the north direction as the positive Y-axis, and the zenith direction as the positive Z-axis. The system converts the coordinates of each vertex in the analysis area from world coordinates to coordinates in the local coordinate system. World coordinates can be Cartesian coordinates in the 3D rendering engine or geodetic coordinates after projection transformation. The coordinate transformation is completed by translation and rotation operations based on the reference point. The transformation result makes the analysis area located on or near the XY plane of the local coordinate system.

[0038] After completing the coordinate transformation, the analysis region is converted into a binary clipped texture, which can be read by the graphics processor. Specifically, the system maps the vertex coordinates of the analysis region to the texture space, assigns a first value indicating validity to pixels inside the analysis region, and assigns a second value indicating invalidity to pixels outside the analysis region.

[0039] Within the bounded space of the analysis region, the system generates a 3D sampling mesh according to preset voxel width, voxel depth, and voxel height parameters. The 3D sampling mesh covers the minimum and maximum values ​​of the analysis region in the local coordinate system X-axis direction in the width direction, the minimum and maximum values ​​of the analysis region in the local coordinate system Y-axis direction in the depth direction, and the range in the height direction starts from the analysis base height and extends upwards to the extrapolated height. The analysis base height can be the starting height of the analysis set by business requirements, or it can be determined according to the scene terrain or building base height. The extrapolated height can be the total analysis height range set by the user or preset by the system. The voxel width, voxel depth, and voxel height determine the mesh spacing in the three directions, respectively.

[0040] During the generation of the 3D sampling mesh, for each sampling point in the mesh, the system determines whether the sampling point is located inside the analysis region by sampling the previously generated binary clipping texture. The sampling operation is performed with the local XY plane coordinates of the sampling point corresponding to the texture coordinates in the binary clipping texture. If the sampling result is a valid first value, it indicates that the sampling point is located within the analysis region, and the system determines the sampling point as a valid voxel unit. If the sampling result is an invalid second value, it indicates that the sampling point is located outside the analysis region, and the system discards the sampling point and does not generate the corresponding voxel unit.

[0041] For each valid voxel unit, the system assigns a voxel index and texture coordinates. The voxel index is assigned uniquely based on its index position in the width, depth, and height directions. For example, the width index can be denoted as `iw`, the depth index as `id`, and the height index as `ih`, and a globally unique voxel index is obtained by combining these indices. The texture coordinates are assigned according to the voxel index, with corresponding two-dimensional normalized texture coordinates. These coordinates uniquely correspond to a pixel position in the off-screen cumulative texture, used to read and write the cumulative shadow data corresponding to that voxel unit at that location. Since the texture coordinates of each valid voxel unit correspond one-to-one with the voxel index, and the voxel index corresponds one-to-one with the three-dimensional spatial position of the voxel unit, a precise correspondence is established between the three-dimensional voxel spatial position and the two-dimensional off-screen texture pixel position.

[0042] It should be noted that in the processing of the height direction, the texture coordinates of each voxel layer in the height direction can be mapped to different rows or columns of the two-dimensional texture according to certain arrangement rules. In other words, the layout of the two-dimensional off-screen texture is to expand the three-dimensional voxel mesh in the height direction so that the two-dimensional texture can accommodate all the accumulated data positions of the entire three-dimensional voxel set. The specific arrangement rules can be adaptively set according to the size of the voxel mesh and the maximum size of the texture during implementation.

[0043] After voxel generation is complete and the texture coordinates of each effective voxel unit are obtained, the system enters a time-slice processing loop. The total number of time slices is determined based on the user-specified analysis start time, analysis end time, and time step. The time step represents the time interval between two adjacent time slices. The total number of time slices is determined by dividing the difference between the analysis end time and the analysis start time by the time step, rounding the quotient, and adding one. This ensures that the first time slice corresponds to the analysis start time, and the last time slice corresponds to the analysis end time or the nearest time step position before the analysis end time. For example, if the analysis start time is 8:00 AM, the analysis end time is 5:00 PM, and the time step is 10 minutes, the total number of time slices calculated by the system ensures that all integer time steps, from 8:00 AM, 8:10 AM, 8:20 AM, up to 5:00 PM, are covered.

[0044] Within each time slice, the system first advances the current time of the 3D scene to the corresponding moment of that time slice. As the scene time progresses, the position of the sun in the scene changes according to the analyzed date and time, and the sun's direction changes accordingly. The 3D rendering engine updates the shadow map based on the new sun direction. The shadow map update process includes: the rendering engine uses the current position of the sun light source as the viewpoint, renders the depth information of the entire scene, and generates a depth map viewed from the light source's perspective, i.e., the shadow map. Each pixel in the shadow map stores the depth value of the nearest geometric surface encountered by a ray emanating from the light source position along the direction corresponding to that pixel.

[0045] After the shadow map is updated, the lighting state of each valid voxel is determined. This determination is performed independently for each voxel, with no dependencies between different voxels, allowing for highly parallel execution on the graphics processor. For a given voxel, the system takes the 3D spatial coordinates of its center sampling point and projects these coordinates onto the shadow map space of the current time slice. The projection process involves transforming the voxel sampling point from world coordinates to the light source clipping space from the light source's viewpoint, followed by perspective division and viewport transformation to obtain the texture coordinates and depth value in the shadow map. This depth value represents the distance between the voxel sampling point and the light source from the light source's perspective. Subsequently, the system samples the shadow map using the projected texture coordinates and reads the depth value stored at that location. This depth value represents the distance from the light source's viewpoint, along that direction, to the nearest geometric surface in the scene.

[0046] The system compares the depth value of the voxel sampling point with the depth value sampled from the shadow map. A depth bias is introduced during this comparison; this bias is a non-negative numerical correction to avoid erroneous judgments due to numerical precision or geometric discretization. If the depth value of the voxel sampling point minus the depth bias is not greater than the depth value of the corresponding pixel in the shadow map, it indicates that the voxel sampling point is not occluded by other geometry from the light source's perspective and is in a lit state at that time slice. The lit state determination value is a value representing being lit. Conversely, if the depth value of the voxel sampling point minus the depth bias is greater than the depth value of the corresponding pixel in the shadow map, it indicates that other geometry is between the light source and the voxel sampling point, and the voxel sampling point is in an occluded state at that time slice. The lit state determination value is a value representing occlusion. The values ​​representing being lit and occlusion can be 1 and 0 respectively, or other binary representations can be used.

[0047] After completing the illumination determination for all voxel units in each time slice, the system accumulates the determination results for that time slice into an off-screen texture, which is initialized to zero before the time slice loop begins. At the end of each time slice, the system increments the illumination determination value for that time slice at the corresponding pixel position in the off-screen texture based on the texture coordinates previously assigned to each voxel unit. This incrementing operation can be performed directly on the graphics processor without sending intermediate results back to the central processing unit. After traversing all time slices, the value stored in each pixel of the off-screen texture represents the cumulative number of illuminations received by the corresponding voxel unit during the analysis period.

[0048] The system calculates the cumulative light exposure rate of each voxel unit based on the ratio of the cumulative number of light exposures to the total number of time slices. The cumulative light exposure rate is a value between 0 and 1, representing the proportion of time the voxel unit is in a lit state during the analysis period. The corresponding spatial shading rate is 1 minus the cumulative light exposure rate, representing the proportion of time the voxel unit is in a shaded state during the analysis period. In practice, the cumulative light exposure rate can be first encoded as RGBA color channel values ​​and stored in an off-screen texture. When needed, it is decoded back to a numerical value. By using the four RGBA color channels to store different bytes or bit segments of the floating-point number, a high-precision cumulative result can be stored within a single texture pixel.

[0049] In other implementations, in addition to simply accumulating the light-receiving determination values ​​in the off-screen texture, the determination result sequence for each time slice can be recorded in the off-screen texture instead of simply accumulating values. For example, the determination results for different time slices can be recorded in different color channels or different pixels of the texture using a bitmask method. In this way, when it is necessary to analyze the shadow rate in any sub-interval of any time period, it is only necessary to read the determination result sequence of the corresponding interval for statistics, without having to re-execute the entire time slice loop.

[0050] After completing the traversal of all time slices and obtaining the spatial shadow rate of each voxel unit, the system binds the shadow rate data to the voxel rendering pipeline. The binding process uses the off-screen texture as a data source for voxel rendering. When rendering each voxel unit, the shader in the voxel rendering pipeline looks up the corresponding cumulative shadow rate value in the off-screen texture using the texture coordinates of that voxel unit. The shader then determines the final display color and transparency of that voxel unit on the screen based on the found shadow rate value.

[0051] For color mapping, a color banding method can be used. Color banding maps the shading rate range of 0 to 1 onto a continuous color band, with the two ends corresponding to low and high shading rates, and a gradient in the middle. For example, voxels with low shading rates can be mapped to light or warm colors, and voxels with high shading rates can be mapped to dark or cool colors, thus creating an intuitive shading rate distribution map in the 3D scene. The specific color banding scheme can be set according to the needs of the business scenario.

[0052] In terms of transparency control, the display transparency of voxels can be adjusted according to the shadow rate value. Voxels with higher shadow rates can be given higher transparency values, making them more visually prominent; voxels with lower shadow rates can be given lower transparency values ​​or even be completely transparent, making them visually weaker or hidden. In this way, the observer can focus on seeing the spatial areas with a high degree of shadow accumulation in the 3D scene.

[0053] In this embodiment, the system also supports filtering voxel units based on height layer range or shadow rate threshold. Height layer filtering allows the user to set a height range, and the system only displays voxel units whose spatial coordinates fall within that range in the height direction, while hiding voxel units at other height layers. By adjusting the height layer filtering range, the user can observe the shadow rate distribution at different heights within the analysis area layer by layer. Shadow rate threshold filtering allows the user to set a shadow rate threshold, and the system only displays voxel units with a shadow rate greater than or equal to that threshold, while hiding voxel units with a shadow rate lower than that threshold. By adjusting the shadow rate threshold, areas where shadow accumulation reaches a certain level during the analysis period can be filtered out, thereby quickly identifying spaces with high shadow rates.

[0054] For voxel unit rendering, the system supports two methods: point voxel rendering and cube voxel rendering. In point voxel rendering, each voxel unit is displayed as a point or small circle in screen space. The color and transparency of the point are determined by the voxel unit's shading rate. This method requires less computation and is suitable for large-scale scenes with a large number of voxels. In cube voxel rendering, each voxel unit is rendered as a 3D cube. The cube's size is equal to the set values ​​for voxel width, depth, and height. All six faces of the cube can be shaded, and the color of each face can be uniformly mapped to the voxel unit's shading rate. Cube voxel rendering provides a more three-dimensional and intuitive effect, but the rendering overhead is relatively higher.

[0055] In terms of interactive queries, the system can receive user clicks on any point in 3D space. Users select a spatial location in the 3D scene via mouse clicks or other interactive methods, and the system obtains the spatial coordinates of that point. The system then transforms these coordinates to the same coordinate space as the voxel unit, i.e., to the previously established local coordinate system. Within this local coordinate system, the system searches for voxel units adjacent to the point. Proximity can be defined using a spatial distance threshold; for example, selecting the voxel unit with the smallest spatial distance from the point, or selecting voxel units located within the voxel mesh containing the point. Upon a match, the system reads the cumulative shadow rate value corresponding to the voxel unit from the off-screen texture based on its texture coordinates. The system then organizes the obtained shadow rate result along with the voxel unit's spatial coordinates, voxel index, and other information into a query result, which is returned and displayed to the user.

[0056] In the voxel generation stage, besides using point voxels or cubic voxels for representation, voxel units can also adopt other three-dimensional spatial discrete unit shapes. In one implementation, sampling points in the height direction can be set with different densities; for example, for height layers near the ground, smaller voxel heights can be used to improve vertical resolution; for higher height layers, larger voxel heights can be used to reduce computational overhead. This non-uniform voxel height setting can retain higher analysis accuracy in areas with drastic changes in ground shadows, and save computational resources in areas with gentle changes in high-level spatial shadows. The voxel height parameters for each height layer can be pre-set by the user through the spatial sampling parameter configuration interface.

[0057] In the coordinate transformation process, in addition to using a local coordinate system with the three directions of East, North, and Sky as axes, a local coordinate system with a custom direction can also be established according to the spatial orientation of the analysis area. For example, if the analysis area is long and narrow and its major axis is at an angle to the due East and due North directions, the X-axis or Y-axis of the local coordinate system can be set to be parallel to the major axis of the area, so that the arrangement direction of the voxel mesh is aligned with the direction of the area, reducing invalid sampling of edge voxels. The custom direction can be specified by the user or determined by the system after automatically calculating its main direction based on the vertex shape of the analysis area.

[0058] In the shadow map determination stage, besides using depth comparison to determine the lighting status of voxel sampling points, other information in the shadow map can also be combined for determination. In 3D rendering engines, the accuracy and coverage of shadow maps may be affected by the light source's frustum parameters. For voxel sampling points located outside the shadow map's coverage area, the system can use preset determination rules, such as directly classifying them as lit or occluded, or interpolating based on the determination results of adjacent time slices. Furthermore, in the edge regions of the shadow map, due to limitations in depth sampling accuracy, discontinuities in the determination results may occur. The system can sample the shadow map multiple times during depth comparison and use the weighted average of the sampling results as the comparison basis to smooth the shadow determination results.

[0059] In the off-screen texture accumulation stage, the encoding method of the accumulation result in the off-screen texture can vary. In addition to encoding different parts of the floating-point number separately for the four RGBA channels mentioned above, a single-channel high-bit-depth texture format can also be used. For example, a 32-bit floating-point single-channel texture can be used to directly store the floating-point value of the accumulated light reception count or accumulated light reception rate. If the texture format supported by the graphics processor allows it, this method can avoid the encoding and decoding process and directly read the floating-point value in the shader. If the graphics processor does not support floating-point textures, the RGBA multi-channel encoding method can continue to be used.

[0060] In the visualization rendering stage, in addition to color banding and transparency mapping, the real-time illumination status under the current time slice and the historically accumulated shadow rate results can be overlaid and displayed in the same scene. For example, for a specific moment currently selected, the system can render the voxel unit in the illuminated state at that moment with the first color or display style, and render the voxel unit in the occluded state with the second color or display style. At the same time, the long-term accumulated shadow rate distribution layer is overlaid in a semi-transparent manner, so that users can observe the sunlight occlusion at a certain instant and at the same time refer to the average shadow distribution trend over the entire analysis period.

[0061] In the spatial query process, in addition to single-point picking, the setting of the picking point can also support multi-point continuous query. Users can continuously move the query point along a spatial line segment or a spatial profile. The system will search for the neighboring voxel elements and read the shadow rate at each query point position, and finally return the shadow rate change curve or profile along the line segment or profile.

[0062] like Figure 2 As shown, this application embodiment also provides a three-dimensional spatial shadow rate analysis system. The three-dimensional spatial shadow rate analysis system includes multiple functional modules configured to perform the above-described three-dimensional spatial shadow rate analysis method. These functional modules include at least a region drawing module, a time parameter module, a spatial sampling parameter module, a voxel generation module, a solar time progression module, a shadow map determination module, an off-screen texture accumulation module, and a shadow rate calculation module.

[0063] The region drawing module is configured to acquire the user-specified analysis region, which can be a polygon boundary drawn by the user in the 3D scene using interactive drawing tools or a preset region selected from existing data. The time parameter module is configured to acquire analysis period parameters, including the analysis date, analysis start time, analysis end time, and time step. The spatial sampling parameter module is configured to acquire voxel generation parameters, including voxel width, voxel depth, and voxel height.

[0064] The voxel generation module is configured to convert the analysis region into a 3D voxel sampling space, generate multiple 3D voxel units, and assign corresponding texture coordinates to each voxel unit. When generating voxel units, the module establishes a local coordinate system using the reference points of the analysis region, converts the vertex coordinates of the analysis region from world coordinates to coordinates in the local coordinate system, generates a 3D sampling mesh according to voxel width, voxel depth, and voxel height in the local coordinate system, and assigns a unique voxel index and corresponding 2D normalized texture coordinates to each valid voxel unit located within the analysis region.

[0065] The solar time progression module is configured to advance multiple time slices within the analysis period by time step, updating the sun direction of the 3D scene in each time slice and triggering shadow map updates. The shadow map determination module is configured to determine the lighting status of each voxel unit using the shadow map in each time slice. This is done by projecting voxel sampling points onto the shadow map space and performing depth comparisons to obtain the lighting determination value for each voxel unit in that time slice. The off-screen texture accumulation module is configured to accumulate the lighting determination results from each time slice in the off-screen texture time-slice by incrementing the lighting determination value at the corresponding pixel position in the off-screen texture. The shadow rate calculation module is configured to, after traversing all time slices, calculate the cumulative lighting rate of each voxel unit within the analysis period based on the accumulated results in the off-screen texture, and obtain the corresponding spatial shadow rate from the cumulative lighting rate.

[0066] In other embodiments, the system may further include one or more of a voxel shading module, a layered filtering module, and a spatial query module; the voxel shading module is configured to bind the spatial shading rate data of each voxel unit to the voxel rendering pipeline, perform color mapping based on the spatial shading rate value of each voxel unit, and perform shading rendering on the voxel unit; the layered filtering module is configured to support users in filtering the display of voxel units according to a height layer range or a shading rate threshold; the spatial query module is configured to receive the user's picking operation of any point in three-dimensional space, transform the spatial coordinates of the picked point to the same coordinate space as the voxel unit, find neighboring voxel units and read the cumulative shading rate value corresponding to the neighboring voxel unit from the off-screen texture, and output the query result.

[0067] It should be noted that the above division of modules is a logical division based on their functions. In actual deployment, multiple modules can be integrated into the same processing program or distributed in different processing units. For example, the coordinate transformation calculation in the voxel generation module can be performed by the central processing unit, while the depth comparison calculation in the shadow mapping determination module can be performed by the graphics processing unit. The two work together to complete the overall analysis process.

[0068] In the above embodiments, the descriptions of each embodiment have different focuses. Parts not described in detail in a particular embodiment can be referred to in the relevant descriptions of other embodiments. It is understood that the relevant features of the above methods and systems can be referenced interchangeably.

[0069] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A three-dimensional spatial shading rate analysis method, characterized in that, include: Obtain the analysis area and analysis period specified by the user; The analysis region is converted into a three-dimensional voxel sampling space, generating multiple three-dimensional voxel units, and each three-dimensional voxel unit is assigned a corresponding texture coordinate. During the analysis period, multiple time slices are advanced according to the time step, and the lighting status of each three-dimensional voxel unit is determined using the shadow map of the three-dimensional scene in each time slice; The determination results for each time slice are accumulated in the off-screen texture over time slices; The spatial shading rate of each of the three-dimensional voxel units during the analysis period is determined based on the cumulative results.

2. The method according to claim 1, characterized in that, The step of converting the analysis region into a three-dimensional voxel sampling space includes: The analysis region is converted into a binary cropped texture; A three-dimensional sampling grid is generated within the bounded space of the analysis region according to the width, depth, and height directions; For each sampling point, it is determined whether the sampling point is located within the analysis area by sampling the binary cropped texture; Only sampling points located within the analysis area are identified as valid voxel units.

3. The method according to claim 1, characterized in that, The step of converting the analysis region into a three-dimensional voxel sampling space includes: Establish a local East-North-Sky coordinate system using the reference point of the analysis area; Convert the vertex coordinates of the analysis region from world coordinates to local planar coordinates in the local East-North-Sky coordinate system; In the local East-North-Sky coordinate system, a regular three-dimensional voxel mesh is generated according to preset voxel width, voxel depth and voxel height parameters.

4. The method according to claim 1, characterized in that, The three-dimensional voxel unit is expressed in the form of point voxels or cube voxels, and each three-dimensional voxel unit includes spatial coordinates, voxel index, texture coordinates and display attributes.

5. The method according to claim 1, characterized in that, Assigning corresponding texture coordinates to each of the three-dimensional voxel units includes: Each valid voxel unit is assigned a unique voxel index according to its index position in the width, depth, and height directions. Based on the voxel index, a corresponding two-dimensional normalized texture coordinate is assigned to each valid voxel unit, establishing a one-to-one correspondence between the three-dimensional voxel spatial position and the off-screen texture pixel position.

6. The method according to claim 1, characterized in that, The process involves advancing multiple time slices according to a time step within the analysis period, and determining the lighting status of each 3D voxel unit using the shadow map of the 3D scene in each time slice, including: The total number of time slices is determined based on the analysis start time, analysis end time, and the time step. The current time of the 3D scene is advanced sequentially according to the stated time step, and the sun direction and shadow map are updated accordingly; At each time slice, the center sampling point of each of the three-dimensional voxel units is projected into the shadow map space of the current time slice; The illumination state of the three-dimensional voxel unit in the current time slice is determined by depth comparison, and the illumination determination value is obtained.

7. The method according to claim 6, characterized in that, The step of accumulating the determination results of each time slice in the off-screen texture time slice by time slice includes: The light-receiving determination value of each three-dimensional voxel unit at each time slice is accumulated at the corresponding pixel position of the off-screen texture time slice by time slice; The cumulative value in floating-point format is saved in the off-screen texture using RGBA color channel encoding. Based on the traversal results of all time slices, the cumulative light exposure rate of each three-dimensional voxel unit is calculated, and the corresponding spatial shading rate is obtained from the cumulative light exposure rate.

8. The method according to claim 1, characterized in that, Also includes: Bind the spatial shading rate data of each of the three-dimensional voxel units to the voxel rendering pipeline; Color mapping is performed based on the spatial shading rate value of each three-dimensional voxel unit, and the three-dimensional voxel unit is then shading and rendering. It supports filtering the display of the three-dimensional voxel units according to the height layer range or shadow rate threshold.

9. The method according to any one of claims 1 to 8, characterized in that, Also includes: Receive user's picking operation for any point in 3D space and use it as the picking point; Transform the spatial coordinates of the pickup point to the same coordinate space as the three-dimensional voxel unit; Locate the 3D voxel unit adjacent to the pickup point, read the cumulative shadow rate value corresponding to the adjacent 3D voxel unit from the off-screen texture, and output the query result.

10. A three-dimensional spatial shadow rate analysis system, characterized in that, This includes a plurality of functional modules configured to perform the method as described in any one of claims 1 to 9, said functional modules comprising at least: The region drawing module is configured to acquire the analysis region specified by the user; The time parameter module is configured to obtain the analysis period specified by the user, which includes the analysis date, start time, end time, and time step. The spatial sampling parameter module is configured to acquire voxel generation parameters, which include voxel width, voxel depth and voxel height. The voxel generation module is configured to convert the analysis region into a three-dimensional voxel sampling space, generate multiple three-dimensional voxel units, and assign corresponding texture coordinates to each three-dimensional voxel unit. The solar time advance module is configured to advance multiple time slices by time step within the analysis period and update the solar orientation of the three-dimensional scene; The shadow mapping determination module is configured to determine the lighting status of each three-dimensional voxel unit using the shadow mapping of the three-dimensional scene at each time slice; The off-screen texture accumulation module is configured to accumulate the judgment results of each time slice in the off-screen texture time slice by time slice; The shadow rate calculation module is configured to determine the spatial shadow rate of each of the three-dimensional voxel units during the analysis period based on the cumulative results.