CN113350785A - Virtual character rendering method and device and electronic equipment - Google Patents

Virtual character rendering method and device and electronic equipment Download PDF

Info

Publication number
CN113350785A
CN113350785A CN202110503378.3A CN202110503378A CN113350785A CN 113350785 A CN113350785 A CN 113350785A CN 202110503378 A CN202110503378 A CN 202110503378A CN 113350785 A CN113350785 A CN 113350785A
Authority
CN
China
Prior art keywords
virtual
target
virtual character
rendering
character
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110503378.3A
Other languages
Chinese (zh)
Inventor
刘舟
袁尧
沈琳焘
施坤省
黎煌达
张志稳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Sanqi Jichuang Network Technology Co ltd
Original Assignee
Guangzhou Sanqi Jichuang Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Sanqi Jichuang Network Technology Co ltd filed Critical Guangzhou Sanqi Jichuang Network Technology Co ltd
Priority to CN202110503378.3A priority Critical patent/CN113350785A/en
Publication of CN113350785A publication Critical patent/CN113350785A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • A63F13/63Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor by the player, e.g. authoring using a level editor
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/822Strategy games; Role-playing games
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/02Non-photorealistic rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • G06T15/506Illumination models
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/66Methods for processing data by generating or executing the game program for rendering three dimensional images
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/807Role playing or strategy games

Abstract

The application discloses a virtual character rendering method, a virtual character rendering device and electronic equipment, wherein the method comprises the following steps: responding to selection operation of a player for a target human body model in each human body model, and acquiring target light effects corresponding to the target human body model, wherein different target light effects are added to each human body model respectively, and the target light effects comprise one or two of direct illumination, indirect illumination and sub-surface scattering; and rendering each virtual character in the current virtual scene according to the target light effect.

Description

Virtual character rendering method and device and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for rendering a virtual character, and an electronic device.
Background
When the virtual character is rendered, in order to improve the display effect of the virtual character, the virtual character is rendered by illumination according to the light source in the virtual scene. In order to make the virtual character more three-dimensional, three illumination effects of direct illumination, indirect illumination and sub-surface scattering are added to the human body model of the virtual character for rendering, so that the virtual character displayed finally is more three-dimensional and real, and the skin texture details on the human body model can be displayed. However, rendering a virtual character by superimposing three illumination effects requires three different illumination calculations for the virtual character, and in a large-scale network Game, such as a Multiplayer Online Role Playing Game (mmoptg), hundreds of virtual characters may need to be simultaneously displayed on a terminal screen, at this time, if three different illumination calculations are performed for each virtual character, a GPU of a display card may need to perform thousands of calculations, the calculation amount is large, and the calculation amount may exceed an upper limit of the calculation capability of the GPU of the display card, so that the drawing speed of the display card is reduced, a phenomenon that a picture displayed on the screen of the Game is delayed, and a phenomenon that the Game is flashed off and the display card is damaged, which affects player experience.
Disclosure of Invention
The present application is directed to solve at least one of the technical problems in the prior art, and provides a virtual character rendering method, apparatus, and electronic device, which reduce the amount of computation of a display card when displaying a plurality of virtual characters, improve the display speed of a terminal screen for the virtual characters, and ensure the game experience of a player.
In a first aspect, an embodiment of the present application provides a virtual character rendering method, including:
responding to selection operation of a player on a target human body model in each human body model, and acquiring target light effects corresponding to the target human body model, wherein different target light effects are added to each human body model respectively, and the target light effects comprise one or two of direct illumination, indirect illumination and sub-surface scattering;
and rendering each virtual character in the current virtual scene according to the target light effect.
In a second aspect, in an embodiment of the present application, there is also provided a virtual character rendering apparatus, including:
the lighting effect selection module is used for responding to selection operation of a player on a target human body model in each human body model and acquiring target lighting effects corresponding to the target human body model, wherein different target lighting effects are added to each human body model respectively, and the target lighting effects comprise one or two of direct illumination, indirect illumination and sub-surface scattering;
and the role rendering module is used for rendering each virtual role in the current virtual scene according to the target light effect.
In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the virtual character rendering method as described in the above embodiments when executing the program.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the virtual character rendering method according to the above embodiments.
Less light effects are added to each virtual character in the current virtual scene, so that the calculation amount of a display card when a plurality of virtual characters are displayed is reduced, the display speed of a terminal screen to the virtual characters is increased, the light effects needing to be added can be determined by a player, the calculation amount is reduced, the final display effect can meet the requirements of the player as far as possible, and the game experience of the player is guaranteed.
Drawings
The present application is further described with reference to the following figures and examples;
FIG. 1 is a diagram of an application environment of a method for rendering virtual characters in one embodiment;
FIG. 2 is a flowchart illustrating a method for rendering a virtual character according to an embodiment;
FIG. 3 is a schematic flow chart illustrating rendering of virtual characters according to target light effects according to an embodiment;
FIG. 4 is a flowchart illustrating a method for rendering a virtual character according to yet another embodiment;
FIG. 5 is a schematic diagram showing the structure of a virtual character rendering apparatus according to an embodiment;
FIG. 6 is a schematic diagram showing the construction of a virtual character rendering apparatus according to another embodiment;
FIG. 7 is a block diagram of a computer device in one embodiment.
Detailed Description
Reference will now be made in detail to the present embodiments of the present application, preferred embodiments of which are illustrated in the accompanying drawings, which are for the purpose of visually supplementing the description with figures and detailed description, so as to enable a person skilled in the art to visually and visually understand each and every feature and technical solution of the present application, but not to limit the scope of the present application.
In order to make the solution of the present application easier to understand, the following explains some concepts involved in the present application:
the virtual scene is a virtual scene displayed when an application runs on the terminal. The virtual scene may be a simulation environment of a real world, a semi-simulation semi-fictional virtual environment, or a pure fictional virtual environment. The virtual scene may be any one of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, or a three-dimensional virtual scene.
The virtual character is a virtual portrait with high reality drawn by a modeling rendering technology. The virtual character is not limited to a human character, and may be a character such as an animal. Wherein the virtual character comprises a player character.
The player role refers to a role controlled by a player in a role-playing game.
A non-player character refers to a game character that is not manipulated by a real player in a game, and is generally controlled by artificial intelligence of a computer, and is a character having its own behavior pattern.
When the game-related application program is run, the display card of the terminal device renders and displays the virtual scene and the virtual character of the application program on the screen of the terminal device. When the virtual character is rendered, in order to improve the display effect of the virtual character, the virtual character is subjected to illumination rendering according to the position, the illumination direction, the illumination color and the like of a light source in a virtual scene. Generally, there are three light effects formed by illumination rendering, namely direct illumination, indirect illumination and sub-surface scattering formed by direct illumination or indirect illumination. In order to make the virtual character more three-dimensional, three illumination effects of direct illumination, indirect illumination and sub-surface scattering are added to the human body model of the virtual character for rendering, so that the virtual character displayed finally is more three-dimensional and real, and the skin texture details on the human body model can be displayed. However, rendering a virtual character by superimposing three illumination effects requires three different illumination calculations for the virtual character, and in a large-scale network Game, such as a Multiplayer Online Role Playing Game (mmoptg), hundreds of virtual characters may need to be simultaneously displayed on a terminal screen, at this time, if three different illumination calculations are performed for each virtual character, a GPU of a display card may need to perform thousands of calculations, the calculation amount is large, and the calculation amount may exceed an upper limit of the calculation capability of the GPU of the display card, so that the drawing speed of the display card is reduced, a phenomenon that a picture displayed on the screen of the Game is delayed, and a phenomenon that the Game is flashed off and the display card is damaged, which affects player experience.
In order to solve the above technical problems, embodiments of the present application will be described in detail below with reference to the accompanying drawings. The virtual role rendering method provided by the embodiment of the application is applied to an environment comprising terminal equipment, a plurality of database instances and a plurality of storage instances. The above example may be a virtual machine, a container, or a server, and in the embodiment of the present application, a server is taken as an example for description. FIG. 1 is a diagram of an application environment of a method for rendering virtual characters in one embodiment. In the application environment, the terminal device 110 is connected to the server 120 through a network, the terminal 110 may specifically be a desktop terminal 110 or a mobile terminal 110, and the mobile terminal may be one of a mobile phone, a tablet computer, a notebook computer, a wearable device, and the like. The server 120 may be implemented by an independent server 120 or a server cluster composed of a plurality of servers 120, and may also be a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a web service, cloud communication, middleware service, a domain name service, a security service, a CDN, and a big data and artificial intelligence platform. In this embodiment, the terminal device 110 may be used as a front end of a game client running a game, and the server 120 may be used as a background of the game client, so that after the server 120 obtains a data call request sent by a game player in the terminal device 110 through the game client, a long connection may be quickly established with the terminal device 110.
The terminal device 110 is loaded with a game, and when the game runs, before entering a virtual scene, a role display interface is entered; or after entering the virtual scene, the terminal device 110 responds to the interface switching operation of the player, and if a click operation initiated by the player in the designated area is received through a display screen of the terminal device 110, the character display interface is entered. In the role display interface, a plurality of human body models with different target light effects are displayed, wherein the target light effects comprise one or two of direct illumination, indirect illumination and sub-surface scattering. After entering the character display interface, the terminal device 110 receives a selection operation of a player for any one of the human body models, marks the selected human body model as a target human body model, obtains a target light effect corresponding to the target human body model, and renders each virtual character obtained from the memory of the terminal device 110 and the server 120 in the current virtual scene according to the target light effect corresponding to the target human body model. Wherein each virtual character comprises a player character and a non-player character. The determination of the current virtual scene is to obtain the character information and the operation information of the player character from the server 120 according to the operation of the player or through the communication link, for example, to move the player character to a target direction or a target point, so that the terminal device 110 may determine the current virtual scene according to the character information and the operation information of the player character and display the current virtual scene on the display interface; alternatively, the terminal device 110 may also directly obtain the current virtual scene from the memory of the terminal device 110 or from the server 120 and display the current virtual scene on the display interface according to a request or an instruction of the player, such as a selection operation for a game map. The memory or the server executes the operation according to the instruction or the request, which belongs to the prior art, so that the content or the form of the instruction or the request is not particularly limited.
Less light effects are added to each virtual character in the current virtual scene, so that the calculation amount of a display card when a plurality of virtual characters are displayed is reduced, the display speed of a terminal screen to the virtual characters is increased, the light effects needing to be added can be determined by a player, the calculation amount is reduced, the final display effect can meet the requirements of the player as far as possible, and the game experience of the player is guaranteed.
Hereinafter, the virtual character rendering method provided by the embodiments of the present application will be described and explained in detail through several specific embodiments. As an alternative embodiment, the method may be performed by the terminal device, or by both the server and the terminal device.
As shown in FIG. 2, in one embodiment, a method of virtual character rendering is provided. The embodiment is mainly illustrated by applying the method to computer equipment. The computer device may specifically be the terminal device 110 in fig. 1 described above.
Referring to fig. 2, the virtual character rendering method specifically includes the following steps:
s11, responding to selection operation of a player for a target human body model in each human body model, and obtaining target light effects corresponding to the target human body model, wherein different target light effects are added to each human body model respectively, and the target light effects comprise one or two of direct illumination, indirect illumination and sub-surface scattering.
In an embodiment, after a display screen of the terminal device enters a role display interface, a plurality of human body models are displayed in the role display interface, and different target light effects are added to each human body model. Since the sub-surface scattering needs to be formed by illumination, and the target light effect of the single sub-surface scattering cannot be formed, the role display interface comprises a human body model added with direct illumination, a human body model added with indirect illumination, a human body model added with direct illumination and sub-surface scattering, and a human body model added with indirect illumination and sub-surface scattering. Each human body model is displayed in different areas of the character display interface, and the size of each area is the same, so that a player can conveniently observe the human body models. In order to enable the player to conveniently observe the human body model added with the target light effect, the background of the character display interface adopts a dark background color, such as black. After a plurality of human body models are displayed, the selection operation of a player for any one of the human body models is received, wherein the selection operation comprises clicking operation on the area where the human body model is located, or inputting the number of the area where a certain human body model is located in an information input column in a role display interface, so that the selection operation on the human body models is realized, and the like. And when the selection operation is received, taking the human body model selected by the selection operation as a target human body model, and extracting the target light effect added by the target human body model from a memory of the terminal equipment or a server. And if the light effect added by the target human body model is direct illumination, extracting data representing the direct illumination.
In order to eliminate other interferences, a user determines a target human body model to be selected according to a target light effect, in one embodiment, each human body model is generated by adding different target light effects to an initial model of the same virtual character. Wherein the initial model is a basic model without any added light effect. As the player pays more attention to the character controlled by the player in the game process, each human body model can be generated by adding different target light effects to the initial model of the player character. Different target light effects are added to the initial model of the same virtual character to generate each human body model, so that the target light effects are the only variables, and the player can conveniently display and compare the target light effects.
And S12, rendering each virtual character in the current virtual scene according to the target light effect.
In an embodiment, after the target light effect is determined, virtual characters in the current virtual scene displayed by the display screen are rendered through the target light effect. Each virtual role may be all virtual roles in the current virtual scene, or all virtual roles within a certain specific range in the current virtual scene. When all the virtual characters in a certain range are selected, the certain range can be selected by a player according to actual needs, or preset by an application program.
In one embodiment, when the target light effect is direct illumination, the front highlight and the back shadow can be formed by adding parallel light towards the front of each virtual character in the current virtual scene in real time, and adding parallel light towards each virtual character in real time. Wherein adding parallel light to each virtual character toward the front of each virtual character, and adding parallel light to each virtual character, can be performed synchronously or asynchronously. When the target light effect is indirect illumination, acquiring indirect illumination brightness corresponding to each vertex on an environment map appointed in the current virtual scene in real time according to the normal direction of each vertex on the surface of the virtual character in the current virtual scene, multiplying the indirect illumination brightness of each vertex with the color value of each vertex to obtain the indirect illumination brightness on each virtual character, and adding indirect illumination to each virtual character by using the indirect illumination brightness on each virtual character. When the target light effect is the combination of direct illumination and sub-surface scattering, the added back parallel light penetrates through the sub-surface scattering of the partial models of the virtual characters according to the added back parallel light of the direct illumination in real time. Similarly, when the target light effect is the combination of indirect illumination and sub-surface scattering, the sub-surface scattering of the partial model of each virtual character is penetrated by the added indirect illumination according to the indirect illumination in real time.
Less light effects are added to each virtual character in the current virtual scene, so that the calculation amount of a display card when a plurality of virtual characters are displayed is reduced, the display speed of a terminal screen to the virtual characters is increased, the light effects needing to be added can be determined by a player, the calculation amount is reduced, the final display effect can meet the requirements of the player as far as possible, and the game experience of the player is guaranteed.
To further alleviate the operating and computational stress, the above embodiment, as shown in fig. 3, for S12, includes:
and S21, matching the target light effect with the skin map set of each virtual character in the material library, and acquiring each target map matched with the target light effect from the skin map set, wherein each target map corresponds to each virtual character one to one.
In an embodiment, the set of skin maps of the virtual character is stored in a material library, wherein the material library may be stored in a server or cached in the terminal device. Different skin maps in the skin map set of the virtual character in the material library are template images for realizing the realistic effect of the skin of the virtual character. Different skin maps in the skin map set of the virtual character in the material library can be obtained by rendering, calculating and modeling through different target light effects in advance, or obtained by hand drawing in advance, or obtained by making an application program for drawing a graph in advance, and then stored, so that the different skin maps can be directly called as required when a game runs. In addition, different skin maps of virtual characters in the material library are associated with target light effects adopted when the skin maps are obtained and skin rendering is carried out, and if direct illumination is adopted for carrying out skin rendering to obtain the skin map 1, the direct illumination is associated with or bound to the skin map 1. I.e. the skin map 1 can be determined from direct illumination. The binding or association of the target light effect with the skin map is not particularly limited.
And S22, rendering each virtual character according to each target map.
In an embodiment, the terminal device renders the skin area of the virtual character in the current virtual scene according to the obtained target maps of the virtual characters. The method comprises the steps that a skin area of a virtual character is rendered according to a target map, the same content as the target map can be generated on the skin area according to the content of the target map, and then the target character is generated; and mapping processing can be carried out in the skin area through the target mapping to obtain the target character.
By matching the target light effect with the skin map set in the material library and rendering each virtual character in the current virtual scene according to the target map matched with the target light effect, a large amount of module surface number calculation and complex program algorithms do not need to be carried out in real time, and therefore when each virtual character is displayed on the terminal, the operation and calculation pressure of the terminal can be relieved, and the efficiency of displaying each virtual character is improved.
In order to highlight details of the virtual character and improve the display effect, in an embodiment, after rendering each virtual character in the current virtual scene, depth of field processing is performed on each virtual character.
In one embodiment, after rendering of the virtual character is completed, an image of the virtual character may be obtained. By carrying out depth of field processing on the image of the virtual character, the details of the human body model can be highlighted, and the depth of field effect formed by the imaging principle of a real camera can be simulated.
In an embodiment, each virtual character rendered according to the target light effect includes a first virtual character which is a player character operated by the target terminal and a plurality of target virtual characters selected from among the second virtual characters which include a non-player character and a player character operated by the non-target terminal. The first virtual role is a target terminal, i.e., a player role operated by the terminal device 110, i.e., a virtual role played and controlled by a player in a massively multi-player online role-playing game. The player can input operation into the terminal device through an input device such as a keyboard, a game handle and the like, and the terminal device generates corresponding operation according to the operation input by the user so as to control the first virtual character. The player character operated by the non-target terminal among the second virtual characters refers to a virtual character operated by a terminal other than the terminal device 110.
In order to control the number of virtual roles to be rendered, and thus prevent the display card from being damaged due to uncontrollable operation amount, in an embodiment, a plurality of target virtual roles are determined after being sequentially selected from the second virtual roles according to the distance between the first virtual role and each second virtual role in the current virtual scene, and the number of the target virtual roles meets a preset condition. As an example of this embodiment, according to the distances between each second virtual character and the first virtual character, multiple target characters may be selected from the second virtual characters in an order from small to large, where, if there are 3 second virtual characters in the current game scene, and the distance between the first virtual character and the 3 second virtual characters is 2m, 3m, and 1m, the second virtual character with the distance between the first virtual character and the first virtual character being 1m is selected first, the second virtual character with the distance between the first virtual character and the first virtual character being 2m is selected, and finally the second virtual character with the distance between the first virtual character and the first virtual character being 3m is selected until the number of the selected second virtual characters meets a preset condition, the selection is stopped, and each selected second virtual character is marked as a target virtual character. The preset condition is used for setting the number of the second virtual roles to be selected. And if the number of the second virtual roles in the current virtual scene is more than or equal to the number in the preset conditions, sequentially selecting the number of the second virtual roles limited by the preset conditions from small to large according to the distance between each second virtual role and the first virtual role. If 13 second virtual characters exist in the current virtual scene and the number of the second virtual characters to be selected is 10, the terminal device sequentially selects 10 second virtual characters from the current virtual scene according to the sequence of the position information from small to large. When the position distances between the plurality of second virtual characters and the first virtual character are the same, and if the number of the plurality of second virtual characters with the same position distance is larger than the number limited by the preset condition, the terminal device may randomly select one or more second virtual characters from the plurality of second virtual characters with the same position distance until the preset condition is met, for example, 13 second virtual characters exist in the current virtual scene, the number of the second virtual characters to be selected limited by the preset condition is 10, and after the 9 second virtual characters are sequentially selected from small to large according to the position information, the distances between the remaining 4 second virtual characters and the first virtual character are 10m, at this time, the terminal device may randomly select one of the 4 second virtual characters to meet the number requirement of 10 limited by the preset condition; the terminal device may also stop selecting 9 second virtual characters. And if the number of the second virtual roles existing in the current virtual scene is smaller than the number in the preset condition, the terminal equipment sequentially selects all the second virtual roles from small to large according to the position distance between each second virtual role and the first virtual role, and then stops selecting.
Because the plurality of target virtual characters meeting the preset condition number are selected to perform subsequent rendering processing through the distance between the first virtual character and each second virtual character in the current game scene, the number of the virtual characters needing the subsequent rendering processing can be controlled in the game scene with a large number of virtual characters, the calculation amount required by the GPU of the display card can be controlled, the calculation capacity of the GPU of the display card is prevented from exceeding the upper limit, the damage of the display card is further avoided, and the calculation amount of the GPU of the display card is reduced.
When each virtual character rendered according to the target light effect includes a first virtual character and a plurality of target virtual characters selected from second virtual characters, in an embodiment, as shown in fig. 4, a flowchart of a virtual character rendering method in another embodiment is shown. In this embodiment, in addition to the steps shown in fig. 2, the method further includes:
s13, when each virtual character rendered according to the target light effect includes the first virtual character and a plurality of target virtual characters selected from the second virtual characters, stopping the rendering and displaying process for the non-target virtual characters except the target virtual character in the second virtual characters.
In an embodiment, after the selection of the target virtual character is completed, the remaining second virtual characters are far away from the first virtual character, and the attention of the player to the second virtual character is not high, so that the terminal device stops the rendering and displaying process of the non-target virtual character in each second virtual character after the selection of the target virtual character is completed.
After the target virtual character is selected, the drawing and display process of the remaining second virtual character is stopped, so that the GPU operation amount of the display card is reduced, and meanwhile, when the display card performs target light effect rendering on the virtual character in the current game scene, the peak value of the GPU operation amount is determinable, and the damage of the GPU of the display card due to uncontrollable operation amount is avoided.
It is to be understood that, in performing S14, the depth of view processing of the avatar in the above-described embodiment may be performed synchronously, or S14 and the depth of view processing of the avatar may be performed asynchronously.
In one embodiment, as shown in fig. 5, there is provided a virtual character rendering apparatus including:
the lighting effect selecting module 101 is configured to respond to a selection operation of a player for a target human body model in each human body model, and acquire a target lighting effect corresponding to the target human body model, where different target lighting effects are added to each human body model respectively, and the target lighting effect includes one or two of direct lighting, indirect lighting, and sub-surface scattering.
And the character rendering module 102 is configured to render each virtual character in the current virtual scene according to the target light effect.
In one embodiment, each human body model is generated by adding different target light effects to the initial model of the same virtual character.
In an embodiment, the character rendering module 102 is specifically configured to: matching the target light effect with the skin map sets of all virtual characters in the material library, and acquiring all target maps matched with the target light effect from the skin map sets, wherein all target maps correspond to all virtual characters one to one; and rendering each virtual character according to each target map.
In an embodiment, the character rendering module 102 is further configured to perform depth processing on each virtual character.
In one embodiment, each virtual character includes a first virtual character that is a player character operated by the target terminal and a plurality of target virtual characters selected from among second virtual characters that include a non-player character and a player character operated by the non-target terminal.
In an embodiment, the plurality of target virtual characters are determined after being sequentially selected from the second virtual characters according to the distance between the first virtual character and each second virtual character in the current virtual scene, and the number of the plurality of target virtual characters meets a preset condition.
In an embodiment, when each virtual character rendered according to the target light effect includes a first virtual character and a plurality of target virtual characters selected from among the second virtual characters, as shown in fig. 6, a schematic structural diagram of a virtual character rendering apparatus in a further embodiment is shown. In this embodiment, in addition to the structure shown in fig. 5, the present invention further includes:
and the rendering control module 103 is configured to stop the rendering and displaying processes of the non-target virtual characters except the target virtual character in each second virtual character.
In one embodiment, a computer apparatus is provided, as shown in fig. 7, which includes a processor, a memory, a network interface, an input device, and a display screen connected by a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to implement a virtual character rendering method. The internal memory may also have stored therein a computer program that, when executed by the processor, causes the processor to perform a virtual character rendering method. Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the virtual character rendering apparatus provided herein may be implemented in the form of a computer program that is executable on a computer device such as that shown in fig. 7. The memory of the computer device may store therein various program modules constituting the virtual character rendering apparatus. The computer program constituted by the respective program modules causes the processor to execute the steps in the virtual character rendering method of the respective embodiments of the present application described in the present specification.
In one embodiment, a computer-readable storage medium is provided, which stores computer-executable instructions for causing a computer to perform the steps of the above-described virtual character rendering method. The steps of the virtual character rendering method herein may be steps in the virtual character rendering method of the various embodiments described above.
The foregoing is a preferred embodiment of the present application, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations are also regarded as the protection scope of the present application.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.

Claims (10)

1. A method for rendering a virtual character, comprising:
responding to selection operation of a player on a target human body model in each human body model, and acquiring target light effects corresponding to the target human body model, wherein different target light effects are added to each human body model respectively, and the target light effects comprise one or two of direct illumination, indirect illumination and sub-surface scattering;
and rendering each virtual character in the current virtual scene according to the target light effect.
2. The virtual character rendering method of claim 1, wherein each of the human body models is generated by adding different target light effects to an initial model of the same virtual character.
3. The virtual character rendering method according to claim 1, wherein rendering each virtual character in a current virtual scene according to the target light effect comprises:
matching the target light effect with the skin map sets of all the virtual characters in a material library, and acquiring all the target maps matched with the target light effect from the skin map sets of all the virtual characters, wherein all the target maps correspond to all the virtual characters one to one;
and rendering each virtual character according to each target map.
4. The virtual character rendering method according to claim 1, further comprising, after rendering each virtual character in a current virtual scene according to the target light effect:
and performing depth of field processing on each virtual character.
5. The virtual character rendering method according to claim 1, wherein each virtual character includes a first virtual character that is a player character operated by the target terminal and a plurality of target virtual characters selected from among second virtual characters that include a non-player character and a player character operated by the non-target terminal.
6. The method for rendering the virtual character according to claim 5, wherein the plurality of target virtual characters are determined after being sequentially selected from the second virtual characters according to the distance between the first virtual character and each second virtual character in the current virtual scene, and the number of the plurality of target virtual characters satisfies a preset condition.
7. The virtual character rendering method according to claim 5, further comprising, after rendering each virtual character in a current virtual scene according to the target light effect:
and stopping the rendering and displaying process of the non-target virtual characters except the target virtual character in each second virtual character.
8. An apparatus for rendering a virtual character, comprising:
the lighting effect selection module is used for responding to selection operation of a player on a target human body model in each human body model and acquiring target lighting effects corresponding to the target human body model, wherein different target lighting effects are added to each human body model respectively, and the target lighting effects comprise one or two of direct illumination, indirect illumination and sub-surface scattering;
and the role rendering module is used for rendering each virtual role in the current virtual scene according to the target light effect.
9. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the virtual character rendering method according to any one of claims 1 to 7 when executing the program.
10. A computer-readable storage medium, in which a computer program is stored which is adapted to be loaded and executed by a processor to cause a computer device having said processor to carry out the method of any one of claims 1 to 7.
CN202110503378.3A 2021-05-08 2021-05-08 Virtual character rendering method and device and electronic equipment Pending CN113350785A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110503378.3A CN113350785A (en) 2021-05-08 2021-05-08 Virtual character rendering method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110503378.3A CN113350785A (en) 2021-05-08 2021-05-08 Virtual character rendering method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113350785A true CN113350785A (en) 2021-09-07

Family

ID=77526011

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110503378.3A Pending CN113350785A (en) 2021-05-08 2021-05-08 Virtual character rendering method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113350785A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106512402A (en) * 2016-11-29 2017-03-22 北京像素软件科技股份有限公司 Game role rendering method and device
CN110276840A (en) * 2019-06-21 2019-09-24 腾讯科技(深圳)有限公司 Control method, device, equipment and the storage medium of more virtual roles
CN110404262A (en) * 2019-09-03 2019-11-05 网易(杭州)网络有限公司 Display control method, device, electronic equipment and storage medium in game
CN111145330A (en) * 2019-12-31 2020-05-12 广州华多网络科技有限公司 Human body model rendering method and device, electronic equipment and storage medium
CN111741060A (en) * 2020-05-08 2020-10-02 广州三七互娱科技有限公司 Message pushing method and device, computer equipment and storage medium
CN112669418A (en) * 2020-12-22 2021-04-16 北京像素软件科技股份有限公司 Model rendering method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106512402A (en) * 2016-11-29 2017-03-22 北京像素软件科技股份有限公司 Game role rendering method and device
CN110276840A (en) * 2019-06-21 2019-09-24 腾讯科技(深圳)有限公司 Control method, device, equipment and the storage medium of more virtual roles
CN110404262A (en) * 2019-09-03 2019-11-05 网易(杭州)网络有限公司 Display control method, device, electronic equipment and storage medium in game
CN111145330A (en) * 2019-12-31 2020-05-12 广州华多网络科技有限公司 Human body model rendering method and device, electronic equipment and storage medium
CN111741060A (en) * 2020-05-08 2020-10-02 广州三七互娱科技有限公司 Message pushing method and device, computer equipment and storage medium
CN112669418A (en) * 2020-12-22 2021-04-16 北京像素软件科技股份有限公司 Model rendering method and device

Similar Documents

Publication Publication Date Title
JP7387758B2 (en) Interface display method, device, terminal, storage medium and computer program
JP7436707B2 (en) Information processing method, device, device, medium and computer program in virtual scene
US20240037839A1 (en) Image rendering
CN112669194B (en) Animation processing method, device, equipment and storage medium in virtual scene
CN115082608A (en) Virtual character clothing rendering method and device, electronic equipment and storage medium
CN112184873A (en) Fractal graph creating method and device, electronic equipment and storage medium
CN111142967B (en) Augmented reality display method and device, electronic equipment and storage medium
CN115082607A (en) Virtual character hair rendering method and device, electronic equipment and storage medium
US20220032188A1 (en) Method for selecting virtual objects, apparatus, terminal and storage medium
CN113069761B (en) Method and device for displaying virtual characters in game scene and electronic equipment
WO2023202254A1 (en) Image rendering method and apparatus, electronic device, computer-readable storage medium, and computer program product
US20230078340A1 (en) Virtual object control method and apparatus, electronic device, storage medium, and computer program product
CN113350785A (en) Virtual character rendering method and device and electronic equipment
CN108986228A (en) The method and device shown for virtual reality median surface
CN113350787A (en) Game role rendering method and device and electronic equipment
CN115713589A (en) Image generation method and device for virtual building group, storage medium and electronic device
CN113181641A (en) Rendering method and device of game role in virtual scene and electronic equipment
CN110741327A (en) Clay toy system based on augmented reality and digital image processing and method thereof
CN113313796A (en) Scene generation method and device, computer equipment and storage medium
CN113181644A (en) Rendering method and device of game role and electronic equipment
CN113069762A (en) Eye image generation method and device of virtual character and electronic equipment
CN113144591A (en) Virtual character edge drawing method and device and electronic equipment
CN113350786A (en) Skin rendering method and device for virtual character and electronic equipment
CN113181643A (en) Virtual character drawing method and device and electronic equipment
CN115797524A (en) Virtual splash animation generation method and device, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination