Virtual fluid model generation method and device, electronic equipment and storage medium
By determining the surface to be mapped that has the same target flow direction and UV coordinate direction, the texture map of the fluid flow effect is obtained and stitched together with the primitive model, which solves the problem of incorrect flow direction of virtual fluid model after rotation and realizes the correct flow display of fluid model at any angle.
Patent Information
- Application Number
- CN202511212550.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-12-12
AI Technical Summary
Existing technologies cannot guarantee the correctness of the flow direction of a fluid model after it has been rotated or its angle changed, when generating virtual fluid models, which can lead to errors in the direction of fluid flow.
By determining the target flow direction of the virtual fluid model in the virtual scene, creating a surface to be textured with the same UV coordinate direction, obtaining the texture map of the fluid flow effect, and stitching several target primitive models together in the target flow direction to ensure the consistency of the fluid flow direction.
It ensures the correct flow direction of the virtual fluid model when placed at any angle, improving the display effect of the fluid model in the game scene.
Smart Images

Figure CN121120930A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, and particularly relates to a virtual fluid model generation method and device, electronic equipment and storage medium. BACKGROUND
[0002] In a computer game scene, in order to make the player better experience the environment in the game and improve the realism of the game, a fluid effect is usually simulated in the game scene, for example, a virtual fluid model with a fluid effect such as a river channel or a pipeline is displayed in the game scene.
[0003] In the prior art, when a virtual fluid model is generated, a virtual fluid model white model is first constructed, vertex coordinates of the virtual fluid model white model in a world coordinate system are calculated, a texture map is sampled through the vertex coordinates, and then mapping processing is performed to obtain a virtual fluid model with a continuous flow effect.
[0004] In the above-mentioned method of generating a virtual fluid model, since the world coordinate system does not rotate, the flow direction of the fluid in the texture map does not change, when the virtual fluid model rotates in the game scene, the vertex coordinates of the virtual fluid model change, while the mapping does not change, which causes the flow direction of the fluid to be wrong after the virtual fluid model is mapped. SUMMARY
[0005] The present disclosure provides a virtual fluid model generation method, device, electronic equipment and storage medium, which can generate a virtual fluid model with a correct flow direction when the virtual fluid model is placed at any angle in a game scene.
[0006] In a first aspect, the present disclosure provides a virtual fluid model generation method, comprising:
[0007] determining a target flow direction of a virtual fluid model to be generated relative to a game character in a virtual scene;
[0008] creating an original primitive model, and determining a splicing surface and at least one surface to be mapped on the original primitive model based on the target flow direction, wherein uv coordinates of each surface to be mapped are in the same direction;
[0009] obtaining a texture map with a fluid flow effect;
[0010] performing mapping processing on the surface to be mapped by using the texture map based on the uv coordinates of each surface to be mapped, to obtain a target primitive model with the same fluid flow direction for each surface to be mapped;
[0011] splicing a plurality of target primitive models in the target flow direction through the splicing surface one by one, to obtain a virtual fluid model with the same fluid flow direction as the target flow direction.
[0012] In a second aspect, the present disclosure provides a virtual fluid model generation apparatus, comprising:
[0013] a target flow direction determination module configured to determine a target flow direction of a virtual fluid model to be generated in a virtual scene relative to a game character;
[0014] an original primitive model creation module configured to create an original primitive model and determine a splicing surface and at least one surface to be mapped on the original primitive model based on the target flow direction, wherein a direction of uv coordinates of each surface to be mapped is the same;
[0015] a texture map acquisition module configured to acquire a texture map with a fluid flow effect;
[0016] a mapping module configured to map each surface to be mapped based on the uv coordinates of each surface to be mapped using the texture map to obtain a target primitive model with the same fluid flow direction for each surface to be mapped;
[0017] a virtual fluid model generation module configured to splice a plurality of target primitive models in the target flow direction through the splicing surface one by one to obtain a virtual fluid model with the same fluid flow direction as the target flow direction.
[0018] In a third aspect, the present disclosure provides an electronic device, comprising:
[0019] at least one processor; and
[0020] a memory in communication with the at least one processor; wherein
[0021] the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the virtual fluid model generation method of the first aspect of the present disclosure.
[0022] In a fourth aspect, the present disclosure provides a computer readable storage medium storing computer instructions for enabling a processor to execute the virtual fluid model generation method of the first aspect of the present disclosure.
[0023] The embodiment of the present disclosure determines the target flow direction of the virtual fluid model to be generated in the virtual scene relative to the game role, creates an original primitive model, and determines the splicing surface on the original primitive model and at least one surface to be mapped based on the target flow direction, the directions of the uv coordinates of each surface to be mapped are the same, a texture map with a fluid flow effect is obtained, the surface to be mapped is mapped by using the texture map based on the uv coordinates of each surface to be mapped, a target primitive model with the same fluid flow direction of the surface to be mapped is obtained, and a plurality of target primitive models are spliced one by one in the target flow direction through the splicing surface, so that a virtual fluid model with the same fluid flow direction as the target flow direction is obtained. Since the fluid flow directions on the surfaces of the plurality of target primitive models used for splicing are the same, the target flow direction of the fluid can be determined after the placement angle of the virtual fluid model is determined, the target primitive model is spliced to generate the virtual fluid model according to the target flow direction, and the correctness of the flow direction of the virtual fluid model can be ensured when the virtual fluid model is placed at any angle.
[0024] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed in the embodiment description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can also be obtained by those skilled in the art without creative labor.
[0026] Figure 1 is a schematic diagram of generating a virtual fluid model in the related art;
[0027] Figure 2 is a flowchart of a virtual fluid model generation method provided by an embodiment of the present disclosure;
[0028] Figure 3 is a schematic diagram of displaying a virtual fluid model in a game scene according to an embodiment of the present disclosure;
[0029] Figure 4 is a schematic diagram of generating a virtual fluid model by splicing target primitive models in an embodiment of the present disclosure;
[0030] Figure 5 is a schematic diagram of a primitive model provided by an embodiment of the present disclosure;
[0031] Figure 6 is a flowchart of a virtual fluid model generation method provided by another optional embodiment of the present disclosure;
[0032] Figure 7 is a schematic diagram of a uv unwrapping diagram and a black and white mask diagram provided by an embodiment of the present disclosure;
[0033] Figure 8 is a schematic diagram of a texture map provided by an embodiment of the present disclosure;
[0034] Figure 9 is a schematic diagram of a noise map provided by an embodiment of the present disclosure;
[0035] Figure 10 is a schematic diagram of achieving light edge rendering through uv coordinates provided by an embodiment of the present disclosure;
[0036] Figure 11 is a structural schematic diagram of a virtual fluid model generation device provided by an embodiment of the present disclosure;
[0037] Figure 12 is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0038] In order for those skilled in the art to better understand the present disclosure scheme, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, not all. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present disclosure.
[0039] Figure 1 A schematic diagram of generating a virtual fluid model in the related art is shown, where the fluid can refer to a non-solid liquid or gas, such as water, oil, magma, etc. In a game scene, the virtual fluid model can refer to a virtual river, a pipeline, etc. which needs to show fluid flow.
[0040] In Figure 1 , the texture Figure 1 is a dynamic image with fluid flow effect, and the texture Figure 1 In the direction F, when generating a virtual fluid model, the related art first constructs a virtual fluid model white model 2, as shown in Figure 1 b, when the virtual fluid model white model 2 is placed in the same direction as the fluid flow direction F in the texture Figure 1 , the texture Figure 1 is sampled and mapped by the vertex coordinates of the virtual fluid model white model 2 in the world coordinate system, and after the mapping, the virtual fluid model after mapping can show the fluid flow effect with the fluid flow direction F.
[0041] However, when the game scene changes or the virtual fluid model is viewed from different game characters, the angle of the virtual fluid model changes, such as Figure 1 As shown in FIG. c of the drawings, the virtual fluid model 2 has an angle θ with the horizontal direction, so that the flow direction F of the virtual fluid model 2 is changed. Figure 1 As shown in FIG. b of the drawings, the vertex coordinates of the virtual fluid model 2 in the world coordinate system are changed, and if the texture is sampled according to the changed vertex coordinates, the texture is not rotated, so that the flow direction of the virtual fluid model 2 after mapping is still the direction F, which causes the flow direction of the fluid to be incorrect in FIG. c of the drawings. Figure 1 Figure 1 Figure 1 Figure 1 Therefore, a large number of texture maps with different flow directions of the fluid need to be maintained.
[0042] Therefore, the embodiments of the present disclosure provide a virtual fluid model generation method, device, electronic device and storage medium, so as to ensure that the fluid is in the correct flow direction when the virtual fluid model is placed at any angle in the game scene.
[0043] Figure 2 A flow chart of a virtual fluid model generation method provided by an embodiment of the present disclosure is provided, and the embodiment can be applied to the case of generating a virtual fluid model in a game scene. The method can be executed by a virtual fluid model generation device, which can be realized in the form of hardware and / or software and can be configured in an electronic device. As shown in FIG. a of the drawings, the virtual fluid model generation method includes the following steps. Figure 2
[0044] S201, determining a target flow direction of a virtual fluid model to be generated in a virtual scene relative to a game character.
[0045] In the embodiment, the virtual scene can be a scene displayed after a game application is run, and the virtual scene can include a game character, a virtual object, a virtual prop, etc. The virtual fluid model is one of the virtual objects, and the virtual fluid model can be a virtual waterway, such as a virtual river. The virtual fluid model can also be a virtual pipeline, such as a virtual oil pipeline or a virtual gas pipeline. In general, the virtual fluid model can be a model simulating the flow effect of a non-solid liquid or gas.
[0046] The embodiment can determine a target flow direction of the virtual fluid model to be generated relative to the game character in the virtual scene upon receiving a generation instruction of the virtual fluid model. The generation instruction can be generated by the game application when a preset event is detected. For example, the preset event can be that the game character enters a scene provided with the virtual fluid model. In this case, the generation instruction can be a rendering instruction for the virtual fluid model, which can include the current position and the forward direction of the game character, and can also include the position of the virtual fluid model in the virtual scene. The target flow direction of the virtual fluid model to be generated can be determined based on the current position and the forward direction of the game character. The target flow direction can be the included angle between the flow direction of the fluid in the virtual fluid model and the forward direction of the game character.
[0047] It should be noted that the generation instruction can be generated by the game application and sent to a computer, a mobile terminal or other electronic device. The virtual fluid model is generated and rendered in the electronic device to present the virtual fluid model with a fluid flow effect in the virtual scene displayed on the display screen of the electronic device. Therefore, the target flow direction of the virtual fluid model can also be directly included in the generation instruction.
[0048] As shown in one game scene in Figure 3 , the game character 3 advances along direction A and needs to display a virtual fluid model 2 flowing along direction F. The game application can directly generate a generation instruction including the target flow direction (the included angle between direction A and direction F) and the length (the size along direction F) of the virtual fluid model 2.
[0049] In S202, an original primitive model is created, and a splicing surface and at least one surface to be mapped on the original primitive model are determined based on the target flow direction. The uv coordinates of each surface to be mapped have the same direction.
[0050] The primitive model can be the smallest structural unit constituting the virtual fluid model. The primitive model can be a square model, a cylindrical model, a triangular column, etc. Different virtual fluid models of different geometric shapes can be constructed by different primitive models. The original primitive model can be a white model before mapping.
[0051] Taking the virtual fluid model 2 to be generated in Figure 3 as a square river as an example, the original primitive model can be a cube or a cuboid. After the original primitive model is created, the placement angle of the original primitive model can be determined based on the target flow direction, so as to determine the splicing surface and the surface to be mapped on the original primitive model. The splicing surface can be a surface used for splicing two primitive models. The surface to be mapped can be a surface used for presenting a fluid flow effect. Each surface to be mapped has independent uv coordinates, and the uv coordinates of each surface to be mapped have the same direction.
[0052] AsFigure 4 As shown, Figure 4 In the virtual fluid model to be generated (Figure c), the target flow direction of the fluid is F. The placement angle of the original primitive model can be determined based on the target flow direction. Figure 4 As shown in Figure a, the splicing surfaces and the surfaces to be mapped on the original primitive model can be determined, as follows: Figure 5 As shown, the splicing surfaces of the original primitive model are surfaces P5 and P6, and the surfaces to be textured are surfaces P1-P4. Each of the surfaces to be textured, P1-P4, has a separate uv coordinate system, and the uv coordinates of each surface have the same direction. In this embodiment, the same direction of the uv coordinates can mean that the origin (0, 0) and the endpoint (1, 1) of the uv coordinates are in the same position in the surface. For example, the origin (0, 0) can be the lower left corner of the surface, and the endpoint (1, 1) can be the upper right corner of the surface.
[0053] S203. Obtain a texture map with fluid flow effects.
[0054] In this embodiment, the texture map can be a graphic used to apply textures to the surface of the original primitive model. The texture map can be a dynamic texture including fluid flow effects. In one embodiment, M original texture maps with different fluid flow effects can be obtained. These M original texture maps are then superimposed to obtain texture maps with different flow rates, thereby enhancing the sense of depth in the fluid flow effect through varying flow rates. Of course, those skilled in the art can obtain different texture maps according to the needs of the fluid flow effect. This embodiment does not limit the method of obtaining texture maps with fluid flow effects.
[0055] S204. Based on the UV coordinates of each surface to be mapped, a texture mapping process is used to map the surface to be mapped, resulting in a target primitive model where the fluid flow direction is the same for each surface to be mapped.
[0056] Traditional techniques for texturing 3D models involve unfolding the surface of the 3D model into a 2D plane, and then mapping a texture map to the coordinates of the 2D plane. This allows different areas of the texture map to be mapped onto the various surfaces of the 3D model. The embodiments disclosed herein differ from traditional techniques in that each surface to be textured has independent UV coordinates. These UV coordinates allow a texture map to be completely mapped onto each surface. Figure 5 The texture maps to surfaces P1-P4 shown are each mapped using their respective UV coordinates, giving surfaces P1-P4 a fluid flow effect. Since the UV coordinates are in the same direction, the fluid flow direction on surfaces P1-P4 is also the same. Figure 4 As shown in Figure a, the fluid flow direction on the surface to be mapped is F.
[0057] S205. Several target primitive models are spliced together one by one in the target flow direction through splicing surfaces to obtain a virtual fluid model with the same fluid flow direction as the target flow direction.
[0058] In an optional embodiment, the target size of the virtual fluid model in the target flow direction can be determined first, and the ratio of the target size to the size of the target primitive model can be calculated to obtain the total number K of target primitive models required to construct the virtual fluid model. The K target primitive models are adjusted to the target angle so that the fluid flow direction of the target primitive model is the same as the target flow direction, so as to obtain a virtual fluid model with the same fluid flow direction as the target flow direction by splicing them one by one through splicing surfaces in the target flow direction.
[0059] like Figure 4 In the target element model shown in Figure a, the fluid flows along direction F. Figure 4 In Figure b, the angle attributes of K (four) target primitive models are set to target angles, so that the K target primitive models are arranged according to the target angles of the virtual fluid model. The fluid flow in the K target primitive models is in the same direction, all flowing along direction F. The virtual fluid model is obtained by splicing the K target primitive models together with splicing surfaces, as shown below. Figure 4 As shown in Figure c, the direction of the virtual fluid model obtained by splicing is F. Since the virtual fluid model is generated by splicing the target primitive model, the fluid flow direction in the virtual fluid model is determined by the fluid flow direction in the target primitive model. Virtual fluid models placed at any angle can be generated by splicing the target primitive model, and the fluid flow direction in the spliced virtual fluid model is the same as the fluid flow direction in the target primitive model, ensuring the correctness of the fluid flow direction in the generated virtual fluid model.
[0060] In this embodiment, after determining the target flow direction of the virtual fluid model to be generated relative to the game character in the virtual scene, an original primitive model is created, and based on the target flow direction, a splicing surface and at least one surface to be textured are determined on the original primitive model. The UV coordinates of each surface to be textured have the same direction. A texture map with fluid flow effect is obtained. Further, based on the UV coordinates of each surface to be textured, the texture map is used to process the surface to be textured, resulting in a target primitive model with the same fluid flow direction on the surface to be textured. Several target primitive models are spliced one by one in the target flow direction through splicing surfaces to obtain a virtual fluid model with the same fluid flow direction as the target flow direction. Since the fluid flow direction on the surfaces of the several target primitive models used for splicing is the same, the target flow direction of the fluid can be determined after determining the placement angle of the virtual fluid model. The virtual fluid model is generated by splicing the target primitive models according to the target flow direction, which can ensure the correctness of the flow direction when the virtual fluid model is placed at any angle.
[0061] Figure 6 A flowchart of a virtual fluid model generation method is provided for another optional embodiment of the present disclosure, as shown in Figure 5 The virtual fluid model generation method includes the following steps:
[0062] S601, receiving an instruction for generating a virtual fluid model in a game scene, the instruction including a target position and a forward direction of a game character in the game scene.
[0063] In an optional embodiment, the instruction can be generated when the game application detects a preset event. For example, the preset event can be that the game character enters a scene provided with a virtual fluid model. In this case, the instruction can be a rendering instruction for the virtual fluid model. The instruction can include the target position and the forward direction of the game character in the game scene, and can also include the position of the virtual fluid model in the game scene.
[0064] As shown in a game scene, Figure 3 The game character 3 moves in the direction A. The game application can directly generate an instruction including the position of the game character and the forward direction A.
[0065] S602, determining a target size and a target flow direction of the virtual fluid model to be generated based on the target position and the forward direction.
[0066] Specifically, the target size and the target angle of the virtual fluid model to be generated can be determined based on the target position and the forward direction of the game character. The target size can refer to the length, width and height of the virtual fluid model, and the target flow direction can refer to the included angle between the flow direction of the fluid in the virtual fluid model and the forward direction of the game character. For example, the distance from the game character to the virtual fluid model can be calculated based on the target position of the game character and the position of the virtual fluid model in the game scene. The target size of the virtual fluid model to be presented in the visual angle of the game character can be calculated based on the distance, the forward direction of the game character and the visual angle of the game character. The target size can be the length of the virtual fluid model. The included angle between the flow direction of the fluid in the virtual fluid model and the forward direction of the game character can be calculated as the target flow direction.
[0067] Of course, the target size and the target flow direction of the virtual fluid model can also be directly included in the instruction. The target size and the target flow direction of the virtual fluid model can be obtained by analyzing the instruction, as shown in a game scene, Figure 3 The game character 3 moves in the direction A and needs to display a virtual fluid model 2 flowing in the direction F. The game application can directly generate an instruction including the target flow direction (the included angle between the direction A and the direction F) and the length (the size in the direction F) of the virtual fluid model 2.
[0068] S603. Create an original primitive model with multiple surfaces, and perform UV unwrapping on the original primitive model to obtain a UV unwrapped map including multiple surfaces.
[0069] A primitive model can be the smallest structural unit that constitutes a virtual fluid model. Taking the original primitive model as a cube primitive model as an example, the cube primitive model can be UV-unfolded to obtain a UV-unfolded diagram with six faces, such as... Figure 7 Figure a shows the UV unfolded diagram of the six faces. Figure 7 The UV unfolded diagram shown in Figure a is merely an example. In practical applications, those skilled in the art can adjust the position of each face arbitrarily.
[0070] S604. Based on the target flow direction, determine the target black and white mask map in the pre-configured black and white mask map. The target black and white mask map includes black areas and white areas.
[0071] In this embodiment, the black-and-white mask image can be used to make surfaces in the original primitive model that do not require fluid flow effects transparent. The black-and-white mask image includes black and white areas. Black-and-white mask images corresponding to different flow directions of the virtual fluid model can be pre-configured. The target black-and-white mask image can be determined by the angle range to which the target flow direction belongs. For example, through... Figure 3 The target flow direction of the virtual fluid model 2 that needs to be generated can be found in the pre-configured lookup table of flow direction range and masking map. The target black and white masking map includes black and white areas.
[0072] S605. Use the target black and white masking image to mask the UV unfolded image, determine the surface of the masked black area as the splicing surface of the original primitive model, and determine the surface of the masked white area as the surface to be textured of the original primitive model, and set UV coordinates with the same direction for each surface to be textured.
[0073] like Figure 7 As shown, the UV unwrapping in Figure a corresponds one-to-one with each region of the black and white mask in Figure b. Figure 4 As an example, when two primitive models are joined together... Figure 4 The left and right sides of the primitive model shown in Figure a do not need to have a fluid flow effect as the splicing surface. These two sides need to be masked as splicing surfaces. Assuming the left and right sides are P5 and P6, the target black-and-white mask image is as follows. Figure 7 As shown in Figure b, faces P5 and P6 are masked by black areas, indicating that the left and right sides P5 and P6 are splicing surfaces and need to be made transparent. Faces P1-P4 are masked by white areas as surfaces to be mapped, and texture mapping is required.
[0074] For the four surfaces to be mapped, P1-P4, UV coordinates with the same direction can be set. In this embodiment, the same direction of UV coordinates means that the lower left corner UV coordinate of each of the four surfaces to be mapped is (0,0), the lower right corner UV coordinate is (1,0), the upper left corner UV coordinate is (0,1), and the upper right corner UV coordinate is (1,1).
[0075] S606. Obtain a texture map with fluid flow effects.
[0076] The texture map in this embodiment can be a graphic used to perform texture processing on the surface to be textured of the original primitive model. The texture map can be a dynamic texture including fluid flow effects. In an optional embodiment, step S606 may include the following steps:
[0077] S6061. Obtain M first texture maps with different fluid flow effects.
[0078] The first texture map can be a texture with a fluid flow effect, such as... Figure 8 As shown, the first texture map can be a star map flowing along direction F. M star maps with different flow rates can be obtained as the first texture map. For example, M=3, that is, three star maps with different flow rates are obtained as the first texture map.
[0079] S6062. Obtain the first noise map, and sample the first noise map to obtain the second noise map.
[0080] Specifically, the first noise map can be a randomly generated noise map, such as... Figure 9 The diagram shows the first noise map. After obtaining the first noise map, it is sampled from the first motion direction and the second motion direction to obtain two noise maps after sampling. The first motion direction and the second motion direction can be opposite directions. The two noise maps after sampling are multiplied and mixed to obtain the second noise map.
[0081] For example, the first noise map can be sampled using the sampling function SAMPLE_TEXTURE2D defined within the Unity engine. After defining the first and second motion directions during sampling, the sampling function SAMPLE_TEXTURE2D is run to sample the first noise map, resulting in two sampled noise maps. The two noise maps are then multiplied and mixed to obtain the second noise map. In this embodiment, the final noise map is obtained by sampling the first noise map twice in different directions and then mixing the samples, which can improve the randomness of the noise in the noise map.
[0082] S6063. The M first texture maps are superimposed using the second noise map to obtain M second texture maps.
[0083] Specifically, a second noise map can be superimposed on each first texture map. For example, the second noise map can be superimposed on the uv coordinates of M first texture maps respectively to obtain M second texture maps with a distortion effect.
[0084] S6064. Overlay M second texture maps to obtain a texture map with a fluid flow effect.
[0085] In one embodiment, M second texture maps can be overlaid to obtain a third texture map.
[0086] In another embodiment, after overlaying M second texture maps to obtain a third texture map, the uv coordinates of the third texture map can be transformed to obtain transformed uv coordinates. The transformed uv coordinates are transformed from 0 to -1 to -0.5 to 0.5. The transformed uv coordinates are then graphically represented, and the resulting graphic is multiplied and mixed with the third texture map to obtain a texture map with fluid flow effect and edge brightening effect.
[0087] For example, to obtain a third texture map through overlay processing, abs(i.uv.x-0.5) can be calculated, transforming the uv coordinates of the third texture map from 0 to -1 to -0.5 to 0.5. Then, the transformed uv coordinates are graphically represented, as shown below. Figure 10 The graphic shown has white edges on both sides that gradually turn black towards the center. Multiplying and blending this graphic with a third texture map results in a texture map with fluid flow effects and edge brightening effects.
[0088] In this embodiment, when generating texture maps, on the one hand, a random distortion effect is achieved by superimposing noise maps, which improves the diversity of the flow effect of the generated texture maps. On the other hand, texture maps with different flow rates can be superimposed to obtain texture maps with different flow effects, which increases the sense of layering of the flow effect. Furthermore, highlight edge drawing is achieved through UV conversion graphics. After the original primitive model is textured using texture maps, a highlighting effect can be displayed at the intersection of two adjacent surfaces of the virtual fluid model, which improves the artistic effect of fluid flow.
[0089] S607. For each surface to be mapped, based on the UV coordinates of the surface to be mapped, use texture mapping to process the surface to be mapped.
[0090] Using the original primitive model described above as a cuboid as an example, the four faces P1-P4 are the surfaces to be mapped. Each face has independent UV coordinates, and texture mapping can be performed using their respective UV coordinates. This allows the four faces P1-P4 to have a fluid flow effect, and the fluid flow direction is the same on all four faces. Figure 4 The primitive model in Figure a has four faces (front, top, back, and bottom) with a fluid effect in the direction of flow F.
[0091] S608. Make the splicing surface transparent to obtain a target primitive model in which the fluid flow direction is the same on each surface to be mapped.
[0092] Using the original primitive model as an example, the cube model, P5 and P6 can be made transparent, resulting in a target primitive model where the splicing surfaces are transparent and each surface to be mapped has the same fluid flow direction.
[0093] In this embodiment, before processing the original primitive model with textures to obtain the target primitive model with fluid flow effect, a target black and white mask image can be determined according to the target flow direction of the virtual fluid model. With this target black and white mask image, the surfaces that do not need to have fluid flow effect can be masked as needed according to the arbitrary placement angle of the virtual fluid model, avoiding brightness superposition at the splicing surface when splicing the target primitive model to generate the virtual fluid model, thus improving the artistic effect of the virtual fluid model.
[0094] S609. Calculate the total number of target primitive models using the target size and the size of the target primitive model.
[0095] The size of the target primitive model can refer to the size of the target primitive model in the target flow direction of the virtual fluid model, such as... Figure 4 As shown in Figure a, the ratio of the length of the virtual fluid model to the side length of the cube model can be calculated and rounded up to obtain the total number of target primitive models used to splice and generate the virtual fluid model.
[0096] S610. Adjust the angle of the target primitive model whose quantity equals the total quantity to the target angle, which is the angle when the fluid flow direction of the target primitive model is the same as the target flow direction.
[0097] In this embodiment, the target primitive model has an angle attribute, which determines the placement angle of the target primitive model in the game scene. The angle value in the angle attribute of the target primitive model can be set as the target angle so that the flow direction of the fluid in the target primitive model is consistent with the target flow direction required by the virtual fluid model.
[0098] S611. Multiple target primitive models adjusted to the target angle are spliced together one by one through splicing surfaces to obtain a virtual fluid model with the same fluid flow direction as the target flow direction.
[0099] like Figure 4 In the target element model shown in Figure a, the fluid flows along direction F. Figure 4 In Figure b, the angle attributes of K (four) target primitive models are set to target angles, so that the K target primitive models are arranged according to the target angles of the virtual fluid model. The fluid flow direction in the K target primitive models is the same, all flowing along direction F. The virtual fluid model is obtained by splicing the K target primitive models together. Figure 4 As shown in Figure c, the direction of the resulting virtual fluid model is F, ensuring the correctness of the fluid flow direction. After generating the virtual fluid model, a semi-transparent material is used for rendering. The rendered virtual fluid model is displayed on the screen as follows. Figure 3 As shown, in Figure 3 The fluid flow direction F of the virtual fluid model is consistent with the length direction, ensuring the correctness of the flow direction. Furthermore, the edges of the virtual fluid model are highlighted to better reflect the lighting effects of fluids in reality. In addition, the transparency of the splicing surface is achieved by masking the splicing surface with a black and white mask image, which avoids the brightness superposition at the splicing point of the two primitive models and improves the artistic effect of the virtual fluid model.
[0100] This embodiment can determine the target size and target flow direction of the virtual fluid model to be generated based on the target position and direction of movement of the game character. After performing UV unwrapping on the original primitive model to obtain a UV unwrapped map including multiple surfaces, a target black and white mask map is determined based on the target flow direction in a pre-configured black and white mask map. The target black and white mask map includes black and white areas. The UV unwrapped map is masked using the target black and white mask map. The surface masked by the black area is determined as the splicing surface of the original primitive model, and the surface masked by the white area is determined as the surface to be textured on the original primitive model. UV coordinates with the same direction are set for each surface to be textured, thereby obtaining a fluid-like surface. After applying the texture mapping for the flow effect, the texture mapping is performed on the surface to be mapped based on the UV coordinates of the surface to be mapped, and the splicing surface is made transparent to obtain the target primitive model. Several target primitive models are spliced one by one in the target flow direction through the splicing surface to obtain a virtual fluid model with the same fluid flow direction as the target flow direction. Since the fluid flow direction on the surface of the several target primitive models used for splicing is the same, the target flow direction of the fluid can be determined after determining the placement angle of the virtual fluid model. The virtual fluid model is generated by splicing the target primitive models according to the target flow direction, which can ensure the correctness of the flow direction when the virtual fluid model is placed at any angle.
[0101] Furthermore, by using the black and white masking image determined by the target flow direction, the model-based surface can be masked as needed for different flow directions to determine the splicing surface and make it transparent. This avoids brightness superposition at the splicing surface when using the target primitive model to generate a virtual fluid model, thus improving the artistic effect of the virtual fluid model.
[0102] Figure 11 This is a schematic diagram of a virtual fluid model generation device provided in an embodiment of this disclosure. Figure 11 As shown, the virtual fluid model generation device includes:
[0103] The target flow direction determination module 1101 is used to determine the target flow direction of the virtual fluid model to be generated relative to the game character in the virtual scene;
[0104] The original module-based creation module 1102 is used to create an original primitive model and determine the splicing surface and at least one surface to be textured on the original primitive model based on the target flow direction, wherein the uv coordinates of each surface to be textured have the same direction.
[0105] The texture map acquisition module 1103 is used to acquire texture maps with fluid flow effects;
[0106] The texturing module 1104 is used to perform texturing processing on the surface to be textured based on the uv coordinates of each surface to be textured, using the texture map, to obtain a target primitive model in which the fluid flow direction is the same for each surface to be textured.
[0107] The virtual fluid model generation module 1105 is used to splice several target primitive models one by one in the target flow direction through the splicing surface to obtain a virtual fluid model with the fluid flow direction as the target flow direction.
[0108] Figure 12 A schematic diagram of the structure of an electronic device 1200 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, mainframe computers, smartphones, tablet computers, game consoles, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0109] like Figure 12As shown, the electronic device 1200 includes at least one processor 1201 and a memory, such as a read-only memory (ROM) 1202 or a random access memory (RAM) 1203, communicatively connected to the at least one processor 1201. The memory stores computer programs executable by the at least one processor. The processor 1201 can perform various appropriate actions and processes based on the computer program stored in the ROM 1202 or loaded into the RAM 1203 from storage unit 1208. The RAM 1203 may also store various programs and data required for the operation of the electronic device 1200. The processor 1201, ROM 1202, and RAM 1203 are interconnected via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.
[0110] Multiple components in electronic device 1200 are connected to I / O interface 1205, including: input unit 1206, such as keyboard, mouse, touch screen, game controller, etc.; output unit 1207, such as various types of monitors, speakers, etc.; storage unit 1208, such as disk, optical disk, etc.; and communication unit 1209, such as network card, modem, wireless transceiver, etc. Communication unit 1209 allows electronic device 1200 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0111] Processor 1201 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 1201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 1201 performs the various methods and processes described above, such as virtual fluid model generation methods.
[0112] The methods for generating virtual fluid models include:
[0113] Determine the target flow direction of the virtual fluid model to be generated relative to the game character in the virtual scene;
[0114] Create an original primitive model, and determine the splicing surface and at least one surface to be textured on the original primitive model based on the target flow direction, wherein the uv coordinates of each surface to be textured have the same direction;
[0115] Obtain a texture map with a fluid flow effect;
[0116] Based on the UV coordinates of each surface to be mapped, the texture map is used to process the texture map on the surface to be mapped, resulting in a target primitive model in which the fluid flow direction is the same on each surface to be mapped.
[0117] Several target primitive models are spliced together one by one along the target flow direction through the splicing surface to obtain a virtual fluid model with the fluid flow direction as the target flow direction.
[0118] Optionally, determining the target flow direction of the virtual fluid model to be generated relative to the game character in the virtual scene includes:
[0119] Receive instructions to generate a virtual fluid model in a game scene, the instructions including the target position and direction of movement of the game character in the game scene;
[0120] The target size and target flow direction of the virtual fluid model to be generated are determined based on the target location and the direction of travel.
[0121] Optionally, an original primitive model is created, and the splicing surface and at least one surface to be mapped on the original primitive model are determined based on the target flow direction, including:
[0122] Create an original primitive model with multiple surfaces, and perform UV unwrapping on the original primitive model to obtain a UV unwrapped map including multiple surfaces;
[0123] Based on the target flow direction, a target black-and-white mask image is determined in a pre-configured black-and-white mask image, the target black-and-white mask image including black areas and white areas;
[0124] The target black and white mask image is used to mask the UV unfolded image. The surface of the masked black area is determined as the splicing surface of the original primitive model, and the surface of the masked white area is determined as the surface to be textured on the original primitive model. UV coordinates with the same direction are set for each surface to be textured.
[0125] Optionally, obtain a texture map with fluid flow effects, including:
[0126] Obtain M first texture maps with different fluid flow effects;
[0127] Obtain a first noise map, and sample the first noise map to obtain a second noise map;
[0128] The second noise map is used to overlay M of the first texture maps to obtain M second texture maps;
[0129] The M second texture maps are overlaid to obtain a texture map with a fluid flow effect.
[0130] Optionally, sampling the first noise map to obtain a second noise map includes:
[0131] The first noise map is sampled from the first motion direction and the second motion direction respectively to obtain two sampled noise maps, wherein the first motion direction and the second motion direction are opposite directions;
[0132] The two noise maps after sampling are multiplied and mixed to obtain the second noise map.
[0133] Optionally, the M second texture maps are overlaid to obtain a texture map with a fluid flow effect, including:
[0134] The third texture map is obtained by overlaying the M second texture maps;
[0135] The UV coordinates of the third texture map are transformed to obtain transformed UV coordinates, which are transformed from 0 to -1 to -0.5 to 0.5.
[0136] The transformed UV coordinates are graphically represented and multiplied and mixed with the third texture map to obtain a texture map with fluid flow effect and edge brightening effect.
[0137] Optionally, based on the UV coordinates of each surface to be mapped, the texture map is used to process the surface to be mapped, resulting in a target primitive model where the fluid flow direction is the same for each surface to be mapped, including:
[0138] For each of the surfaces to be mapped, the texture map is used to perform mapping processing on the surface based on the UV coordinates of the surface to be mapped;
[0139] The splicing surfaces are made transparent to obtain target primitive models in which the fluid flow direction is the same on each surface to be mapped.
[0140] Optionally, several target primitive models are spliced together one by one along the target flow direction using the splicing surface to obtain a virtual fluid model with the fluid flow direction as the target flow direction, including:
[0141] The total number of target primitive models is calculated using the target size and the size of the target primitive model.
[0142] Adjust the angle of the target primitive model, which is equal to the total number, to the target angle, where the fluid flow direction of the target primitive model is the same as the target flow direction;
[0143] Multiple target primitive models adjusted to the target angle are spliced together one by one through the splicing surface to obtain a virtual fluid model with the fluid flow direction as the target flow direction.
[0144] In some embodiments, the virtual fluid model generation method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 1208. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 1200 via ROM 1202 and / or communication unit 1209. When the computer program is loaded into RAM 1203 and executed by processor 1201, one or more steps of the virtual fluid model generation method described above may be performed. Alternatively, in other embodiments, processor 1201 may be configured to execute the virtual fluid model generation method by any other suitable means (e.g., by means of firmware).
[0145] The methods for generating virtual fluid models include:
[0146] Determine the target flow direction of the virtual fluid model to be generated relative to the game character in the virtual scene;
[0147] Create an original primitive model, and determine the splicing surface and at least one surface to be textured on the original primitive model based on the target flow direction, wherein the uv coordinates of each surface to be textured have the same direction;
[0148] Obtain a texture map with a fluid flow effect;
[0149] Based on the UV coordinates of each surface to be mapped, the texture map is used to process the texture map on the surface to be mapped, resulting in a target primitive model in which the fluid flow direction is the same on each surface to be mapped.
[0150] Several target primitive models are spliced together one by one along the target flow direction through the splicing surface to obtain a virtual fluid model with the fluid flow direction as the target flow direction.
[0151] Optionally, determining the target flow direction of the virtual fluid model to be generated relative to the game character in the virtual scene includes:
[0152] Receive instructions to generate a virtual fluid model in a game scene, the instructions including the target position and direction of movement of the game character in the game scene;
[0153] The target size and target flow direction of the virtual fluid model to be generated are determined based on the target location and the direction of travel.
[0154] Optionally, an original primitive model is created, and the splicing surface and at least one surface to be mapped on the original primitive model are determined based on the target flow direction, including:
[0155] Create an original primitive model with multiple surfaces, and perform UV unwrapping on the original primitive model to obtain a UV unwrapped map including multiple surfaces;
[0156] Based on the target flow direction, a target black-and-white mask image is determined in a pre-configured black-and-white mask image, the target black-and-white mask image including black areas and white areas;
[0157] The target black and white mask image is used to mask the UV unfolded image. The surface of the masked black area is determined as the splicing surface of the original primitive model, and the surface of the masked white area is determined as the surface to be textured on the original primitive model. UV coordinates with the same direction are set for each surface to be textured.
[0158] Optionally, obtain a texture map with fluid flow effects, including:
[0159] Obtain M first texture maps with different fluid flow effects;
[0160] Obtain a first noise map, and sample the first noise map to obtain a second noise map;
[0161] The second noise map is used to overlay M of the first texture maps to obtain M second texture maps;
[0162] The M second texture maps are overlaid to obtain a texture map with a fluid flow effect.
[0163] Optionally, sampling the first noise map to obtain a second noise map includes:
[0164] The first noise map is sampled from the first motion direction and the second motion direction respectively to obtain two sampled noise maps, wherein the first motion direction and the second motion direction are opposite directions;
[0165] The two noise maps after sampling are multiplied and mixed to obtain the second noise map.
[0166] Optionally, the M second texture maps are overlaid to obtain a texture map with a fluid flow effect, including:
[0167] The third texture map is obtained by overlaying the M second texture maps;
[0168] The UV coordinates of the third texture map are transformed to obtain transformed UV coordinates, which are transformed from 0 to -1 to -0.5 to 0.5.
[0169] The transformed UV coordinates are graphically represented and multiplied and mixed with the third texture map to obtain a texture map with fluid flow effect and edge brightening effect.
[0170] Optionally, based on the UV coordinates of each surface to be mapped, the texture map is used to process the surfaces of the original primitive model to be mapped, resulting in a target primitive model where the fluid flow direction is the same on each surface to be mapped, including:
[0171] For each of the surfaces to be mapped, the texture map is used to perform mapping processing on the surface based on the UV coordinates of the surface to be mapped;
[0172] The splicing surfaces are made transparent to obtain target primitive models in which the fluid flow direction is the same on each surface to be mapped.
[0173] Optionally, several target primitive models are spliced together one by one along the target flow direction using the splicing surface to obtain a virtual fluid model with the fluid flow direction as the target flow direction, including:
[0174] The total number of target primitive models is calculated using the target size and the size of the target primitive model.
[0175] Adjust the angle of the target primitive model, which is equal to the total number, to the target angle, where the fluid flow direction of the target primitive model is the same as the target flow direction;
[0176] Multiple target primitive models adjusted to the target angle are spliced together one by one through the splicing surface to obtain a virtual fluid model with the fluid flow direction as the target flow direction.
[0177] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0178] Computer programs used to implement the methods of this disclosure may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0179] In the context of this disclosure, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer 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 of the foregoing.
[0180] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0181] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0182] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0183] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this disclosure can be achieved, and this is not limited herein.
[0184] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for generating a virtual fluid model, characterized in that, include: Determine the target flow direction of the virtual fluid model to be generated relative to the game character in the virtual scene; Create an original primitive model, and determine the splicing surface and at least one surface to be textured on the original primitive model based on the target flow direction, wherein the uv coordinates of each surface to be textured have the same direction; Obtain a texture map with a fluid flow effect; Based on the UV coordinates of each surface to be mapped, the texture map is used to process the texture map on the surface to be mapped, resulting in a target primitive model in which the fluid flow direction is the same on each surface to be mapped. Several target primitive models are spliced together one by one along the target flow direction through the splicing surface to obtain a virtual fluid model with the fluid flow direction as the target flow direction.
2. The method according to claim 1, characterized in that, Determine the target flow direction of the virtual fluid model to be generated relative to the game character in the virtual scene, including: Receive instructions to generate a virtual fluid model in a game scene, the instructions including the target position and direction of movement of the game character in the game scene; The target size and target flow direction of the virtual fluid model to be generated are determined based on the target location and the direction of travel.
3. The method according to claim 1, characterized in that, Create an original primitive model, and determine the splicing surface and at least one surface to be mapped on the original primitive model based on the target flow direction, including: Create an original primitive model with multiple surfaces, and perform UV unwrapping on the original primitive model to obtain a UV unwrapped map including multiple surfaces; Based on the target flow direction, a target black-and-white mask image is determined in a pre-configured black-and-white mask image, the target black-and-white mask image including black areas and white areas; The target black and white mask image is used to mask the UV unfolded image. The surface of the masked black area is determined as the splicing surface of the original primitive model, and the surface of the masked white area is determined as the surface to be textured on the original primitive model. UV coordinates with the same direction are set for each surface to be textured.
4. The method according to claim 1, characterized in that, Obtain a texture map with fluid flow effects, including: Obtain M first texture maps with different fluid flow effects; Obtain a first noise map, and sample the first noise map to obtain a second noise map; The second noise map is used to overlay M of the first texture maps to obtain M second texture maps; The M second texture maps are overlaid to obtain a texture map with a fluid flow effect.
5. The method according to claim 4, characterized in that, The second noise map is obtained by sampling the first noise map, including: The first noise map is sampled from the first motion direction and the second motion direction respectively to obtain two sampled noise maps, wherein the first motion direction and the second motion direction are opposite directions; The two noise maps after sampling are multiplied and mixed to obtain the second noise map.
6. The method according to claim 4, characterized in that, The M second texture maps are overlaid to obtain a texture map with a fluid flow effect, including: The third texture map is obtained by overlaying the M second texture maps; The UV coordinates of the third texture map are transformed to obtain transformed UV coordinates, which are transformed from 0 to -1 to -0.5 to 0.
5. The transformed UV coordinates are graphically represented and multiplied and mixed with the third texture map to obtain a texture map with fluid flow effect and edge brightening effect.
7. The method according to claim 3, characterized in that, Based on the UV coordinates of each surface to be mapped, the texture map is used to process the surfaces of the original primitive model to be mapped, resulting in a target primitive model where the fluid flow direction is the same on each surface to be mapped, including: For each of the surfaces to be mapped, the texture map is used to perform mapping processing on the surface based on the UV coordinates of the surface to be mapped; The splicing surfaces are made transparent to obtain target primitive models in which the fluid flow direction is the same on each surface to be mapped.
8. The method according to claim 2, characterized in that, By sequentially splicing several target primitive models along the target flow direction using the splicing surface, a virtual fluid model with the fluid flow direction being the target flow direction is obtained, including: The total number of target primitive models is calculated using the target size and the size of the target primitive model. Adjust the angle of the target primitive model, which is equal to the total number, to the target angle, where the fluid flow direction of the target primitive model is the same as the target flow direction; Multiple target primitive models adjusted to the target angle are spliced together one by one through the splicing surface to obtain a virtual fluid model with the fluid flow direction as the target flow direction.
9. A virtual fluid model generation device, characterized in that, include: The target flow direction determination module is used to determine the target flow direction of the virtual fluid model to be generated relative to the game character in the virtual scene; The original module is used to create an original primitive model and determine the splicing surface and at least one surface to be textured on the original primitive model based on the target flow direction, wherein the uv coordinates of each surface to be textured have the same direction. The texture map acquisition module is used to acquire texture maps with fluid flow effects; The texturing module is used to perform texturing processing on the surfaces to be textured based on the UV coordinates of each surface to be textured, thereby obtaining a target primitive model in which the fluid flow direction is the same for each surface to be textured. The virtual fluid model generation module is used to splice several target primitive models one by one in the target flow direction through the splicing surface to obtain a virtual fluid model with the fluid flow direction as the target flow direction.
10. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the virtual fluid model generation method according to any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the virtual fluid model generation method according to any one of claims 1-8.