A method, device, equipment and medium for model rendering of target virtual object
By detecting the positional relationship between the player's virtual object and the target virtual object, and using preset flow noise maps for color blur processing, flow blur effect is generated, and the problem of the inability to achieve edge effects with flow textures and effective control of blur effect in the existing technology is solved, and a more flexible and dynamic virtual object rendering effect is achieved.
Patent Information
- Application Number
- CN202411987997.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-08
AI Technical Summary
The prior art cannot achieve edge effects with flowing textures and effective control of blur effects in three-dimensional graphic rendering, resulting in the rendering effect of virtual objects being not flexible enough.
By detecting the positional relationship between the player's virtual object and the target virtual object, when the preset rendering trigger condition is met, the outline area of the target virtual object is obtained, and the color blur process is performed according to the preset flow noise map to generate a flow blur effect without using texture technology.
It realizes a more flexible flowing blur rendering, enhances the dynamics of the virtual objects, enhances the visual appeal and fun of the game screen, and improves the immersion of the players.
Smart Images

Figure CN119770963A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of model rendering, and in particular to a method, device, equipment and medium for rendering a model of a target virtual object. Background Art
[0002] When rendering three-dimensional graphics, for ordinary texture flow technology, the texture map is directly sampled through the object, the flow effect of the x-axis or y-axis is made in time, and the object contour effect is achieved through multi-channel rendering. However, this method is only used for object prompt interaction, which is a simple solid color effect. In terms of blur, pure radial blur is only a directional blur, which cannot achieve the edge effect with flowing texture, and the blur effect cannot be controlled by flowing texture maps. Summary of the invention
[0003] The purpose of the present invention is to provide a model rendering method, device, equipment and medium for a target virtual object in response to the deficiencies in the above-mentioned prior art, so that when the positional relationship between the player virtual object and the target virtual object meets the first preset rendering trigger condition, the contour area of the target virtual object is processed to generate a flow blur effect map, and the contour area is color blurred and superimposed according to the preset flow noise map, without the need to use texture technology, so that the generated flow blur effect map is more flexible.
[0004] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0005] In a first aspect, an embodiment of the present application provides a method for rendering a model of a target virtual object, which is applied to a graphical user interface, wherein the graphical user interface includes: a player virtual object and at least one virtual object, and the method includes:
[0006] Detecting a positional relationship between the player virtual object and a target virtual object;
[0007] If the positional relationship satisfies a first preset rendering trigger condition, obtaining a contour area of the target virtual object in a preset screen space;
[0008] According to a preset flow noise map, a color blur process is performed on the contour area to obtain a target blurred color value of each sampling point in the contour area;
[0009] The target fuzzy color value of each sampling point is sequentially superimposed on the corresponding sampling point in the contour area to generate a flow blur effect image of the target virtual object;
[0010] The target virtual object is switched from the initial material rendering to the flow blur rendering.
[0011] In an optional implementation, the color blurring process is performed on the contour area according to the preset flow noise map to obtain the target blurred color value of each sampling point in the contour area, including:
[0012] Obtaining the fuzzy direction of each sampling point;
[0013] Performing at least one color blurring process on the contour area along the blurring direction of each sampling point to obtain at least one blurring color value of each sampling point;
[0014] According to at least one fuzzy color value of each sampling point and the preset flow noise map, a target fuzzy color value of each sampling point is determined.
[0015] In an optional implementation, performing at least one color blurring process on the contour area along the blurring direction of each sampling point to obtain at least one blurring color value of each sampling point includes:
[0016] Sampling the contour area at least once to obtain at least one sampling color value of each sampling point;
[0017] Determine the weight value of each sampling point in the corresponding fuzzy direction along the fuzzy direction of each sampling point;
[0018] According to the weight value of each sampling point and the preset color deviation value, fuzzy processing is performed on at least one sampled color value of each sampling point to obtain at least one fuzzy color value of each sampling point.
[0019] In an optional implementation manner, obtaining the fuzzy direction of each sampling point includes:
[0020] The blur direction of each sampling point is obtained according to the texture coordinates of the preset reference point of the contour area and the texture coordinates of each sampling point.
[0021] In an optional implementation, determining the weight value of each sampling point in the corresponding blur direction along the blur direction of each sampling point includes:
[0022] Along the blurring direction of each sampling point, a preset linear interpolation algorithm is used to calculate the weight value of each sampling point in the corresponding blurring direction.
[0023] In an optional implementation, determining the target fuzzy color value of each sampling point according to at least one fuzzy color value of each sampling point and the preset flow noise map includes:
[0024] Using the preset flow noise map, performing noise processing on at least one fuzzy color value of each sampling point to obtain at least one noisy fuzzy color value of each sampling point;
[0025] According to at least one noisy fuzzy color value of each sampling point, a target fuzzy color value of each sampling point is obtained.
[0026] In an optional implementation manner, obtaining a contour area of the target virtual object in a preset screen space includes:
[0027] Obtaining the local coordinates of each sampling point of the target virtual object in a preset model coordinate system;
[0028] Convert the local coordinates of each sampling point from the preset model coordinate system to a preset world coordinate system to obtain the world coordinates of each sampling point;
[0029] Converting the world coordinates of each sampling point from the preset world coordinate system to a preset view coordinate system to obtain the view coordinates of each sampling point;
[0030] Converting the world coordinates of each sampling point from the preset view coordinate system to the preset screen space coordinate system to obtain the texture coordinates of each sampling point;
[0031] According to the texture coordinates of each sampling point, a contour area of the target virtual object is obtained.
[0032] In an optional embodiment, the method further comprises:
[0033] Detecting an interaction event between the player virtual object and the target virtual object;
[0034] If the interaction event satisfies a second preset rendering trigger condition, position shifting is performed on each vertex on the three-dimensional contour line corresponding to the two-dimensional contour line of the contour area;
[0035] Generate new two-dimensional contour lines according to the offset vertices;
[0036] Generate a flow stroke effect map of the target virtual object according to the new two-dimensional contour line and the preset flow map;
[0037] The target virtual object is switched from the flow blur effect image to the flow stroke effect image.
[0038] In an optional implementation, generating a flow stroke effect map of the target virtual object according to the new two-dimensional contour line and the preset flow map includes:
[0039] Sampling the flow parameters of each sampling point from the preset flow map;
[0040] The flow stroke effect diagram is generated according to the flow parameters of each sampling point and the new two-dimensional contour line.
[0041] In an optional implementation, the step of performing position shifting on each vertex on the three-dimensional contour line corresponding to the two-dimensional contour line of the contour area includes:
[0042] Obtaining the target normal direction of each vertex and the offset parameter of each vertex in the target normal direction;
[0043] The positions of the vertices on the contour area are offset along the target normal direction of the vertices according to the offset parameters of the target normal direction.
[0044] In an optional implementation, obtaining the target normal direction of each vertex includes:
[0045] Using a preset correction factor, the original normal direction of each vertex is corrected to obtain the calculated normal direction of each vertex;
[0046] The target normal direction of each vertex is determined from the original normal direction and the calculated normal direction of each vertex.
[0047] In an optional implementation, obtaining the position offset parameter of each vertex in the target normal direction includes:
[0048] Obtaining position disturbance information of each vertex;
[0049] Obtaining the normal offset of each vertex in the direction of the target normal;
[0050] The position offset parameters of each vertex in the target normal direction are determined according to the position disturbance information, the normal offset and the target normal direction.
[0051] In an optional embodiment, the method further comprises:
[0052] If the duration of the interactive event reaches a preset rendering recovery condition, the target virtual object is restored from the flowing stroke effect image to be displayed as the initial material effect image.
[0053] In a second aspect, an embodiment of the present application further provides a model rendering device for a target virtual object, comprising:
[0054] A detection module, used to detect the positional relationship between the player virtual object and the target virtual object;
[0055] An acquisition module, configured to acquire a contour area of the target virtual object in a preset screen space if the positional relationship satisfies a first preset rendering trigger condition;
[0056] A processing module, used for performing color fuzzy processing on the contour area according to a preset flow noise map, to obtain a target fuzzy color value of each sampling point in the contour area;
[0057] A generating module, used for sequentially superimposing the target fuzzy color value of each sampling point to the corresponding sampling point in the contour area to generate a flow blur effect image of the target virtual object;
[0058] The display module is used to switch the display of the target virtual object from the initial material effect diagram to the flow blur effect diagram.
[0059] In the third aspect, an embodiment of the present application also provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the program instructions to perform the steps of the model rendering method for the target virtual object as described in any of the first aspects.
[0060] 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 executed by a processor, the steps of the method for rendering a model of a target virtual object as described in any one of the first aspects are executed.
[0061] The beneficial effects of this application are:
[0062] The embodiments of the present application provide a method, apparatus, device and medium for model rendering of a target virtual object. The method includes: detecting a positional relationship between a player virtual object and a target virtual object; if the positional relationship satisfies a first preset rendering trigger condition, obtaining a contour area of the target virtual object in a preset screen space; performing color blurring processing on the contour area according to a preset flow noise map; obtaining a target blur color value of each sampling point in the contour area; sequentially superimposing the target blur color value of each sampling point to the corresponding sampling point in the contour area; generating a flow blur effect map of the target virtual object; and switching the display of the target virtual object from an initial material effect map to a flow blur effect map.
[0063] According to the method of the present application, when the positional relationship between the player virtual object and the target virtual object meets the first preset rendering trigger condition, the contour area of the target virtual object is processed to generate a flow blur effect map, and the contour area is color blurred and superimposed according to the preset flow noise map, without the need to use texture technology, so that the generated flow blur effect map is more flexible, and the game player can intuitively see the target virtual object in the game scene and conduct subsequent interactions. The flow blur effect map can give the target virtual object a stronger sense of movement, enhance the visual appeal and fun of the game screen, and at the same time, the game player's attention is more easily focused on the target virtual object with a flow blur effect, so that the player is more involved in the game and the immersion of the game is enhanced. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention 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 creative work.
[0065] Figure 1 One of the flowcharts of a method for rendering a model of a target virtual object provided in an embodiment of the present application;
[0066] Figure 2 A second flow chart of a method for rendering a model of a target virtual object provided in an embodiment of the present application;
[0067] Figure 3 A third flowchart of a method for rendering a model of a target virtual object provided in an embodiment of the present application;
[0068] Figure 4 A fourth flowchart of a method for rendering a model of a target virtual object provided in an embodiment of the present application;
[0069] Figure 5 A fifth flowchart of a method for rendering a model of a target virtual object provided in an embodiment of the present application;
[0070] Figure 6 A sixth flowchart of a method for rendering a model of a target virtual object provided in an embodiment of the present application;
[0071] Figure 7 A seventh flowchart of a method for rendering a model of a target virtual object provided in an embodiment of the present application;
[0072] Figure 8FIG8 is a flow chart of a method for rendering a model of a target virtual object provided in an embodiment of the present application;
[0073] Fig. 9 A ninth flowchart of a method for rendering a model of a target virtual object provided in an embodiment of the present application;
[0074] Fig.10 A tenth flowchart of a method for rendering a model of a target virtual object provided in an embodiment of the present application;
[0075] Fig.11 A schematic diagram of functional modules of a model rendering device for a target virtual object provided in an embodiment of the present application;
[0076] Fig.12 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0077] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.
[0078] 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.
[0079] In the description of the present application, it should be noted that if the terms "upper", "lower", etc. appear, the orientation or position relationship indicated is based on the orientation or position relationship shown in the drawings, or is the orientation or position relationship in which the product of the application is usually placed when used. It is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application.
[0080] In addition, the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0081] 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.
[0082] The model rendering method for the target virtual object provided in the embodiment of the present application is applied to a graphical user interface, and the model rendering display of the target virtual object is realized through operations in the graphical user interface. The graphical user interface is provided by a terminal device, and a game application may be pre-installed in the terminal device. When the game application is running and entering the game battle, the current game scene can be displayed in the graphical user interface, wherein the terminal device may be: a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart TV and other devices.
[0083] The game scene of the graphical user interface includes: a player virtual object and at least one virtual object, the player virtual object is a virtual object controlled by the player, and at least one virtual object is a virtual object existing in the game scene, which can be an object virtual object or a non-player virtual object. When the player virtual object interacts with the target virtual object in the game, the target virtual object will switch its own display effect. For example, if the target virtual object is a monster, when the player virtual object approaches the monster, the monster switches from the initial material effect image to the flowing blurred effect image. After the player virtual object interacts with the monster, for example, after the player virtual object uses a prop to come into contact with the monster, the monster will switch from the flowing blurred effect image to the initial material effect image. At this time, the player virtual object can fight with the monster until the battle is won and the monster disappears, and obtains the reward for the victory in the battle.
[0084] Currently, a method for generating a flow blur effect image of a target virtual object is to use a simple texture flow technology to cover the display area of the target virtual object with color. This cannot meet special artistic requirements, such as edge effects with flowing textures, which affects the display effect of the target virtual object and further affects the player's gaming experience.
[0085] Therefore, an embodiment of the present application provides a model rendering method for a target virtual object. When it is detected that the positional relationship between the player virtual object and the target virtual object satisfies a first preset rendering trigger condition, the contour area of the target virtual object in the preset screen space is obtained, and the contour area is color blurred according to the preset flow noise map to obtain the target blurred color value of each sampling point in the contour area, and the target blurred color value of each sampling point is sequentially superimposed on the corresponding sampling point in the contour area to generate a flow blurred effect map of the target virtual object. Finally, the target virtual object is switched from the initial material effect map to the flow blurred effect map. The player can intuitively see the target virtual object and conduct subsequent interactions. The flow blurred effect map can give the target virtual object a stronger sense of movement, enhance the visual appeal and fun of the game, and at the same time, the player's attention is more easily focused on the target virtual object in the flow blurred effect, so that the player is more involved in the game and the immersion of the game is enhanced.
[0086] A method for rendering a model of a target virtual object provided by an embodiment of the present application is explained in detail below with reference to the accompanying drawings through specific examples. Figure 1 One of the flow charts of a method for rendering a model of a target virtual object provided in an embodiment of the present application; Figure 1 As shown, the method includes:
[0087] S101, detecting the positional relationship between the player virtual object and the target virtual object.
[0088] S102: If the positional relationship satisfies a first preset rendering trigger condition, obtaining a contour area of the target virtual object in a preset screen space.
[0089] In this embodiment, in the game scene constructed by the graphical user interface, there are a player virtual object controlled by the game player and at least one other virtual object. The positional relationship between the player virtual object and the at least one virtual object is detected. The positional relationship can be measured in a variety of ways, such as calculating the coordinate distance between the player virtual object and the target virtual object in the game scene coordinate system, relative orientation (in front, to the side or behind, etc.). For example, the position of the player virtual object may be used as a reference point to determine whether the target virtual object is within a certain radius with the reference point as the center, or within a certain angle range. The purpose is to determine the relative position state of the player virtual object and the target virtual object, and then determine whether the subsequent rendering trigger conditions are met.
[0090] When it is detected that the positional relationship between the player virtual object and the target virtual object meets the first preset rendering trigger condition, the contour area of the target virtual object in the preset screen space is obtained. The first preset rendering trigger condition is a rule related to the positional relationship that is pre-set according to game design, visual effect requirements, etc.
[0091] A position distance threshold is preset, and the first preset rendering trigger condition can be that if it is detected that the position distance between the player virtual object and the target virtual object is less than the position distance threshold, the contour area of the target virtual object in the preset screen space is obtained. The first preset rendering trigger condition can also be that the game player controls the player virtual object to move in the game scene. When the target virtual object enters a certain viewing range of the player virtual object (such as a 60-degree viewing fan-shaped area directly in front), it is considered that the first preset rendering trigger condition is met, and the contour area of the target virtual object in the preset screen space is obtained.
[0092] Specifically, the preset screen space can be understood as the two-dimensional plane space corresponding to the game screen. It has its own coordinate system and range, such as the pixel coordinate range corresponding to the width and height of the screen. When the position relationship meets the first preset rendering trigger condition, the preset frame selection tool is first used to determine the contour area of the target virtual object in the preset model coordinate system, and then the coordinates of each sampling point in the contour area in the preset model coordinate system are transformed to obtain the contour area of the target virtual object in the preset screen space, that is, the coordinates of each sampling point in the contour area in the preset screen space coordinate system are obtained.
[0093] S103 , performing color fuzzy processing on the contour area according to a preset flow noise map to obtain a target fuzzy color value of each sampling point in the contour area.
[0094] S104 , sequentially superimposing the target fuzzy color value of each sampling point to the corresponding sampling point in the contour area to generate a flow blur effect image of the target virtual object.
[0095] S105: Switch the display of the target virtual object from the initial material rendering to a flow blur rendering.
[0096] Specifically, the preset flow noise map is a pre-made image resource, and the pixel color information in the preset flow noise map presents a style similar to flow, random changes and fuzzy texture. For example, it may look like a texture pattern with smoke, water flow or light and shadow flow effects, the purpose of which is to add a dynamic and fuzzy visual effect to the target virtual object. Each sampling point in the contour area samples the preset flow noise map to obtain the target fuzzy color value of each sampling point, and the target fuzzy color value of each sampling point is sequentially superimposed on the corresponding sampling point in the contour area to generate a flow blur effect map of the target virtual object.
[0097] Then the display effect of the target virtual object is switched. The initial material rendering is an image of the target virtual object with color, material, texture and other effects. The target virtual object is switched from the initial material rendering to a flow blur rendering, so that the display effect of the target virtual object seen by the game player is a flow blur effect. If the flow blur effect is a shadow black fog effect, the game player will see the outline area corresponding to the target virtual object as a ball of shadow black fog.
[0098] In summary, an embodiment of the present application provides a model rendering method for a target virtual object, the method comprising: detecting a positional relationship between a player virtual object and a target virtual object, if the positional relationship satisfies a first preset rendering trigger condition, obtaining a contour area of the target virtual object in a preset screen space, performing color blurring processing on the contour area according to a preset flow noise map, obtaining a target blur color value of each sampling point in the contour area, superimposing the target blur color value of each sampling point on the corresponding sampling point in the contour area in turn, generating a flow blur effect map of the target virtual object, and switching the display of the target virtual object from an initial material effect map to a flow blur effect map.
[0099] According to the method of the present application, when the positional relationship between the player virtual object and the target virtual object meets the first preset rendering trigger condition, the contour area of the target virtual object is processed to generate a flow blur effect map, and the contour area is color blurred and superimposed according to the preset flow noise map, without the need to use texture technology, so that the generated flow blur effect map is more flexible, and the game player can intuitively see the target virtual object in the game scene and conduct subsequent interactions. The flow blur effect map can give the target virtual object a stronger sense of movement, enhance the visual appeal and fun of the game screen, and at the same time, the game player's attention is more easily focused on the target virtual object with a flow blur effect, so that the player is more involved in the game and the immersion of the game is enhanced.
[0100] On the basis of the above-mentioned embodiment, the embodiment of the present application provides another possible implementation method of the model rendering method of the target virtual object by determining the target fuzzy color value of each sampling point in the contour area. Figure 2 A second flow chart of a method for rendering a model of a target virtual object provided in an embodiment of the present application is as follows: Figure 2 As shown, according to the preset flow noise map, the contour area is color blurred to obtain the target blurred color value of each sampling point in the contour area, including:
[0101] S201, obtaining the fuzzy direction of each sampling point.
[0102] In this embodiment, the blur direction of each sampling point is determined according to each sampling point in the contour area and a preset reference point.
[0103] Optionally, the blur direction of each sampling point is obtained according to the texture coordinates of a preset reference point of the contour area and the texture coordinates of each sampling point.
[0104] Specifically, the preset reference point can be the center point of the contour area. Since what is obtained is the contour area of the target virtual object in the preset screen space, the coordinates of each sampling point in the contour area are texture coordinates, that is, screen UV coordinates. The texture coordinates of the preset reference point of the contour area and the texture coordinate difference of each sampling point are calculated to determine the direction vector corresponding to each sampling point. The direction vector corresponding to each sampling point is used to characterize the blur direction of each sampling point.
[0105] For example, when the texture coordinates of the sampling point are above and to the right of the texture coordinates of the preset reference point, the blur direction is determined to be from the lower left to the upper right, so that the color blurring process can be performed according to the layout logic of the texture, so that the final blurring effect is consistent with the texture characteristics of the object itself, looks more natural and reasonable, and meets the visual expectations of the changing laws of light and shadow, texture, etc. on the surface of the object.
[0106] S202: Perform at least one color blurring process on the contour area along the blurring direction of each sampling point to obtain at least one blurred color value of each sampling point.
[0107] S203 : Determine a target fuzzy color value of each sampling point according to at least one fuzzy color value of each sampling point and a preset flow noise map.
[0108] Specifically, along the blurring direction of each sampling point, the color of the contour area on the screen is sampled, and color blurring processing is performed at least once to obtain at least one blur color value of each sampling point. Then, each sampling point samples a preset flow noise map to obtain a noise value of each sampling point. According to the at least one blur color value and the noise value of each sampling point, a target blur color value of each sampling point is determined.
[0109] In the method provided in the embodiment of the present application, a blur direction of each sampling point is obtained, and a color blur process is performed on the contour area at least once along the blur direction of each sampling point to obtain at least one blur color value of each sampling point. According to the at least one blur color value of each sampling point and a preset flow noise map, a target blur color value of each sampling point is determined. By sampling each sampling point along the blur direction of each sampling point, a color blur process is performed at least once, and finally the target blur color value of each sampling point is determined for generating a flow blur effect map of the target virtual object.
[0110] On the basis of the above embodiment, the embodiment of the present application further provides another possible implementation method of the model rendering method of the target virtual object by determining at least one fuzzy color value of each sampling point. Figure 3 A third flow chart of a method for rendering a model of a target virtual object provided in an embodiment of the present application is as follows: Figure 3 As shown, along the blur direction of each sampling point, the contour area is subjected to at least one color blur process to obtain at least one blur color value of each sampling point, including:
[0111] S301 , sampling a contour area at least once to obtain at least one sampling color value of each sampling point.
[0112] In this embodiment, when processing the contour area of the target virtual object, in order to achieve the subsequent color blurring effect more meticulously, the contour area needs to be sampled. For example, the contour area may be a set of many tiny points, and some points are selected as sampling points according to certain rules and densities. For example, a sampling point may be determined from the contour area at a certain pixel interval or texture coordinate interval according to the principle of uniform distribution.
[0113] Each sampling point has its original corresponding color value, which is based on the initial material texture of the target virtual object and the color presented under the current virtual scene lighting conditions. Since the contour area is the contour area in the preset screen space, each sampling point samples the color of the preset screen space at least once to obtain at least one sampled color value of each sampling point.
[0114] S302: along the blur direction of each sampling point, determine the weight value of each sampling point in the corresponding blur direction.
[0115] The weight value is a parameter used to further measure the degree of influence of each sampling point on the colors of its surrounding sampling points when performing color blurring along the blurring direction.
[0116] The blur direction of each sampling point is determined by the texture coordinates of each sampling point and the texture coordinates of the preset reference point. The sampling points at different positions play different roles. The sampling points that are closer to the preset reference point and more critical in the blur direction often have higher weight values, which means that they have a greater influence on the formation of the final blurred color; while the sampling points that are farther away from the preset reference point or in relatively secondary positions have relatively lower weight values.
[0117] Optionally, along the blurring direction of each sampling point, a preset linear interpolation algorithm is used to calculate the weight value of each sampling point in the corresponding blurring direction.
[0118] Specifically, a preset linear interpolation algorithm is used, and the weight value is determined by considering other factors such as the relative position of each sampling point in the entire contour area, the texture area in which it is located, etc., so that the color blurring processing can be carried out along the blurring direction according to the expected visual effect rules, simulating the color gradient and blurring effects caused by real light and shadow, object movement, etc.
[0119] S303 , performing fuzzy processing on at least one sampled color value of each sampling point according to the weight value of each sampling point and a preset color deviation value, to obtain at least one fuzzy color value of each sampling point.
[0120] Among them, the preset color deviation value can be determined by color offset adjustment technology (RGBOffset). The parameters used to adjust the amplitude and direction of color change can be a fixed deviation in color dimensions such as hue, saturation, and brightness. For example, the hue can be increased or decreased by a certain degree, the saturation can be increased or decreased by a certain proportion, etc. The purpose is to make the blurred color have richer changes and more in line with the desired visual style.
[0121] For each sampling point, along its blur direction, according to the weight value of each sampling point and the preset color deviation value, its original sampled color value is changed by a specific calculation method. For example, a weighted average calculation method is used to weight the sampled color value of the current sampling point and other sampling points according to their respective weight values, and then the preset color deviation value is combined for corresponding adjustment to obtain a fuzzy color value of the sampling point after the blurring process. Since multiple blurring operations may be performed, each sampling point can eventually obtain at least one fuzzy color value.
[0122] In the method provided in the embodiment of the present application, the contour area is sampled at least once to obtain at least one sampled color value of each sampling point; along the blur direction of each sampling point, the weight value of each sampling point in the corresponding blur direction is determined; according to the weight value of each sampling point and the preset color deviation value, at least one sampled color value of each sampling point is blurred to obtain at least one blurred color value of each sampling point. By sampling at least once, at least one blurred color value of each sampling point is obtained, so that the flow blur effect map corresponding to the target virtual object is finally constructed more delicate.
[0123] The embodiment of the present application also provides another possible implementation method of the model rendering method of the target virtual object by determining the target fuzzy color value of each sampling point. Figure 4 A fourth flow chart of a method for rendering a model of a target virtual object provided in an embodiment of the present application is as follows: Figure 4 As shown, according to at least one fuzzy color value of each sampling point and a preset flow noise map, a target fuzzy color value of each sampling point is determined, including:
[0124] S401: Using a preset flow noise map, perform noise processing on at least one fuzzy color value of each sampling point to obtain at least one noisy fuzzy color value of each sampling point.
[0125] S402: Obtain a target fuzzy color value of each sampling point according to at least one noisy fuzzy color value of each sampling point.
[0126] In this embodiment, each sampling point has a corresponding specific position in the contour area and also has a corresponding position on the preset flow noise map. The preset flow noise map is sampled at each sampling point to determine the noise value of each sampling point. At least one fuzzy color value and noise value of each sampling point are superimposed to obtain at least one noisy fuzzy color value of each sampling point.
[0127] According to at least one noisy fuzzy color value of each sampling point and the sampling number of each sampling point, a target fuzzy color value of each sampling point is determined. Specifically, at least one noisy fuzzy color value of each sampling point is superimposed and divided by the sampling number of each sampling point to obtain the target fuzzy color value of each sampling point.
[0128] In the method provided in the embodiment of the present application, a preset flow noise map is used to perform noise processing on at least one fuzzy color value of each sampling point to obtain at least one noisy fuzzy color value of each sampling point; based on the at least one noisy fuzzy color value of each sampling point, a target fuzzy color value of each sampling point is obtained, and by superimposing the preset flow noise map, the final target fuzzy color value can make the contour area of the target virtual object present a natural, vivid and expected flow blur visual effect after integrating the noise effect of the flow noise map.
[0129] The embodiment of the present application also provides another possible implementation method of the model rendering method of the target virtual object by determining the contour area of the target virtual object in the preset screen space. Figure 5 A fifth flow chart of a method for rendering a model of a target virtual object provided in an embodiment of the present application is as follows: Figure 5 As shown, obtaining the contour area of the target virtual object in the preset screen space includes:
[0130] S501: Obtain the local coordinates of each sampling point of the target virtual object in a preset model coordinate system.
[0131] In this embodiment, the target virtual object will have its own independent model coordinate system when it is created, which is a coordinate system established with reference to the target virtual object itself. The settings of the origin, coordinate axis direction, etc. of the preset model coordinate system are determined based on the initial design and modeling method of the target virtual object, which is convenient for positioning and describing the various components, vertices, etc. of the target virtual object. For example, for a simple rectangular virtual treasure box, the origin of its preset model coordinate system may be located at the geometric center of the virtual treasure box, the x-axis direction is along the length of the virtual treasure box, the y-axis is along the width of the virtual treasure box, and the z-axis is along the height of the virtual treasure box.
[0132] Among them, after sampling the contour area of the target virtual object, each sampling point has its own corresponding position information, and the position information is reflected by the local coordinates in the preset model coordinate system.
[0133] S502: Convert the local coordinates of each sampling point from the preset model coordinate system to the preset world coordinate system to obtain the world coordinates of each sampling point.
[0134] Among them, the preset world coordinate system is an absolute coordinate system shared by the entire game scene, covering all virtual objects, terrain and other elements in the game scene, just like the longitude and latitude coordinates in the real world, which is used to uniformly describe the position relationship of various objects in the game scene. The origin and coordinate axis direction of this coordinate system are determined when the virtual scene is initialized, and will not change with the changes of a single virtual object. The positions of all virtual objects in the scene are ultimately measured uniformly through the world coordinate system.
[0135] In order to accurately know the position of each sampling point in the entire game scene, it is necessary to convert the local coordinates in the preset model coordinate system of the target virtual object into the world coordinates in the world coordinate system. This conversion involves the operation of transformation matrices (such as translation, rotation, scaling and other transformation matrices), because the target virtual object itself may have position translation, angle rotation and size scaling in the virtual world. And if there is a certain rotation angle, then the local coordinates of each sampling point must be calculated according to the corresponding transformation rules to obtain the accurate world coordinates in the world coordinate system, so that the specific position of each sampling point relative to the entire game scene can be known.
[0136] Specifically, through the function float4 worldPos=mul(world_mat,local_pos), the local coordinates local_pos of each sampling point are converted from the preset model coordinate system to the preset world coordinate system to obtain the world coordinates worldPos of each sampling point.
[0137] S503 : Convert the world coordinates of each sampling point from a preset world coordinate system to a preset view coordinate system to obtain the view coordinates of each sampling point.
[0138] The preset view coordinate system is a coordinate system based on the observation perspective, which is closely related to the game player in the game scene (such as the player character perspective in the game), and is mainly used to describe the position relationship of objects in the eyes of the game player. Its origin is usually located at the position of the game player or set with the game player as a reference, with the purpose of relocating the position of the object from the perspective of the game player.
[0139] When the target virtual object is to be rendered and presented to the game player, the world coordinates of each sampling point in the world coordinate system need to be converted to the view coordinates in the preset view coordinate system. A specific transformation matrix needs to be used for calculation, and the world coordinates are converted accordingly by considering factors such as the position, orientation, and viewing angle of the game player. For example, the coordinates of a sampling point of a virtual treasure chest in the world coordinate system are (15, 22, 8), but from the current viewing angle of the game player, the coordinates in the view coordinate system may become (-2, 3, 5) after conversion, indicating the relative position of the sampling point relative to the player's viewing angle, so that the sampling point can be determined in the picture seen by the player.
[0140] Specifically, the world coordinate worldPos of each sampling point is converted from a preset world coordinate system to a preset view coordinate system through the function float4 viewPos=mul(view_mat, worldPos), so as to obtain the view coordinate viewPos of each sampling point.
[0141] It should be noted that the origin of the world coordinate system also needs to be transformed into the view coordinate system. Specifically, the function float4 viewOrigin=mul(view_mat,float4(0.0,0.0,0.0,1.0)) is used to transform the origin (0,0,0) of the world coordinate system into the view coordinate system for calculating the relative position.
[0142] According to the view coordinates of each sampling point in the view coordinate system and the origin coordinates of the view coordinate system, the position of each sampling point in the view coordinate system is determined, and the position of each sampling point in the view coordinate system is determined by the function float4 localViewPos=viewPos-viewOrigin.
[0143] S504: Convert the world coordinates of each sampling point from a preset view coordinate system to a preset screen space coordinate system to obtain texture coordinates of each sampling point.
[0144] Among them, the coordinate system of the preset screen space corresponds to the coordinate system used by the screen plane that displays the game scene. It is a two-dimensional (for example, the horizontal coordinate corresponds to the horizontal pixel position of the screen, and the vertical coordinate corresponds to the vertical pixel position of the screen) coordinate system. The coordinate system of the preset screen space has its own coordinate range, usually in pixels. For example, the screen width direction is from 0 to the maximum pixel width of the screen, and the height direction is from 0 to the maximum pixel height of the screen, which is used to determine the specific display position and range of the virtual object on the screen.
[0145] In order to accurately display the target virtual object on the screen, the view coordinates of each sampling point in the view coordinate system need to be further converted into texture coordinates in the preset screen space coordinate system. This conversion process takes into account factors such as the projection relationship and resolution of the screen, so that each sampling point of the virtual object can correspond to a specific pixel position on the screen. In addition to being used to locate the display position on the screen, the texture coordinates are also associated with the texture mapping of the virtual object surface. For example, the texture coordinates determine the specific position of each sampling point in the texture pattern applied to the virtual object.
[0146] S505 : Obtain a contour area of the target virtual object according to the texture coordinates of each sampling point.
[0147] The texture coordinates of each sampling point are used to define the contour area of the target virtual object in the screen space. It can be imagined that on the two-dimensional plane of the screen, the texture coordinates of all sampling points are like position markers of points. By connecting these points in a certain order, or by detecting the boundary range surrounded by these sampling points in the screen space, the area surrounded by the outer edge of the target virtual object presented on the screen can be outlined, thereby obtaining the contour area.
[0148] In the method provided in the embodiment of the present application, the local coordinates of each sampling point of the target virtual object in the preset model coordinate system are obtained; the local coordinates of each sampling point are converted from the preset model coordinate system to the preset world coordinate system to obtain the world coordinates of each sampling point; the world coordinates of each sampling point are converted from the preset world coordinate system to the preset view coordinate system to obtain the view coordinates of each sampling point; the world coordinates of each sampling point are converted from the preset view coordinate system to the coordinate system of the preset screen space to obtain the texture coordinates of each sampling point; according to the texture coordinates of each sampling point, the contour area of the target virtual object is obtained, and the contour area of the target virtual object is obtained by converting the coordinates of each sampling point.
[0149] The embodiment of the present application also provides another possible implementation of the method for rendering a model of a target virtual object. Figure 6 A sixth flow chart of a method for rendering a model of a target virtual object provided in an embodiment of the present application is as follows: Figure 6As shown, the method also includes:
[0150] S601: Detect an interaction event between a player virtual object and a target virtual object.
[0151] In this embodiment, the game player can interact with the target virtual object in various ways by manipulating the player virtual object. These interactive events cover a variety of forms. For example, the player virtual object may be close to the target virtual object to a certain distance range, or the player may perform a specific operation (such as clicking, touching, using skills, etc.) on the target virtual object, or the player may use a special prop to act on the target virtual object, such as using a flashlight to illuminate the target virtual object. Through the corresponding detection mechanism, the occurrence of these interactive events can be captured in real time, and then it can be determined whether the subsequent rendering trigger conditions are met.
[0152] S602: If the interaction event satisfies a second preset rendering trigger condition, position shifting is performed on each vertex on the three-dimensional contour line corresponding to the two-dimensional contour line of the contour area.
[0153] Among them, the second preset rendering trigger condition is a rule related to the interactive event that is set in advance according to the game design, visual presentation requirements, etc. For example, when the player virtual object launches an attack skill on the target virtual object, and this attack hits the target virtual object, it is determined whether the second preset rendering trigger condition is met through the corresponding collision detection and other mechanisms, or a certain specific interactive action is completed between the player virtual object and the target virtual object, such as the target virtual object using a flashlight to illuminate the target virtual object, and the corresponding detection mechanism is used to determine whether the second preset rendering trigger condition is met. If the second preset rendering trigger condition is met, the position of each vertex on the three-dimensional contour line corresponding to the two-dimensional contour line of the contour area is offset.
[0154] Specifically, the contour area of the target virtual object in the preset screen space has been determined. This contour area is two-dimensional, but it actually corresponds to the contour shape of the target virtual object in the three-dimensional space. Its two-dimensional contour line can be regarded as the result of projecting the three-dimensional contour line onto the preset screen plane. The three-dimensional contour line is composed of many vertices, which define the shape of the contour. The positions of these vertices are offset to change the original coordinate positions of each vertex, so that the shape of the contour line changes.
[0155] S603: Generate a new two-dimensional contour line according to each offset vertex.
[0156] Specifically, after the position offset operation is performed on each vertex on the three-dimensional contour line, the coordinate positions of these vertices have changed. At this time, based on the new vertex coordinates, the new vertices are reconnected in the screen space to obtain a new two-dimensional contour line. The shape of the new two-dimensional contour line will be different from the original contour line. It will reflect the shape change caused by the previous vertex position offset, and thus become the key basic element for the subsequent generation of a new rendering effect.
[0157] S604: Generate a flow stroke effect map of the target virtual object according to the new two-dimensional contour line and the preset flow map.
[0158] Among them, the preset flow map is a pre-prepared image resource, and its pixel color distribution shows the characteristics of flow and dynamic change. For example, it has a texture pattern with visual effects such as liquid flow, light and shadow flow, which can add a dynamic and fantastic visual texture to the target virtual object.
[0159] Based on the newly generated two-dimensional contour line, combined with the preset flow map, a flowing stroke effect is created for the target virtual object. In specific operations, the color, texture and other information in the preset flow map can be applied to the area near the contour line according to certain mapping rules along the new two-dimensional contour line, so that the contour line looks like there are flowing elements surrounding and flowing along it, creating a unique stroke effect, so that the edge of the target virtual object presents a dynamic and artistic flowing visual feature, and finally generates a flowing stroke effect map that meets the requirements.
[0160] S605: Switch the display of the target virtual object from the flow blur effect diagram to the flow stroke effect diagram.
[0161] Specifically, when it is detected that the interaction event between the player virtual object and the target virtual object meets the second preset rendering trigger condition and the generation of the flowing stroke effect diagram is completed, the current display effect is switched to the new flowing stroke effect.
[0162] In the method provided in this embodiment, an interaction event between a player virtual object and a target virtual object is detected; if the interaction event satisfies a second preset rendering trigger condition, the position of each vertex on the three-dimensional contour line corresponding to the two-dimensional contour line of the contour area is offset; a new two-dimensional contour line is generated according to each offset vertex; a flow stroke effect map of the target virtual object is generated according to the new two-dimensional contour line and the preset flow map; and the target virtual object is switched from a flow blur effect map to a flow stroke effect map. This switching operation is usually performed by a game rendering engine or other related mechanisms, and the transition to complete the display effect conversion at an appropriate time, such as the moment after the interaction event is triggered or in a very short time, so that the player can intuitively see the appearance changes of the target virtual object caused by the interaction between the player virtual object and the target virtual object, further enriching the visual performance of the game screen and enhancing the player's interactive experience and immersion.
[0163] On the basis of the above embodiments, the embodiment of the present application also provides another possible implementation method of the model rendering method of the target virtual object by generating a flowing stroke effect diagram of the target virtual object. Figure 7 A flow chart of a method for rendering a model of a target virtual object provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, according to the new two-dimensional contour line and the preset flow map, a flow stroke effect map of the target virtual object is generated, including:
[0164] S701, sampling the flow parameters of each sampling point from a preset flow map.
[0165] S702: Generate a flow stroke effect diagram according to the flow parameters of each sampling point and the new two-dimensional contour line.
[0166] In this embodiment, a large number of sampling points are distributed on the newly generated two-dimensional contour line. The flow parameters of each sampling point are sampled from the preset flow map, and the positions of these sampling points on the two-dimensional contour line are matched to the corresponding positions in the preset flow map to obtain relevant parameters. For example, the flow parameters may include information such as color change rate, texture flow direction, flow intensity, etc., which are specifically implemented through preset sampling rules. A common method is to use the coordinates of the sampling points (such as the coordinate values in the two-dimensional plane coordinate system where the two-dimensional contour line is located) as the basis, and convert them into the coordinate space of the preset flow map through a certain mapping relationship, find the corresponding pixel position, and then extract the relevant color channel values or other data forms pre-set to represent the flow parameters from the pixel position.
[0167] After obtaining the flow parameters of each sampling point and the new two-dimensional contour line, along the two-dimensional contour line, according to the flow parameters of each sampling point, the corresponding dynamic and flow effects are gradually added to the area around the contour line, so that the contour line presents a visual effect of flowing strokes.
[0168] Specifically, for each sampling point on the two-dimensional contour line, the corresponding operation is performed according to the flow parameters obtained. For example, according to the texture flow direction parameter corresponding to the sampling point, the direction of adding effects around the contour line is determined. If the texture flow direction is from left to right, then it is processed from the sampling point along this direction; then according to the color change rate parameter, the dynamic change of color over time or space is controlled. For example, for sampling points with a faster color change rate, the surrounding color will change more obviously within a short distance; at the same time, according to the flow intensity parameter, the obviousness of the effect is determined. For sampling points with high flow intensity, the flow effect produced, such as the brightness of light and shadow effects and the concentration of smoke effects, will be more prominent.
[0169] In the method provided in the embodiment of the present application, the flow parameters of each sampling point are sampled from the preset flow map, and a flow stroke effect map is generated according to the flow parameters of each sampling point and the new two-dimensional contour line. By gradually superimposing and integrating various flow effects represented by the flow parameters on the entire two-dimensional contour line and its surrounding area, a continuous, natural flow effect that conforms to the preset flow map style is presented around the new two-dimensional contour line, and finally a complete flow stroke effect map of the target virtual object is formed, so that the edge of the target virtual object seems to be surrounded by dynamic light and shadow, smoke, water flow and other elements, which greatly enhances its visual appeal and fantasy.
[0170] The embodiment of the present application also provides another possible implementation of the method for rendering a model of a target virtual object. Figure 8 FIG8 is a flow chart of a method for rendering a model of a target virtual object provided in an embodiment of the present application, as shown in FIG. Figure 8 As shown, the position of each vertex on the three-dimensional contour line corresponding to the two-dimensional contour line of the contour area is offset, including:
[0171] S801. Obtain a target normal direction of each vertex and an offset parameter of each vertex in the target normal direction.
[0172] S802 , offset the position of each vertex on the contour area along the target normal direction of each vertex according to the offset parameter of the target normal direction.
[0173] In this embodiment, the target normal direction of each vertex and the offset parameters of each vertex in the target normal direction are obtained, and the offset parameters of the target normal direction are superimposed along the target normal direction of each vertex to offset the position of each vertex on the contour area. Specifically, for each vertex on the three-dimensional contour line, based on its current coordinate position, the position of the vertex is moved along the determined target normal direction according to the distance or amplitude specified by the offset parameters to achieve position offset of each vertex on the contour area.
[0174] In the method provided in the embodiment of the present application, the target normal direction of each vertex and the offset parameter of each vertex in the target normal direction are obtained; along the target normal direction of each vertex, the position of each vertex on the contour area is offset according to the offset parameter of the target normal direction. Each vertex will move to a new position in the three-dimensional space according to its own target normal direction and offset parameter, thereby changing the shape of the entire three-dimensional contour line. Since there is a corresponding relationship between the three-dimensional contour line and the two-dimensional contour line, the position offset of the three-dimensional contour line vertex will eventually be reflected in the shape change of the two-dimensional contour line, laying the foundation for the subsequent generation of the flowing stroke effect diagram.
[0175] The embodiment of the present application also provides another possible implementation of the method for rendering a model of a target virtual object. Fig. 9 A ninth flow chart of a method for rendering a model of a target virtual object provided in an embodiment of the present application is as follows: Fig. 9 As shown, get the target normal direction of each vertex, including:
[0176] S901. Using a preset correction factor, correct the original normal direction of each vertex to obtain the calculated normal direction of each vertex.
[0177] S902: Determine the target normal direction of each vertex from the original normal direction and the calculated normal direction of each vertex.
[0178] In this embodiment, since the hard edges of the target virtual model need to be retained, the normals of the connected vertices are different, which will cause model separation when the vertices are offset in the normal direction. In order to make the contour area of the target virtual model expand outward evenly, the normals need to be recalculated to obtain the calculated normal direction of each vertex.
[0179] In the geometric model of the target virtual object, each vertex has its initially determined original normal direction. This original normal direction is determined based on the object's modeling method and basic geometric topological relationships, reflecting the natural orientation of the local surface where the vertex is located without any other additional influences, and intuitively showing the state of the object surface when it was initially constructed from a geometric perspective.
[0180] It should be noted that before obtaining the target normal direction of each vertex, the Houdini vertex color generation tool is used to bake the smooth normal information. Specifically, the vertices are welded to generate new normal information after welding, and the new normal information is transmitted back to the target virtual object model. The new normal information is normalized and transferred to the vertex color attributes of each vertex of the target virtual object model.
[0181] Get the new normal information from the vertex color attribute of each vertex, and multiply it by the preset correction factor to correct the original normal direction of each vertex to get the calculated normal direction of each vertex. Specifically, through the function float3 normal_local = (VertIn.VertexColor*2-1)*TPO_OutLine_NormalFix, determine the calculated normal direction normal_local of each vertex, where TPO_OutLine_NormalFix represents the preset correction factor and VertIn.VertexColor represents the vertex color.
[0182] According to the preset adjustment parameters, the target normal direction of each vertex is determined from the original normal direction and the calculated normal direction of each vertex. Specifically, through the function float3 Norm_Switch=TPO_UseObject_Normal==1?VertIn.NormalLS:normal_local, it is determined whether the target normal direction Norm_Switch of each vertex is the original normal direction VertIn.NormalLS or the calculated normal direction normal_local, where TPO_UseObject_Normal is represented as the preset adjustment parameter.
[0183] In the method provided in the embodiment of the present application, a preset correction factor is used to correct the original normal direction of each vertex to obtain the calculated normal direction of each vertex, and then the target normal direction of each vertex is determined from the original normal direction and the calculated normal direction of each vertex to achieve position offset of each vertex on the contour area.
[0184] The embodiment of the present application also provides another possible implementation of the method for rendering a model of a target virtual object. Fig.10 A flowchart of a method for rendering a model of a target virtual object provided in an embodiment of the present application is shown in FIG. Fig.10 As shown, the position offset parameters of each vertex in the target normal direction are obtained, including:
[0185] S1001. Obtain position disturbance information of each vertex.
[0186] S1002. Obtain the normal offset of each vertex in the target normal direction.
[0187] S1003. Determine the position offset parameter of each vertex in the target normal direction according to the position disturbance information, the normal offset and the target normal direction.
[0188] In this embodiment, noise is generated by using trigonometric functions, so that the position disturbance information of each vertex is calculated according to the noise, wherein the position disturbance information of each vertex is calculated as follows:
[0189] float3 np=VertIn.PositionLS.xyz*TPO_OutLine_VertexControl.x;
[0190] float t=_FrameTime*TPO_OutLine_VertexControl.z;
[0191] float3 p2 = np.xyz - np.yzx;
[0192] p2=(p2+t)*float3(1.0,1.5,2.0);
[0193] float3 noise = sin(p2) + 1.0;
[0194] float sum_noise=noise.x+noise.y+noise.z;
[0195] Among them, TPO_OutLine_VertexControl represents the preset control parameter vector, VertIn.PositionLS represents the vertex position, and sum_noise represents the position disturbance information of each vertex.
[0196] Specifically, the normal information of each vertex is converted from the preset model coordinate system to the preset world coordinate system. First, the normal transformation matrix is calculated, and then the normal information of each vertex in the preset world coordinate system is determined according to the normal transformation matrix and the target normal direction.
[0197] Finally, according to the position disturbance information, normal offset and target normal direction, the position offset parameters of each vertex in the target normal direction are determined, and the position disturbance information and normal offset are superimposed along the target normal direction of each vertex to obtain the position offset parameters of each vertex in the target normal direction.
[0198] In the method provided in the embodiment of the present application, the position disturbance information of each vertex is obtained, and the normal offset of each vertex in the target normal direction is obtained; based on the position disturbance information, the normal offset and the target normal direction, the position offset parameters of each vertex in the target normal direction are determined to achieve position offset of each vertex on the contour area.
[0199] The embodiment of the present application also provides another possible implementation of a method for rendering a model of a target virtual object, the method comprising:
[0200] If the duration of the interaction event reaches the preset rendering recovery condition, the target virtual object will be restored from the flowing stroke effect image to the initial material effect image.
[0201] In this embodiment, the interaction event between the player virtual object and the target virtual object has a certain time span. The time from the beginning of the interaction behavior to its end or continued impact on the target virtual object is the duration of the interaction event.
[0202] The preset rendering recovery condition is a time rule standard set in advance based on game design, visual presentation planning and other factors. It specifies how long the interactive event lasts before the display effect of the target virtual object needs to be restored. For example, when the duration of the interactive event reaches 10 seconds, the preset rendering recovery condition is considered to be met.
[0203] The target virtual object originally has its own initial material setting, and the initial material rendering is based on the normal visual effect presented by this initial material. For example, the preset material of a treasure chest virtual object may be a wood texture with metal edging. When there is no interaction event or the interaction ends and is restored, it presents a regular appearance that conforms to its own material characteristics, such as clear wood texture and bright metal edging. When the duration of the interaction event reaches the preset rendering recovery condition, it is necessary to switch the current flowing stroke rendering of the target virtual object back to the initial material rendering. This display recovery operation is usually performed by the game's rendering engine, so that the target virtual object is displayed in front of the player with the original material effect again.
[0204] In the method provided in the embodiment of the present application, if the duration of the interactive event reaches the preset rendering recovery condition, the target virtual object is restored from the flowing stroke effect image to the initial material effect image. The significance of this is to maintain the rationality and coherence of the visual presentation of the entire virtual scene, avoid the special effects remaining for a long time after the interactive event ends and appear abrupt, and let the player see the target virtual object return to the normal state, which meets the player's expectations for the normal appearance of virtual objects at different stages, and helps to maintain a good game visual experience and immersion.
[0205] The following is a corresponding explanation of the model rendering device and electronic device for the target virtual object provided by any of the above embodiments of the present application. The specific implementation process and the technical effects produced are the same as those of the corresponding method embodiments mentioned above. For the sake of brief description, the parts not mentioned in this embodiment can refer to the corresponding content in the method embodiment.
[0206] Fig.11 A schematic diagram of the functional modules of a model rendering device for a target virtual object provided in an embodiment of the present application. Fig.11 As shown, the model rendering device 100 for the target virtual object includes:
[0207] A detection module 110 is used to detect the positional relationship between the player virtual object and the target virtual object;
[0208] An acquisition module 120, configured to acquire a contour area of a target virtual object in a preset screen space if the positional relationship satisfies a first preset rendering trigger condition;
[0209] The processing module 130 is used to perform color fuzzy processing on the contour area according to a preset flow noise map to obtain a target fuzzy color value of each sampling point in the contour area;
[0210] A generating module 140 is used to sequentially superimpose the target fuzzy color value of each sampling point to the corresponding sampling point in the contour area to generate a flow blur effect image of the target virtual object;
[0211] The display module 150 is used to switch the display of the target virtual object from the initial material effect image to the flow blur effect image.
[0212] Optionally, the processing module 130 is further used to obtain the blur direction of each sampling point; perform color blurring processing on the contour area at least once along the blur direction of each sampling point to obtain at least one blur color value of each sampling point; and determine the target blur color value of each sampling point based on the at least one blur color value of each sampling point and a preset flow noise map.
[0213] Optionally, the processing module 130 is further used to sample the contour area at least once to obtain at least one sampling color value of each sampling point; determine the weight value of each sampling point in the corresponding blur direction along the blur direction of each sampling point; and blur at least one sampling color value of each sampling point according to the weight value of each sampling point and a preset color deviation value to obtain at least one blurred color value of each sampling point.
[0214] Optionally, the processing module 130 is further configured to obtain a blur direction of each sampling point according to the texture coordinates of a preset reference point of the contour area and the texture coordinates of each sampling point.
[0215] Optionally, the processing module 130 is further configured to calculate a weight value of each sampling point in a corresponding blur direction by using a preset linear interpolation algorithm along the blur direction of each sampling point.
[0216] Optionally, the processing module 130 is further used to use a preset flow noise map to perform noise processing on at least one fuzzy color value of each sampling point to obtain at least one noisy fuzzy color value of each sampling point; and obtain a target fuzzy color value of each sampling point based on the at least one noisy fuzzy color value of each sampling point.
[0217] Optionally, the acquisition module 120 is also used to obtain the local coordinates of each sampling point of the target virtual object in a preset model coordinate system; convert the local coordinates of each sampling point from the preset model coordinate system to a preset world coordinate system to obtain the world coordinates of each sampling point; convert the world coordinates of each sampling point from the preset world coordinate system to a preset view coordinate system to obtain the view coordinates of each sampling point; convert the world coordinates of each sampling point from the preset view coordinate system to a preset screen space coordinate system to obtain the texture coordinates of each sampling point; and obtain the contour area of the target virtual object based on the texture coordinates of each sampling point.
[0218] Optionally, the device further comprises:
[0219] The detection module 110 is also used to detect interaction events between the player virtual object and the target virtual object;
[0220] An offset module, configured to offset the positions of the vertices on the three-dimensional contour line corresponding to the two-dimensional contour line of the contour area if the interaction event satisfies the second preset rendering trigger condition;
[0221] The generating module 140 is further used to generate a new two-dimensional contour line according to each offset vertex; and to generate a flow stroke effect map of the target virtual object according to the new two-dimensional contour line and the preset flow map;
[0222] The display module 150 is further used to switch the display of the target virtual object from the flow blur effect image to the flow stroke effect image.
[0223] Optionally, the generating module 140 is further used to sample the flow parameters of each sampling point from a preset flow map; and generate a flow stroke effect map according to the flow parameters of each sampling point and the new two-dimensional contour line.
[0224] Optionally, the offset module is also used to obtain the target normal direction of each vertex and the offset parameter of each vertex in the target normal direction; along the target normal direction of each vertex, according to the offset parameter of the target normal direction, the position of each vertex on the contour area is offset.
[0225] Optionally, the offset module is further used to correct the original normal direction of each vertex using a preset correction factor to obtain the calculated normal direction of each vertex; and determine the target normal direction of each vertex from the original normal direction and the calculated normal direction of each vertex.
[0226] Optionally, the offset module is also used to obtain position disturbance information of each vertex; obtain the normal offset of each vertex in the target normal direction; and determine the position offset parameters of each vertex in the target normal direction based on the position disturbance information, the normal offset and the target normal direction.
[0227] Optionally, the display module 150 is further used to restore the target virtual object from the flowing stroke effect image to the initial material effect image if the duration of the interactive event reaches a preset rendering recovery condition.
[0228] 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.
[0229] 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 (ASICs), or one or more microprocessors, or one or more field programmable gate arrays (FPGAs). 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).
[0230] Fig.12 Schematic diagram of an electronic device provided in an embodiment of the present application, the electronic device can be used to render a model of a target virtual object. Fig.12 As shown, the electronic device includes: a processor 210 , a storage medium 220 , and a bus 230 .
[0231] The storage medium 220 stores machine-readable instructions executable by the processor 210. When the electronic device is running, the processor 210 communicates with the storage medium 220 via the bus 230, and the processor 210 executes the machine-readable instructions. The execution method includes:
[0232] Detect the positional relationship between the player's virtual object and the target virtual object; if the positional relationship meets the first preset rendering trigger condition, obtain the contour area of the target virtual object in the preset screen space; perform color blurring on the contour area according to the preset flow noise map to obtain the target blur color value of each sampling point in the contour area; superimpose the target blur color value of each sampling point on the corresponding sampling point in the contour area in turn to generate a flow blur effect map of the target virtual object; switch the display of the target virtual object from the initial material effect map to the flow blur effect map.
[0233] Optionally, according to a preset flow noise map, a color blurring process is performed on the contour area to obtain a target blurring color value of each sampling point in the contour area, including:
[0234] Obtain a blur direction of each sampling point; perform at least one color blur process on the contour area along the blur direction of each sampling point to obtain at least one blur color value of each sampling point; determine a target blur color value of each sampling point according to at least one blur color value of each sampling point and a preset flow noise map.
[0235] Optionally, along the blurring direction of each sampling point, the contour area is subjected to at least one color blurring process to obtain at least one blurring color value of each sampling point, including:
[0236] The contour area is sampled at least once to obtain at least one sampling color value of each sampling point; along the blurring direction of each sampling point, the weight value of each sampling point in the corresponding blurring direction is determined; according to the weight value of each sampling point and a preset color deviation value, at least one sampling color value of each sampling point is blurred to obtain at least one blurred color value of each sampling point.
[0237] Optionally, the fuzzy direction of each sampling point is obtained, including:
[0238] According to the texture coordinates of the preset reference point of the contour area and the texture coordinates of each sampling point, the blur direction of each sampling point is obtained.
[0239] Optionally, along the blur direction of each sampling point, determining a weight value of each sampling point in the corresponding blur direction includes:
[0240] Along the blurring direction of each sampling point, a preset linear interpolation algorithm is used to calculate the weight value of each sampling point in the corresponding blurring direction.
[0241] Optionally, determining a target fuzzy color value of each sampling point according to at least one fuzzy color value of each sampling point and a preset flow noise map includes:
[0242] A preset flow noise map is used to perform noise processing on at least one fuzzy color value of each sampling point to obtain at least one noisy fuzzy color value of each sampling point; and a target fuzzy color value of each sampling point is obtained according to the at least one noisy fuzzy color value of each sampling point.
[0243] Optionally, obtaining a contour area of the target virtual object in a preset screen space includes:
[0244] Obtain the local coordinates of each sampling point of the target virtual object in the preset model coordinate system; convert the local coordinates of each sampling point from the preset model coordinate system to the preset world coordinate system to obtain the world coordinates of each sampling point; convert the world coordinates of each sampling point from the preset world coordinate system to the preset view coordinate system to obtain the view coordinates of each sampling point; convert the world coordinates of each sampling point from the preset view coordinate system to the preset screen space coordinate system to obtain the texture coordinates of each sampling point; obtain the contour area of the target virtual object according to the texture coordinates of each sampling point.
[0245] Optionally, the method further comprises:
[0246] Detect interaction events between the player's virtual object and the target virtual object; if the interaction event meets the second preset rendering trigger condition, offset the positions of the vertices on the three-dimensional contour line corresponding to the two-dimensional contour line of the contour area; generate new two-dimensional contour lines according to the offset vertices; generate a flow stroke effect map of the target virtual object according to the new two-dimensional contour line and the preset flow map; switch the display of the target virtual object from the flow blur effect map to the flow stroke effect map.
[0247] Optionally, generating a flow stroke effect map of the target virtual object according to the new two-dimensional contour line and the preset flow map includes:
[0248] The flow parameters of each sampling point are sampled from the preset flow map; and a flow stroke effect map is generated according to the flow parameters of each sampling point and the new two-dimensional contour line.
[0249] Optionally, performing position shifting on each vertex on the three-dimensional contour line corresponding to the two-dimensional contour line of the contour area includes:
[0250] The target normal direction of each vertex and the offset parameter of each vertex in the target normal direction are obtained; along the target normal direction of each vertex, the position of each vertex on the contour area is offset according to the offset parameter of the target normal direction.
[0251] Optionally, obtain the target normal direction of each vertex, including:
[0252] The original normal direction of each vertex is corrected by using a preset correction factor to obtain the calculated normal direction of each vertex; the target normal direction of each vertex is determined from the original normal direction and the calculated normal direction of each vertex.
[0253] Optionally, obtain the position offset parameters of each vertex in the target normal direction, including:
[0254] Obtain position disturbance information of each vertex; obtain the normal offset of each vertex in the target normal direction; determine the position offset parameter of each vertex in the target normal direction according to the position disturbance information, the normal offset and the target normal direction.
[0255] Optionally, the method further comprises:
[0256] If the duration of the interaction event reaches the preset rendering recovery condition, the target virtual object will be restored from the flowing stroke effect image to the initial material effect image.
[0257] Optionally, the present application further provides a storage medium 220 on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method embodiment are executed.
[0258] When the program is executed by the processor, the execution method may include:
[0259] Detect the positional relationship between the player's virtual object and the target virtual object; if the positional relationship meets the first preset rendering trigger condition, obtain the contour area of the target virtual object in the preset screen space; perform color blurring on the contour area according to the preset flow noise map to obtain the target blur color value of each sampling point in the contour area; superimpose the target blur color value of each sampling point on the corresponding sampling point in the contour area in turn to generate a flow blur effect map of the target virtual object; switch the display of the target virtual object from the initial material effect map to the flow blur effect map.
[0260] Optionally, according to a preset flow noise map, a color blurring process is performed on the contour area to obtain a target blurred color value of each sampling point in the contour area, including:
[0261] Obtain a blur direction of each sampling point; perform at least one color blur process on the contour area along the blur direction of each sampling point to obtain at least one blur color value of each sampling point; determine a target blur color value of each sampling point according to at least one blur color value of each sampling point and a preset flow noise map.
[0262] Optionally, along the blurring direction of each sampling point, the contour area is subjected to at least one color blurring process to obtain at least one blurring color value of each sampling point, including:
[0263] The contour area is sampled at least once to obtain at least one sampling color value of each sampling point; along the blurring direction of each sampling point, the weight value of each sampling point in the corresponding blurring direction is determined; according to the weight value of each sampling point and a preset color deviation value, at least one sampling color value of each sampling point is blurred to obtain at least one blurred color value of each sampling point.
[0264] Optionally, the fuzzy direction of each sampling point is obtained, including:
[0265] According to the texture coordinates of the preset reference point of the contour area and the texture coordinates of each sampling point, the blur direction of each sampling point is obtained.
[0266] Optionally, along the blur direction of each sampling point, determining a weight value of each sampling point in the corresponding blur direction includes:
[0267] Along the blurring direction of each sampling point, a preset linear interpolation algorithm is used to calculate the weight value of each sampling point in the corresponding blurring direction.
[0268] Optionally, determining a target fuzzy color value of each sampling point according to at least one fuzzy color value of each sampling point and a preset flow noise map includes:
[0269] A preset flow noise map is used to perform noise processing on at least one fuzzy color value of each sampling point to obtain at least one noisy fuzzy color value of each sampling point; and a target fuzzy color value of each sampling point is obtained according to the at least one noisy fuzzy color value of each sampling point.
[0270] Optionally, obtaining a contour area of the target virtual object in a preset screen space includes:
[0271] Obtain the local coordinates of each sampling point of the target virtual object in the preset model coordinate system; convert the local coordinates of each sampling point from the preset model coordinate system to the preset world coordinate system to obtain the world coordinates of each sampling point; convert the world coordinates of each sampling point from the preset world coordinate system to the preset view coordinate system to obtain the view coordinates of each sampling point; convert the world coordinates of each sampling point from the preset view coordinate system to the preset screen space coordinate system to obtain the texture coordinates of each sampling point; obtain the contour area of the target virtual object according to the texture coordinates of each sampling point.
[0272] Optionally, the method further comprises:
[0273] Detect interaction events between the player's virtual object and the target virtual object; if the interaction event meets the second preset rendering trigger condition, offset the positions of the vertices on the three-dimensional contour line corresponding to the two-dimensional contour line of the contour area; generate new two-dimensional contour lines according to the offset vertices; generate a flow stroke effect map of the target virtual object according to the new two-dimensional contour line and the preset flow map; switch the display of the target virtual object from the flow blur effect map to the flow stroke effect map.
[0274] Optionally, generating a flow stroke effect map of the target virtual object according to the new two-dimensional contour line and the preset flow map includes:
[0275] The flow parameters of each sampling point are sampled from the preset flow map; and a flow stroke effect map is generated according to the flow parameters of each sampling point and the new two-dimensional contour line.
[0276] Optionally, performing position shifting on each vertex on the three-dimensional contour line corresponding to the two-dimensional contour line of the contour area includes:
[0277] The target normal direction of each vertex and the offset parameter of each vertex in the target normal direction are obtained; along the target normal direction of each vertex, the position of each vertex on the contour area is offset according to the offset parameter of the target normal direction.
[0278] Optionally, obtain the target normal direction of each vertex, including:
[0279] The original normal direction of each vertex is corrected by using a preset correction factor to obtain the calculated normal direction of each vertex; the target normal direction of each vertex is determined from the original normal direction and the calculated normal direction of each vertex.
[0280] Optionally, obtain the position offset parameters of each vertex in the target normal direction, including:
[0281] Obtain position disturbance information of each vertex; obtain the normal offset of each vertex in the target normal direction; determine the position offset parameter of each vertex in the target normal direction according to the position disturbance information, the normal offset and the target normal direction.
[0282] Optionally, the method further comprises:
[0283] If the duration of the interaction event reaches the preset rendering recovery condition, the target virtual object will be restored from the flowing stroke effect image to the initial material effect image.
[0284] In the several embodiments provided by the present invention, 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.
[0285] 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.
[0286] In addition, each functional unit in each embodiment of the present invention 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.
[0287] 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 invention. 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.
[0288] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for rendering a model of a target virtual object, characterized in that: Applied to a graphical user interface, the graphical user interface includes: a player virtual object and at least one virtual object, the method includes: Detecting a positional relationship between the player virtual object and a target virtual object; If the positional relationship satisfies a first preset rendering trigger condition, obtaining a contour area of the target virtual object in a preset screen space; According to a preset flow noise map, a color blur process is performed on the contour area to obtain a target blurred color value of each sampling point in the contour area; The target fuzzy color value of each sampling point is sequentially superimposed on the corresponding sampling point in the contour area to generate a flow blur effect image of the target virtual object; The target virtual object is switched from the initial material rendering to the flow blur rendering.
2. The method according to claim 1, characterized in that The color blurring process is performed on the contour area according to the preset flow noise map to obtain the target blurring color value of each sampling point in the contour area, including: Obtaining the fuzzy direction of each sampling point; Performing at least one color blurring process on the contour area along the blurring direction of each sampling point to obtain at least one blurring color value of each sampling point; According to at least one fuzzy color value of each sampling point and the preset flow noise map, a target fuzzy color value of each sampling point is determined.
3. The method according to claim 2, characterized in that The step of performing at least one color blurring process on the contour area along the blurring direction of each sampling point to obtain at least one blurring color value of each sampling point includes: Sampling the contour area at least once to obtain at least one sampling color value of each sampling point; Determine the weight value of each sampling point in the corresponding fuzzy direction along the fuzzy direction of each sampling point; According to the weight value of each sampling point and the preset color deviation value, fuzzy processing is performed on at least one sampled color value of each sampling point to obtain at least one fuzzy color value of each sampling point.
4. The method according to claim 2, characterized in that: The obtaining of the fuzzy direction of each sampling point includes: The blur direction of each sampling point is obtained according to the texture coordinates of the preset reference point of the contour area and the texture coordinates of each sampling point.
5. The method according to claim 3, characterized in that: The step of determining the weight value of each sampling point in the corresponding blur direction along the blur direction of each sampling point includes: Along the blurring direction of each sampling point, a preset linear interpolation algorithm is used to calculate the weight value of each sampling point in the corresponding blurring direction.
6. The method according to claim 2, characterized in that The step of determining a target fuzzy color value of each sampling point according to at least one fuzzy color value of each sampling point and the preset flow noise map comprises: Using the preset flow noise map, performing noise processing on at least one fuzzy color value of each sampling point to obtain at least one noisy fuzzy color value of each sampling point; According to at least one noisy fuzzy color value of each sampling point, a target fuzzy color value of each sampling point is obtained.
7. The method according to claim 1, characterized in that The obtaining of the contour area of the target virtual object in the preset screen space includes: Obtaining the local coordinates of each sampling point of the target virtual object in a preset model coordinate system; Convert the local coordinates of each sampling point from the preset model coordinate system to a preset world coordinate system to obtain the world coordinates of each sampling point; Converting the world coordinates of each sampling point from the preset world coordinate system to a preset view coordinate system to obtain the view coordinates of each sampling point; Converting the world coordinates of each sampling point from the preset view coordinate system to the preset screen space coordinate system to obtain the texture coordinates of each sampling point; According to the texture coordinates of each sampling point, a contour area of the target virtual object is obtained.
8. The method according to claim 1, characterized in that: The method further comprises: Detecting an interaction event between the player virtual object and the target virtual object; If the interaction event satisfies a second preset rendering trigger condition, position shifting is performed on each vertex on the three-dimensional contour line corresponding to the two-dimensional contour line of the contour area; Generate new two-dimensional contour lines according to the offset vertices; Generate a flow stroke effect map of the target virtual object according to the new two-dimensional contour line and the preset flow map; The target virtual object is switched from the flow blur effect image to the flow stroke effect image.
9. The method according to claim 8, characterized in that The step of generating a flow stroke effect diagram of the target virtual object according to the new two-dimensional contour line and the preset flow map comprises: Sampling the flow parameters of each sampling point from the preset flow map; The flow stroke effect diagram is generated according to the flow parameters of each sampling point and the new two-dimensional contour line.
10. The method according to claim 8, characterized in that The position shifting of each vertex on the three-dimensional contour line corresponding to the two-dimensional contour line of the contour area includes: Obtaining the target normal direction of each vertex and the offset parameter of each vertex in the target normal direction; The positions of the vertices on the contour area are offset along the target normal direction of the vertices according to the offset parameters of the target normal direction.
11. The method according to claim 10, characterized in that The obtaining of the target normal direction of each vertex includes: Using a preset correction factor, the original normal direction of each vertex is corrected to obtain the calculated normal direction of each vertex; The target normal direction of each vertex is determined from the original normal direction and the calculated normal direction of each vertex.
12. The method according to claim 10, characterized in that The obtaining of the position offset parameters of each vertex in the target normal direction includes: Obtaining position disturbance information of each vertex; Obtaining the normal offset of each vertex in the target normal direction; The position offset parameters of each vertex in the target normal direction are determined according to the position disturbance information, the normal offset and the target normal direction.
13. The method according to claim 8, characterized in that The method further comprises: If the duration of the interactive event reaches a preset rendering recovery condition, the target virtual object is restored from the flowing stroke effect image to be displayed as the initial material effect image.
14. A model rendering device for a target virtual object, characterized in that: Applied to a graphical user interface, the graphical user interface comprising: a player virtual object and at least one virtual object, including: A detection module, used to detect the positional relationship between the player virtual object and the target virtual object; An acquisition module, configured to acquire a contour area of the target virtual object in a preset screen space if the positional relationship satisfies a first preset rendering trigger condition; A processing module, used for performing color fuzzy processing on the contour area according to a preset flow noise map, to obtain a target fuzzy color value of each sampling point in the contour area; A generating module, used for sequentially superimposing the target fuzzy color value of each sampling point to the corresponding sampling point in the contour area to generate a flow blur effect image of the target virtual object; The display module is used to switch the target virtual object from the initial material rendering to the flow blur rendering.
15. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the model rendering method for the target virtual object as described in any one of claims 1 to 13.
16. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for rendering a model of a target virtual object as claimed in any one of claims 1 to 13 are executed.
Citation Information
Cited By
Display method, electronic equipment and storage medium
CN120455586A