Method, apparatus and electronic device for rendering virtual object

By monitoring the attribute parameters of game characters in the game mode and switching the rendering material of virtual objects from PBR to NPR, the problem of the monotonous rendering style of game characters was solved, and the game's visual performance and player experience were improved.

CN115957506BActive Publication Date: 2026-07-31NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NETEASE (HANGZHOU) NETWORK CO LTD
Filing Date
2022-12-16
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In existing technologies, the rendering style of game characters is monotonous, resulting in overly dull game visuals and reducing the user's gaming experience.

Method used

By monitoring the character attribute parameters of game characters in the game mode, it is determined whether the rendering trigger conditions are met, and the rendering material of virtual objects is switched from Physically Based Rendering (PBR) to Non-Physically Based Rendering (NPR) to form a visual fusion, thereby enhancing the expressiveness and impact of the game screen.

Benefits of technology

It enables dynamic switching of game characters between different rendering styles, improving the visual experience and player experience of the game, and enhancing the game's artistic expression and fun.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115957506B_ABST
    Figure CN115957506B_ABST
Patent Text Reader

Abstract

This invention provides a rendering method, apparatus, and electronic device for virtual objects, relating to the technical field of game rendering. The method includes: monitoring the character mode of a target virtual object; if the character mode indicates that the target virtual object is in a game mode, then monitoring the character attribute parameters of the target virtual object in the game mode; if the detected character attribute parameters are lower than a preset parameter threshold, then analyzing whether the animation data of the target virtual object's preset skeleton meets preset rendering trigger conditions; if so, controlling the switching of the target virtual object from a first rendering material to a second rendering material, so as to render and display the target virtual object through the second rendering material. The rendering method, apparatus, and electronic device for virtual objects provided by this invention can create a unique visual fusion, enhancing the expressiveness and impact of game visuals, improving not only the player's visual experience but also their overall gaming experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of image rendering, and in particular to a method, apparatus, and electronic device for rendering virtual objects. Background Technology

[0002] In the gaming industry, a uniform rendering style is generally used to represent game characters. However, a uniform rendering style usually has some drawbacks: for example, a realistic rendering style cannot fully show the characteristics of intersecting dimensions, making the characters appear too monotonous, the visuals not rich enough, and the characters' temperament not exaggerated enough; while a non-realistic rendering style, when representing game characters, loses the player's sense of immersion, and the visual texture is not sufficiently expressed, making the character textures appear relatively thin, giving people a lightweight and childish feeling, and reducing the user's gaming experience. Summary of the Invention

[0003] In view of this, the purpose of the present invention is to provide a method, apparatus and electronic device for rendering virtual objects to alleviate the above-mentioned technical problems.

[0004] In a first aspect, embodiments of the present invention provide a method for rendering virtual objects. A graphical user interface (GUI) is provided via a terminal device, displaying a game scene. The game scene includes a target virtual object rendered and displayed using a first rendering material. The method includes: monitoring the character mode of the target virtual object; if the character mode indicates that the target virtual object is in a game mode, monitoring the character attribute parameters of the target virtual object in the game mode; if the character attribute parameters are detected to be lower than a preset parameter threshold, analyzing whether the animation data of the preset skeleton of the target virtual object meets a preset rendering trigger condition; if so, controlling the switching of the target virtual object from the first rendering material to a second rendering material, so as to render and display the target virtual object using the second rendering material; wherein the first rendering material and the second rendering material are different.

[0005] Secondly, embodiments of the present invention also provide a rendering apparatus for virtual objects, which provides a graphical user interface through a terminal device. The graphical user interface displays a game scene, and the game scene includes a target virtual object rendered and displayed through a first rendering material. The apparatus includes: a first monitoring module for monitoring the character mode of the target virtual object; a second detection module for monitoring the character attribute parameters of the target virtual object in the game mode if the character mode indicates that the target virtual object is in the game mode; a parsing module for parsing whether the animation data of the preset skeleton of the target virtual object meets the preset rendering trigger conditions if the detected character attribute parameters are lower than the preset parameter threshold; and a switching rendering module for controlling the switching of the target virtual object from the first rendering material to the second rendering material when the animation data of the preset skeleton of the target virtual object meets the preset rendering trigger conditions, so as to render and display the target virtual object through the second rendering material; wherein the first rendering material and the second rendering material are different.

[0006] Thirdly, embodiments of the present invention also provide an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the method described in the first aspect.

[0007] Fourthly, embodiments of the present invention also provide a machine-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the method described in the first aspect.

[0008] The embodiments of the present invention bring the following beneficial effects:

[0009] The rendering method, apparatus, and electronic device for virtual objects provided in this invention can continue to monitor the character attribute parameters of the target virtual object when the target virtual object's character mode indicates that the target virtual object is in a game mode. This allows for the analysis of whether the animation data of the target virtual object's preset skeleton meets preset rendering trigger conditions when the character attribute parameters are below a preset threshold. When the rendering trigger conditions are met, the system controls the target virtual object to switch from a first rendering material to a second rendering material for rendering and display. Furthermore, the first and second rendering materials are different to achieve switching rendering of the target virtual object. This switching rendering process can create a unique visual fusion, enhancing the expressiveness and impact of the game screen, improving not only the player's visual experience but also their gaming experience.

[0010] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0011] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0012] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0013] Figure 1 A flowchart illustrating a method for rendering a virtual object, as provided in an embodiment of the present invention;

[0014] Figure 2 A flowchart illustrating another method for rendering virtual objects provided in an embodiment of the present invention;

[0015] Figure 3 This is a schematic diagram of the structure of a virtual object rendering device provided in an embodiment of the present invention;

[0016] Figure 4 This is a schematic diagram of the structure of another virtual object rendering device provided in an embodiment of the present invention;

[0017] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] Currently, in the field of real-time rendering games, physically based lighting (PBR) rendering or non-physical rendering (NPR) rendering is generally used to represent characters. That is, simply using physically based lighting (PBR) rendering or simply using non-physical rendering. However, using only one rendering method often results in characters that are too monotonous and the visuals that are not rich enough, which reduces the user's gaming experience.

[0020] Based on this, the present invention provides a rendering method, apparatus and electronic device for virtual objects, which can show players the instability of virtual objects in two different time and space and their rich artistic expression.

[0021] To facilitate understanding of this embodiment, a method for rendering virtual objects disclosed in this embodiment of the invention will first be described in detail.

[0022] In one possible implementation, this invention provides a method for rendering virtual objects. A graphical user interface (GUI) is provided through a terminal device, displaying a game scene. The game scene includes target virtual objects rendered and displayed using a first rendering material. Specifically, this method can run on a local terminal device or a server. When running on a server, the method can be implemented and executed based on a cloud interactive system.

[0023] For ease of understanding, Figure 1 A flowchart of a method for rendering a virtual object is shown, which includes the following steps:

[0024] Step S102: Monitor the role mode of the target virtual object;

[0025] Step S104: If the character mode indicates that the target virtual object is in game mode, then monitor the character attribute parameters of the target virtual object in game mode.

[0026] In practical use, the aforementioned target virtual object usually refers to a virtual object in a game. It can be a game character controlled by the player, an NPC, or equipment or props worn by the game character, etc.

[0027] Furthermore, the aforementioned game mode typically refers to a specific mode of the target virtual object, such as a combat mode, and then the character attribute parameters are monitored within that specific mode. These character attribute parameters usually refer to parameters describing a certain attribute of the target virtual character, such as health points, attack power, etc. By monitoring these character attribute parameters, the following steps can be performed to determine whether to render in the specific mode.

[0028] Step S106: If the character attribute parameters are detected to be lower than the preset parameter threshold, then analyze whether the animation data of the preset skeleton of the target virtual object meets the preset rendering trigger conditions.

[0029] Step S108: If yes, control the switching of the target virtual object from the first rendering material to the second rendering material, so as to render and display the target virtual object through the second rendering material;

[0030] The first rendering material is different from the second rendering material.

[0031] In practical use, taking the target virtual object as a game character controlled by the player as an example, the character mode of the target virtual object can usually be monitored at the script level. Taking the above-mentioned character attribute parameter as the health value corresponding to the health, when the target virtual object is within the enemy's attack range, it can be determined that the target virtual object is in the game mode and that the target virtual object has entered the combat mode. Every time the target virtual object is damaged, a health reduction operation is performed, and the corresponding health value is reduced. In step S106, if the remaining health value is detected to be lower than the preset health value threshold, the rendering trigger condition can be triggered, and then the target virtual object is switched to rendering in step S108.

[0032] Furthermore, the game resources corresponding to the first and second rendering materials mentioned above are usually pre-made and stored in the corresponding storage area so that when switching rendering is performed, the game resources corresponding to the rendering materials can be directly obtained to perform the switching rendering.

[0033] The virtual object rendering method provided in this invention can continue to monitor the character attribute parameters of the target virtual object when the target virtual object's character mode indicates that the target virtual object is in a game mode. This allows for the analysis of whether the animation data of the target virtual object's preset skeleton meets preset rendering trigger conditions when the character attribute parameters are below a preset threshold. When the rendering trigger conditions are met, the method controls the switching of the target virtual object from a first rendering material to a second rendering material for rendering and display. Furthermore, the first and second rendering materials are different to achieve switching rendering of the target virtual object. This switching rendering process can create a unique visual fusion, enhancing the expressiveness and impact of the game screen, improving not only the player's visual experience but also their overall gaming experience.

[0034] In practical use, the first rendering material in the embodiments of the present invention includes a Physically Based Rendering (PBR) material, and the second rendering material includes a Non-Physically Based Rendering (NPR) material. Therefore, in step S108 of the embodiments of the present invention, the process of controlling the target virtual object to switch from the first rendering material to the second rendering material is actually controlling the target virtual object to switch between the PBR material and the NPR material, thereby forming a visual fusion with a special feel.

[0035] Furthermore, in this embodiment of the invention, when analyzing whether the animation data of the preset skeleton of the target virtual object meets the preset rendering triggering conditions, it is based on an offline analysis method. Specifically, a preset offline analysis method can be used to analyze whether the animation data of the preset skeleton of the target virtual object meets the preset rendering triggering conditions.

[0036] Specifically, the offline parsing method is based on the motion parameters of the animation data. For ease of understanding, in Figure 1 On this basis, Figure 2 A flowchart of another virtual object rendering method is also shown, further describing the offline parsing process and the rendering switching process, specifically, as follows: Figure 2 As shown, it includes the following steps:

[0037] Step S202: Monitor the role mode of the target virtual object;

[0038] Step S204: If the character mode indicates that the target virtual object is in game mode, then monitor the character attribute parameters of the target virtual object in game mode.

[0039] Step S206: Determine whether the character attribute parameters are lower than the preset parameter threshold. If yes, continue to step S208; otherwise, return to step S202.

[0040] Step S208: Obtain the animation data of the preset skeleton of the target virtual object, and extract the motion parameters of the target virtual object based on the animation data;

[0041] Step S210: Analyze the action parameters to determine whether the preset rendering trigger conditions are met;

[0042] Specifically, the preset skeleton in the embodiments of the present invention can be any one of the skeletons of the target virtual object. It can be set according to the characteristics of the target virtual object's role, and the embodiments of the present invention do not impose any restrictions on this.

[0043] Furthermore, in step S208 above, the motion parameters extracted based on the animation data include at least one of the following parameters: motion frequency, motion amplitude, and motion posture; based on these parameters, in step S210, when parsing the motion parameters, each motion parameter needs to be parsed separately. If any motion parameter satisfies the preset rendering trigger condition, then it is determined that the animation data of the preset skeleton of the target virtual object satisfies the preset rendering trigger condition.

[0044] Furthermore, the process of parsing each motion parameter is based on offline parsing. Specifically, the animation data of each bone of the target virtual object can be parsed offline, the motion frequency, motion amplitude and motion posture of the target virtual object can be parsed, and the positions of some specified bones, namely the preset bones in the embodiments of the present invention, in the corresponding animation data can be parsed as needed to obtain the local position of each frame relative to the root bone.

[0045] Specifically, when parsing motion parameters, if the motion parameters include motion frequency, the system determines whether the trajectory of the preset bone changes repeatedly within a preset time period based on the animation data, and whether the frequency of change meets the preset frequency threshold; if so, the system determines that the motion frequency meets the preset rendering triggering conditions.

[0046] For example, if an action itself contains repetitive action segments, then it can be determined whether the trajectory of a specified bone changes repeatedly over a period of time, such as waving. If a script controls the target virtual object to repeatedly play a certain action segment, then the determination can be made at the script level, such as walking.

[0047] Furthermore, if the above motion parameters include motion amplitude, then based on the animation data, it is determined whether the movement distance of the preset bone within the preset time period is greater than the preset distance threshold; if so, it is determined that the motion amplitude meets the preset rendering triggering conditions.

[0048] Typically, the above-mentioned motion amplitude analysis process is to analyze the motion process of the target virtual object. This is because the situation where the moving distance is greater than the distance threshold usually occurs when the target virtual object is in motion. For example, if the displacement of the foot bones is 1 when walking slowly, the displacement of the foot bones may be 2 when walking fast. When the threshold is 1, once it is greater than 1, it can be determined that the target virtual object is no longer walking slowly, and thus the motion amplitude meets the preset rendering triggering conditions.

[0049] Furthermore, if the above action parameters include action posture, then based on the animation data, it is determined whether the relative position change of the preset bone is greater than the preset position threshold; if so, it is determined that the action posture meets the preset rendering triggering conditions.

[0050] In practical use, the process of analyzing motion posture is based on the changes in the relative positions between bones, such as the changes in the spine relative to the leg bones when running, etc., to determine whether the motion posture meets the preset rendering trigger conditions.

[0051] Step S212: If the animation data of the preset skeleton of the target virtual object meets the preset rendering trigger conditions, then the action corresponding to the animation data that meets the preset rendering trigger conditions is determined as the trigger point.

[0052] Step S214: At the trigger point, control the switching of the target virtual object from the first rendering material to the second rendering material.

[0053] Specifically, in this embodiment of the invention, the first rendering material includes a Physically Based Rendering (PBR) material, and the second rendering material includes a Non-Physically Based Rendering (NPR) material. By analyzing the motion frequency, motion amplitude, and motion posture in the motion parameters, the trigger point of the motion can be obtained. Then, in step S214, the switching from PBR material to NPR material can be realized at the trigger point, that is, the target virtual object is controlled to switch from PBR material to NPR material.

[0054] Therefore, based on the above process, in this embodiment of the invention, the target virtual object is controlled to switch from PBR material to NPR material when the animation data is parsed by changes in character attribute parameters, such as when the character attribute parameters are lower than a preset parameter threshold, under a specific mode, such as when the target virtual object is in a game mode.

[0055] Typically, PBR materials correspond to 3D effects, while NPR materials correspond to 2D effects. When a target virtual object is in a specific mode, taking the example of a target virtual object's health being less than a certain percentage, when the target virtual object's health is less than a preset threshold, a parsing process is triggered to analyze whether the animation data of the target virtual object's preset skeleton meets the preset rendering trigger conditions, thereby implementing the method described in this embodiment of the invention. At this time, insufficient health means that the target virtual object's consciousness energy is insufficient to maintain the target virtual object's 3D world, which leads to this abnormal world dimension. In this case, the PBR 3D effect can be triggered to switch to the NPR 2D effect, allowing the target virtual object to switch between realistic physical lighting rendering and non-realistic rendering, forming a visual fusion with a special sense of perception.

[0056] Furthermore, since the aforementioned switching rendering of the target virtual object is performed at the trigger point of the action, in this embodiment of the invention, the target virtual object can also be controlled to switch from NPR material back to PBR material in response to the end of the action corresponding to the trigger point.

[0057] Furthermore, in addition to the aforementioned switching rendering of the target virtual object, objects throughout the entire game scene where the current target virtual object is located can also undergo visual switching rendering. Therefore, the method in this embodiment of the invention further includes the following process:

[0058] In response to the target virtual object switching from PBR material to NPR material, the pre-stored scene NPR material corresponding to the game scene is obtained; where scene NPR material is the scene NPR effect corresponding to the target virtual object's NPR material; the game scene is switched to scene NPR material, that is, at the instant the target virtual object switches from PBR material to NPR material, the game scene can be controlled by program scripts to simultaneously change to the same two-dimensional effect as the NPR material, so as to unify the overall style of the screen.

[0059] Furthermore, in this embodiment of the invention, in response to the target virtual object switching from PBR material to NPR material, the color resources corresponding to the NPR material can be obtained; and the NPR material can be color rendered based on the color resources.

[0060] Color rendering can be achieved through color resources, and NPR materials can be arbitrarily changed in color using program scripts to enhance the visual appeal.

[0061] Furthermore, when the target virtual object switches from NPR material back to PBR material, the aforementioned game scene and the color resources corresponding to the NPR material can simultaneously switch back to the initial PBR state, creating a visual conflict between realism and unrealism.

[0062] In summary, the virtual object rendering method provided in this embodiment of the invention has the following beneficial effects:

[0063] (1) It has the advantages of both PBR rendering and NPR rendering;

[0064] It not only demonstrates a solid ability to create the target virtual objects, but also enhances the game's artistic style, enriches the game experience and fun, and strengthens the visual impact between the three-dimensional and two-dimensional worlds.

[0065] (2) Any target virtual object can be quickly and quantitatively produced to produce a cartoon-style flat effect using the virtual object rendering method of the present invention;

[0066] Specifically, in implementation, it is only necessary to store the resource path of the target virtual object. When the target virtual object is in game mode and meets the preset rendering trigger conditions, the rendering can be switched. For example, the script can index the material to be changed of the target virtual object through the resource path and automatically switch between PBR material and NPR material.

[0067] (3) Props or scenes can also use the rendering method of virtual objects in the embodiments of the present invention to enrich the expressiveness of the game screen;

[0068] For example, props or scenes can also switch between three-dimensional and two-dimensional visuals to enhance the visual impact of the two time periods.

[0069] (4) The rendering method of virtual objects in this embodiment of the invention can be compared with the performance effect of film and television. Moreover, compared with film and television, the rendering method of virtual objects in this embodiment of the invention also enables the target virtual object to have real-time controllability. Furthermore, since film and television characters can only be fixed in a certain shot, the rendering method of virtual objects in this embodiment of the invention can support the player's 360-degree observation state switching effect.

[0070] Furthermore, based on the above embodiments, this embodiment of the invention also provides a rendering device for virtual objects, which provides a graphical user interface through a terminal device. The graphical user interface displays a game scene, and the game scene includes target virtual objects rendered and displayed through a first rendering material, such as... Figure 3 The diagram shows a structural schematic of a virtual object rendering device, which includes:

[0071] The first monitoring module 30 is used to monitor the role mode of the target virtual object;

[0072] The second detection module 32 is used to monitor the character attribute parameters of the target virtual object in the game mode if the character mode indicates that the target virtual object is in the game mode;

[0073] The parsing module 34 is used to parse whether the animation data of the preset skeleton of the target virtual object meets the preset rendering triggering conditions if the character attribute parameters are detected to be lower than the preset parameter threshold.

[0074] The switching rendering module 36 is used to control the switching of the target virtual object from the first rendering material to the second rendering material when the animation data of the preset skeleton of the target virtual object meets the preset rendering trigger conditions, so as to render and display the target virtual object through the second rendering material; wherein, the first rendering material and the second rendering material are different.

[0075] Furthermore, the parsing module 34 is also used to: use a preset offline parsing method to parse whether the animation data of the preset skeleton of the target virtual object meets the preset rendering triggering conditions.

[0076] Furthermore, the parsing module 34 is also used to: acquire the animation data of the preset skeleton of the target virtual object; extract the motion parameters of the target virtual object based on the animation data; and parse the motion parameters to determine whether the preset rendering triggering conditions are met.

[0077] Furthermore, the motion parameters in this embodiment of the invention include at least one of the following parameters: motion frequency, motion amplitude, and motion posture;

[0078] The parsing module 34 described above is further configured to: parse each of the action parameters respectively, and if any of the action parameters satisfies the preset rendering triggering condition, then determine that the animation data of the preset skeleton of the target virtual object satisfies the preset rendering triggering condition.

[0079] Specifically, if the action parameters include the action frequency, then based on the animation data, it is determined whether the trajectory of the preset bone changes repeatedly within a preset time period, and the change frequency meets a preset frequency threshold; if so, it is determined that the action frequency meets a preset rendering trigger condition.

[0080] Furthermore, if the motion parameters include the motion amplitude, then based on the animation data, it is determined whether the movement distance of the preset bone within a preset time period is greater than a preset distance threshold; if so, it is determined that the motion amplitude meets the preset rendering triggering conditions.

[0081] Furthermore, if the action parameters include the action posture, then based on the animation data, it is determined whether the relative position change of the preset bone is greater than a preset position threshold; if so, it is determined that the action posture meets the preset rendering triggering conditions.

[0082] Furthermore, the aforementioned switching rendering module 36 is also used to: determine the action corresponding to the animation data that meets the preset rendering trigger conditions as the trigger point; and control the target virtual object to switch from the first rendering material to the second rendering material at the trigger point.

[0083] The first rendering material includes physically based rendering (PBR) materials, and the second rendering material includes non-physical rendering (NPR) materials.

[0084] The aforementioned switching rendering module 36 is also used to: control the target virtual object to switch from the PBR material to the NPR material.

[0085] Furthermore, in Figure 3On this basis, Figure 4 A schematic diagram of another virtual object rendering device is also shown, except... Figure 3 The structure shown above, the rendering device for the aforementioned virtual object, further includes:

[0086] The first switching module 40 is used to control the target virtual object to switch from the NPR material back to the PBR material when the action corresponding to the trigger point ends.

[0087] The second switching module 42 is used to respond to the target virtual object switching from the PBR material to the NPR material and obtain the scene NPR material corresponding to the pre-stored game scene; wherein, the scene NPR material is the scene NPR effect corresponding to the NPR material of the target virtual object;

[0088] Switch the game scene to the scene NPR material.

[0089] The third switching module 44 is used to respond to the target virtual object switching from the PBR material to the NPR material, obtain the color resources corresponding to the NPR material, and perform color rendering on the NPR material based on the color resources.

[0090] The virtual object rendering apparatus provided in this embodiment of the invention has the same technical features as the virtual object rendering method provided in the above embodiments, so it can also solve the same technical problems and achieve the same technical effects.

[0091] Furthermore, embodiments of the present invention also provide an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-described method.

[0092] Furthermore, embodiments of the present invention also provide a machine-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the above-described method.

[0093] This invention also provides an electronic device, see [link to relevant documentation]. Figure 5 The diagram shows the structure of an electronic device, which includes a processor 50 and a memory 51. The memory 51 stores machine-executable instructions that can be executed by the processor 50, which executes the machine-executable instructions to implement the above-described method.

[0094] Furthermore, Figure 5 The electronic device shown also includes a bus 52 and a communication interface 53. The processor 50, the communication interface 53 and the memory 51 are connected via the bus 52.

[0095] The memory 51 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 53 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 52 may be an ISA (Industrial Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Enhanced Industry Standard Architecture) bus, etc. These buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 5 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0096] Processor 50 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 50 or by instructions in software form. Processor 50 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 51. The processor 50 reads the information in memory 51 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiment.

[0097] The computer program products of the virtual object rendering method, apparatus and electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.

[0098] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0099] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.

[0100] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0101] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0102] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for rendering virtual objects, characterized in that, The method includes providing a graphical user interface (GUI) via a terminal device, the GUI displaying a game scene, the game scene including target virtual objects rendered and displayed using a first rendering material, and the method comprising: Monitor the role pattern of the target virtual object; If the character mode indicates that the target virtual object is in game mode, then monitor the character attribute parameters of the target virtual object in the game mode; If the character attribute parameters are detected to be lower than the preset parameter threshold, the preset offline parsing method is used to analyze whether the animation data of the preset skeleton of the target virtual object meets the preset rendering triggering conditions. If so, control the switching of the target virtual object from the first rendering material to the second rendering material, so as to render and display the target virtual object through the second rendering material; The first rendering material is different from the second rendering material; the first rendering material includes physically based rendering (PBR) material, and the second rendering material includes non-physical rendering (NPR) material; the PBR material corresponds to a three-dimensional effect, and the NPR material corresponds to a two-dimensional effect. The step of analyzing whether the animation data of the preset skeleton of the target virtual object meets the preset rendering triggering conditions further includes: obtaining the animation data of the preset skeleton of the target virtual object; extracting the motion parameters of the target virtual object based on the animation data; and parsing the motion parameters to determine whether the preset rendering triggering conditions are met; the motion parameters include at least one of the following parameters: motion frequency, motion amplitude, and motion posture.

2. The method of claim 1, wherein, The step of parsing the action parameters to determine whether the preset rendering trigger conditions are met includes: Each of the action parameters is analyzed separately. If any of the action parameters satisfies the preset rendering trigger condition, then it is determined that the animation data of the preset skeleton of the target virtual object satisfies the preset rendering trigger condition.

3. The method of claim 2, wherein, The step of parsing the action parameters to determine whether the preset rendering trigger conditions are met includes: If the motion parameters include the motion frequency, then based on the animation data, it is determined whether the trajectory of the preset skeleton changes repeatedly within a preset time period, and the change frequency meets a preset frequency threshold. If so, then the frequency of the action is determined to meet the preset rendering triggering conditions.

4. The method of claim 2, wherein, The step of parsing the action parameters to determine whether the preset rendering trigger conditions are met includes: If the motion parameters include the motion amplitude, then based on the animation data, it is determined whether the movement distance of the preset bone within a preset time period is greater than a preset distance threshold. If so, then the magnitude of the action is determined to meet the preset rendering triggering conditions.

5. The method of claim 2, wherein, The step of parsing the action parameters to determine whether the preset rendering trigger conditions are met includes: If the motion parameters include the motion posture, then based on the animation data, it is determined whether the relative position change of the preset bone is greater than a preset position threshold; If so, then the action posture is determined to meet the preset rendering triggering conditions.

6. The method of claim 1, wherein, The step of controlling the switching of the target virtual object from the first rendering material to the second rendering material includes: The action corresponding to the animation data that meets the preset rendering trigger conditions is determined as the trigger point; At the trigger point, the target virtual object is switched from the first rendering material to the second rendering material.

7. The method of claim 6, wherein, The step of controlling the switching of the target virtual object from the first rendering material to the second rendering material includes: Control the target virtual object to switch from the PBR material to the NPR material.

8. The method of claim 7, wherein, The method further includes: When the action corresponding to the trigger point ends, the target virtual object is controlled to switch from the NPR material back to the PBR material.

9. The method of claim 7, wherein, The method further includes: In response to the target virtual object switching from the PBR material to the NPR material, the scene NPR material corresponding to the pre-stored game scene is obtained; wherein, the scene NPR material is the scene NPR effect corresponding to the NPR material of the target virtual object; Switch the game scene to the scene NPR material.

10. The method according to claim 7, characterized in that, The method further includes: In response to the target virtual object switching from the PBR material to the NPR material, the color resources corresponding to the NPR material are obtained; The NPR material is rendered using the color resources.

11. A rendering apparatus for virtual objects, characterized in that, A graphical user interface is provided via a terminal device, the graphical user interface displaying a game scene, the game scene including target virtual objects rendered and displayed through a first rendering material, the device comprising: The first monitoring module is used to monitor the role mode of the target virtual object; The second detection module is used to monitor the character attribute parameters of the target virtual object in the game mode if the character mode indicates that the target virtual object is in the game mode. The parsing module is used to analyze whether the animation data of the preset skeleton of the target virtual object meets the preset rendering triggering conditions if the character attribute parameters are detected to be lower than the preset parameter threshold. The rendering module is switched so that when the animation data of the preset skeleton of the target virtual object meets the preset rendering trigger conditions, the target virtual object is switched from the first rendering material to the second rendering material, so as to render and display the target virtual object through the second rendering material; wherein, the first rendering material and the second rendering material are different; the first rendering material includes physically based rendering (PBR) material, and the second rendering material includes non-physical rendering (NPR) material; PBR material corresponds to three-dimensional effect, and NPR material corresponds to two-dimensional effect; The parsing module is further configured to: acquire animation data of the preset skeleton of the target virtual object; extract motion parameters of the target virtual object based on the animation data; parse the motion parameters to determine whether the preset rendering trigger conditions are met; the motion parameters include at least one of the following parameters: motion frequency, motion amplitude, and motion posture.

12. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the method of any one of claims 1-10.

13. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the method according to any one of claims 1-10.