Virtual fluid model processing method and device, equipment and storage medium

By obtaining the edge line and central axis of the virtual fluid model, and automatically calculating the fluid width using the ray detection method, the problem of difficulty in calculating the river width in the prior art is solved, and the accuracy and efficiency of the calculation are improved.

CN119416460APending Publication Date: 2025-02-11GUANGZHOU BOGUAN TELECOMM TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411440849.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

In the prior art, it is difficult and there is no clear method to calculate the river width, resulting in low calculation accuracy and low efficiency.

Method used

By obtaining the edge line and central axis of the virtual fluid model, the fluid width is automatically calculated using the ray detection method.

Benefits of technology

Improves the calculation accuracy and efficiency of fluid width, and reduces the amount of manual participation and runtime calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119416460A_ABST
    Figure CN119416460A_ABST
Patent Text Reader

Abstract

The invention provides a virtual fluid model processing method and device, equipment and a storage medium, and relates to the technical field of data processing. The virtual fluid model processing method comprises the steps of obtaining an edge line of a target virtual fluid model and a central axis of the target virtual fluid model, wherein the central axis is used for indicating a flow path of a target virtual fluid; and performing ray detection on the edge line according to the central axis to obtain the fluid width of the target virtual fluid model on the flow path. Radiographic detection is carried out based on the central axis of the target virtual fluid model and the edge line of the target virtual fluid model to automatically calculate the fluid width of the target virtual fluid model, and compared with manual marking or lattice calculation, the detection method of radiographic detection in the embodiment of the invention can improve the calculation accuracy of the fluid width; manual participation is not needed, and the calculation efficiency of the fluid width can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a processing method, device, equipment and storage medium for a virtual fluid model. Background Art

[0002] The current game design project requires some gameplay about rivers and waterways. There will be different interaction logics depending on the width of each river, so the width of the river needs to be calculated and recorded for use in the game.

[0003] Currently, in game design, it is difficult to calculate the width of a river and there is no clear method. Most of the calculations are done manually or using grids. However, there are problems with low calculation accuracy and low efficiency. Summary of the invention

[0004] The purpose of this application is to provide a processing method, device, equipment and storage medium for a virtual fluid model in order to solve the above-mentioned technical problems existing in the related technology in view of the above-mentioned deficiencies in the prior art.

[0005] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for processing a virtual fluid model, the method comprising:

[0007] Acquire an edge line of a target virtual fluid model and a center axis of the target virtual fluid model, wherein the center axis is used to indicate a flow path of the target virtual fluid;

[0008] According to the central axis, ray detection is performed on the edge line to obtain the fluid width of the target virtual fluid model on the flow path.

[0009] In a second aspect, an embodiment of the present application further provides a processing device for a virtual fluid model, the device comprising:

[0010] An acquisition module, used to acquire an edge line of a target virtual fluid model and a central axis of the target virtual fluid model, wherein the central axis is used to indicate a flow path of the target virtual fluid;

[0011] The detection module is used to perform ray detection on the edge line according to the central axis to obtain the fluid width of the target virtual fluid model on the flow path.

[0012] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a memory and a processor, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, the method for processing the virtual fluid model described in any one of the first aspects above is implemented.

[0013] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is read and executed, the method for processing the virtual fluid model described in any one of the first aspects above is implemented.

[0014] The beneficial effects of the present application are as follows: the embodiment of the present application provides a method for processing a virtual fluid model, including: obtaining the edge line of the target virtual fluid model and the central axis of the target virtual fluid model, the central axis is used to indicate the flow path of the target virtual fluid; according to the central axis, the edge line is ray detected to obtain the fluid width of the target virtual fluid model on the flow path. Based on the central axis of the target virtual fluid model and the edge line of the target virtual fluid model, ray detection is performed to automatically calculate the fluid width of the target virtual fluid model. Compared with manual marking or grid calculation, the ray detection in the embodiment of the present application can improve the calculation accuracy of the fluid width without manual participation, and can also improve the calculation efficiency of the fluid width. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 1 ;

[0017] Figure 2 A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 2 ;

[0018] Figure 3 A schematic diagram of a target virtual fluid model provided in an embodiment of the present application;

[0019] Figure 4 A schematic diagram of a central axis of a target virtual fluid model provided in an embodiment of the present application;

[0020] Figure 5A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 3 ;

[0021] Figure 6 A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 4 ;

[0022] Figure 7 A schematic diagram of a central axis and an edge line provided in an embodiment of the present application;

[0023] Figure 8 A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 5 ;

[0024] Fig. 9 A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 6 ;

[0025] Fig.10 A schematic diagram of a line connection between vertices and intersections on a central axis provided in an embodiment of the present application;

[0026] Fig.11 A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 7 ;

[0027] Fig.12 A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 8 ;

[0028] Fig.13 A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 9 ;

[0029] Fig.14 A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 10 ;

[0030] Fig.15 A schematic diagram of the structure of a virtual fluid model processing device provided in an embodiment of the present application;

[0031] Fig.16 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.

[0033] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0034] In addition, the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0035] It should be noted that, in the absence of conflict, the features in the embodiments of the present application may be combined with each other.

[0036] An embodiment of the present application provides a method for processing a virtual fluid model, which is applied to an electronic device, which may be a terminal device or a server. The terminal device may be any of the following: a computer device, a laptop computer, a tablet computer, a smart phone, etc.

[0037] The following is an explanation of a method for processing a virtual fluid model provided in an embodiment of the present application.

[0038] Figure 1 A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 1 ,like Figure 1 As shown, the method may include:

[0039] S101 : Acquire edge lines of a target virtual fluid model and a central axis of the target virtual fluid model.

[0040] The central axis is used to indicate the flow path of the target virtual fluid.

[0041] In some embodiments, the edge line of the target virtual fluid model may include: a first edge line and a second edge line of the target virtual fluid model, and the distance between the first edge line and the second edge line may represent the fluid width of the target virtual fluid model. The central axis of the target virtual fluid model is located between the first edge line and the second edge line of the target virtual fluid model, and the central axis of the target virtual fluid model is the central curve of the target virtual fluid model.

[0042] Optionally, the target virtual fluid model may be a pre-baked virtual river model with width, and the central axis of the target virtual fluid model may be the central axis of the virtual river model.

[0043] It should be noted that, the edge line of the target virtual fluid model can be obtained first, and then the central axis of the target virtual fluid model can be obtained; the central axis of the target virtual fluid model can be obtained first, and then the edge line of the target virtual fluid model can be obtained; the edge line of the target virtual fluid model and the central axis of the target virtual fluid model can also be obtained at the same time. The embodiments of the present application do not impose specific restrictions on this.

[0044] S102 . Perform ray detection on the edge line according to the central axis to obtain the fluid width of the target virtual fluid model on the flow path.

[0045] Among them, the fluid width of the target virtual fluid at different positions on the flow path is different.

[0046] In some embodiments, ray detection is performed on the first edge line and the second edge line according to the central axis, and the distance between the central axis and the first edge line and the distance between the central axis and the second edge line are obtained respectively. Based on the distance between the central axis and the first edge line and the distance between the central axis and the second edge line, the fluid width of the target virtual fluid model on the flow path can be obtained.

[0047] It should be noted that, according to the relative position between the central axis and the edge line, ray detection can be performed from the central axis toward the edge line to obtain the distance between the central axis and the edge line.

[0048] In actual applications, the fluid width needs to be calculated in multiple game scenes in the game, for example, to determine whether the target virtual fluid reaches the scene of building a virtual bridge, whether the target virtual fluid can freeze in winter, and whether the virtual ship can sail on the target virtual fluid, etc. That is, the width of the virtual fluid model has a wide range of applications in games.

[0049] In summary, the embodiment of the present application provides a method for processing a virtual fluid model, including: obtaining the edge line of the target virtual fluid model and the central axis of the target virtual fluid model, the central axis is used to indicate the flow path of the target virtual fluid; according to the central axis, the edge line is ray detected to obtain the fluid width of the target virtual fluid model on the flow path. Based on the central axis of the target virtual fluid model and the edge line of the target virtual fluid model, ray detection is performed to automatically calculate the fluid width of the target virtual fluid model. Compared with manual marking or grid calculation, the ray detection in the embodiment of the present application can improve the calculation accuracy of the fluid width without manual participation, and can also improve the calculation efficiency of the fluid width.

[0050] Optionally, Figure 2 A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 2 ,like Figure 2 As shown, the process of obtaining the edge line of the target virtual fluid model and the central axis of the target virtual fluid model in S101 may include:

[0051] S201 , extracting the fluid edge of the target virtual fluid model to obtain an edge line.

[0052] In some embodiments, a preset function can be used to extract non-shared edges, i.e., fluid edges, from the target virtual fluid model and store them in an edge group whose group name is Unshared; a preset built-in command is used to extract the edge group into curves to obtain edge lines.

[0053] The preset function may be group, which is mainly used to extract captured groups from regular expression matching results. The built-in command may be edgegroup_to_curve, which is a command for converting edge groups into curves.

[0054] Figure 3 A schematic diagram of a target virtual fluid model provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the target virtual fluid model has a certain width. Figure 4 A schematic diagram of the central axis of a target virtual fluid model provided in an embodiment of the present application, such as Figure 4 As shown, the central axis is Figure 3 The fluid centerline of the virtual fluid model shown is a curve.

[0055] S202: Perform centerline detection on the target virtual fluid model to obtain a central axis.

[0056] In the embodiment of the present application, the fluid centerline of the target virtual fluid model is the central axis of the target virtual fluid model.

[0057] It should be noted that the above-mentioned process S201 can be executed first, and then the above-mentioned process S202 can be executed; the above-mentioned process S202 can be executed first, and then the above-mentioned process S201 can be executed; the above-mentioned processes S201 and S202 can also be executed at the same time, and the embodiments of the present application do not impose specific restrictions on this.

[0058] Optionally, Figure 5 A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 3 ,like Figure 5 As shown, the process of performing centerline detection on the target virtual fluid model in S202 to obtain the centerline may include:

[0059] S301, segmenting the target virtual fluid model along a preset fluid flow direction to obtain at least two segments of virtual fluid models.

[0060] According to a preset length or a preset number of segments, the target virtual fluid model is segmented along a preset fluid flow direction to obtain at least two virtual fluid models. The preset length or the preset number of segments can be set according to actual needs or empirical values.

[0061] S302 , performing centerline detection on at least two segments of the virtual fluid model respectively to obtain at least two centerline segments.

[0062] In practical applications, the centerline detection may be performed on at least two sections of the virtual fluid model in sequence, or may be performed on at least two sections of the virtual fluid model simultaneously, and the embodiment of the present application does not impose any specific limitation on this.

[0063] S303, connecting at least two center line segments to obtain a central axis.

[0064] Wherein, at least two segments of the virtual fluid model have an order, and the corresponding at least two center lines also have an order. According to the order of the at least two center lines, the at least two center line segments are connected to obtain the central axis.

[0065] Optionally, Figure 6 A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 4 ,like Figure 6 As shown, the process of performing ray detection on the edge line according to the central axis in the above S102 to obtain the fluid width of the target virtual fluid model on the flow path may include:

[0066] S401. In a preset fluid top-view coordinate system, taking each vertex on the central axis as a starting point, perform ray detection on the edge line to obtain a distance parameter of each vertex relative to the edge line.

[0067] Among them, the central axis includes multiple vertices, each vertex has a corresponding identification attribute value, and the identification attribute value of the vertex can be assigned based on a custom integer attribute identifier. The preset conversion line command is used to divide the central axis into multiple segments, and each segment of the central axis has two vertices, so the segmented central axis has multiple vertices. Optionally, the preset conversion line command can be convertline. The segmented central axis can also be considered as a multi-segment central axis model.

[0068] It should be noted that the central axis and the edge lines can be transferred into the same preset fluid overhead coordinate system according to the coordinate information of the central axis and the coordinate information of the edge lines. In the preset fluid overhead coordinate system, the central axis is located between the two edge lines. Figure 7 A schematic diagram of a central axis and edge line provided in an embodiment of the present application, such as Figure 7 As shown, the central axis is located between the first edge line and the second edge line, and has a plurality of vertices.

[0069] In some embodiments, in a preset fluid overhead coordinate system, ray detection is performed on the first edge line and the second edge line with each vertex on the central axis as a starting point to obtain distance parameters of each vertex relative to the first edge line and distance parameters of each vertex relative to the second edge line.

[0070] S402 , determining the fluid width of the target virtual fluid model at the position corresponding to each vertex on the flow path according to the distance parameter of each vertex relative to the edge line.

[0071] In the embodiment of the present application, the fluid width of the target virtual fluid model at the corresponding position of each vertex on the flow path is determined according to the distance parameter of each vertex relative to the first edge line and the distance parameter of each vertex relative to the second edge line.

[0072] The distance parameters of each vertex relative to the first edge line and the sum of the distance parameters of each vertex relative to the second edge line are calculated to obtain the sum corresponding to each vertex, and the sum corresponding to each vertex is used as the fluid width at the corresponding position of each vertex.

[0073] In addition, the fluid width of the target virtual fluid model on the flow path includes: the fluid width at the corresponding position of each vertex of the target virtual fluid model on the flow path. There are multiple vertices, and the fluid widths corresponding to different vertices may be different.

[0074] It should be noted that there is a correspondence between the fluid width at the corresponding position of each vertex and the identification attribute value of each vertex, and the correspondence can be stored. Optionally, the fluid width at the corresponding position of each vertex can be stored at each vertex on the central axis.

[0075] In practical applications, a floating-point attribute river_width can be declared and used to store the width of a virtual river.

[0076] Optionally, Figure 8 A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 5 ,like Figure 8 As shown, the process of performing ray detection on the edge line with each vertex on the central axis as a starting point in S401 to obtain the distance parameter of each vertex relative to the edge line may include:

[0077] S501 , taking each vertex as a starting point, performing ray detection along a preset direction corresponding to an edge line, determining an intersection point between the ray corresponding to each vertex and the edge line, and obtaining an intersection point corresponding to each vertex.

[0078] Among them, the preset directions corresponding to different edge lines are opposite.

[0079] In some embodiments, a first ray detection is performed along a first preset direction corresponding to a first edge line with each vertex on the central axis as a starting point to detect intersections within a first preset distance, thereby obtaining intersections between the first ray corresponding to each vertex and the first edge line and obtaining first intersections corresponding to each vertex.

[0080] In other embodiments, a second ray detection is performed along the second preset direction corresponding to the second edge line with each vertex on the central axis as a starting point, and the intersection within the first preset distance is detected to obtain the intersection between the second ray corresponding to each vertex and the second edge line, and obtain the second intersection corresponding to each vertex. Optionally, the first preset distance can be 1000 units, and the specific value of the first preset distance can be set according to actual needs or experience.

[0081] The intersection points corresponding to each vertex may include: a first intersection point corresponding to each vertex and a second intersection point corresponding to each vertex.

[0082] Optionally, you can declare a vector array pos, which is used to store the positions of the intersection points corresponding to each vertex; declare an integer array prim, which is used to store the original indexes related to the intersection points; declare a vector array uvw, which is used to store the UVW coordinates (mapping coordinates) related to the intersection points.

[0083] S502: Determine a distance parameter of each vertex relative to the edge line according to the coordinate information of the intersection point corresponding to each vertex and the coordinate information of each vertex.

[0084] In the embodiment of the present application, the distance parameter of each vertex relative to the edge line is determined based on the coordinate information of the first intersection point corresponding to each vertex, the coordinate information of the second intersection point corresponding to each vertex, and the coordinate information of each vertex.

[0085] Optionally, Fig. 9 A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 6 ,like Fig. 9 As shown, the process of determining the distance parameter of each vertex relative to the edge line according to the coordinate information of the intersection point corresponding to each vertex and the coordinate information of each vertex in the above S502 may include:

[0086] S601: Calculate the coordinate information of the intersection points corresponding to each vertex and the difference between the coordinate information of each vertex.

[0087] In some implementations, a first difference between the coordinate information of a first intersection corresponding to each vertex and the coordinate information of each vertex is calculated, and a second difference between the coordinate information of a second intersection corresponding to each vertex and the coordinate information of each vertex is calculated.

[0088] A line is created between each vertex and the first intersection point corresponding to each vertex, and the length of the line is the first difference value; a line is created between each vertex and the second intersection point corresponding to each vertex, and the length of the line is the second difference value.

[0089] It should be noted that the first difference value corresponding to each vertex may represent the distance from each vertex to the first edge line, and the second difference value corresponding to each vertex may represent the distance from each vertex to the second edge line.

[0090] Fig.10 A schematic diagram of the connection between the vertices and the intersection points on the central axis provided in an embodiment of the present application is shown in FIG. Fig.10 As shown, each vertex is connected with a first intersection point corresponding to each vertex, and each vertex is connected with a second intersection point corresponding to each vertex.

[0091] In the embodiment of the present application, the coordinate information of the intersection points corresponding to each vertex may be stored in a target group. Optionally, the target group may be a Temp group. Fig.10 If you delete the Temp group, only the central axis and the vertices on the central axis will be displayed.

[0092] S602: Determine the distance parameter of each vertex relative to the edge line according to the difference value corresponding to each vertex.

[0093] The sum of the first difference value corresponding to each vertex and the second difference value corresponding to each vertex is calculated, and the sum value corresponding to each vertex is used as the distance parameter of each vertex relative to the edge line.

[0094] Optionally, Fig.11 A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 7 ,like Fig.11As shown, the process of determining the distance parameter of each vertex relative to the edge line according to the coordinate information of the intersection point corresponding to each vertex and the coordinate information of each vertex in the above S502 may include:

[0095] S701 : Determine a target point corresponding to each vertex according to coordinate information of an intersection point corresponding to each vertex, a preset direction corresponding to an edge line, and a preset distance.

[0096] The target points corresponding to each vertex include: a first target point corresponding to each vertex and a second target point corresponding to each vertex. In the embodiment of the present application, the index of the target point corresponding to each vertex may also be recorded.

[0097] In some embodiments, in the first preset direction corresponding to the first edge line, the coordinate information of the first intersection corresponding to each vertex is at a second preset distance from the point serving as the first target point corresponding to each vertex; and in the second preset direction corresponding to the second edge line, the coordinate information of the second intersection corresponding to each vertex is at a second preset distance from the point serving as the second target point corresponding to each vertex.

[0098] Optionally, the second preset distance may be 0.3 units, and the specific value of the second preset distance may be set according to actual needs or empirical values.

[0099] S702: Determine a distance parameter of each vertex relative to the edge line according to the coordinate information of the target point corresponding to each vertex and the coordinate information of each vertex.

[0100] In the embodiment of the present application, the distance parameter of each vertex relative to the edge line is determined based on the coordinate information of the first target point corresponding to each vertex, the coordinate information of the second target point corresponding to each vertex, and the coordinate information of each vertex.

[0101] Specifically, the difference between the coordinate information of the first target point corresponding to each vertex and the coordinate information of each vertex is calculated, the coordinate information of the second target point corresponding to each vertex and the difference between the coordinate information of each vertex are calculated to obtain the two differences corresponding to each vertex, the sum of the two differences corresponding to each vertex is calculated to obtain the distance parameter of each vertex relative to the edge line.

[0102] Among them, a line is created between each vertex and the first target point corresponding to each vertex, and the length of the line is a difference value. A line is created between each vertex and the second target point corresponding to each vertex, and the length of the line is another difference value, that is, two differences are obtained.

[0103] In the embodiment of the present application, the coordinate information of the target point corresponding to each vertex may be stored in a target group. Optionally, the target group may be a Temp group. Fig.10 If you delete the Temp group, only the central axis and the vertices on the central axis will be displayed.

[0104] In practical applications, the distance parameters of each vertex relative to the edge line are determined based on the coordinate information of the target point corresponding to each vertex and the coordinate information of each vertex. The error can be corrected so that the calculated fluid width corresponding to each vertex is greater than or equal to the actual fluid width, so as to avoid the problem that some functions are not well implemented when the calculated fluid width is small. For example, when building a virtual bridge for the target virtual fluid model based on the calculated fluid width, when the calculated fluid width is greater than or equal to the actual fluid width, the virtual bridge deck can be successfully built, and when the calculated fluid width is less than the actual fluid width, the built virtual bridge deck is too short, which may cause the problem of failure to build the virtual bridge deck.

[0105] Optionally, Fig.12 A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 8 ,like Fig.12 As shown, before the process of performing ray detection along the preset direction corresponding to the edge line with each vertex as the starting point in the above S501 to determine the intersection point between the ray corresponding to each vertex and the edge line and obtain the intersection point corresponding to each vertex, the method may further include:

[0106] S801, determining the normal direction of each vertex according to the tangent direction of each vertex;

[0107] In some embodiments, a preset command is used to obtain the tangent direction of each vertex, and then the tangent direction of each vertex is recorded as the normal direction of each vertex. The central axis indicates the flow path, and the vertices on the central axis have an order, and the tangent direction of each vertex is the direction of each vertex to the next vertex.

[0108] In addition, the normal direction of each vertex can be recorded as N.

[0109] S802: Use a direction vector that is orthogonal to the normal direction of each vertex and the preset axis direction as a preset direction corresponding to the edge line.

[0110] The preset axis direction may be a preset longitudinal axis direction, that is, the preset axis may be a Y axis, which may be expressed as: (0, 1, 0).

[0111] It should be noted that a direction vector orthogonal to the normal direction of each vertex and the Y axis can be calculated, and the direction vector is used as a preset direction corresponding to one of the two edge lines, for example, as a first preset direction corresponding to the first edge line; the reverse direction vector of the direction vector is used as a preset direction corresponding to the other of the two edge lines, for example, as a second preset direction corresponding to the second edge line. The first preset direction can be expressed as a dir direction, and the second preset direction can be expressed as a -dir direction.

[0112] In the embodiment of the present application, each vertex on the central axis is used as a starting point, and a ray detection is performed along the dir direction and the -dir direction to find the point that intersects with the edge line, and then the distance between the two intersection points is calculated, and finally the distance is stored as the fluid width, and the intersection point can be marked into a temporary group (Temp group). In addition, a target point can be created near each detected intersection position, and the distance between the two target points can be calculated, which can also be used as the fluid width, and the target point can be marked into a temporary group (Temp group).

[0113] Optionally, Fig.13 A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 9 ,like Fig.13 As shown, after determining the fluid width of the target virtual fluid model at the position corresponding to each vertex on the flow path according to the distance parameter of each vertex relative to the edge line in the above S402, the method may further include:

[0114] S901. Traverse each vertex and store the identification attribute value of each vertex in a dictionary.

[0115] S902: Store the fluid width at the corresponding position of each vertex in a dictionary.

[0116] After dividing the multiple central axes into multiple segments, multiple vertices on the central axes and the identification attribute value of each vertex in the multiple vertices can be obtained. The identification attribute value of each vertex can also be called the ID (Identity document, unique code) attribute value of each vertex.

[0117] In an embodiment of the present application, the data format of the identification attribute value of each vertex and the fluid width at the corresponding position of each vertex can be json data (a lightweight data exchange format). Optionally, after calculating the fluid width at the corresponding position of each vertex, python (a computer program programming language) can be used to export the above json data and export the json data to the engine. Among them, the json model can be imported, the json module can be used to process the json data, and the os module (a module in the Python standard library, a common module for accessing operating system related functions) can also be imported so that the os module can be used for file and directory operations.

[0118] In some implementations, each vertex may be assigned to a variable, an empty dictionary may be initialized, each vertex may be traversed based on the variable, the dictionary may be cleared, and then the identification attribute value of each vertex may be stored in the dictionary, and the fluid width at the corresponding position of each vertex may be stored in the dictionary.

[0119] The identification attribute value of each vertex and the fluid width at the corresponding position of each vertex can be referred to as node parameters. The node parameters are used to obtain a path string, which can indicate a preset file path.

[0120] S903: Store the dictionary in a file under a preset file path.

[0121] There are no duplicate files in the preset file path. If there are duplicate files in the preset file path, the duplicate files will be deleted.

[0122] It should be noted that the dictionary stores the identification attribute value of each vertex and the fluid width at the corresponding position of each vertex. Storing the dictionary in a file under a preset file path means that the identification attribute value of each vertex and the fluid width at the corresponding position of each vertex are stored in a file under the preset file path.

[0123] Optionally, Fig.14 A schematic diagram of a virtual fluid model processing method provided in an embodiment of the present application Figure 10 ,like Fig.14 As shown, the dictionary is stored in a file under the preset file path, including:

[0124] S1001. Store the dictionary in a preset list.

[0125] Among them, a preset list can be initialized, and the preset list can be a json_list list. A dictionary can be added to the json_list list, and then a prompt message can be printed, and the prompt message can indicate that the dictionary is created successfully.

[0126] S1002: Construct a preset file path.

[0127] In the embodiment of the present application, a preset file path is constructed, and the file name format can be a file name with a suffix of json format. After the preset file path is constructed, the preset file path can be printed to facilitate debugging by R&D personnel. If the preset file path exists, there is no need to repeatedly construct the preset file path. If the preset file path does not exist, the preset file path needs to be constructed.

[0128] S1003: Create a file in a preset file path.

[0129] Among them, the file created under the preset file path is an empty file, that is, no information is stored in the file.

[0130] It is worth noting that if a file exists under the preset file path, there is no need to create the file repeatedly; if a file does not exist under the preset file path, a file is created under the preset file path; if a duplicate file exists under the preset file path, the duplicate file is deleted.

[0131] S1004: Store the preset list in a file.

[0132] In some embodiments, a file under a preset file path is opened in write mode, and then a preset list json_list is written into the file, the preset list is converted into a JSON string format, and an indentation is set. For example, the indentation can be 4 spaces, and the JSON string is written into the file.

[0133] In addition, after the preset list is stored in the file, a prompt message may be printed, which is used to indicate that the data is written successfully, that is, the identification attribute value of each vertex and the fluid width at the corresponding position of each vertex are written successfully.

[0134] It should be noted that the identification attribute value of each vertex and the fluid width at the corresponding position of each vertex are processed and recorded in a pre-planned data structure, so as to predict the virtual fluid width according to factors such as terrain and virtual fluid shape. This data can be used for rendering, physical interaction and other aspects in the game.

[0135] To summarize, the embodiment of the present application provides a method for processing a virtual fluid model, which performs ray detection based on the central axis and edge line of the target virtual fluid model to automatically calculate the fluid width of the target virtual fluid model. Compared with manual marking or grid calculation, the ray detection in the embodiment of the present application can improve the calculation accuracy of the fluid width without human intervention, and can also improve the calculation efficiency of the fluid width.

[0136] Moreover, through the processing method of the virtual fluid model provided in the embodiment of the present application, the calculation of the river width can greatly reduce the amount of calculation at runtime without affecting the river rendering and interaction effects, making the gameplay more diversified.

[0137] The following describes a virtual fluid model processing device, electronic device, storage medium, etc. used to execute the virtual fluid model processing method provided in the present application. Its specific implementation process and technical effects refer to the relevant content of the above-mentioned virtual fluid model processing method, which will not be repeated below.

[0138] Fig.15 A schematic diagram of a virtual fluid model processing device provided in an embodiment of the present application is shown in FIG. Fig.15 As shown, the device comprises:

[0139] An acquisition module 101 is used to acquire an edge line of a target virtual fluid model and a central axis of the target virtual fluid model, wherein the central axis is used to indicate a flow path of the target virtual fluid;

[0140] The detection module 102 is used to perform ray detection on the edge line according to the central axis to obtain the fluid width of the target virtual fluid model on the flow path.

[0141] Optionally, the acquisition module 101 is specifically configured to perform fluid edge extraction on the target virtual fluid model to obtain the edge line; and perform centerline detection on the target virtual fluid model to obtain the centerline.

[0142] Optionally, the acquisition module 101 is specifically used to segment the target virtual fluid model along a preset fluid flow direction to obtain at least two segments of the virtual fluid model; perform centerline detection on the at least two segments of the virtual fluid model respectively to obtain at least two centerline segments; and connect the at least two centerline segments to obtain the central axis.

[0143] Optionally, the detection module 102 is specifically used to perform ray detection on the edge line in a preset fluid overhead coordinate system, taking each vertex on the central axis as a starting point, to obtain distance parameters of each vertex relative to the edge line; wherein the central axis includes multiple vertices; based on the distance parameters of each vertex relative to the edge line, determine the fluid width of the target virtual fluid model at the corresponding position of each vertex on the flow path.

[0144] Optionally, the detection module 102 is specifically used to perform ray detection along the preset direction corresponding to the edge line with each vertex as the starting point, determine the intersection between the ray corresponding to each vertex and the edge line, and obtain the intersection corresponding to each vertex; wherein the preset directions corresponding to different edge lines are opposite; and determine the distance parameters of each vertex relative to the edge line based on the coordinate information of the intersection corresponding to each vertex and the coordinate information of each vertex.

[0145] Optionally, the detection module 102 is specifically used to calculate the coordinate information of the intersection points corresponding to the vertices and the difference between the coordinate information of the vertices; and determine the distance parameters of the vertices relative to the edge line according to the difference corresponding to the vertices.

[0146] Optionally, the detection module 102 is specifically used to determine the target point corresponding to each vertex based on the coordinate information of the intersection point corresponding to each vertex, the preset direction and the preset distance corresponding to the edge line; and determine the distance parameters of each vertex relative to the edge line based on the coordinate information of the target point corresponding to each vertex and the coordinate information of each vertex.

[0147] Optionally, the device further comprises:

[0148] The determination module is used to determine the normal direction of each vertex according to the tangent direction of each vertex; and use the direction vector orthogonal to the normal direction of each vertex and the preset axis direction as the preset direction corresponding to the edge line.

[0149] Optionally, the device further comprises:

[0150] The storage module is used to traverse the vertices and store the identification attribute values ​​of the vertices in a dictionary; store the fluid width at the corresponding position of each vertex in the dictionary; and store the dictionary in a file under a preset file path.

[0151] Optionally, the storage module is specifically used to store the dictionary in a preset list; construct the preset file path; create the file under the preset file path; and store the preset list under the file.

[0152] To summarize, ray detection is performed based on the central axis and edge line of the target virtual fluid model to automatically calculate the fluid width of the target virtual fluid model. Compared with manual marking or grid calculation, the ray detection in the embodiment of the present application can improve the calculation accuracy of the fluid width without human intervention, and can also improve the calculation efficiency of the fluid width.

[0153] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0154] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0155] Fig.16A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Fig.16 As shown, the device includes: a processor 201 and a memory 202.

[0156] The memory 202 is used to store programs, and the processor 201 calls the programs stored in the memory 202 to execute the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.

[0157] For example, the method includes:

[0158] Acquire an edge line of a target virtual fluid model and a center axis of the target virtual fluid model, wherein the center axis is used to indicate a flow path of the target virtual fluid;

[0159] According to the central axis, ray detection is performed on the edge line to obtain the fluid width of the target virtual fluid model on the flow path.

[0160] Optionally, the acquiring the edge line of the target virtual fluid model and the central axis of the target virtual fluid model includes:

[0161] Extracting the fluid edge of the target virtual fluid model to obtain the edge line;

[0162] Performing centerline detection on the target virtual fluid model to obtain the centerline.

[0163] Optionally, performing centerline detection on the target virtual fluid model to obtain the centerline includes:

[0164] Segmenting the target virtual fluid model along a preset fluid flow direction to obtain at least two segments of virtual fluid models;

[0165] Performing centerline detection on the at least two segments of the virtual fluid model respectively to obtain at least two centerline segments;

[0166] The at least two center line segments are connected to obtain the central axis.

[0167] Optionally, performing ray detection on the edge line according to the central axis to obtain a fluid width of the target virtual fluid model on the flow path includes:

[0168] In a preset fluid top-view coordinate system, taking each vertex on the central axis as a starting point, ray detection is performed on the edge line to obtain distance parameters of each vertex relative to the edge line; wherein the central axis includes a plurality of vertices;

[0169] The fluid width of the target virtual fluid model at the position corresponding to each vertex on the flow path is determined according to the distance parameter of each vertex relative to the edge line.

[0170] Optionally, taking each vertex on the central axis as a starting point, performing ray detection on the edge line to obtain distance parameters of each vertex relative to the edge line includes:

[0171] Taking each vertex as a starting point, performing ray detection along the preset direction corresponding to the edge line, determining the intersection point between the ray corresponding to each vertex and the edge line, and obtaining the intersection point corresponding to each vertex; wherein the preset directions corresponding to different edge lines are opposite;

[0172] According to the coordinate information of the intersection points corresponding to the vertices and the coordinate information of the vertices, the distance parameters of the vertices relative to the edge line are determined.

[0173] Optionally, determining the distance parameters of each vertex relative to the edge line according to the coordinate information of the intersection points corresponding to each vertex and the coordinate information of each vertex includes:

[0174] Calculate the coordinate information of the intersection points corresponding to the vertices and the difference between the coordinate information of the vertices;

[0175] According to the difference values ​​corresponding to the vertices, distance parameters of the vertices relative to the edge line are determined.

[0176] Optionally, determining the distance parameters of each vertex relative to the edge line according to the coordinate information of the intersection points corresponding to each vertex and the coordinate information of each vertex includes:

[0177] Determine the target point corresponding to each vertex according to the coordinate information of the intersection point corresponding to each vertex, the preset direction corresponding to the edge line, and the preset distance;

[0178] According to the coordinate information of the target point corresponding to each vertex and the coordinate information of each vertex, the distance parameter of each vertex relative to the edge line is determined.

[0179] Optionally, before performing ray detection along a preset direction corresponding to the edge line with each vertex as a starting point to determine the intersection point between the ray corresponding to each vertex and the edge line, and obtaining the intersection point corresponding to each vertex, the method further includes:

[0180] Determining the normal direction of each vertex according to the tangent direction of each vertex;

[0181] A direction vector orthogonal to the normal direction of each vertex and the preset axis direction is used as the preset direction corresponding to the edge line.

[0182] Optionally, after determining the fluid width of the target virtual fluid model at the position corresponding to each vertex on the flow path according to the distance parameter of each vertex relative to the edge line, the method further includes:

[0183] Traversing each of the vertices, and storing the identification attribute value of each of the vertices in a dictionary;

[0184] storing the fluid width at the position corresponding to each vertex in the dictionary;

[0185] The dictionary is stored in a file under a preset file path.

[0186] Optionally, storing the dictionary in a file under a preset file path includes:

[0187] storing the dictionary in a preset list;

[0188] Constructing the preset file path;

[0189] Creating the file in the preset file path;

[0190] The preset list is stored under the file.

[0191] To summarize, ray detection is performed based on the central axis and edge line of the target virtual fluid model to automatically calculate the fluid width of the target virtual fluid model. Compared with manual marking or grid calculation, the ray detection in the embodiment of the present application can improve the calculation accuracy of the fluid width without human intervention, and can also improve the calculation efficiency of the fluid width.

[0192] Optionally, the present application also provides a program product, such as a computer-readable storage medium, including a program, which is used to execute the above method embodiment when executed by a processor.

[0193] For example, the method includes:

[0194] Acquire an edge line of a target virtual fluid model and a center axis of the target virtual fluid model, wherein the center axis is used to indicate a flow path of the target virtual fluid;

[0195] According to the central axis, ray detection is performed on the edge line to obtain the fluid width of the target virtual fluid model on the flow path.

[0196] Optionally, the acquiring the edge line of the target virtual fluid model and the central axis of the target virtual fluid model includes:

[0197] Extracting the fluid edge of the target virtual fluid model to obtain the edge line;

[0198] Performing centerline detection on the target virtual fluid model to obtain the centerline.

[0199] Optionally, performing centerline detection on the target virtual fluid model to obtain the centerline includes:

[0200] Segmenting the target virtual fluid model along a preset fluid flow direction to obtain at least two segments of virtual fluid models;

[0201] Performing centerline detection on the at least two segments of the virtual fluid model respectively to obtain at least two centerline segments;

[0202] The at least two center line segments are connected to obtain the central axis.

[0203] Optionally, performing ray detection on the edge line according to the central axis to obtain a fluid width of the target virtual fluid model on the flow path includes:

[0204] In a preset fluid top-view coordinate system, taking each vertex on the central axis as a starting point, ray detection is performed on the edge line to obtain distance parameters of each vertex relative to the edge line; wherein the central axis includes a plurality of vertices;

[0205] The fluid width of the target virtual fluid model at the position corresponding to each vertex on the flow path is determined according to the distance parameter of each vertex relative to the edge line.

[0206] Optionally, taking each vertex on the central axis as a starting point, performing ray detection on the edge line to obtain distance parameters of each vertex relative to the edge line includes:

[0207] Taking each vertex as a starting point, performing ray detection along the preset direction corresponding to the edge line, determining the intersection point between the ray corresponding to each vertex and the edge line, and obtaining the intersection point corresponding to each vertex; wherein the preset directions corresponding to different edge lines are opposite;

[0208] According to the coordinate information of the intersection points corresponding to the vertices and the coordinate information of the vertices, the distance parameters of the vertices relative to the edge line are determined.

[0209] Optionally, determining the distance parameters of each vertex relative to the edge line according to the coordinate information of the intersection points corresponding to each vertex and the coordinate information of each vertex includes:

[0210] Calculate the coordinate information of the intersection points corresponding to the vertices and the difference between the coordinate information of the vertices;

[0211] According to the difference values ​​corresponding to the vertices, distance parameters of the vertices relative to the edge line are determined.

[0212] Optionally, determining the distance parameters of each vertex relative to the edge line according to the coordinate information of the intersection points corresponding to each vertex and the coordinate information of each vertex includes:

[0213] Determine the target point corresponding to each vertex according to the coordinate information of the intersection point corresponding to each vertex, the preset direction corresponding to the edge line, and the preset distance;

[0214] According to the coordinate information of the target point corresponding to each vertex and the coordinate information of each vertex, the distance parameter of each vertex relative to the edge line is determined.

[0215] Optionally, before performing ray detection along a preset direction corresponding to the edge line with each vertex as a starting point to determine the intersection between the ray corresponding to each vertex and the edge line, and obtaining the intersection corresponding to each vertex, the method further includes:

[0216] Determining the normal direction of each vertex according to the tangent direction of each vertex;

[0217] A direction vector orthogonal to the normal direction of each vertex and the preset axis direction is used as the preset direction corresponding to the edge line.

[0218] Optionally, after determining the fluid width of the target virtual fluid model at the position corresponding to each vertex on the flow path according to the distance parameter of each vertex relative to the edge line, the method further includes:

[0219] Traversing each of the vertices, and storing the identification attribute value of each of the vertices in a dictionary;

[0220] storing the fluid width at the position corresponding to each vertex in the dictionary;

[0221] The dictionary is stored in a file under a preset file path.

[0222] Optionally, storing the dictionary in a file under a preset file path includes:

[0223] storing the dictionary in a preset list;

[0224] Constructing the preset file path;

[0225] Creating the file in the preset file path;

[0226] The preset list is stored under the file.

[0227] To summarize, ray detection is performed based on the central axis and edge line of the target virtual fluid model to automatically calculate the fluid width of the target virtual fluid model. Compared with manual marking or grid calculation, the ray detection in the embodiment of the present application can improve the calculation accuracy of the fluid width without human intervention, and can also improve the calculation efficiency of the fluid width.

[0228] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0229] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0230] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0231] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.

[0232] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for processing a virtual fluid model, characterized in that: The method comprises: Acquire an edge line of a target virtual fluid model and a center axis of the target virtual fluid model, wherein the center axis is used to indicate a flow path of the target virtual fluid; According to the central axis, ray detection is performed on the edge line to obtain the fluid width of the target virtual fluid model on the flow path.

2. The method according to claim 1, characterized in that The step of acquiring the edge line of the target virtual fluid model and the central axis of the target virtual fluid model includes: Extracting the fluid edge of the target virtual fluid model to obtain the edge line; Performing centerline detection on the target virtual fluid model to obtain the centerline.

3. The method according to claim 2, characterized in that The performing centerline detection on the target virtual fluid model to obtain the centerline includes: Segmenting the target virtual fluid model along a preset fluid flow direction to obtain at least two segments of virtual fluid models; Performing centerline detection on the at least two segments of the virtual fluid model respectively to obtain at least two centerline segments; The at least two center line segments are connected to obtain the central axis.

4. The method according to claim 1, characterized in that: The step of performing ray detection on the edge line according to the central axis to obtain the fluid width of the target virtual fluid model on the flow path includes: In a preset fluid top-view coordinate system, taking each vertex on the central axis as a starting point, ray detection is performed on the edge line to obtain distance parameters of each vertex relative to the edge line; wherein the central axis includes a plurality of vertices; The fluid width of the target virtual fluid model at the position corresponding to each vertex on the flow path is determined according to the distance parameter of each vertex relative to the edge line.

5. The method according to claim 4, characterized in that The step of performing ray detection on the edge line with each vertex on the central axis as a starting point to obtain distance parameters of each vertex relative to the edge line includes: Taking each vertex as a starting point, performing ray detection along the preset direction corresponding to the edge line, determining the intersection between the ray corresponding to each vertex and the edge line, and obtaining the intersection corresponding to each vertex; wherein the preset directions corresponding to different edge lines are opposite; According to the coordinate information of the intersection points corresponding to the vertices and the coordinate information of the vertices, the distance parameters of the vertices relative to the edge line are determined.

6. The method according to claim 5, characterized in that The determining, according to the coordinate information of the intersection points corresponding to the vertices and the coordinate information of the vertices, the distance parameters of the vertices relative to the edge line comprises: Calculate the coordinate information of the intersection points corresponding to the vertices and the difference between the coordinate information of the vertices; According to the difference values ​​corresponding to the vertices, distance parameters of the vertices relative to the edge line are determined.

7. The method according to claim 5, characterized in that The determining, according to the coordinate information of the intersection points corresponding to the vertices and the coordinate information of the vertices, the distance parameters of the vertices relative to the edge line comprises: Determine the target point corresponding to each vertex according to the coordinate information of the intersection point corresponding to each vertex, the preset direction corresponding to the edge line, and the preset distance; According to the coordinate information of the target point corresponding to each vertex and the coordinate information of each vertex, the distance parameter of each vertex relative to the edge line is determined.

8. The method according to claim 5, characterized in that Before performing ray detection with each vertex as a starting point along a preset direction corresponding to the edge line to determine the intersection point between the ray corresponding to each vertex and the edge line, and obtaining the intersection point corresponding to each vertex, the method further includes: Determining the normal direction of each vertex according to the tangent direction of each vertex; A direction vector orthogonal to the normal direction of each vertex and the preset axis direction is used as the preset direction corresponding to the edge line.

9. The method according to claim 4, characterized in that After determining the fluid width of the target virtual fluid model at the position corresponding to each vertex on the flow path according to the distance parameter of each vertex relative to the edge line, the method further includes: Traversing each of the vertices, and storing the identification attribute value of each of the vertices in a dictionary; storing the fluid width at the position corresponding to each vertex in the dictionary; The dictionary is stored in a file under a preset file path.

10. The method according to claim 9, characterized in that The step of storing the dictionary in a file under a preset file path includes: storing the dictionary in a preset list; Constructing the preset file path; Creating the file in the preset file path; The preset list is stored under the file.

11. A processing device for a virtual fluid model, characterized in that: The device comprises: An acquisition module, used to acquire an edge line of a target virtual fluid model and a central axis of the target virtual fluid model, wherein the central axis is used to indicate a flow path of the target virtual fluid; The detection module is used to perform ray detection on the edge line according to the central axis to obtain the fluid width of the target virtual fluid model on the flow path.

12. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, the method for processing the virtual fluid model described in any one of claims 1 to 10 is implemented.

13. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is read and executed, the method for processing the virtual fluid model described in any one of claims 1 to 10 is implemented.