Game avatar display method, device, storage medium and electronic device
By querying and downloading the two-dimensional avatar on the server in the virtual scene, the performance consumption problem caused by virtual character avatar rendering is solved, and a more efficient avatar display is achieved.
Patent Information
- Application Number
- CN202211105442.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-09
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2042-09-09
AI Technical Summary
In the prior art, when displaying virtual character avatars in virtual scenes, three-dimensional models need to be rendered, resulting in increased memory and video memory pressure and high performance consumption.
Send avatar query request to the server through the terminal device. The server queries whether the target two-dimensional avatar exists. If it exists, download and display it. Otherwise, display the avatar provided by the terminal device to avoid repeated rendering.
Reduces the rendering pressure of terminal devices, improves device performance, and saves memory resources.
Smart Images

Figure CN115414672B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of virtual display, and in particular, to a game avatar display method, a game avatar display device, a computer-readable storage medium, and an electronic device. Background Art
[0002] Virtual scenes break through the limitations of real life. Users can control their own virtual characters to carry out activities in virtual scenes. The avatar and other information of the virtual characters will be displayed in real time on the interface.
[0003] The current solution is to set a virtual camera on the character model in the virtual scene to obtain the character image, and then crop it to use as the avatar.
[0004] However, this solution actually renders another 3D model, which increases the pressure on memory and video memory and results in greater performance consumption.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] The purpose of the embodiments of the present disclosure is to provide a game avatar display method, a game avatar display device, a computer-readable storage medium, and an electronic device, so as to reduce the rendering pressure of the avatar display in the game.
[0007] A first aspect of an embodiment of the present disclosure provides a method for displaying a game avatar, wherein a graphical user interface is provided through a terminal device, wherein the content displayed by the graphical user interface at least partially includes a virtual scene of the game, wherein the virtual scene includes at least one virtual character, and the method comprises: in response to a selection operation on a target virtual character, sending an avatar query request to a server, so that the server queries whether there is a target two-dimensional avatar corresponding to the target virtual character; when the server queries that the target two-dimensional avatar exists, downloading the target two-dimensional avatar to the terminal device and displaying the target two-dimensional avatar on the graphical user interface; when the server queries that the target two-dimensional avatar does not exist, displaying the avatar provided by the terminal device on the graphical user interface.
[0008] In an exemplary embodiment of the present disclosure, the terminal device includes a first terminal device whose hardware parameters meet a first preset condition and a second terminal device whose hardware parameters meet a second preset condition; displaying an avatar provided by the terminal device on the graphical user interface includes: when the terminal device is a first terminal device, displaying a two-dimensional avatar rendered in real time by the first terminal device on the graphical user interface; or when the terminal device is a second terminal device, displaying a three-dimensional avatar pre-generated in the second terminal device.
[0009] In an exemplary embodiment of the present disclosure, before displaying the two-dimensional avatar rendered in real time by the first terminal device, the method further includes: the first terminal device performs real-time rendering based on the model resource information of the target virtual character to generate the two-dimensional avatar of a preset image size.
[0010] In an exemplary embodiment of the present disclosure, the method further includes: the first terminal device uploading the two-dimensional avatar to the server, so that the server queries whether there is a target two-dimensional avatar corresponding to the target virtual character.
[0011] In an exemplary embodiment of the present disclosure, before displaying the three-dimensional avatar pre-generated in the second terminal device, the steps include: the second terminal device loads the three-dimensional model of the target virtual character; performing skeleton disabling processing or character stillness processing on the three-dimensional model to obtain a static three-dimensional model; and cutting the static three-dimensional model according to preset cutting nodes to generate the three-dimensional avatar.
[0012] In an exemplary embodiment of the present disclosure, the method further includes: in response to the avatar modification operation acting on the target virtual character, sending an avatar deletion request to the server, so that the server deletes the stored target two-dimensional avatar corresponding to the target virtual character.
[0013] In an exemplary embodiment of the present disclosure, after downloading the target two-dimensional avatar to the terminal device, the method further includes: querying whether there is another target two-dimensional avatar corresponding to the target virtual character in the local cache of the terminal device; obtaining the download timestamp of the target two-dimensional avatar and the cache timestamp of the other target two-dimensional avatar; comparing the download timestamp and the cache timestamp, and selecting the latest target two-dimensional avatar for display.
[0014] According to a second aspect of an embodiment of the present disclosure, there is provided a game avatar display device, which provides a graphical user interface through a terminal device, wherein the content displayed by the graphical user interface at least partially includes a virtual scene of the game, and the virtual scene includes at least one virtual character. The device comprises: a query module, which is used to respond to a selection operation on a target virtual character and send an avatar query request to a server so that the server queries whether there is a target two-dimensional avatar corresponding to the target virtual character; a first display module, which is used to download the target two-dimensional avatar to the terminal device and display the target two-dimensional avatar on the graphical user interface when the server queries that the target two-dimensional avatar exists; and a second display module, which is used to display the avatar provided by the terminal device on the graphical user interface when the server queries that the target two-dimensional avatar does not exist.
[0015] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the game avatar display method as described in the first aspect of the above embodiment is implemented.
[0016] According to a fourth aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the game avatar display method as described in the first aspect of the above embodiment.
[0017] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0018] In the technical solutions provided by some embodiments of the present disclosure, an avatar query request can be sent to a server in response to a selection operation on a target virtual character, so that the server queries whether there is a target two-dimensional avatar corresponding to the target virtual character; when the server queries that the target two-dimensional avatar exists, the target two-dimensional avatar is downloaded to the terminal device and displayed on the graphical user interface; when the server queries that the target two-dimensional avatar does not exist, the avatar provided by the terminal device is displayed on the graphical user interface. The game avatar display method provided by the present disclosure sends an avatar query request to the server, and when the server queries that the target two-dimensional avatar exists, the target two-dimensional avatar is downloaded and displayed. On the one hand, the terminal device does not need to generate a new avatar, which reduces the rendering pressure of the terminal device and improves the device performance; on the other hand, it does not need to pre-store the rendered target two-dimensional avatar of the target virtual character, which can save the device's memory.
[0019] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0021] Figure 1 A schematic diagram schematically shows an exemplary system structure of a method and device for displaying a game avatar to which the embodiments of the present disclosure can be applied;
[0022] Figure 2 A flowchart of a method for displaying a game avatar according to an embodiment of the present disclosure is schematically shown;
[0023] Figure 3 The following schematically shows an interface diagram of a virtual character avatar display according to an embodiment of the present disclosure;
[0024] Figure 4 The following schematically shows a flow chart of a first terminal displaying a two-dimensional avatar according to an embodiment of the present disclosure;
[0025] Figure 5 The following schematically shows a flow chart of a second terminal displaying a two-dimensional avatar according to an embodiment of the present disclosure;
[0026] Figure 6 A schematic diagram of a process of combining a first terminal with a second terminal according to an embodiment of the present disclosure is shown;
[0027] Figure 7 The structure block diagram of a game avatar display device according to one embodiment of the present disclosure is schematically shown;
[0028] Figure 8 The schematic diagram shows the structure of a computer system of a terminal device suitable for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0030] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0031] Figure 1 A schematic diagram of an exemplary terminal device to which a method and an apparatus for displaying a game avatar according to an embodiment of the present disclosure can be applied is shown.
[0032] like Figure 1 As shown, the terminal device may include one or more of terminal devices 101, 102, and 103. Terminal devices 101, 102, and 103 may be various electronic devices with display screens, including but not limited to desktop computers, portable computers, smart phones, and tablet computers.
[0033] Terminal 101 may be a terminal device used by the current user to control his own virtual character, and terminals 102 and 103 may be other terminal devices used to control other virtual characters in the same camp as the above virtual character. The terminal devices are all connected to server 104 .
[0034] The computer-readable storage medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium carries one or more programs. When the above one or more programs are executed by a terminal device, the terminal device implements the method described in the following embodiments. For example, the terminal device may implement the following method. Figure 2The various steps shown, etc.
[0035] In the exemplary embodiments of the present disclosure, the virtual scene can be a digital scene drawn by a computer, mobile phone, tablet computer or other intelligent terminal device through digital communication technology. The digital scene can be on the display screen of the intelligent terminal device or projected onto other display devices. The virtual scene can include buildings or structures such as houses, buildings, gardens, bridges, and pools, and can also include natural landscapes such as mountains, rivers, and lakes, as well as any virtual items and virtual props such as weapons, tools, and creatures. This exemplary embodiment does not specifically limit this.
[0036] This example embodiment provides a method for displaying a game avatar. Figure 2 As shown, a graphical user interface is provided by a terminal device, and the content displayed by the graphical user interface at least partially includes a virtual scene of the game, and the virtual scene includes at least one virtual character. The method includes:
[0037] Step S210: In response to a selection operation on a target virtual character, sending an avatar query request to a server, so that the server queries whether there is a target two-dimensional avatar corresponding to the target virtual character;
[0038] Step S220: when the server finds that the target two-dimensional avatar exists, download the target two-dimensional avatar to the terminal device, and display the target two-dimensional avatar on the graphical user interface;
[0039] Step S230: When the server finds that the target two-dimensional avatar does not exist, the avatar provided by the terminal device is displayed on the graphical user interface.
[0040] Implementation Figure 2 The game avatar display method shown can respond to a selection operation on a target virtual character by sending an avatar query request to a server, so that the server queries whether there is a target two-dimensional avatar corresponding to the target virtual character; when the server queries that the target two-dimensional avatar exists, the target two-dimensional avatar is downloaded to the terminal device and displayed on the graphical user interface; when the server queries that the target two-dimensional avatar does not exist, the avatar provided by the terminal device is displayed on the graphical user interface. The game avatar display method provided by the present disclosure sends an avatar query request to the server, and when the server queries that the target two-dimensional avatar exists, the target two-dimensional avatar is downloaded and displayed. On the one hand, the terminal device does not need to generate a new avatar, which reduces the rendering pressure of the terminal device and improves the device performance; on the other hand, it does not need to pre-store the rendered target two-dimensional avatar of the target virtual character, which can save the device's memory.
[0041] Next, the above steps of this exemplary embodiment are described in more detail.
[0042] In step S210, in response to a selection operation on a target virtual character, an avatar query request is sent to a server, so that the server queries whether there is a target two-dimensional avatar corresponding to the target virtual character.
[0043] In the disclosed embodiment, there may be at least one virtual character in the virtual scene, and the upper left corner of the graphical user interface or other places are used to display the avatar of the virtual character. It is understandable that generally, the relevant information of the virtual character including the avatar, name and other attribute information is displayed in the interface. However, similarly, it may be other virtual objects in the virtual scene, including monsters, non-player characters (NPCs) and other entities. The disclosed embodiment is not limited here.
[0044] The selection operation may be, for example, a click or long press operation on a graphical user interface, or the above operation on an external input device (mouse, keyboard, handle, etc.) connected to the terminal.
[0045] In the disclosed embodiment, the avatar files of the virtual characters can all be stored in the server, and the terminal device sends a query request to the server for query. The query request can include a tag of the target virtual character to query a specific virtual character.
[0046] In step S220, when the server finds that the target two-dimensional avatar exists, the server downloads the target two-dimensional avatar to the terminal device and displays the target two-dimensional avatar on the graphical user interface.
[0047] In the disclosed embodiment, when the server receives a query request, it can query the avatar file of the target virtual character in the database. When the avatar file of the target virtual character is found, it can be directly sent to the terminal device. After the terminal device downloads it, it is displayed at a preset position of the graphical user interface. For example, Figure 3 As shown, the graphical user interface 310 is entirely used to display the screen of the virtual scene. In the upper left corner of the graphical user interface 310, an avatar 311 of the virtual character A and an avatar 312 of the virtual character B are displayed.
[0048] In step S230, when the server finds that the target two-dimensional avatar does not exist, the avatar provided by the terminal device is displayed on the graphical user interface.
[0049] In the disclosed embodiment, if no relevant avatar file is found in the server, the avatar provided by the terminal device is used for display. Considering that the terminal devices of different players are different, the avatars provided for display by the terminal devices with different hardware parameters are different.
[0050] Specifically, the terminal device includes a first terminal device whose hardware parameters meet a first preset condition and a second terminal device whose hardware parameters meet a second preset condition. When the terminal device is the first terminal device, a two-dimensional avatar rendered in real time by the first terminal device is displayed on the graphical user interface; or when the terminal device is the second terminal device, a three-dimensional avatar pre-generated in the second terminal device is displayed.
[0051] Among them, terminal devices with better hardware parameters are classified as first terminal devices, and terminal devices with poorer hardware parameters are classified as second terminal devices. The reason for distinguishing the first terminal device from the second terminal device is that the two-dimensional image rendered by the first terminal device is clear and has a good display effect, while the second terminal device, as a terminal with poor performance, if it also renders and generates a two-dimensional image like the first terminal device, the generated image quality may be low and the display on the image user interface will be less clear.
[0052] In the embodiments of the present disclosure, there are multiple ways to determine whether a terminal device is a first terminal device that meets the first preset condition or a second terminal device that meets the second preset condition. For example, there may be a preset list to match the device information of the terminal device, such as model information, processor information, etc., with the preset list. If the model of the current terminal can match any model in the preset list, it is deemed to meet the first preset condition and is considered to belong to the first terminal device. If it does not match, it is deemed to meet the second preset condition and is considered to belong to the second terminal device. Alternatively, a threshold value of a key performance parameter of the device is set. When the value of the key performance parameter of the device exceeds the threshold, it is deemed to meet the first preset condition and is the first terminal device. When it does not exceed the threshold, it is deemed to meet the second preset condition and is the second terminal device. The embodiments of the present disclosure do not limit how to set the preset conditions, and the hardware parameters can be evaluated accordingly according to the actual application scenario.
[0053] For the first terminal device, when the server queries that the target two-dimensional avatar does not exist, it is necessary to display the two-dimensional avatar rendered in real time by the first terminal device. Therefore, the method also includes: the first terminal device performs real-time rendering based on the model resource information of the target virtual character to generate the two-dimensional avatar of a preset image size.
[0054] Specifically, the first terminal device performs real-time rendering through the real-time rendering node CCRenderNode of the game rendering engine according to the model resource information of the virtual character. The model resource information may be the resource information when the virtual character is created, and finally generates a two-dimensional image of the current virtual character model, and displays the two-dimensional image as a two-dimensional avatar on the graphical user interface.
[0055] It is understandable that the size of the two-dimensional image generated by rendering can be limited, for example, set to 100px*100px or other sizes to avoid the image being too large, resulting in excessive storage space being occupied, and consuming too much traffic during transmission between the server and the terminal.
[0056] In addition, the two-dimensional avatars that need to be rendered by the first terminal device will be stored in the terminal, and will continue to accumulate as the number of virtual characters increases. Therefore, the number of two-dimensional avatar files stored in the terminal can also be limited, for example, it can be one thousand, and when it exceeds one thousand, the two-dimensional images with earlier timestamps will be deleted.
[0057] In the embodiment of the present disclosure, the method further includes: the first terminal device uploading the two-dimensional avatar to the server, so that the server queries whether there is a target two-dimensional avatar corresponding to the target virtual character.
[0058] Specifically, in order to share the rendered two-dimensional avatar with the server, the first terminal device can upload the rendered two-dimensional image to the server, and the server stores the image. In this way, other terminal devices can send an avatar query request to the server to obtain the target two-dimensional avatar corresponding to the target virtual character.
[0059] According to the contents of the above embodiments, it can be obtained as follows Figure 4 As shown in the flowchart. Figure 4 As shown, the user selects a virtual character (or other virtual objects) through the first terminal device and queries the server. When a two-dimensional avatar is found, it is directly downloaded from the server for use; if there is no two-dimensional avatar, the rendering node of the virtual engine generates a two-dimensional avatar, which is displayed on the graphical user interface of the first terminal device and uploaded to the server at the same time.
[0060] For the second terminal device, when the server queries that the target two-dimensional avatar does not exist, it is necessary to display the three-dimensional avatar pre-generated in the second terminal device. Therefore, the method also includes: the second terminal device loads the three-dimensional model of the target virtual character; performs skeleton disabling processing or character stillness processing on the three-dimensional model to obtain a static three-dimensional model; and cuts the static three-dimensional model according to preset cutting nodes to generate the three-dimensional avatar.
[0061] Specifically, firstly, a virtual camera can be set in a virtual scene to obtain a picture of a three-dimensional model of a virtual character. For different virtual characters, parameters of the virtual camera such as position and direction can be adjusted to load a three-dimensional model.
[0062] Since the process of rendering a two-dimensional avatar is also based on the target virtual character model in the virtual scene, and the virtual character model is likely to have dynamic movements including turning the head and blinking, etc., which will cause the generated two-dimensional avatar to be unstable, so during the rendering process, the bones in the animation file of the virtual character model corresponding to the avatar are disabled or the virtual character is controlled to be still, and a static three-dimensional model can be obtained.
[0063] Finally, you can use the cocos2d-x cropping node to crop out part of the target area to obtain a small head, half-length or full-length head of the three-dimensional model.
[0064] According to the contents of the above embodiments, it can be obtained as follows Figure 5 As shown in the flowchart. Figure 5 As shown, the user selects a virtual character (or other virtual objects) through the second terminal device and queries the server. When a two-dimensional avatar is found, it is directly downloaded from the server for use; if there is no two-dimensional avatar, a pre-generated three-dimensional avatar is used.
[0065] It should be noted that a plurality of terminal devices may share the same server, and the plurality of terminal devices may include a first terminal device with better hardware parameters, and may also include a second terminal device with worse hardware parameters.
[0066] Among them, only the first terminal device can render a two-dimensional avatar by itself and upload it to the server when the server does not have a two-dimensional avatar. At this time, the server stores the two-dimensional avatar of the virtual character. If the user selects the virtual character again in the second terminal device and needs to display the avatar of the virtual character, the server can query the existence of the two-dimensional avatar and then download it for use. Even if the second terminal device queries the server and finds that there is no two-dimensional avatar, it cannot render it and still uses the three-dimensional avatar.
[0067] According to the contents of the above embodiments, the contents of the embodiments are combined. Figure 6 As shown in the flowchart. Figure 6 As shown, the rendering node of the virtual engine of the first terminal device generates a two-dimensional avatar, which is displayed on the graphical user interface of the first terminal device and uploaded to the server. Afterwards, if the second terminal device selects the same virtual character as the first terminal device, the two-dimensional avatar generated by the first terminal device can be downloaded from the server.
[0068] Based on the above method, on the one hand, when a two-dimensional avatar of a virtual character exists in the server, it can be directly downloaded and used, reducing the pressure on the terminal device to render the two-dimensional avatar; on the other hand, the server and the terminal device only circulate the two-dimensional avatar rendered by the first terminal device with better hardware parameters, which can avoid the problem of low display quality of the overall avatar due to poor performance in generating two-dimensional avatars, thereby improving the user experience.
[0069] In the present disclosure, a method for implementing a game avatar display method is also proposed. The method further includes:
[0070] In response to the avatar modification operation on the target virtual character, an avatar deletion request is sent to the server, so that the server deletes the stored target two-dimensional avatar corresponding to the target virtual character.
[0071] Specifically, when any terminal device modifies the appearance of the virtual character model, or performs other operations that cause the appearance of the virtual character to change, the server is notified to delete the stored avatar file of the virtual character. In this way, when the user selects the virtual character on any terminal, the avatar file corresponding to the previous appearance of the virtual character will not be downloaded after querying the server.
[0072] By implementing the embodiments of the present disclosure, the avatar file corresponding to the target virtual character stored in the server is deleted in response to the modification operation on the target virtual character. This can avoid the displayed avatar being different from the actual appearance of the virtual character; and the first terminal device can generate the latest two-dimensional avatar of the virtual character as quickly as possible, and each terminal can obtain it and display it, thereby improving the timeliness of the avatar display.
[0073] In the present disclosure, an implementation of a method for displaying a game avatar is also proposed. After downloading the target two-dimensional avatar to the terminal device, the method further includes: querying whether there is another target two-dimensional avatar corresponding to the target virtual character in the local cache of the terminal device; obtaining the download timestamp of the target two-dimensional avatar and the cache timestamp of the other target two-dimensional avatar; comparing the download timestamp and the cache timestamp, and selecting the latest target two-dimensional avatar for display.
[0074] Specifically, after the terminal device has downloaded the two-dimensional avatar, but another two-dimensional avatar is stored in the local cache of the terminal device, in order to ensure the real-time display of the avatar, it is necessary to compare the timestamps of the two avatars and display the latest two-dimensional avatar, which can improve the real-time display of the character avatar.
[0075] Furthermore, in this example implementation, a game avatar display device is also provided.
[0076] A graphical user interface is provided through a terminal device, wherein the content displayed by the graphical user interface at least partially includes a virtual scene of the game, and the virtual scene includes at least one virtual character. Figure 7 As shown, the game avatar display device 700 may include:
[0077] A query module 701 is used to respond to a selection operation on a target virtual character and send an avatar query request to a server so that the server queries whether there is a target two-dimensional avatar corresponding to the target virtual character;
[0078] A first display module 702 is used to download the target two-dimensional avatar to the terminal device and display the target two-dimensional avatar on the graphical user interface when the server finds that the target two-dimensional avatar exists;
[0079] The second display module 703 is used to display the avatar provided by the terminal device on the graphical user interface when the server finds that the target two-dimensional avatar does not exist.
[0080] In an exemplary embodiment of the present disclosure, the terminal device includes a first terminal device whose hardware parameters meet a first preset condition and a second terminal device whose hardware parameters meet a second preset condition, and the second display module 703 includes a first unit and a second unit, the first unit being used to display a two-dimensional avatar rendered in real time by the first terminal device on the graphical user interface when the terminal device is a first terminal device; the second unit being used to display a three-dimensional avatar pre-generated in the second terminal device when the terminal device is a second terminal device.
[0081] In an exemplary embodiment of the present disclosure, the first unit is also used for, before displaying the two-dimensional avatar rendered in real time by the first terminal device, the first terminal device performs real-time rendering based on the model resource information of the target virtual character to generate the two-dimensional avatar of a preset image size.
[0082] In an exemplary embodiment of the present disclosure, the first unit is also used for the first terminal device to upload the two-dimensional avatar to the server, so that the server queries whether there is a target two-dimensional avatar corresponding to the target virtual character.
[0083] In an exemplary embodiment of the present disclosure, the second unit is also used for, before displaying the three-dimensional avatar pre-generated in the second terminal device, the second terminal device loads the three-dimensional model of the target virtual character; performs skeleton disabling processing or character stillness processing on the three-dimensional model to obtain a static three-dimensional model; and cuts the static three-dimensional model according to preset cutting nodes to generate the three-dimensional avatar.
[0084] In an exemplary embodiment of the present disclosure, the device is further used to: in response to an avatar modification operation acting on the target virtual character, send an avatar deletion request to the server, so that the server deletes the stored target two-dimensional avatar corresponding to the target virtual character.
[0085] In an exemplary embodiment of the present disclosure, the device is also used to: after downloading the target two-dimensional avatar to the terminal device, query whether there is another target two-dimensional avatar corresponding to the target virtual character in the local cache of the terminal device; obtain the download timestamp of the target two-dimensional avatar and the cache timestamp of the other target two-dimensional avatar; compare the download timestamp and the cache timestamp, and select the latest target two-dimensional avatar for display.
[0086] Figure 8 A schematic diagram of the structure of a computer system of a terminal device suitable for implementing an embodiment of the present disclosure is shown.
[0087] It should be noted that Figure 8 The computer system of the terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0088] like Figure 8 As shown, the computer system includes a central processing unit (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) or the program loaded from the storage part into the random access memory (RAM). In the (RAM), various programs and data required for the operation of the system are also stored. The (CPU), (ROM) and (RAM) are connected to each other through a bus. The input / output (I / O) interface is also connected to the bus.
[0089] The following components are connected to the (I / O) interface: an input part including a keyboard, a mouse, etc.; an output part including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage part including a hard disk, etc.; and a communication part including a network interface card such as a LAN card, a modem, etc. The communication part performs communication processing via a network such as the Internet. A drive is also connected to the (I / O) interface as needed. Removable media, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., are installed on the drive as needed so that a computer program read therefrom is installed into the storage part as needed.
[0090] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), various functions defined in the method and apparatus of the present disclosure are executed. It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to an embodiment of the present disclosure, the features and functions of the two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of a module or unit described above can be further divided into being embodied by multiple modules or units.
[0091] Since the various functional modules of the game avatar display device of the example embodiment of the present disclosure correspond to the steps of the example embodiment of the game avatar display method described above, for details and effects not disclosed in the embodiment of the device of the present disclosure, please refer to the embodiment of the game avatar display method described above in the present disclosure.
[0092] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0093] In the embodiments provided in the present disclosure, 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.
[0094] 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.
[0095] 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.
[0096] 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 enabling 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.
[0097] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for displaying a game avatar, characterized in that: A graphical user interface is provided through a terminal device, wherein the content displayed by the graphical user interface at least partially includes a virtual scene of a game, wherein the virtual scene includes at least one virtual character, and the terminal device includes a first terminal device whose hardware parameters meet a first preset condition and a second terminal device whose hardware parameters meet a second preset condition, and the method includes: In response to a selection operation on a target virtual character, sending an avatar query request to a server so that the server queries whether there is a target two-dimensional avatar corresponding to the target virtual character; When the server finds that the target two-dimensional avatar exists, downloading the target two-dimensional avatar to the terminal device, and displaying the target two-dimensional avatar on the graphical user interface; When the server finds that the target two-dimensional avatar does not exist, if the terminal device is a first terminal device, displaying the two-dimensional avatar rendered in real time by the first terminal device on the graphical user interface; or if the terminal device is a second terminal device, displaying the three-dimensional avatar pre-generated in the second terminal device; Before displaying the two-dimensional avatar rendered in real time by the first terminal device, the method also includes: the first terminal device performs real-time rendering based on the model resource information of the target virtual character to generate the two-dimensional avatar of a preset image size; the first terminal device uploads the two-dimensional avatar to the server, so that the server queries whether there is a target two-dimensional avatar corresponding to the target virtual character.
2. The method according to claim 1, characterized in that Before displaying the three-dimensional avatar pre-generated in the second terminal device, the method further includes: The second terminal device loads the three-dimensional model of the target virtual character; Performing skeleton disabling processing or character stillness processing on the three-dimensional model to obtain a static three-dimensional model; The static three-dimensional model is cut according to preset cutting nodes to generate the three-dimensional avatar.
3. The method according to claim 1, characterized in that The method further comprises: In response to the avatar modification operation on the target virtual character, an avatar deletion request is sent to the server, so that the server deletes the stored target two-dimensional avatar corresponding to the target virtual character.
4. The method according to claim 1, characterized in that: After downloading the target two-dimensional avatar to the terminal device, the method further includes: Querying whether there is another target two-dimensional avatar corresponding to the target virtual character in the local cache of the terminal device; Obtaining a download timestamp of the target two-dimensional avatar and a cache timestamp of the other target two-dimensional avatar; The download timestamp and the cache timestamp are compared, and the latest target two-dimensional avatar is selected for display.
5. A game avatar display device, characterized in that: A graphical user interface is provided through a terminal device, wherein the content displayed by the graphical user interface at least partially includes a virtual scene of the game, wherein the virtual scene includes at least one virtual character, wherein the terminal device includes a first terminal device whose hardware parameters meet a first preset condition and a second terminal device whose hardware parameters meet a second preset condition, wherein the apparatus includes: A query module, configured to respond to a selection operation on a target virtual character and send an avatar query request to a server, so that the server queries whether there is a target two-dimensional avatar corresponding to the target virtual character; A first display module, configured to download the target two-dimensional avatar to the terminal device and display the target two-dimensional avatar on the graphical user interface when the server finds that the target two-dimensional avatar exists; The second display module is used for displaying the two-dimensional avatar rendered in real time by the first terminal device on the graphical user interface when the server queries that the target two-dimensional avatar does not exist and when the terminal device is the first terminal device; or for displaying the three-dimensional avatar pre-generated in the second terminal device when the terminal device is the second terminal device; and is also used for, before displaying the two-dimensional avatar rendered in real time by the first terminal device, the first terminal device performs real-time rendering based on the model resource information of the target virtual character to generate the two-dimensional avatar of a preset image size; the first terminal device uploads the two-dimensional avatar to the server so that the server queries whether there is a target two-dimensional avatar corresponding to the target virtual character.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the game avatar display method according to any one of claims 1 to 4 is implemented.
7. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the game avatar display method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Head portrait generation method and device
CN108876878A
Skin display method, device and equipment of virtual roles
CN109603151A