Flow field data processing method and device

CN123012070APending Publication Date: 2026-10-30EVERYTHING MIRROR (SHANGHAI) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611378679.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-07
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

由于不同区域的数据相对独立,在靠近相邻区域的边界位置进行流场数据采样时,可供采样的数据可能存在不连续的情况,从而容易在区域交界位置出现水流状态突变或接缝

Benefits of technology

本公开示例实施例中提供的流场数据处理方法,通过获取针对目标区域的编辑轨迹,对编辑轨迹进行采样处理,并根据得到的多个轨迹采样点确定相应的方向信息,使针对目标区域的编辑操作能够进一步转换为具有空间位置对应关系的流场信息;在此基础上,根据轨迹采样点及其方向信息确定流场属性数据,使流场数据的生成能够与编辑轨迹相对应,从而使对目标区域流场状态的调整能够通过编辑过程反映至后续流场数据中,降低采用预先制作的固定流场资源时对反复修改和重新制作相应资源的依赖。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123012070A_ABST
    Figure CN123012070A_ABST
Patent Text Reader

Abstract

The present disclosure provides a flow field data processing method and device, and relates to the technical field of flow field data processing. The method comprises the following steps: obtaining an editing track for a target region and performing sampling processing to obtain a plurality of track sampling points and corresponding direction information; determining flow field attribute data based on the plurality of track sampling points and the corresponding direction information, and writing the flow field attribute data into corresponding flow field grid data of the target region; obtaining adjacent flow field data corresponding to a boundary region and a neighboring region of the target region, performing data writing on the boundary region based on the flow field grid data and the adjacent flow field data, and obtaining target flow field data; and generating a flow field diagram corresponding to the target region based on the target flow field data. The present disclosure can convert the editing track into continuous flow field data, and process the boundary region in combination with the flow field data of the neighboring region, thereby reducing the situation that the flow direction and other flow field attributes of different regions suddenly change, and improving the continuity and consistency of the flow field data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of flow field data processing technology, and more specifically, to a flow field data processing method and apparatus. Background Technology

[0002] In the construction and rendering of water scenes, it is usually necessary to use flow field information to describe the flow state of water at different locations, so as to represent the direction and speed of water flow in space and the differences between different water areas. As the coverage of 3D scenes expands and the morphology of water becomes increasingly complex, the amount of flow field information that needs to be processed increases accordingly, and the production, maintenance, and application of flow field data in different spatial areas also become more complex.

[0003] In related technologies, water surface flow fields are typically generated using pre-made textures or offline tools. When adjusting local flow conditions, it is often necessary to modify and output the corresponding flow field resources again, making it difficult to conveniently adjust the flow field during scene editing. Furthermore, when maintaining different flow field information such as flow direction, velocity, and water type using independent data, it is also necessary to handle the spatial location and data update relationships of each type of information separately, making the editing and maintenance process of flow field data quite cumbersome.

[0004] Furthermore, in large-scale scenarios, to facilitate data organization and loading, the scene is typically divided into multiple regions, with flow field information for each region stored separately. Since the data from different regions are relatively independent, when sampling flow field data near the boundaries of adjacent regions, the available data may be discontinuous, easily leading to abrupt changes or seams in the flow state at region boundaries. Therefore, how to improve the editing and maintenance methods of flow field data in large-scale scenarios and reduce the problem of discontinuity in flow field data at boundary locations under regional storage remains a problem that needs to be solved in related technologies.

[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0006] The purpose of this disclosure is to provide a flow field data processing method and apparatus that can convert edited trajectories into continuous flow field data and process boundary regions by combining flow field data from adjacent regions, thereby reducing abrupt changes in flow field attributes such as flow direction between different regions and improving the continuity and consistency of flow field data.

[0007] According to a first aspect of the present disclosure, a flow field data processing method is provided, comprising: The editing trajectory for the target area is obtained, the editing trajectory is sampled to obtain multiple trajectory sampling points, and the corresponding direction information is determined based on the multiple trajectory sampling points; Based on the multiple trajectory sampling points and the corresponding direction information, the flow field attribute data corresponding to the target area is determined, and the flow field attribute data is written into the flow field grid data corresponding to the target area. The boundary region corresponding to the target region is determined, and the adjacent flow field data corresponding to the adjacent region adjacent to the target region is obtained. Based on the flow field grid data and the adjacent flow field data, the boundary region is written with data to obtain the target flow field data after boundary processing. A flow field map corresponding to the target region is generated based on the target flow field data.

[0008] In one exemplary embodiment of this disclosure, the step of sampling the edited trajectory to obtain multiple trajectory sampling points, and determining the corresponding direction information based on the multiple trajectory sampling points, includes: Obtain multiple trajectory control points corresponding to the edited trajectory, and construct a spline curve based on the multiple trajectory control points; Based on the time and distance corresponding to the edit trajectory, the edit trajectory is resampled to obtain the plurality of trajectory sampling points; The tangent information of the spline curve at each of the trajectory sampling points is determined, and the direction information corresponding to each of the trajectory sampling points is determined based on the tangent information.

[0009] In an exemplary embodiment of this disclosure, determining the corresponding direction information based on the plurality of trajectory sampling points includes: Obtain the specified direction parameters set for the edited trajectory; Based on the specified direction parameters, corresponding direction information is determined for each of the trajectory sampling points.

[0010] In one exemplary embodiment of this disclosure, the edit trajectory is generated by a flow field editing operation, which includes at least one of a direction editing operation, a velocity editing operation, a type editing operation, and an erasure operation; Different operation types in the flow field editing operation share the delay control and resampling process corresponding to the sampling process; The step of determining the flow field attribute data corresponding to the target region based on the multiple trajectory sampling points and the corresponding direction information includes: Based on the operation type of the flow field editing operation, and based on the multiple trajectory sampling points and the corresponding direction information, flow field attribute data corresponding to the operation type is determined.

[0011] In one exemplary embodiment of this disclosure, the flow field attribute data includes at least one of direction attribute, velocity attribute, and type attribute; The step of writing the flow field attribute data into the flow field raster data corresponding to the target region includes: Based on the position of each trajectory sampling point in the target area, determine the grid position in the flow field grid data corresponding to each trajectory sampling point; Write the flow field attribute data corresponding to each of the trajectory sampling points into the corresponding grid position.

[0012] In an exemplary embodiment of this disclosure, writing the flow field attribute data corresponding to each of the trajectory sampling points into the corresponding grid position includes: The corresponding grid operation range is determined based on the grid position corresponding to each of the trajectory sampling points; Modify the corresponding flow field attribute data based on the grid operation range; Write the modified flow field attribute data into the grid position corresponding to the grid operation range.

[0013] In an exemplary embodiment of this disclosure, modifying the corresponding flow field attribute data based on the grid operation range includes: Determine the grid operation for the grid operation range, the grid operation including at least one of flow field writing operation and brush operation; The grid operation is performed through a grid operation layer decoupled from the flow field editing operation used to generate the edit trajectory; Based on the grid operation, the flow field attribute data corresponding to the grid operation range is modified.

[0014] In one exemplary embodiment of this disclosure, determining the boundary region corresponding to the target region and acquiring adjacent flow field data corresponding to the adjacent regions adjacent to the target region includes: Based on a preset boundary width, the texture coordinate space corresponding to the target region is expanded to determine the boundary region in the expanded texture coordinate space. Based on the texture coordinates corresponding to the boundary region, determine the adjacent regions that are adjacent to the target region; The adjacent flow field data corresponding to the boundary region is obtained by sampling the flow field data corresponding to the adjacent region.

[0015] In one exemplary embodiment of this disclosure, the flow field data corresponding to the adjacent regions includes the residual texture data corresponding to the adjacent regions; The step of sampling the adjacent flow field data corresponding to the boundary region from the flow field data corresponding to the adjacent region includes: Based on the spatial correspondence between each boundary position in the boundary region and the adjacent region, the residual texture sampling position corresponding to each boundary position is determined; Based on the sampling positions of each residual texture, the corresponding adjacent flow field data is obtained from the residual texture data corresponding to the adjacent regions.

[0016] In one exemplary embodiment of this disclosure, the flow field attribute data includes direction attribute, velocity attribute and type attribute, and the type attribute includes first type information, second type information and transition weight between the first type information and the second type information; The step of writing the flow field attribute data corresponding to each of the trajectory sampling points into the corresponding grid position includes: Obtain the direction attribute, velocity attribute, first type information, second type information, and transition weight corresponding to each trajectory sampling point; According to the preset encoding rules, the direction attribute, velocity attribute, first type information, second type information and transition weight corresponding to each trajectory sampling point are encoded to obtain the corresponding encoded data; Write the encoded data corresponding to each of the trajectory sampling points into the corresponding grid position.

[0017] In one exemplary embodiment of this disclosure, after generating a flow field map corresponding to the target region based on the target flow field data, the method further includes: Determine the decoding rule corresponding to the preset encoding rule; The encoded data in the flow field diagram is decoded according to the decoding rules to obtain the corresponding direction attribute, velocity attribute and type attribute; The decoded direction attribute, velocity attribute, and type attribute are used for flow field display processing or flow field sampling processing performed based on the flow field diagram.

[0018] According to a second aspect of this disclosure, a flow field data processing apparatus is provided, comprising: The trajectory direction processing module is used to acquire the editing trajectory for the target area, perform sampling processing on the editing trajectory to obtain multiple trajectory sampling points, and determine the corresponding direction information based on the multiple trajectory sampling points; The flow field grid writing module is used to determine the flow field attribute data corresponding to the target area based on the multiple trajectory sampling points and the corresponding direction information, and write the flow field attribute data into the flow field grid data corresponding to the target area. The boundary flow field processing module is used to determine the boundary region corresponding to the target region, and to obtain the adjacent flow field data corresponding to the adjacent region adjacent to the target region. Based on the flow field grid data and the adjacent flow field data, the module writes data to the boundary region to obtain the target flow field data after boundary processing. The flow field map generation module is used to generate a flow field map corresponding to the target region based on the target flow field data.

[0019] The technical solutions provided in this disclosure may have the following beneficial effects: The flow field data processing method provided in the example embodiments of this disclosure acquires the editing trajectory for the target area, samples the editing trajectory, and determines the corresponding direction information based on the obtained multiple trajectory sampling points. This enables the editing operation for the target area to be further converted into flow field information with spatial positional correspondence. On this basis, flow field attribute data is determined based on the trajectory sampling points and their direction information, so that the generation of flow field data can correspond to the editing trajectory. This allows the adjustment of the flow field state in the target area to be reflected in the subsequent flow field data through the editing process, reducing the dependence on repeated modification and remaking of corresponding resources when using pre-made fixed flow field resources.

[0020] Furthermore, by writing the flow field attribute data determined based on trajectory sampling points and direction information into the flow field raster data corresponding to the target area, the flow field attributes at different locations within the target area can be organized according to a unified spatial data structure. Furthermore, target flow field data and corresponding flow field maps are formed based on the flow field raster data. Thus, the generation, writing, and flow field map generation of flow field attributes can establish a continuous data processing relationship, reducing the increased data maintenance complexity caused by inconsistent spatial correspondences or update processes when flow field information is processed separately.

[0021] Furthermore, during the formation of target flow field data, the boundary regions corresponding to the target area are determined, and adjacent flow field data corresponding to neighboring regions are acquired. The boundary regions are then written with the flow field raster data of the target area and the adjacent flow field data. This ensures that the boundary data of the target area is not only based on the flow field information of the target area itself but also incorporates flow field information from neighboring regions. Therefore, after generating the flow field map based on the target flow field data, locations near the region boundary can have a flow field data foundation corresponding to adjacent regions. This reduces the occurrence of abrupt changes in flow field attributes or boundary discontinuities during cross-region sampling in the case of regional storage, improving the continuity and consistency of flow field data in large-scale scenes.

[0022] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0023] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0024] Figure 1 A system architecture diagram of a flow field data processing method to which embodiments of the present disclosure can be applied is shown; Figure 2 A flowchart illustrating a flow field data processing method according to an embodiment of this disclosure is shown; Figure 3 This illustration shows a flowchart of an embodiment of the present disclosure for sampling an editing trajectory to obtain multiple trajectory sampling points, and determining the corresponding direction information based on the multiple trajectory sampling points; Figure 4 This illustration shows a flowchart of an embodiment of the present disclosure for determining the boundary region corresponding to the target region and obtaining the adjacent flow field data corresponding to the adjacent region adjacent to the target region. Figure 5 A schematic diagram of a real-time water flow direction editing interface in an embodiment of this disclosure is shown; Figure 6 A block diagram of a flow field data processing apparatus according to an embodiment of the present disclosure is shown; Figure 7 A schematic diagram of the structure of an electronic device suitable for implementing embodiments of the present disclosure is shown.

[0025] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts. Detailed Implementation

[0026] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0027] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0028] Figure 1 A system architecture diagram is shown for a flow field data processing method to which embodiments of the present disclosure can be applied.

[0029] like Figure 1 As shown, the system architecture 100 may include a flow field editing device 101, a processing device 102, and a network 103. The network 103 is used as a medium to provide a communication link between the flow field editing device 101 and the processing device 102. The network 103 may include a wired communication link, a wireless communication link, a vehicle-mounted communication link, or a fiber optic communication link, etc.

[0030] The flow field editing device 101 is used to acquire flow field editing information for a target area. For example, the flow field editing device 101 can respond to an editing operation on the target area, acquire the corresponding editing trajectory, and provide the editing trajectory to the processing device 102. In some embodiments, the flow field editing device 101 can be a flow field editing terminal, a 3D scene editing device, or other device capable of receiving flow field editing operations.

[0031] The processing device 102 may be a device with data processing capabilities, used to execute the flow field data processing method provided in the embodiments of this disclosure. For example, the processing device 102 may acquire an editing trajectory for a target area, sample the editing trajectory to obtain multiple trajectory sampling points, and determine the corresponding direction information based on the multiple trajectory sampling points; determine the flow field attribute data corresponding to the target area based on the multiple trajectory sampling points and the corresponding direction information, and write the flow field attribute data into the flow field grid data corresponding to the target area; determine the boundary area corresponding to the target area, acquire the adjacent flow field data corresponding to the adjacent areas adjacent to the target area, write data into the boundary area based on the flow field grid data and the adjacent flow field data to obtain the target flow field data after boundary processing; and generate a flow field map corresponding to the target area based on the target flow field data.

[0032] In some embodiments, the processing device 102 may include a server, desktop computer, laptop computer, tablet device, mobile terminal, or other electronic device with data processing capabilities. The flow field data processing method may be executed by one processing device 102 or by multiple processing devices 102 working together. In some embodiments, the flow field editing device 101 and the processing device 102 may also be integrated into the same device.

[0033] It should be understood that Figure 1 The number of flow field editing devices, processing devices, and networks shown is merely illustrative. Any number of flow field editing devices, processing devices, and networks can be included depending on implementation needs.

[0034] This disclosure provides a flow field data processing method, referring to... Figure 2 As shown, the method may include steps S210 to S240: Step S210: Obtain the editing trajectory for the target area, perform sampling processing on the editing trajectory to obtain multiple trajectory sampling points, and determine the corresponding direction information based on the multiple trajectory sampling points.

[0035] In the exemplary embodiments of this disclosure, the target region can be a spatial region where flow field data needs to be generated or adjusted. The target region can be divided according to the data organization method of the actual scene; it can correspond to a local area in the complete scene or to a region divided according to a predetermined spatial range. For example, in a water scene, the target region can be the water surface area or a scene block area where flow field editing is currently required. This disclosure does not limit the specific shape, size, or division method of the target region.

[0036] An editing trajectory is trajectory data formed during the flow field editing of a target area, representing the change of the editing position as the editing process progresses. The editing trajectory can consist of multiple continuous or discrete position data points, each corresponding to a specific spatial location within the target area. For example, a user can perform continuous movement operations within the editing interface corresponding to the target area using an editing device, and the processing device generates a corresponding editing trajectory based on the positions traversed by these movements. The editing trajectory can also originate from pre-set trajectory data or other data capable of representing the flow field editing path; this disclosure does not limit this approach.

[0037] Sampling processing can be a process of determining data points for subsequent flow field calculations from the edited trajectory according to a preset sampling method. Since the edited trajectory can contain a large number of trajectory data with different distribution states, multiple trajectory sampling points for characterizing the edited trajectory can be formed from the edited trajectory through sampling processing. Each trajectory sampling point can at least have a position corresponding to the target area, thereby establishing a correspondence between the edited trajectory and the specific spatial position in the target area. The specific sampling processing method can be set according to the data format of the edited trajectory, the spatial scale of the target area, and the processing accuracy of the flow field data, etc., and the specific sampling method is not limited in step S210.

[0038] Directional information is used to characterize the flow orientation corresponding to a trajectory sampling point. For example, directional information can take the form of data that describes direction, such as direction vectors, direction angles, direction codes, or other data forms that can distinguish different orientations. For multiple trajectory sampling points, the directional information corresponding to each trajectory sampling point can be determined based on the arrangement relationship, spatial position relationship, or local orientation of the edited trajectory at the corresponding position. For example, for multiple trajectory sampling points located on a continuous edited trajectory, the directional information corresponding to each trajectory sampling point can be formed according to the orientation of the edited trajectory at different sampling positions.

[0039] Step S210 yields multiple trajectory sampling points with spatial location and corresponding orientation, providing a data foundation for determining subsequent flow field attribute data.

[0040] Step S220: Based on multiple trajectory sampling points and their corresponding direction information, determine the flow field attribute data corresponding to the target area, and write the flow field attribute data into the flow field grid data corresponding to the target area.

[0041] Flow field attribute data is used to describe the flow field state at different spatial locations within a target area. Flow field attribute data can be associated with the spatial location and corresponding orientation information of trajectory sampling points, enabling the spatial changes reflected by the edited trajectory to be converted into flow field data in the target area. Depending on different flow field application scenarios, flow field attribute data can adopt single attribute values, attribute combinations consisting of multiple data components, or other data structures capable of describing the flow field state. This disclosure does not limit the specific data composition of the flow field attribute data.

[0042] Specifically, for each trajectory sampling point obtained in step S210, flow field attribute data corresponding to that location can be generated based on the location and corresponding direction information of the trajectory sampling point in the target area. When multiple trajectory sampling points correspond to different locations in the target area, flow field attribute data for multiple locations in the target area can be generated accordingly, thereby establishing a correspondence between the spatial range covered by the edited trajectory and the corresponding flow field attributes.

[0043] Flow field raster data can be a data structure that discretizes flow field attributes according to spatial location. A spatial mapping relationship can be established between flow field raster data and a target region, so that different spatial ranges within the target region correspond to corresponding data units in the flow field raster data. The division scale of the flow field raster can be set according to the size of the target region, the required flow field accuracy, and data processing capabilities. For example, the target region can be divided into multiple raster units according to a predetermined spatial scale, and each raster unit can be used to store the flow field attribute data within its corresponding spatial range.

[0044] When writing flow field attribute data into flow field raster data, the flow field attribute data formed by the trajectory sampling points can be updated to the corresponding spatial range in the flow field raster data based on the spatial relationship between the trajectory sampling points and the target area. The writing operation can include updating existing data or adding flow field attribute data to locations where corresponding flow field data does not yet exist. For cases where multiple trajectory sampling points correspond to the same spatial range, the flow field attribute data to be saved can be determined according to a preset data processing method.

[0045] After the above processing, the flow field attributes determined by the edited trajectory in the target area can be organized into flow field raster data with a unified spatial correspondence.

[0046] Step S230: Determine the boundary region corresponding to the target region, and obtain the adjacent flow field data corresponding to the adjacent region adjacent to the target region. Write data to the boundary region based on the flow field grid data and the adjacent flow field data to obtain the target flow field data after boundary processing.

[0047] A boundary region can be a spatial area within the target region that is located at or near the boundary of the target region and requires processing in conjunction with data from adjacent regions. A boundary region can be set along one or more boundaries of the target region, and its specific extent can be determined based on the data organization method of the target region and the requirements for generating the flow field data. When the target region has multiple adjacent regions, different boundary portions can establish spatial correspondences with their respective adjacent regions.

[0048] Adjacent regions can be other flow field data regions that are spatially adjacent to the target region. For example, when a large scene is divided into multiple regions for flow field data management, other regions that are spatially adjacent to the target region can be considered adjacent regions. The number of adjacent regions can be one or more, depending on the location of the target region in the scene and the region division method.

[0049] Adjacent flow field data can be flow field data originating from adjacent regions and spatially corresponding to the boundary regions of the target region. In other words, not all flow field data from adjacent regions needs to participate in the boundary processing of the current target region. Adjacent flow field data relevant to the current boundary processing can be obtained based on the spatial relationship between the boundary region and adjacent regions. For example, for one side boundary of the target region, flow field data from the corresponding spatial range in the region adjacent to that side boundary can be obtained as the adjacent flow field data for that side boundary.

[0050] After obtaining the flow field raster data of the target region itself and the adjacent flow field data of neighboring regions, data can be written to the boundary region based on the spatial correspondence between the two and the boundary region. For the portion of the boundary region corresponding to the flow field of the target region itself, the corresponding flow field raster data of the target region can be used to form the corresponding data; for the portion that has a spatial correspondence with adjacent regions, the corresponding adjacent flow field data can be used to participate in the data writing. If the target region has multiple adjacent regions, the adjacent flow field data corresponding to each adjacent region can be obtained separately, and corresponding data processing can be performed according to the adjacent regions corresponding to different boundary positions.

[0051] The target flow field data is the flow field data formed after boundary processing of the flow field raster data of the target area. Compared with the flow field raster data obtained in step S220, the target flow field data further includes the data formed after boundary processing, so that the flow field data inside the target area and the boundary data related to adjacent areas can be processed in a unified data format.

[0052] Step S240: Generate a flow field map corresponding to the target region based on the target flow field data.

[0053] The flow field diagram is a data representation used to express the flow field data of a target area according to spatial location. Different positions in the flow field diagram can be correlated with different spatial positions in the target area, enabling the target flow field data to be organized according to the spatial distribution of the target area. The flow field diagram can be a two-dimensional data map, a rasterized data map, or other data formats that can be read according to spatial location. This embodiment of the disclosure does not limit the specific storage format of the flow field diagram.

[0054] Specifically, the target flow field data obtained in step S230 can be converted into corresponding data in the flow field diagram based on the spatial mapping relationship between the target region and the target flow field data. For locations within the target region, the flow field diagram content can be formed based on the data at the corresponding locations in the target flow field data; for the boundary locations of the target region, the flow field diagram content can be formed based on the corresponding data after boundary processing. Thus, data corresponding to different spatial locations in the target flow field data can be organized into the same flow field diagram.

[0055] For example, when a target region corresponds to an independent block in the scene, a corresponding flow field diagram can be created for that block, and the data inside and at the boundary of that block can be mapped to the flow field diagram based on the target flow field data. For a scene containing multiple target regions, flow field diagrams corresponding to each target region can be generated separately, and the corresponding flow field diagrams can be managed according to the spatial relationship of each target region in the scene.

[0056] This disclosure enables the direct conversion of flow field editing results into flow field data with spatial correspondence, reducing the reliance on repeated creation and updating of fixed flow field resources, and allowing flow field information to be organized and maintained on a unified data basis. At the same time, by introducing the flow field state of adjacent regions in the region boundary processing, the boundary data abrupt changes caused by independent storage of different regions can be weakened, and the possibility of flow field breaks or seams when sampling across regions can be reduced, thereby improving the continuity and consistency of flow field data in large-scale scenes.

[0057] In some example implementations, references Figure 3 As shown, in step S210, when sampling the edited trajectory to obtain multiple trajectory sampling points and determining the corresponding direction information based on the multiple trajectory sampling points, this process can further include steps S310 to S330: Step S310: Obtain multiple trajectory control points corresponding to the edit trajectory, and construct a spline curve based on the multiple trajectory control points.

[0058] The trajectory control points corresponding to the edited trajectory can be multiple location points used to characterize the shape of the edited trajectory during the flow field editing process, and the spline curve can be a continuous curve representation established based on multiple trajectory control points. By using spline curves to describe the edited trajectory, a continuous trajectory representation can be formed between adjacent trajectory control points, without having to rely solely on discrete input positions to determine the flow direction.

[0059] For example, Hermite spline curves can be used. During flow field editing, Hermite splines can be used to record multiple trajectory control points corresponding to the brush movement trajectory, and a continuous editing trajectory representation can be formed based on these multiple trajectory control points. As the brush continues to move, the corresponding Hermite splines can be updated based on the newly added trajectory control points, enabling the spline curves to continuously represent the actual movement process of the brush.

[0060] Step S320: Based on the time and distance corresponding to the edited trajectory, resample the edited trajectory to obtain multiple trajectory sampling points.

[0061] Here, time is used to characterize the temporal relationship between different trajectory positions during the editing operation, and distance is used to characterize the spatial interval between different positions on the editing trajectory. Resampling can redetermine trajectory sampling points for subsequent processing on the editing trajectory based on the above temporal relationship and spatial interval, so that the formation of trajectory sampling points does not completely depend on the discrete distribution of the original input events.

[0062] For example, data can be resampled based on the time and distance of the brush movement, rather than simply writing data at the location where the mouse event occurs.

[0063] Specifically, the time intervals and spatial distances between the original input events generated during continuous brush movement may not be uniform, especially during high-speed dragging, where there may be significant spatial gaps between adjacent original input positions. Therefore, the editing trajectory of continuous input can be resampled based on time and distance conditions, forming trajectory sampling points at positions that meet the corresponding sampling conditions, ensuring that each trajectory sampling point corresponds to at least the relevant positional information. This reduces the possibility of data write breakpoints occurring during continuous editing due to the uneven distribution of discrete input events.

[0064] Step S330: Determine the tangent information of the spline curve at the corresponding position of each trajectory sampling point, and determine the direction information corresponding to each trajectory sampling point based on the tangent information.

[0065] For any trajectory sampling point obtained through resampling, its corresponding position on the spline curve can be determined, and the tangent information of the spline curve at that position can be obtained. The tangent information can be used to describe the local extension direction of the spline curve at the corresponding position, thereby determining the direction information corresponding to the trajectory sampling point. For example, the corresponding heading angle can be determined based on the tangent information, and the heading angle can be converted into data expressing the flow direction to form the direction information of the trajectory sampling point.

[0066] When Hermite spline curves are used, the tangent direction of the Hermite spline curve can be extracted at each trajectory sampling point. The corresponding heading angle is determined based on this tangent direction, and the heading angle is normalized to obtain a flow direction value that can be written into the flow field data. Therefore, in addition to their spatial location, each trajectory sampling point also has a flow direction determined by the actual brush movement direction, enabling the user's continuous brush gestures to be converted into corresponding vector field data.

[0067] Therefore, the edited trajectory can first be resampled to form multiple trajectory sampling points for flow field data generation, and then combined with spline curves used to describe the continuous shape of the edited trajectory to determine the local direction of each sampling position, so that the trajectory sampling position and direction information can be established in correspondence with the actual edited trajectory.

[0068] In other example implementations, the direction information in step S210 may not be determined based on the local orientation of the edit trajectory itself, but rather on specified direction parameters that are pre-set or set in real-time for the edit trajectory. Specifically, specified direction parameters set for the edit trajectory can be obtained, and corresponding direction information can be determined for each trajectory sampling point based on the specified direction parameters.

[0069] The specified direction parameter can be a parameter used to represent the desired flow direction. It can be set by the user before performing flow field editing operations, or it can be adjusted during the editing process according to the actual editing needs.

[0070] The specified direction parameter can be an angle, a direction vector, or other data format that can describe direction. For example, when it's necessary to maintain a predetermined direction for water flow in a certain area and prevent the water flow direction from changing with brush movement, a specified angle can be set as the specified direction parameter. For instance, as the brush moves in different directions, corresponding direction information can be generated according to the set specified angle.

[0071] After obtaining the specified direction parameters, the specified direction parameters can be used to determine the corresponding direction information for each trajectory sampling point obtained after resampling the edited trajectory. Each trajectory sampling point is still used to determine the spatial location where the flow field editing is applied, while its corresponding flow direction is determined by the specified direction parameters. In this way, the spatial distribution of direction information can correspond to the edited trajectory, and the flow direction at each location can be formed according to the set direction.

[0072] For example, when a specified direction is enabled, the corresponding flow direction can be determined directly from the tangent direction of the Hermite spline curve at each trajectory sampling point, instead of relying on the tangent direction. The user-defined angle is then converted into a corresponding flow direction value, which is used as the direction information for each trajectory sampling point. This allows the water flow direction within the brush's effective range to be locked to the set direction while maintaining the brush's position as the editing trajectory changes.

[0073] This implementation method, along with the method of determining direction information based on the direction of the editing trajectory itself, can be selected according to actual editing needs. For example, when it is necessary to form a water flow according to the direction of brush movement, the aforementioned trajectory direction determination method can be used; when it is necessary to lock the direction of the water flow, the method of specifying direction parameters can be used.

[0074] In some example implementations, the edit trajectory can be generated by a flow field editing operation. A flow field editing operation can be a data editing operation performed on one or more flow field attributes in a target area, and may include at least one of direction editing, velocity editing, type editing, and erasing operations. Specifically, a direction editing operation can be used to adjust the flow direction at a corresponding location, a velocity editing operation can be used to adjust the flow velocity at a corresponding location, a type editing operation can be used to adjust the water area type at a corresponding location, and an erasing operation can be used to remove or restore flow field attributes already written to a corresponding location.

[0075] For example, the aforementioned direction editing, speed editing, type editing, and eraser operations can be implemented using the flow direction brush, speed brush, type brush, and eraser, respectively. For different editing operations, corresponding flow direction drawing actions, flow speed drawing actions, and type drawing actions can be set to generate corresponding flow field attribute modifications based on the current operation type.

[0076] Although different operation types correspond to different flow field attribute modifications, they all generate corresponding editing trajectories during the editing process. Therefore, different operation types can share the same delay control and resampling process for handling editing trajectories. Delay control can be used to receive and process continuous editing operations according to a unified trajectory processing rhythm, while the resampling process can redetermine the trajectory sampling points for flow field processing based on the editing trajectory. By adopting a common trajectory processing foundation, it is unnecessary to establish independent trajectory sampling processes for different operations such as direction, velocity, and type.

[0077] Specifically, a unified flow field drawing action can be set up as the common basis for trajectory processing of different types of brushes, and this flow field drawing action provides delay control and resampling processing. Continuous editing trajectories generated by flow brushes, speed brushes, type brushes, and erasers can all first have their trajectory sampling points determined through this common processing procedure, and then the flow field attributes to be formed or modified are determined by the processing procedure corresponding to the current brush type. Thus, even when the user quickly or continuously drags different types of brushes, all types of brushes can still continuously form the data required for subsequent flow field processing according to the unified trajectory sampling mechanism.

[0078] When determining the flow field attribute data corresponding to the target area based on multiple trajectory sampling points and their corresponding direction information, the flow field attribute data corresponding to the operation type can be determined according to the operation type of the flow field editing operation.

[0079] Specifically, after obtaining multiple trajectory sampling points, the flow field attribute data that needs to be formed or modified for the trajectory sampling points can be further determined based on the operation type of the current flow field editing operation. For example, when the current operation is a direction editing operation, flow field attribute data related to the flow direction can be formed based on the trajectory sampling points and the corresponding direction information; when the current operation is a velocity editing operation or a type editing operation, flow field attribute data corresponding to the corresponding operation type can be formed based on the corresponding editing parameters.

[0080] In some example implementations, the flow field attribute data in step S220 may include at least one of direction attribute, velocity attribute, and type attribute. The direction attribute characterizes the flow orientation at the corresponding spatial location, the velocity attribute characterizes the flow velocity at the corresponding spatial location or a parameter related to the flow velocity, and the type attribute characterizes the water body type or water body state to which the corresponding spatial location belongs.

[0081] When writing flow field attribute data into the flow field raster data corresponding to the target area, the raster positions in the flow field raster data corresponding to each trajectory sampling point can be determined first based on the position of each trajectory sampling point in the target area. The different flow field attributes mentioned above can be organized within the same flow field raster data. The flow field raster data can be divided into multiple raster positions according to the spatial range of the target area, with each raster position corresponding to a specific spatial location or range within the target area. Therefore, the raster positions in the flow field raster data that have a spatial correspondence with each trajectory sampling point can be determined first based on the position of each trajectory sampling point in the target area.

[0082] After determining the grid positions, the flow field attribute data corresponding to each trajectory sampling point can be written to the corresponding grid position. For example, in the same editing process, trajectory sampling points can correspond to multiple consecutive positions in the target area, and the direction attribute, velocity attribute, or type attribute corresponding to each position can be written to the corresponding position in the flow field grid, so that the area traversed by the edited trajectory forms a corresponding flow field data distribution.

[0083] For example, information such as flow direction, velocity, and water type can be stored in the same flow field raster data layer. Therefore, different flow field attributes can share the same set of spatial relationships without the need to establish separate independent spatial data layers, thus providing a data foundation for subsequent flow field map generation and unified processing of different flow field attributes.

[0084] In practical implementation, flow field raster data can be set up to store flow field attributes, and information such as flow direction, velocity, and water type can be organized in the same flow field raster data layer. Flow direction drawing, velocity drawing, and type drawing actions can each determine the corresponding attributes to be written, and then, based on the correspondence between trajectory sampling points and raster positions, the corresponding attributes are updated to the flow field raster data. Thus, the same spatial location in the target area can be associated with different types of flow field attributes through a unified raster position.

[0085] For example, the corresponding grid operation range can be further determined based on the grid position corresponding to each trajectory sampling point. The grid operation range can be a set of grid positions that need to be affected by the current trajectory sampling point during a flow field data modification process. It can include the grid position directly corresponding to the trajectory sampling point and one or more surrounding grid positions associated with that position.

[0086] The raster operation range can be determined based on the spatial range involved in the actual flow field editing operation. For example, when a trajectory sampling point in the editing trajectory corresponds to a certain position in the target area, the local raster area to be affected by this editing can be determined based on that position, and this local raster area can be used as the corresponding raster operation range. Different trajectory sampling points can each determine their respective raster operation ranges, thereby forming continuous or interconnected data modification areas along the editing trajectory.

[0087] In some embodiments, the grid operation range can be determined based on the corresponding brush's effective range. For example, when using a circular brush for flow field editing, the circular grid operation range can be determined based on the brush radius, centered on the grid position corresponding to the trajectory sampling point, and corresponding flow field attribute modifications can be performed on one or more grid positions within this grid operation range.

[0088] After determining the raster operation range, the corresponding flow field attribute data within that range can be modified. Modifications can include adding flow field attribute data, updating existing flow field attribute data, or adjusting existing attribute values ​​based on the current editing operation. After completing the modification, the modified flow field attribute data can be written to the raster position corresponding to the raster operation range, thus reflecting the editing operation in the flow field raster data.

[0089] It should be noted that the grid operation range is used to describe the scope of a single local flow field edit in the grid data. Its specific shape and size can be set according to the actual editing method, and this embodiment does not limit this. For example, a brush can be applied to a local grid area to convert the user's continuous editing operations in the editor into corresponding flow field grid data modifications.

[0090] Furthermore, specific modifications to flow field raster data can be abstracted into raster operations. Raster operations can include at least one of flow field write operations and brush operations. Flow field write operations can be used to update the flow field attribute data to be written to the corresponding raster position, while brush operations can be used to process local raster data according to the brush's scope and attribute parameters. For example, a circular brush operation can be used as a type of brush operation.

[0091] Grid operations can be performed by a separately configured grid operation layer, which is decoupled from the flow field editing operations used to generate editing trajectories. The flow field editing operations primarily receive user input and generate corresponding editing trajectories and parameters, while the grid operation layer performs the actual data modifications based on the defined grid operation range and the flow field attribute data to be modified. Therefore, the interactive processing in the editor interface does not need to directly handle the data writing to the underlying flow field grid.

[0092] Specifically, after determining the raster operation scope, information such as the location, operation range, and flow field attributes related to the raster operation can be submitted to the raster operation layer. The raster operation layer then performs the corresponding data modification and writes the modification results back to the corresponding raster location. For different types of flow field editing operations, the same or corresponding raster operations can be reused to achieve data processing.

[0093] For example, both flow field writing operations and circular brush operations can be used as grid operations in the grid operation layer. After determining the editing trajectory, trajectory sampling points, and corresponding editing parameters, the flow field editing operation can call the corresponding grid operation, and the grid operation layer will complete the actual flow field grid data update, thereby separating the specific data writing process from the interactive input process in the editor.

[0094] Based on the decoupling method described above, the same grid operation can also be invoked by processing procedures other than flow field editing operations. For example, this grid operation layer can provide a reuse basis for processes such as undo, redo, and runtime patch writing. The above application can be used as a specific implementation method, and the configuration can be selected according to the actual system functions. It is not required that all implementation methods be available simultaneously.

[0095] In some example implementations, references Figure 4 As shown, in step S230, when determining the boundary region corresponding to the target region and obtaining the adjacent flow field data corresponding to the adjacent region adjacent to the target region, this process can further include steps S410 to S430: Step S410: Based on the preset boundary width, expand the texture coordinate space corresponding to the target area to determine the boundary region in the expanded texture coordinate space.

[0096] The preset boundary width can be used to determine the boundary data range outside or near the edge of the target area. The texture coordinate space can be used to map the spatial position in the target area to the position of the flow field texture.

[0097] When generating flow field data corresponding to the target area, the original texture coordinate space of the target area can be expanded according to the preset boundary width, so that the expanded texture coordinate space includes not only the data range of the target area itself, but also the boundary area located around it.

[0098] For example, a "Border" can be used to represent the boundary region, and the original UV (texture coordinate) coordinate space can be expanded accordingly during the flow field map generation process. Specifically, when generating the flow field map corresponding to the target region, the UV coordinate space of the target region can be enlarged as a whole according to the boundary range corresponding to the Border, so that the enlarged UV coordinate space forms a redundant region for storing boundary data outside the original data range of the target region. This redundant region can form a Border around the target region, providing an additional data range for cross-regional flow field data sampling.

[0099] Step S420: Based on the texture coordinates corresponding to the boundary region, determine the adjacent regions that are adjacent to the target region.

[0100] For different texture coordinates in the boundary region, the adjacent regions adjacent to the boundary can be determined based on the positional relationship between the texture coordinates and the boundary of the target region. For example, the boundary region on one side of the target region can correspond to the adjacent region on that side, and boundary regions in different directions can be associated with different adjacent regions respectively.

[0101] Step S430: Sample the adjacent flow field data corresponding to the boundary region from the flow field data corresponding to the adjacent region.

[0102] After identifying adjacent regions, data with spatial correspondence to the current boundary region can be sampled from the flow field data corresponding to those adjacent regions, and the sampled data can be used as adjacent flow field data. Therefore, when writing subsequent data to the boundary region of the target area, data from adjacent regions can be used, rather than relying solely on data from the target area's own edges to form the boundary content.

[0103] For example, the flow field data corresponding to adjacent regions may include residual texture data corresponding to adjacent regions. The residual texture data can be texture data used to provide flow field information of adjacent regions for boundary processing of the target region, and it contains adjacent region data that can establish a correspondence with the boundary position of the target region. For example, the residual texture of adjacent plots can be used to participate in the completion of edge pixels of the current plot.

[0104] For each boundary location within a boundary region, the corresponding residual texture sampling location can be determined based on the spatial correspondence between that boundary location and adjacent regions. This spatial correspondence reflects the corresponding location of the current boundary location after mapping to adjacent regions, enabling data between the current region and adjacent regions to be matched according to their actual spatial adjacency.

[0105] After obtaining the residual texture sampling position, the data corresponding to that position can be obtained from the residual texture data of the adjacent region, and used as the adjacent flow field data corresponding to the current boundary position. Different boundary positions can each have corresponding residual texture sampling positions, thus forming a set of adjacent flow field data required for the boundary region.

[0106] For example, residual data from adjacent plots can be read during the flow field map magnification process, and this data can be used to supplement the edge pixels of the current plot. Compared with simply copying the edge data of the current region itself, this process uses data from regions that are actually adjacent to the current boundary position, thus enabling the boundary processing to establish a correspondence with the actual flow field data of adjacent regions.

[0107] In practice, a flow field boundary compensation shader file can be set up, and the UV scaling offset corresponding to the Border and the sampling processing of residual textures of adjacent plots can be performed through this flow field boundary compensation shader file. For a boundary pixel located in the current plot Border, the sampling position of its corresponding adjacent plots and residual textures can be determined according to the texture coordinates of the boundary pixel. The corresponding flow field data is read from the residual texture data of the adjacent plots, and the reading result is written to the boundary pixel corresponding to the current plot.

[0108] Therefore, the edge pixels within the current plot's border are not formed by simply copying the current plot's own boundary data, but are calculated based on the actual flow field data from adjacent plots. For the boundaries of the current plot in different directions, corresponding flow field data can be obtained from adjacent plots in the corresponding directions, thereby establishing a continuous data correspondence between the flow field data of adjacent plots at the spatial seam location, reducing the possibility of flow direction jumps or data breaks when sampling across plots.

[0109] In some example implementations, the flow field attribute data may simultaneously include direction attributes, velocity attributes, and type attributes. The type attribute may further include first type information, second type information, and a transition weight between the first and second type information. The first and second type information can respectively represent two types participating in the description of the water state at the same location, and the transition weight can be used to represent the relative transition relationship between the two types at corresponding locations.

[0110] When writing the flow field attribute data corresponding to each trajectory sampling point into the corresponding grid position, the direction attribute, velocity attribute, first type information, second type information, and transition weight corresponding to each trajectory sampling point can be obtained separately, and the above attributes can be encoded according to the preset encoding rules. The preset encoding rules can be used to specify how different flow field attributes are converted into data formats that can be written into flow field grid data, so that multiple flow field attributes with different semantics can be saved in a unified data format.

[0111] For example, flow field attributes such as flow direction, velocity, and transition weights between two water body types can be compactly encoded, allowing flow field attributes with different semantics to jointly form encoded data for corresponding grid positions. The specific data layout of the compact encoding can be set according to the data format of the flow field map and the number of attributes to be saved.

[0112] After encoding, coded data corresponding to each trajectory sampling point can be obtained. Then, based on the correspondence between trajectory sampling points and grid positions, the coded data is written into the corresponding grid positions. Thus, the data corresponding to the same grid position can carry multiple flow field attributes such as direction, velocity, and type transition relationships, and the spatial correspondence between these attributes can be retained when generating flow field maps in the future.

[0113] For example, flow direction, flow velocity, and transition weights for dual-body water types can be compactly encoded. It should be noted that the preset encoding rules can be set according to the data format and attribute representation requirements of the flow field diagram; this disclosure does not limit specific channel allocation, bit width, or quantization method.

[0114] Furthermore, after generating the flow field map corresponding to the target region based on the target flow field data, the encoded data in the flow field map can be decoded. The decoding rule can be a data restoration rule corresponding to the aforementioned preset encoding rule, used to recover the different flow field properties represented before encoding based on the encoded data. Therefore, the corresponding decoding rule can be determined based on the preset encoding rule.

[0115] When flow field information from the flow field diagram is needed, the encoded data in the diagram can be read according to the decoding rules, and the corresponding direction, velocity, and type attributes can be obtained. For type attributes that include multiple type information and their transition weights, the decoded type attributes can further reflect the corresponding type and its transition relationships. The encoding and decoding use corresponding rules to ensure that the meaning of the data written into the flow field diagram remains consistent with the meaning of the data read subsequently.

[0116] The decoded flow field attributes can be used for flow field display processing or flow field sampling processing based on the flow field map. For example, flow field display processing can generate corresponding flow field visualization results based on the decoded direction attributes and other data; flow field sampling processing can read the corresponding data in the flow field map based on the location to be queried, and obtain the flow field attributes at that location according to the decoding rules. The specific usage can be set according to the running scenario.

[0117] For example, the encoding and decoding of flow field maps can be uniformly maintained in a common shader file for water area information, ensuring that the editor preview, water surface material, and runtime sampling read the flow field map according to the same data semantics. This common shader file is a specific implementation of the decoding rules, but it does not limit the decoding rules to be implemented through a specific shader file. By using corresponding data interpretation methods on the encoding and decoding sides, inconsistencies in the attribute meanings of the same flow field map at different usage stages can be avoided.

[0118] In practical implementation, a unified flow field map encoding and decoding function can be set in the common shader file for water area information. The flow field data writing process can generate encoded data according to the data semantics corresponding to this encoding function. The editor preview, water surface material processing, and runtime sampling processes can then call the corresponding decoding function to read the flow field map, ensuring that different processing stages interpret attributes such as flow direction, velocity, and water area type according to a unified data meaning. For example, the editor can display the water area flow direction based on the decoded direction attribute, the water surface material can be processed accordingly based on the decoded flow field attributes, and the runtime sampling process can obtain the corresponding flow field attributes based on the sampling location.

[0119] In some example implementations, data structures, processing units, or resources such as flow field tool functions, flow direction drawing actions, flow velocity drawing actions, type drawing actions, flow field raster data, flow field boundary completion shader files, and water area information common shader files can be set separately. The flow field tool functions can provide common processing logic for the generation, encoding, decoding, or related data processing of flow field data; the flow direction drawing actions, flow velocity drawing actions, and type drawing actions can be used to handle corresponding types of flow field editing operations; the flow field raster data is used to store flow field attributes corresponding to different spatial locations; the flow field boundary completion shader file can be used to perform cross-plot boundary data completion; and the water area information common shader file can be used to unify the encoding and decoding semantics of flow field data in different usage processes. The above components can be combined and set according to the actual system architecture, without being limited to a specific software file format or program organization method.

[0120] In large-scale 3D Earth systems or other scene systems comprising multiple land parcels, the aforementioned flow field data processing method can be implemented as an independent module or as a sub-processing flow within an existing module. The corresponding input data can enter the flow field processing process via data fragments, configuration layers, generators, or editor tools. Then, through generators, shader files, rendering resource layers, or background tasks, the corresponding flow field data calculations and flow field map generation are completed. The processing results can be further submitted to land parcels, materials, components, debugging systems, or business query systems. For example, a target land parcel can save a flow field map corresponding to its spatial extent; water surface materials can obtain corresponding flow field attributes based on the flow field map; the debugging system can visualize attributes such as flow direction; and the business query system can query the corresponding flow field information from the flow field map based on the target location.

[0121] refer to Figure 5The diagram illustrates a real-time editing interface for water flow direction. This interface includes a water flow display area, a parameter setting area, a function selection area, and a layer management area. The water flow display area shows the water area to be edited and its flow direction information, which is visualized using multiple directional arrows. The parameter setting area allows users to set parameters such as brush speed, direction, and brush radius, and allows selection of a specific direction. The function selection area provides entry points for functions such as water body editing, type drawing, and flow direction drawing. When the flow direction drawing function is selected, the brush's effective range corresponding to the current brush radius is displayed in the water flow display area, allowing editors to determine the area where flow direction data is written. The layer management area allows for hierarchical management of different scene objects in the editing scene, such as layers for roads, buildings, water bodies, and vegetation. Display controls allow users to adjust the visibility of each layer in the water flow display area, facilitating the viewing and editing of water flow direction by combining different scene elements.

[0122] When drawing flow direction, the editor can control the brush to move within the water area display area. The system determines the corresponding flow direction based on the brush's movement trajectory and writes the determined flow direction into the flow field raster data layer used to generate the flow field map. This ensures that the flow direction indication in the water area display area is updated with each drawing operation. When a specified direction is used, the flow direction within the brush's effective range can be determined according to the direction set in the parameter settings area; when no specified direction is used, the flow direction can be determined based on the brush's movement trajectory. Therefore, the editor can directly view and adjust the water flow direction in the visual interface, improving the intuitiveness and ease of operation for editing large-scale water flow directions.

[0123] This example embodiment also provides a flow field data processing apparatus. (See reference...) Figure 6 As shown, the device may include a trajectory direction processing module 610, a flow field grid writing module 620, a boundary flow field processing module 630, and a flow field map generation module 640, wherein: The trajectory direction processing module 610 is used to acquire the editing trajectory for the target area, perform sampling processing on the editing trajectory to obtain multiple trajectory sampling points, and determine the corresponding direction information based on the multiple trajectory sampling points; The flow field grid writing module 620 is used to determine the flow field attribute data corresponding to the target area based on multiple trajectory sampling points and their corresponding direction information, and to write the flow field attribute data into the flow field grid data corresponding to the target area. The boundary flow field processing module 630 is used to determine the boundary region corresponding to the target region, and to obtain the adjacent flow field data corresponding to the adjacent region adjacent to the target region. Based on the flow field grid data and the adjacent flow field data, the boundary region is written with data to obtain the target flow field data after boundary processing. The flow field diagram generation module 640 is used to generate a flow field diagram corresponding to the target region based on the target flow field data.

[0124] The specific details of each module of the above-mentioned flow field data processing device have been described in detail in the corresponding flow field data processing methods, so they will not be repeated here.

[0125] Exemplary embodiments of this disclosure also provide a computer-readable storage medium having a program product stored thereon capable of implementing the methods described above. In some possible embodiments, various aspects of this disclosure may also be implemented as a program product including program code that, when run on an electronic device, causes the electronic device to perform the steps of the various exemplary embodiments described in this specification.

[0126] The program product may be a portable compact disc read-only memory (CD-ROM) and include program code, and may run on an electronic device, such as a personal computer. However, the program product disclosed herein is not limited thereto. In this disclosure, the readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0127] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0128] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0129] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0130] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C#, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0131] Furthermore, exemplary embodiments of this disclosure also provide an electronic device capable of implementing the above-described flow field data processing method.

[0132] The following reference Figure 7 To describe an electronic device 700 according to such an embodiment of the present disclosure. Figure 7 The electronic device 700 shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.

[0133] like Figure 7 As shown, the electronic device 700 is manifested in the form of a general-purpose computing device. The components of the electronic device 700 may include, but are not limited to: at least one processing unit 710, at least one storage unit 720, a bus 730 connecting different system components (including storage unit 720 and processing unit 710), and a display unit 740.

[0134] The storage unit 720 stores program code, which can be executed by the processing unit 710, causing the processing unit 710 to perform the steps of the various exemplary embodiments described in this specification.

[0135] Storage unit 720 may include readable media in the form of volatile storage units, such as random access memory (RAM) 721 and / or cache memory (Cache) 722, and may further include read-only memory (ROM) 723.

[0136] The storage unit 720 may also include a program / utility 724 having a set (at least one) of program modules 725, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0137] Bus 730 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0138] Electronic device 700 can also communicate with one or more external devices 770 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 700, and / or with any device that enables electronic device 700 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 750. Furthermore, electronic device 700 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 760. As shown, network adapter 760 communicates with other modules of electronic device 700 via bus 730. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0139] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this disclosure and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0140] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0141] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A flow field data processing method, characterized in that, include: The editing trajectory for the target area is obtained, the editing trajectory is sampled to obtain multiple trajectory sampling points, and the corresponding direction information is determined based on the multiple trajectory sampling points; Based on the multiple trajectory sampling points and the corresponding direction information, the flow field attribute data corresponding to the target area is determined, and the flow field attribute data is written into the flow field grid data corresponding to the target area. The boundary region corresponding to the target region is determined, and the adjacent flow field data corresponding to the adjacent region adjacent to the target region is obtained. Based on the flow field grid data and the adjacent flow field data, the boundary region is written with data to obtain the target flow field data after boundary processing. A flow field map corresponding to the target region is generated based on the target flow field data.

2. The flow field data processing method according to claim 1, characterized in that, The step of sampling the edited trajectory to obtain multiple trajectory sampling points, and determining the corresponding direction information based on the multiple trajectory sampling points, includes: Obtain multiple trajectory control points corresponding to the edited trajectory, and construct a spline curve based on the multiple trajectory control points; Based on the time and distance corresponding to the edit trajectory, the edit trajectory is resampled to obtain the plurality of trajectory sampling points; The tangent information of the spline curve at each of the trajectory sampling points is determined, and the direction information corresponding to each of the trajectory sampling points is determined based on the tangent information.

3. The flow field data processing method according to claim 1, characterized in that, The determination of the corresponding direction information based on the multiple trajectory sampling points includes: Obtain the specified direction parameters set for the edited trajectory; Based on the specified direction parameters, corresponding direction information is determined for each of the trajectory sampling points.

4. The flow field data processing method according to claim 1, characterized in that, The edit trajectory is generated by flow field editing operations, which include at least one of direction editing operations, velocity editing operations, type editing operations, and erase operations; Different operation types in the flow field editing operation share the delay control and resampling process corresponding to the sampling process; The step of determining the flow field attribute data corresponding to the target region based on the multiple trajectory sampling points and the corresponding direction information includes: Based on the operation type of the flow field editing operation, and based on the multiple trajectory sampling points and the corresponding direction information, flow field attribute data corresponding to the operation type is determined.

5. The flow field data processing method according to claim 1, characterized in that, The flow field attribute data includes at least one of direction attribute, velocity attribute and type attribute; The step of writing the flow field attribute data into the flow field raster data corresponding to the target region includes: Based on the position of each trajectory sampling point in the target area, determine the grid position in the flow field grid data corresponding to each trajectory sampling point; Write the flow field attribute data corresponding to each of the trajectory sampling points into the corresponding grid position.

6. The flow field data processing method according to claim 5, characterized in that, The step of writing the flow field attribute data corresponding to each of the trajectory sampling points into the corresponding grid position includes: The corresponding grid operation range is determined based on the grid position corresponding to each of the trajectory sampling points; Modify the corresponding flow field attribute data based on the grid operation range; Write the modified flow field attribute data into the grid position corresponding to the grid operation range.

7. The flow field data processing method according to claim 6, characterized in that, The modification of the corresponding flow field attribute data based on the grid operation range includes: Determine the grid operation for the grid operation range, the grid operation including at least one of flow field writing operation and brush operation; The grid operation is performed through a grid operation layer decoupled from the flow field editing operation used to generate the edit trajectory; Based on the grid operation, the flow field attribute data corresponding to the grid operation range is modified.

8. The flow field data processing method according to claim 1, characterized in that, The step of determining the boundary region corresponding to the target region and obtaining the adjacent flow field data corresponding to the adjacent regions adjacent to the target region includes: Based on a preset boundary width, the texture coordinate space corresponding to the target region is expanded to determine the boundary region in the expanded texture coordinate space. Based on the texture coordinates corresponding to the boundary region, determine the adjacent regions that are adjacent to the target region; The adjacent flow field data corresponding to the boundary region is obtained by sampling the flow field data corresponding to the adjacent region.

9. The flow field data processing method according to claim 8, characterized in that, The flow field data corresponding to the adjacent regions includes the residual texture data corresponding to the adjacent regions. The step of sampling the adjacent flow field data corresponding to the boundary region from the flow field data corresponding to the adjacent region includes: Based on the spatial correspondence between each boundary position in the boundary region and the adjacent region, the residual texture sampling position corresponding to each boundary position is determined; Based on the sampling positions of each residual texture, the corresponding adjacent flow field data is obtained from the residual texture data corresponding to the adjacent regions.

10. The flow field data processing method according to claim 5, characterized in that, The flow field attribute data includes direction attribute, velocity attribute and type attribute, and the type attribute includes first type information, second type information and transition weight between the first type information and the second type information; The step of writing the flow field attribute data corresponding to each of the trajectory sampling points into the corresponding grid position includes: Obtain the direction attribute, velocity attribute, first type information, second type information, and transition weight corresponding to each trajectory sampling point; According to the preset encoding rules, the direction attribute, velocity attribute, first type information, second type information and transition weight corresponding to each trajectory sampling point are encoded to obtain the corresponding encoded data; Write the encoded data corresponding to each of the trajectory sampling points into the corresponding grid position.

11. The flow field data processing method according to claim 10, characterized in that, After generating the flow field map corresponding to the target region based on the target flow field data, the method further includes: Determine the decoding rule corresponding to the preset encoding rule; The encoded data in the flow field diagram is decoded according to the decoding rules to obtain the corresponding direction attribute, velocity attribute and type attribute; The decoded direction attribute, velocity attribute, and type attribute are used for flow field display processing or flow field sampling processing performed based on the flow field diagram.

12. A flow field data processing device, characterized in that, include: The trajectory direction processing module is used to acquire the editing trajectory for the target area, perform sampling processing on the editing trajectory to obtain multiple trajectory sampling points, and determine the corresponding direction information based on the multiple trajectory sampling points; The flow field grid writing module is used to determine the flow field attribute data corresponding to the target area based on the multiple trajectory sampling points and the corresponding direction information, and write the flow field attribute data into the flow field grid data corresponding to the target area. The boundary flow field processing module is used to determine the boundary region corresponding to the target region, and to obtain the adjacent flow field data corresponding to the adjacent region adjacent to the target region. Based on the flow field grid data and the adjacent flow field data, the module writes data to the boundary region to obtain the target flow field data after boundary processing. The flow field map generation module is used to generate a flow field map corresponding to the target region based on the target flow field data.