Rendering Method, Device, Equipment and Readable Storage Medium for Virtual Object
By determining the target rendering accuracy based on distance and using LOD technology to perform multi-precision division and material combination, the problem of low rendering efficiency of virtual objects is solved, efficient and flexible rendering processing is achieved, and resource consumption is reduced.
Patent Information
- Application Number
- CN202111305382.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-05
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2041-11-05
AI Technical Summary
In the prior art, the rendering efficiency of virtual objects is low, especially objects far away still render with higher precision, resulting in increased resource consumption and low flexibility.
According to the distance between the virtual object and the first virtual object, the target rendering accuracy is determined, and rendered by rendering materials corresponding to N rendering accuracy less than or equal to the target rendering accuracy. LOD technology is used to divide and combine materials in multiple precisions to achieve flexible rendering processing.
Improve the rendering efficiency of virtual objects, reduce rendering resource consumption and network transmission resources, and improve rendering flexibility and effect.
Smart Images

Figure CN114028807B_ABST
Abstract
Description
Technical Field
[0001] This application relates to rendering technology in the field of computer applications, and particularly to a method, apparatus, device, and readable storage medium for rendering virtual objects. Background Art
[0002] In a virtual scene rendered based on graphics processing hardware, there are various virtual objects. As the display technology of graphics processing hardware becomes increasingly mature, it expands the channels for perceiving the environment and obtaining information; through the display technology of the virtual scene, diverse interactions between virtual objects controlled by users or artificial intelligence (AI) can be realized according to actual needs, and there are various typical application scenarios.
[0003] Generally, in order to render the objects to be rendered in a virtual scene, it is usually implemented based on the issued virtual object creation protocol. However, the virtual object creation protocol is used to render all elements of the objects to be rendered; thus, objects to be rendered at a relatively far distance will also be rendered with high precision, resulting in low rendering efficiency of virtual objects. Summary of the Invention
[0004] Embodiments of this application provide a method, apparatus, device, computer-readable storage medium, and computer program product for rendering virtual objects, which can improve the rendering efficiency of virtual objects.
[0005] The technical solution of the embodiments of this application is implemented as follows:
[0006] Embodiments of this application provide a method for rendering virtual objects, including:
[0007] In a virtual scene, determine the target rendering precision of the object to be rendered based on the distance between the first virtual object and the object to be rendered;
[0008] Obtain N rendering precisions less than or equal to the target rendering precision, where N is a positive integer;
[0009] Based on the correspondence between the rendering precision and the material to be rendered, determine the material to be rendered corresponding to each of the N rendering precisions, and obtain N materials to be rendered;
[0010] Render the material to be rendered to present a second virtual object corresponding to the target rendering precision of the object to be rendered in the virtual scene.
[0011] Embodiments of this application provide a device for rendering virtual objects, including:
[0012] The precision acquisition module is used to determine the target rendering precision of the object to be rendered based on the distance between the first virtual object and the object to be rendered in the virtual scene;
[0013] The precision acquisition module is further used to obtain N rendering precisions less than or equal to the target rendering precision, where N is a positive integer;
[0014] The material acquisition module is used to determine the object to be rendered corresponding to each of the N rendering precisions based on the correspondence between the rendering precision and the object to be rendered, and obtain N objects to be rendered;
[0015] The object rendering module is used to present a second virtual object corresponding to the target rendering precision of the object to be rendered in the virtual scene by rendering the object to be rendered.
[0016] In an embodiment of the present application, the rendering device of the virtual object further includes a material division module, which is used to determine M rendering precisions based on the candidate distance between the first virtual object and the object to be rendered, where M is a positive integer greater than 1 and M≥N, and the M rendering precisions include the target rendering precision; obtain the rendering material corresponding to the object to be rendered; divide the rendering material based on the M rendering precisions to obtain the object to be rendered corresponding to each of the M rendering precisions; combine the objects to be rendered corresponding to each of the M rendering precisions to obtain the correspondence between the rendering precision and the object to be rendered.
[0017] In an embodiment of the present application, the object rendering module is further used to obtain the current rendering material corresponding to the object to be rendered in the virtual scene; determine the material update information corresponding to the current rendering material based on the comparison result between the N objects to be rendered and the current rendering material; render the object to be rendered based on the material update information; present a second virtual object corresponding to the target rendering precision of the object to be rendered in the virtual scene through the rendering of the object to be rendered.
[0018] In an embodiment of the present application, the rendering device of the virtual object further includes an initial rendering module, which is used to respond to the presentation request of the virtual scene, obtain the object to be rendered within the field of view of the first virtual object; for the object to be rendered, obtain the data to be rendered corresponding to the first specified rendering precision, where the M rendering precisions include the first specified rendering precision, and the first specified rendering precision refers to the rendering precision corresponding to the object to be rendered when presenting the virtual scene; present a third virtual object corresponding to the first specified rendering precision of the object to be rendered in the virtual scene by rendering the data to be rendered.
[0019] Accordingly, in the embodiment of the present application, the object rendering module is further configured to replace the presented third virtual object with the second virtual object corresponding to the target rendering accuracy of the object to be rendered in the virtual scene by rendering the material to be rendered.
[0020] In the embodiment of the present application, the rendering device of the virtual object further includes an accuracy switching module, configured to obtain the motion state corresponding to the first virtual object, where the motion state includes at least one of a motion distance and a motion duration; when it is determined that the rendering accuracy detection condition is satisfied based on the motion state, obtain the distance between the first virtual object and the object to be rendered in the virtual scene, where the rendering accuracy detection condition includes at least one of a motion distance condition and a motion duration condition.
[0021] In the embodiment of the present application, the rendering device of the virtual object further includes a quantity control module, configured to obtain K target rendering accuracies corresponding to K objects to be rendered within the field of view of the first virtual object, where K is a positive integer; obtain the specified quantity corresponding to the second specified rendering accuracy that is positively correlated with the device rendering performance index, where M rendering accuracies include the second specified rendering accuracy; determine at least one object to be rendered with the second specified rendering accuracy from the K objects to be rendered based on the K target rendering accuracies; when the target quantity corresponding to at least one object to be rendered is greater than the specified quantity, obtain the quantity difference between the target quantity and the specified quantity, and determine the quantity difference number of objects to be rendered from at least one object to be rendered; for the quantity difference number of objects to be rendered, reduce the target rendering accuracy corresponding to each object to be rendered to a third specified rendering accuracy, where M rendering accuracies include the third specified rendering accuracy, and the third specified rendering accuracy is lower than the second specified rendering accuracy.
[0022] In the embodiment of the present application, the quantity control module is further configured to determine the quantity difference number of objects to be rendered with the farthest distance from at least one object to be rendered based on at least one distance between the first virtual object and at least one object to be rendered.
[0023] In the embodiment of the present application, the rendering device of the virtual object further includes a quantity control module, configured to obtain the correlation degree between at least one object to be rendered; determine the quantity difference number of objects to be rendered with the smallest correlation degree as the quantity difference number of objects to be rendered.
[0024] In an embodiment of the present application, the precision switching module is further configured to obtain an updated distance between the first virtual object and the object to be rendered in the virtual scene; when the rendering precision corresponding to the updated distance is different from the target rendering precision, determine the rendering precision corresponding to the updated distance as the new target rendering precision corresponding to the object to be rendered.
[0025] In an embodiment of the present application, the object rendering module is further configured to obtain a virtual obstacle between the first virtual object and the object to be rendered in the virtual scene, and obtain a first field of view area between the first virtual object and the object to be rendered; when the second field of view area corresponding to the virtual obstacle is greater than the first field of view area, end the rendering process of the object to be rendered.
[0026] In an embodiment of the present application, the object rendering module is further configured to determine a sequence of objects to be rendered with the rendering priorities of K objects to be rendered corresponding to K distances between the first virtual object and the K objects to be rendered within the field of view in descending order in the virtual scene; and render each object to be rendered in sequence based on the sequence of objects to be rendered.
[0027] In an embodiment of the present application, the M rendering precisions include at least two of a brief precision, a contour precision, a detailed precision, and an interaction precision, and the precisions among the brief precision, the contour precision, the detailed precision, and the interaction precision increase in sequence.
[0028] An embodiment of the present application provides a rendering device for virtual objects, including:
[0029] A memory for storing executable instructions;
[0030] A processor for implementing the virtual object rendering method provided by the embodiment of the present application when executing the executable instructions stored in the memory.
[0031] An embodiment of the present application provides a computer-readable storage medium storing executable instructions, and the executable instructions are used to implement the virtual object rendering method provided by the embodiment of the present application when being executed by a processor.
[0032] An embodiment of the present application provides a computer program product including a computer program or instructions, and the computer program or instructions implement the virtual object rendering method provided by the embodiment of the present application when being executed by a processor.
[0033] The embodiments of the present application at least have the following beneficial effects: Since when rendering the object to be rendered, the target rendering precision of the object to be rendered is determined according to the distance between the object to be rendered and the first virtual object, and the rendering of the object to be rendered is achieved through N rendering materials corresponding to N rendering precisions less than or equal to the target rendering precision; therefore, the rendering data corresponding to the object to be rendered is related to the distance from the first virtual object, so that objects to be rendered with different rendering precisions can be rendered for different distances, reducing the consumption of rendering resources; therefore, the rendering efficiency of virtual objects can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a schematic architecture diagram of a rendering system for virtual objects provided by an embodiment of the present application;
[0035] Figure 2 is a schematic composition diagram of a rendering device provided by an embodiment of the present application;
[0036] Figure 3 is a schematic flowchart of a method for rendering virtual objects provided by an embodiment of the present application Figure 1 ;
[0037] Figure 4 is a schematic flowchart of a method for rendering virtual objects provided by an embodiment of the present application Figure 2 ;
[0038] Figure 5 is a schematic flowchart of a method for rendering virtual objects provided by an embodiment of the present application Figure 3 ;
[0039] Figure 6 is a schematic flowchart for determining the rendering precision provided by an embodiment of the present application;
[0040] Figure 7 is a schematic diagram of an exemplary brief field of view provided by an embodiment of the present application;
[0041] Figure 8 is a schematic diagram of an exemplary contour field of view provided by an embodiment of the present application;
[0042] Figure 9 is a schematic diagram of an exemplary detailed field of view provided by an embodiment of the present application;
[0043] Figure 10 is a schematic diagram of an exemplary interaction field of view provided by an embodiment of the present application;
[0044] Figure 11 is an exemplary rendering switching flowchart provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] In order to make the objectives, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be construed as limitations on the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present application.
[0046] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with each other without conflict.
[0047] In the following description, the terms "first / second / third" are only used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first / second / third" can be interchanged with a specific order or sequence when permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0048] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0049] Before further elaborating on the embodiments of the present application, the nouns and terms involved in the embodiments of the present application are explained, and the nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0050] 1) Virtual scene: A scene output by a device that is different from the real world, and through the naked eye or with the assistance of a device, a visual perception of the virtual scene can be formed; for example, a two-dimensional image output by a display screen, or a three-dimensional image output by stereoscopic display technologies such as stereoscopic projection, virtual reality, and augmented reality technologies; in addition, various possible hardware can also form various perceptions that simulate the real world, such as auditory perception, tactile perception, olfactory perception, and motion perception.
[0051] It should also be noted that the virtual scene displayed (or provided) when an application runs on a terminal device can be a simulation environment of the real world, a semi-simulated and semi-fictional virtual environment, or a purely fictional virtual environment. The virtual scene can be any one of a two-dimensional virtual scene, a 2.5D virtual scene, or a three-dimensional virtual scene. The embodiments of the present application do not limit the dimension of the virtual scene. For example, the virtual scene can include the sky, land, ocean, etc. The land can include environmental elements such as deserts, cities, and buildings. Virtual objects can move or perform other operations (such as attack operations) in the virtual scene under the control of a user or AI.
[0052] 2) Responsive to: Used to represent the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more of the executed operations can be real-time or have a set delay; without special instructions, there is no restriction on the execution order of multiple executed operations; for example, the response to a rendering request for a virtual scene in the embodiments of the present application.
[0053] 3) Client: An application program running on a terminal device for providing various services; for example, a game client, etc.
[0054] 4) Virtual object: The images of various people and objects that can interact in a virtual scene, or movable objects in a virtual scene. The movable object can be a virtual character, a virtual animal, an anime character, etc.; for example, the characters, animals, plants, oil drums, walls, stones, buildings, etc. displayed in a virtual scene. The virtual object can be a virtual image in the virtual scene used to represent the user. A virtual scene can include multiple virtual objects, and each virtual object has its own shape and volume in the virtual scene, occupying a part of the space in the virtual scene. In the embodiments of the present application, the virtual objects involved are, for example, the first virtual object, the second virtual object, and the third virtual object.
[0055] 5) Multi-Level of Detail (LOD) technology: A technology that determines the rendering resource allocation of an object to be rendered according to the position and importance of the object to be rendered in the display environment, reduces the number of faces and detail level of unimportant objects in the object to be rendered, and thus obtains a high-efficiency rendering operation. For example, in some medium and large-scale multi-view games, it is divided according to the distance between the camera view and the rendering resource objects in the scene, and multiple LOD levels (LOD 0, LOD 1, LOD 2...; among them, LOD 0 is the highest-definition rendering resource, occupying the largest cache space, and the larger the LOD level, the less clear the rendering resource and the smaller the cache space occupied) are obtained. In the embodiments of the present application, M rendering precisions are M LOD levels; and in the embodiments of the present application, based on the LOD technology, the rendering of the object to be rendered is realized.
[0056] Generally speaking, in order to render an object to be rendered in a virtual scene, usually the server determines whether the distance between the object to be rendered and the player (a virtual object in the virtual scene) reaches the visible range, and when it does, sends a virtual object creation protocol to the terminal; at this time, the terminal implements based on the sent virtual object creation protocol. However, the virtual object creation protocol is used to render all elements of the object to be rendered; thus, objects to be rendered at a relatively far distance will also be rendered with high precision, resulting in low rendering efficiency of the virtual object. In addition, the rendering of the object to be rendered is triggered passively, with low flexibility; and because the sent virtual object creation protocol is used to render all elements of the object to be rendered, and there are many elements corresponding to the object to be rendered, more network resources are occupied during the transmission process, and more resources of the processor and video memory are consumed during the rendering process. Rendering in a frame-by-frame manner results in a long rendering time, while not using a frame-by-frame manner will cause the frame rate of the virtual scene to decrease. In addition, the rendering of each object to be rendered is independent, and thus, overall control over the rendering of multiple objects to be rendered cannot be achieved. In summary, the rendering effect of multiple objects to be rendered is poor.
[0057] Based on this, the embodiments of the present application provide a method, device, equipment, computer-readable storage medium and computer program product for rendering virtual objects, which can improve the flexibility, efficiency and effect of virtual object rendering, and reduce the resource consumption and network transmission resources of virtual object rendering. The following describes the exemplary application of the virtual object rendering device (hereinafter simply referred to as the rendering device) provided by the embodiments of the present application; the rendering device provided by the embodiments of the present application can be implemented as various types of terminals such as smart phones, smart watches, laptop computers, tablet computers, desktop computers, smart TVs, set-top boxes, intelligent vehicle-mounted devices, portable music players, personal digital assistants, dedicated messaging devices, portable game devices and smart speakers, or can be implemented as a server, or can be implemented as a combination of a terminal and a server. The following will describe the exemplary application when the device is implemented as a terminal and a server.
[0058] See Figure 1 , Figure 1 is the schematic diagram of the architecture of the virtual object rendering system provided by the embodiments of the present application; as Figure 1 shown, to support the rendering application of a virtual object, in the virtual object rendering system 100, the terminal 400 (exemplarily shows the terminal 400-1 and the terminal 400-2) is connected to the server 200 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two. In addition, the virtual object rendering system 100 also includes a database 500 for providing data support to the server 200; and, Figure 1Shown in the figure is a situation where the database 500 is independent of the server 200. In addition, the database 500 can also be integrated into the server 200, and the embodiments of the present application do not limit this. Here, the terminal 400 and the server 200 are the rendering devices for the virtual objects provided by the embodiments of the present application.
[0059] The terminal 400 is configured to determine the target rendering accuracy of the object to be rendered based on the distance between the first virtual object and the object to be rendered in the virtual scene; send the target rendering accuracy to the server 400 via the network 300; receive N materials to be rendered sent by the server 400 for the target rendering accuracy via the network 300; and present a second virtual object corresponding to the target rendering accuracy of the object to be rendered in the virtual scene by rendering the materials to be rendered (for example, the rendering result corresponding to the contour accuracy is displayed on the terminal 400-1, and the rendering result corresponding to the brief accuracy is displayed on the terminal 400-2).
[0060] The server 200 is configured to receive the target rendering accuracy sent by the terminal 400 via the network 300; obtain N rendering accuracies less than or equal to the target rendering accuracy, where N is a positive integer; determine the materials to be rendered corresponding to each of the N rendering accuracies based on the correspondence between the rendering accuracy and the materials to be rendered, to obtain N materials to be rendered; and send the N materials to be rendered to the terminal 400 via the network 300.
[0061] In some embodiments, the server 200 may be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal 400 may be a smart phone, a smart watch, a laptop computer, a tablet computer, a desktop computer, a smart TV, a set-top box, a smart vehicle-mounted device, a portable music player, a personal digital assistant, a dedicated messaging device, a portable game device, and a smart speaker, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected by wired or wireless communication means, and the embodiments of the present application do not limit this.
[0062] See Figure 2 , Figure 2 which is a schematic structural diagram of the composition of the rendering device provided by the embodiments of the present application. Figure 2The rendering device 40 shown includes: at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. Each component in the rendering device 40 is coupled together through a bus system 440. It can be understood that the bus system 440 is used to implement the connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clear illustration, in Figure 2 all kinds of buses are labeled as the bus system 440.
[0063] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0064] The user interface 430 includes one or more output devices 431 capable of presenting media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as keyboards, mice, microphones, touch screen displays, cameras, and other input buttons and controls.
[0065] The memory 450 can be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memories, hard disk drives, optical disc drives, etc. Optionally, the memory 450 includes one or more storage devices that are physically remote from the processor 410.
[0066] The memory 450 includes volatile memory or non-volatile memory, and can also include both volatile and non-volatile memory. The non-volatile memory can be a read-only memory (ROM, Read Only Memory), and the volatile memory can be a random access memory (RAM, Random Access Memory). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0067] In some embodiments of the present application, the memory 450 is capable of storing data to support various operations. Examples of such data include programs, modules, and data structures, or subsets or supersets thereof, which are described below by way of example.
[0068] An operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0069] A network communication module 452 for reaching other computer devices via one or more (wired or wireless) network interfaces 420. Exemplary network interfaces 420 include: Bluetooth, Wi-Fi (Wireless Fidelity), and USB (Universal Serial Bus), etc.
[0070] A presentation module 453 for enabling the presentation of information (such as a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 associated with the user interface 430 (such as a display screen, a speaker, etc.).
[0071] An input processing module 454 for detecting and translating one or more user inputs or interactions from one of one or more input devices 432.
[0072] In some embodiments of the present application, the virtual object rendering device provided by the embodiments of the present application can be implemented in software. Figure 2 Shown is a virtual object rendering device 455 stored in the memory 450, which can be software in the form of a program and a plugin, etc., including the following software modules: an accuracy acquisition module 4551, a material acquisition module 4552, an object rendering module 4553, a material division module 4554, an initial rendering module 4555, an accuracy switching module 4556, and a quantity control module 4557. These modules are logical, so they can be combined arbitrarily or further split according to the functions implemented. The functions of each module will be described below.
[0073] In some embodiments of the present application, the virtual object rendering device provided by the embodiments of the present application can be implemented in hardware. As an example, the virtual object rendering device provided by the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the virtual object rendering method provided by the embodiments of the present application. For example, a processor in the form of a hardware decoding processor can employ one or more application-specific integrated circuits (ASICs, Application-Specific Integrated Circuits), DSPs, programmable logic devices (PLDs, Programmable Logic Devices), complex programmable logic devices (CPLDs, Complex Programmable Logic Devices), field-programmable gate arrays (FPGAs, Field-Programmable Gate Arrays), or other electronic components.
[0074] In some embodiments, a terminal or a server may implement the method for rendering a virtual object provided in the embodiments of the present application by running a computer program. For example, the computer program may be a native program or a software module in an operating system; it may be a local (Native) application (APP, Application), that is, a program that needs to be installed in the operating system to run, such as a game APP, a game development APP, a live broadcast APP, or an instant messaging APP; it may also be a small program, that is, a program that only needs to be downloaded to a browser environment to run; it may also be a small program that can be embedded in any APP. In short, the above computer program may be any form of application program, module, or plug-in.
[0075] Next, the method for rendering a virtual object provided in the embodiments of the present application will be described in conjunction with the exemplary applications and implementations of the rendering device provided in the embodiments of the present application.
[0076] See Figure 3 , Figure 3 is a flowchart showing the method for rendering a virtual object provided in the embodiments of the present application Figure 1 will be described in conjunction with Figure 3 the steps shown.
[0077] S301. In a virtual scene, determine the target rendering accuracy of a to-be-rendered object based on the distance between a first virtual object and the to-be-rendered object.
[0078] In the embodiments of the present application, when a player enters a virtual scene with a first virtual object, the rendering device obtains the distance between a to-be-rendered object pre-determined in the virtual scene and the first virtual object, and when it is determined based on the obtained distance that the pre-determined to-be-rendered object is outside the field of view of the first virtual object, the to-be-rendered object is not rendered, or the rendering result corresponding to the to-be-rendered object is destroyed; and when it is determined based on the obtained distance that the pre-determined to-be-rendered object is within the field of view of the first virtual object, the to-be-rendered object is rendered, which may be to start the rendering process of the to-be-rendered object, or may also be the rendering process of updating the rendering result of the to-be-rendered object. Here, when the rendering device renders the to-be-rendered object, the target rendering accuracy is obtained by determining the rendering accuracy corresponding to the to-be-rendered object based on the obtained distance. Among them, the distance between the first virtual object and the to-be-rendered object is negatively correlated with the target rendering accuracy, that is, the farther the distance between the first virtual object and the to-be-rendered object, the lower the target rendering accuracy, and the closer the distance between the first virtual object and the to-be-rendered object, the higher the target rendering accuracy.
[0079] It should be noted that the first virtual object is the main virtual object in the virtual scene. For example, it can be the player character corresponding to the client login account. The virtual scene is used for the first virtual object to interact with other virtual objects. It can be the main control virtual scene or the spectator virtual scene. The embodiments of the present application do not make any limitations in this regard. The object to be rendered is an entity to be rendered in the virtual scene and is an entity with a compositional structure, such as a virtual building, a virtual prop, and so on. The target rendering precision is the LOD level, which represents the fine degree of rendering of the object to be rendered in the virtual scene.
[0080] S302. Obtain N rendering precisions less than or equal to the target rendering precision.
[0081] In the embodiments of the present application, after the rendering device obtains the target rendering precision, since the object to be rendered is composed of different elements, and since the elements that make up the object to be rendered have been hierarchically divided in terms of precision to obtain different rendering precisions corresponding to different elements, when obtaining the data to be rendered corresponding to the target rendering precision, the rendering device can render the object to be rendered at the target rendering precision only by obtaining the elements corresponding to the N rendering precisions from the lowest rendering precision to the target rendering precision.
[0082] It should be noted that the elements that make up the object to be rendered are called the rendering materials corresponding to the object to be rendered; N is a positive integer, such as 1, 3, 4. In addition, when M rendering precisions are obtained after the hierarchical division, the rendering device obtains N rendering precisions less than or equal to the target rendering precision from the M rendering precisions; where M is a positive integer greater than 1 and M≥N, and the M rendering precisions include the target rendering precision.
[0083] S303. Based on the correspondence between the rendering precision and the material to be rendered, determine the material to be rendered corresponding to each of the N rendering precisions to obtain N materials to be rendered.
[0084] In the embodiments of the present application, the rendering device uses the LOD technology to hierarchically divide the rendering materials corresponding to the object to be rendered in terms of precision in advance. The correspondence between the rendering precision and the material to be rendered is the result of the hierarchical division. The rendering device determines the corresponding material to be rendered for each of the obtained N rendering precisions in the correspondence between the rendering precision and the material to be rendered. When the processing of the N rendering precisions is completed, N materials to be rendered corresponding one by one to the N rendering precisions are obtained. It is easy to know that the N materials to be rendered are the data for rendering the object to be rendered at the target rendering precision.
[0085] It should be noted that in the correspondence between the rendering precision and the material to be rendered, there are M rendering precisions, and the materials to be rendered corresponding to each of the M rendering precisions; moreover, the M materials to be rendered corresponding one by one to the M rendering precisions are the rendering materials corresponding to the object to be rendered, and the rendering result with the maximum rendering precision can be obtained. That is to say, the correspondence between the rendering precision and the material to be rendered means the M materials to be rendered corresponding to the M rendering precisions. Thus, the rendering device determines the materials to be rendered corresponding to each of the N rendering precisions from the M materials to be rendered corresponding to the M rendering precisions, and obtains N materials to be rendered.
[0086] S304. By rendering the material to be rendered, present a second virtual object corresponding to the target rendering precision of the object to be rendered in the virtual scene.
[0087] It should be noted that by rendering N materials to be rendered, the rendering device also realizes the rendering of the object to be rendered in the virtual scene. Among them, the rendering result is the second virtual object, and the second virtual object is a rendering result of the object to be rendered corresponding to the target rendering precision.
[0088] It can be understood that the rendering device determines the target rendering precision corresponding to the object to be rendered based on the distance between the first virtual object and the object to be rendered; furthermore, based on the level division of the rendering materials of the object to be rendered in terms of precision pre-done by the LOD technology, determines the rendering data (N materials to be rendered) corresponding to the target rendering precision, and renders the object to be rendered based on the rendering data; can achieve rendering results with different rendering precisions for different distances between the object to be rendered and the first virtual object. Thus, it can reduce the consumption of rendering resources and improve the rendering efficiency. In addition, when S301 and S304 are implemented through the terminal, and S302 and S303 are implemented through the server, the rendering data of the object to be rendered is obtained by the terminal based on determining the target rendering precision, which is a process of actively rendering the object to be rendered, can improve the rendering flexibility of the object to be rendered, and can also reduce the network transmission resources corresponding to the rendering resources.
[0089] See Figure 4 , Figure 4 is the flowchart of the rendering method of the virtual object provided by the embodiment of the present application Figure 2 ; as Figure 4 shown, based on Figure 3 , in the embodiment of the present application, before S301, there are also S305 to S308; that is to say, before the rendering device determines the target rendering precision of the object to be rendered based on the distance between the first virtual object and the object to be rendered in the virtual scene, the rendering method of this virtual object also includes S305 to S308, and the following will explain each step separately.
[0090] S305. Determine M rendering precisions based on the candidate distance between the first virtual object and the object to be rendered.
[0091] In an embodiment of the present application, the rendering device obtains various possible distances between the first virtual object and the object to be rendered, and divides M rendering precisions negatively correlated with the distance based on the obtained various possible distances; where the various possible distances are the candidate distances. Additionally, the rendering device can also determine M - 1 key distance points between the first virtual object and the object to be rendered, and determine the rendering precision corresponding to each distance range based on the M - 1 key distance points, thus obtaining M rendering precisions.
[0092] S306. Obtain the rendering material corresponding to the object to be rendered.
[0093] S307. Divide the rendering material based on the M rendering precisions to obtain the rendering material to be rendered corresponding to each of the M rendering precisions.
[0094] In an embodiment of the present application, the rendering device performs multi - precision division (also known as multi - level division) on the rendering material; here, the rendering device can determine the rendering precision corresponding to each element / material in the rendering material based on the attributes and functions (presentation, interaction) of the rendering material.
[0095] It should be noted that for attributes, such as size, a larger size corresponds to a lower rendering precision, and a smaller size corresponds to a higher rendering precision. Also, for example, for position, the rendering precision of peripheral elements is lower, and the rendering precision of internal elements is higher.
[0096] S308. Combine the rendering materials to be rendered corresponding to each of the M rendering precisions to obtain the correspondence between the rendering precision and the rendering material to be rendered.
[0097] It should be noted that the rendering device combines the M rendering materials to be rendered corresponding to the M rendering precisions one - to - one, thus obtaining the correspondence between the rendering precision and the rendering material to be rendered.
[0098] In an embodiment of the present application, an element is the basic data unit for rendering the object to be rendered; the rendering material is all the elements corresponding to the object to be rendered; the rendering material to be rendered is all the elements in the rendering material corresponding to a rendering precision; N rendering materials to be rendered refer to all the elements corresponding to the object to be rendered for rendering the target rendering precision; thus, both the rendering material and the rendering material to be rendered are composed of elements, and the rendering material to be rendered is a subset of the rendering material.
[0099] It can be understood that the rendering device pre - divides the rendering materials corresponding to the objects to be rendered by using the LOD technology with multiple precisions, so that after determining the target rendering precision corresponding to the object to be rendered, the rendering data with the target rendering precision can be obtained based on the multi - precision division result, realizing the rendering process of determining the rendering precision by distance, improving the rendering effect and reducing the rendering resources. In addition, the rendering device divides the rendering materials with multiple precisions and combines the materials to be rendered based on the determined target rendering precision to render the object to be rendered, without adding rendering materials, thus being able to reduce the rendering resources.
[0100] See Figure 5 , Figure 5 which is the flow schematic of the rendering method of the virtual object provided by the embodiment of the present application Figure 3 As Figure 5 shown, based on Figure 3 , in the embodiment of the present application, S304 can be implemented through S3041 to S3043; that is to say, the rendering device renders the materials to be rendered and presents the second virtual object corresponding to the target rendering precision of the object to be rendered in the virtual scene, including S3041 to S3043, and the following will explain each step separately.
[0101] S3041. Obtain the current rendering materials corresponding to the object to be rendered in the virtual scene.
[0102] It should be noted that the current rendering materials obtained by the rendering device are the data corresponding to the rendering result for presenting the object to be rendered before presenting the second virtual object.
[0103] S3042. Determine the material update information corresponding to the current rendering materials based on the comparison result between the N materials to be rendered and the current rendering materials.
[0104] In the embodiment of the present application, the rendering device compares the obtained current rendering materials with the N materials to be rendered to determine whether the N materials to be rendered and the current rendering materials are the same. Here, when the comparison result is that the N materials to be rendered and the current rendering materials are the same, it indicates that there is no need to update the current rendering result of the object to be rendered. Thus, the rendering device ends the rendering process of the object to be rendered; when the comparison result is that the N materials to be rendered and the current rendering materials are different, it indicates that the current rendering result of the object to be rendered needs to be updated. Thus, the rendering device determines the update processing information for the current rendering materials based on the N materials to be rendered, and thus obtains the material update information.
[0105] S3043. Render the materials to be rendered based on the material update information, and present the second virtual object corresponding to the target rendering precision of the object to be rendered in the virtual scene through the rendering of the materials to be rendered.
[0106] In an embodiment of the present application, the rendering device updates the current rendering material based on the material update information. When the update is completed, the rendering of the material to be rendered is also completed. At this time, a second virtual object is presented in the virtual scene. That is to say, based on the update result corresponding to the material update information, the rendering device presents a second virtual object corresponding to the data to be rendered in the virtual scene.
[0107] It can be understood that by adding or deleting elements to the current rendering material based on N materials to be rendered, the rendering device can achieve the rendering of the object to be rendered with the target rendering accuracy, and the rendering efficiency is relatively high.
[0108] In an embodiment of the present application, before S301, it also includes the process of the first virtual object entering the virtual scene for the first time. That is to say, in the virtual scene, before the rendering device determines the target rendering accuracy of the object to be rendered based on the distance between the first virtual object and the object to be rendered, the rendering method of this virtual object further includes: the rendering device responds to the presentation request of the virtual scene, and obtains the object to be rendered within the field of view of the first virtual object; for the object to be rendered, obtains the data to be rendered corresponding to the first specified rendering accuracy; by rendering the data to be rendered, presents a third virtual object corresponding to the first specified rendering accuracy of the object to be rendered in the virtual scene.
[0109] It should be noted that when the user starts the game or starts watching the game, the rendering device receives the presentation request of the virtual scene. At this time, when the rendering device responds to the presentation request of the virtual scene and determines that the object to be rendered is within the field of view of the first virtual object in the virtual scene, it determines that the object to be rendered is rendered with the first specified rendering accuracy. Thus, based on the corresponding relationship between the rendering accuracy and the material to be rendered, the rendering device obtains the rendering material corresponding to the first specified rendering accuracy, and also obtains the data to be rendered corresponding to the first specified rendering accuracy. Then, by rendering the data to be rendered, the rendering device presents a rendering result rendered with the first specified rendering accuracy in the virtual scene, which is the third virtual object. Among them, the third virtual object is a rendering result of the object to be rendered corresponding to the first specified rendering accuracy. And the first specified rendering accuracy can be the lowest rendering accuracy among M rendering accuracies. The first specified rendering accuracy refers to the rendering accuracy corresponding to the object to be rendered when presenting the virtual scene, where presenting the virtual scene refers to the initial presentation of the virtual scene.
[0110] In an embodiment of the present application, the rendering result of the rendering device rendering with the first specified rendering accuracy in the virtual scene may be no display information, and only initial creation is performed on the rendering device. For example, position information, identification information, etc. At this time, the third virtual object will not be presented in the virtual scene.
[0111] Accordingly, in the embodiment of the present application, in S301, the rendering device renders the material to be rendered, and presents a second virtual object corresponding to the target rendering accuracy of the object to be rendered in the virtual scene, including: rendering the material to be rendered, and in the virtual scene, replacing the presented third virtual object with the second virtual object corresponding to the target rendering accuracy of the object to be rendered.
[0112] It should be noted that when the object to be rendered is rendered at the first specified rendering accuracy in the initially presented virtual scene, that is, when the third virtual object is presented in the virtual scene, after the rendering device obtains a target rendering accuracy different from the first specified rendering accuracy, the object to be rendered is rendered at the target rendering accuracy, so as to present the second virtual object for replacing the third virtual object in the virtual scene. In addition, when the object to be rendered is rendered at the first specified rendering accuracy, if there is no display information in the virtual scene, the rendering device directly presents the second virtual object in the virtual scene.
[0113] In the embodiment of the present application, the virtual device may present the rendering result corresponding to the first specified rendering accuracy when the player enters the virtual scene, or may directly determine the rendering result based on the distance between the object to be rendered and the first virtual object. The embodiment of the present application does not limit this.
[0114] In the embodiment of the present application, before S301, it also includes a process of triggering the rendering and rendering accuracy update of the object to be rendered; that is, before the rendering device determines the target rendering accuracy of the object to be rendered based on the distance between the first virtual object and the object to be rendered in the virtual scene, the rendering method of the virtual object further includes: obtaining the motion state corresponding to the first virtual object; when it is determined that the rendering accuracy detection condition is met based on the motion state, obtaining the distance between the first virtual object and the object to be rendered in the virtual scene.
[0115] It should be noted that the motion state includes at least one of the motion distance and the motion duration, and the rendering accuracy detection condition includes at least one of the motion distance condition and the motion duration condition. Moreover, when the rendering accuracy detection condition includes the motion distance condition, the motion state includes the motion distance. At this time, the rendering device determines whether the motion distance meets the motion distance condition. For example, if the motion distance is greater than the specified motion distance, the distance between the first virtual object and the object to be rendered is obtained; if the motion distance is less than or equal to the specified motion distance, the acquisition of the motion distance continues. When the rendering accuracy detection condition includes the motion duration condition, the motion state includes the motion duration. At this time, the rendering device determines whether the motion duration meets the motion duration condition. For example, if the motion duration is greater than the specified motion duration, the distance between the first virtual object and the object to be rendered is obtained; if the motion distance is less than or equal to the specified motion duration, the acquisition of the motion duration continues. When the rendering accuracy detection condition includes both the motion distance condition and the motion duration condition, the motion state includes both the motion distance and the motion duration.
[0116] See Figure 6 , Figure 6 is a schematic flowchart of the process for determining the rendering accuracy provided by an embodiment of the present application; as Figure 6 shown, in an embodiment of the present application, Figure 3 after S301 in
[0117] S309, obtain the K target rendering accuracies corresponding to the K objects to be rendered within the field of view of the first virtual object.
[0118] In an embodiment of the present application, the rendering device obtains the target rendering accuracies corresponding to the K objects to be rendered within the field of view of the first virtual object respectively based on the process of obtaining the target rendering accuracy corresponding to the object to be rendered, and thus obtains the K target rendering accuracies corresponding one by one to the K objects to be rendered. Wherein, K is a positive integer.
[0119] S310, obtain the specified quantity corresponding to the second specified rendering accuracy that is positively correlated with the device rendering performance index.
[0120] It should be noted that the M rendering precisions include the second specified rendering precision, and the second specified rendering precision is the higher rendering precision among the M rendering precisions. Thus, the rendering device determines the maximum number of the second specified rendering precisions that can be rendered in combination with its own rendering performance. Here, the device rendering performance index refers to the rendering performance of the rendering device, and the specified number is the maximum number of the second specified rendering precisions that can be rendered and is positively correlated with the device rendering performance index.
[0121] S311. Based on the K target rendering precisions, determine at least one object to be rendered with the second specified rendering precision from the K objects to be rendered.
[0122] In the embodiment of the present application, the rendering device filters out the objects to be rendered with the second specified rendering precision from the K objects to be rendered, and thus obtains at least one object to be rendered.
[0123] S312. When the target number corresponding to at least one object to be rendered is greater than the specified number, obtain the difference between the target number and the specified number, and determine the objects to be rendered with the number of the difference from at least one object to be rendered.
[0124] In the embodiment of the present application, the rendering device counts the number of objects to be rendered included in at least one object to be rendered, and thus obtains the target number. At this time, the rendering device compares the target data with the specified number. When the target number is less than or equal to the specified data, it indicates that the number of objects to be rendered with the second specified rendering precision within the field of view of the first virtual object is within the maximum number corresponding to the rendering device and will not affect the rendering effect of the rendering device. When the target number is greater than the specified number, it indicates that the number of objects to be rendered with the second specified rendering precision within the field of view of the first virtual object exceeds the maximum number corresponding to the rendering device and may affect the rendering effect of the rendering device. Thus, at this time, the rendering device selects the objects to be rendered that exceed the specified number from at least one object to be rendered to perform precision reduction processing on the target rendering precision corresponding to the objects to be rendered that exceed the specified number. Among them, the objects to be rendered that exceed the specified number are the objects to be rendered with the number of the difference.
[0125] S313. Among the objects to be rendered with the number of the difference, reduce the target rendering precision corresponding to each object to be rendered to the third specified rendering precision.
[0126] It should be noted that the target rendering precision corresponding to each to-be-rendered object with a quantity difference is the second specified rendering precision. Here, based on the rendering performance of the rendering device, the second specified rendering precision corresponding to each to-be-rendered object with a quantity difference is reduced to the third specified rendering precision to reduce the consumption of the rendering resources of the rendering device. Among them, the M rendering precisions include the third specified rendering precision, and the third specified rendering precision is lower than the second specified rendering precision.
[0127] It can be understood that the rendering device combines its own rendering performance to determine the number of to-be-rendered objects with the second specified rendering precision, realizing the control of the number of to-be-rendered objects and the overall control of the to-be-rendered objects, and improving the rendering quality and rendering flexibility.
[0128] In the embodiment of the present application, in S312, the rendering device determines a quantity difference of to-be-rendered objects from at least one to-be-rendered object, including: determining, from at least one to-be-rendered object, a quantity difference of to-be-rendered objects with the farthest distances based on at least one distance between the first virtual object and at least one to-be-rendered object.
[0129] It should be noted that the rendering device can determine a quantity difference of to-be-rendered objects with reduced rendering precision from at least one to-be-rendered object based on the distance between the to-be-rendered object and the first virtual object. Here, the rendering device determines a quantity difference of to-be-rendered objects with the farthest distances from at least one to-be-rendered object.
[0130] In the embodiment of the present application, in S312, the rendering device determines a quantity difference of to-be-rendered objects from at least one to-be-rendered object, including: obtaining the correlation degrees among at least one to-be-rendered object; and determining the quantity difference of to-be-rendered objects with the smallest correlation degrees as the quantity difference of to-be-rendered objects.
[0131] It should be noted that there is a correlation relationship among the to-be-rendered objects, and the rendering device can determine a quantity difference of to-be-rendered objects from at least one to-be-rendered object based on the correlation relationship among the to-be-rendered objects. Here, the rendering device determines a quantity difference of to-be-rendered objects with the smallest correlation degrees from at least one to-be-rendered object.
[0132] In an embodiment of the present application, after S304, it further includes a process in which the rendering device continues to update the rendering precision of the object to be rendered, and then renders the object to be rendered again with different rendering precisions; that is to say, after the rendering device renders the material to be rendered and presents a second virtual object corresponding to the target rendering precision of the object to be rendered in the virtual scene, the rendering method of the virtual object further includes: in the virtual scene, obtaining the updated distance between the first virtual object and the object to be rendered; when the rendering precision corresponding to the updated distance is different from the target rendering precision, determining the rendering precision corresponding to the updated distance as the new target rendering precision corresponding to the object to be rendered.
[0133] It should be noted that after the rendering device finishes rendering the object to be rendered with the target rendering precision, it continues to obtain the updated distance between the first virtual object and the object to be rendered, so as to determine whether to update the rendering precision of the object to be rendered based on the updated distance. Here, when the rendering device determines that the updated distance is still within the specified range of the target rendering precision, it indicates that the rendering precision corresponding to the updated distance is the same as the target rendering precision. At this time, the rendering precision of the object to be rendered is not updated; while when the rendering device determines that the updated distance is not within the specified range of the target rendering precision but within the specified range of other rendering precisions except the target rendering precision among the M rendering precisions, it indicates that the rendering precision corresponding to the updated distance is different from the target rendering precision. At this time, it is determined to update the rendering precision of the object to be rendered. When the rendering device updates the rendering precision of the object to be rendered, it determines the rendering precision corresponding to the updated distance as the new target rendering precision corresponding to the object to be rendered, and then renders the object to be rendered based on the new target rendering precision according to the process described in S302 to S304.
[0134] It should also be noted that when, during the process of the rendering device rendering the object to be rendered with the new target rendering precision, it is determined that the rendering precision corresponding to the distance updated again is different from the new target rendering precision, the process of rendering the object to be rendered with the new target rendering precision is terminated, and the object to be rendered is directly rendered with the rendering precision corresponding to the distance updated again.
[0135] In an embodiment of the present application, after S301, it further includes a process in which the rendering device determines whether to render the object to be rendered in combination with the occlusion relationship; that is to say, after the rendering device determines the target rendering precision of the object to be rendered based on the distance between the first virtual object and the object to be rendered in the virtual scene, the rendering method of the virtual object further includes: the rendering device obtains the virtual obstacle between the first virtual object and the object to be rendered in the virtual scene, and obtains the first viewing area between the first virtual object and the object to be rendered; when the second viewing area corresponding to the virtual obstacle is larger than the first viewing area, the rendering process of the object to be rendered is ended.
[0136] It should be noted that when the rendering device determines that the second visual field area corresponding to the virtual obstacle is larger than the first visual field area, it indicates that the virtual obstacle can completely block the object to be rendered. At this time, the rendering device will end the rendering process of the object to be rendered and will not render the object to be rendered. When the rendering device determines that the second visual field area corresponding to the virtual obstacle is less than or equal to the first visual field area, it indicates that the virtual obstacle cannot completely block the object to be rendered. At this time, the rendering device continues to render the object to be rendered with the target rendering accuracy.
[0137] It can be understood that after the rendering device obtains the target rendering accuracy of the object to be rendered, by obtaining the occlusion relationship between the first virtual object and the object to be rendered, and determining that the virtual obstacle can completely block the object to be rendered based on this occlusion relationship, the rendering process can be ended, which can save rendering resources.
[0138] In the embodiment of the present application, after S309, a process of determining the rendering order of the objects to be rendered is further included; that is, after the rendering device obtains the K target rendering accuracies corresponding to the K objects to be rendered within the visual field of the first virtual object, the rendering method of this virtual object further includes: in the virtual scene, based on the K distances between the first virtual object and the K objects to be rendered within the visual field, determining a sequence of objects to be rendered arranged in descending order of rendering priority corresponding to the K objects to be rendered; and rendering each object to be rendered in sequence based on the sequence of objects to be rendered.
[0139] It should be noted that after the rendering device obtains the K target rendering accuracies corresponding to the K objects to be rendered, it can determine the rendering accuracy of each object to be rendered; here, the rendering device determines the rendering time of each object to be rendered based on the K distances and preferentially renders the objects to be rendered at a short distance. Among them, the sequence of objects to be rendered is composed of the K objects to be rendered with the rendering time getting later in turn, and is also the sequence of the K objects to be rendered with the rendering accuracy decreasing in turn.
[0140] It can be understood that the rendering device determines the rendering attributes between the K target rendering accuracies and the K objects to be rendered based on the K distances between the first virtual object and the K objects to be rendered, so that the rendering device preferentially renders the objects to be rendered at a relatively short distance and with a relatively high rendering accuracy.
[0141] In the implementation of the present application, the M rendering accuracies include at least two of brief accuracy, contour accuracy, detailed accuracy, and interaction accuracy, and the accuracies of brief accuracy, contour accuracy, detailed accuracy, and interaction accuracy increase in turn.
[0142] It should be noted that the brief precision corresponds to the position information and identification information of the object to be rendered. The corresponding rendering result in the virtual scene may have no display information or may be displayed as a position outline; the contour precision corresponds to the contour information of the object to be rendered, and the corresponding rendering result in the virtual scene includes the contour structure and the outer contour of the object to be rendered; the detailed precision corresponds to the complete structural information and additional information of the object to be rendered, and the corresponding rendering result in the virtual scene includes the complete frame information of the object to be rendered and additional virtual objects; the interaction precision corresponds to all the information of the object to be rendered and the information for interaction, and the corresponding rendering result in the virtual scene includes all the appearance information and interaction attributes of the object to be rendered.
[0143] It should also be noted that the rendering result corresponding to the contour precision is jointly rendered by the rendering material corresponding to the contour precision and the rendering material corresponding to the brief precision; the rendering result corresponding to the detailed precision is jointly rendered by the rendering material corresponding to the detailed precision, the rendering material corresponding to the contour precision, and the rendering material corresponding to the brief precision; the rendering result corresponding to the interaction precision is jointly rendered by the rendering material corresponding to the interaction precision, the rendering material corresponding to the detailed precision, the rendering material corresponding to the contour precision, and the rendering material corresponding to the brief precision.
[0144] Exemplarily, the target rendering precision is one of the brief precision, the contour precision, the detailed precision, and the interaction precision. The first specified rendering precision can be the brief precision, the second specified rendering precision can be at least one of the contour precision, the detailed precision, and the interaction precision, and the third specified rendering precision can be at least one of the brief precision, the contour precision, and the detailed precision; for example, when the second specified rendering precision is the detailed precision, the to-be-specified rendering precision can be the contour precision.
[0145] Next, an exemplary application of the embodiments of the present application in an actual application scenario will be described. In this exemplary application, the virtual object rendering method provided by the embodiments of the present application will be described by taking the object to be rendered as a manor as an example.
[0146] In the embodiments of the present application, the server performs multi-level classification on the elements of the manor (referred to as rendering materials), and obtains elements at a brief accuracy level (for example, the location of the manor), elements at a contour accuracy level (for example, the enclosure wall of the manor, the outer contour of the manor, and some large furniture), elements at a detailed accuracy level (for example, the complete outer contour of the manor, construction elements (referred to as additional virtual objects)), and elements at an interaction accuracy level (for example, combat attributes and building attributes); among them, the elements at the brief accuracy level are used to render a brief view through the client, the elements at the contour accuracy level are used to combine the elements at the brief accuracy level to render a contour view through the client, the elements at the detailed accuracy level are used to combine the elements at the brief accuracy level and the elements at the contour accuracy level to render a detailed view through the client, and the elements at the interaction accuracy level are used to combine the elements at the brief accuracy level, the elements at the contour accuracy level, and the elements at the detailed accuracy level to render an interaction view through the client. Here, the elements at the brief accuracy level, the elements at the contour accuracy level, the elements at the detailed accuracy level, and the elements at the interaction accuracy level are respectively referred to as the rendering materials to be rendered corresponding to the rendering accuracy.
[0147] Exemplarily, refer to Figure 7 , Figure 7 which is a schematic diagram of an exemplary brief view provided by the embodiments of the present application; as Figure 7 shown, in the virtual scene 7-1, the area presented by the dotted line is the brief view 7-11, including the location of the manor, and also including the manor identifier in terms of data processing.
[0148] Exemplarily, refer to Figure 8 , Figure 8 which is a schematic diagram of an exemplary contour view provided by the embodiments of the present application; as Figure 8 shown, in the virtual scene 8-1, the area presented by the dotted line is the contour view 8-11, including the enclosure wall 8-111 of the manor presented at the location of the manor, the outer contour 8-112 of the manor, and some large furniture ( Figure 8 not shown in). Here, the contour view 8-11 includes the information (the location of the manor) included in the brief view 7-11.
[0149] Exemplarily, refer to Figure 9 , Figure 9 which is a schematic diagram of an exemplary detailed view provided by the embodiments of the present application; as Figure 9 shown, in the virtual scene 9-1, the area presented by the dotted line is the detailed view 9-11, including the construction elements 9-111 presented at the location of the manor and the complete outer contour 9-112 of the manor (including Figure 8 the outer contour 8-112 of the manor in), and also including Figure 8 the enclosure wall 8-111 of the manor in, and Figure 8Some large furniture not shown in Figure 9 is not shown).
[0150] Exemplarily, refer to Figure 10 , Figure 10 which is a schematic diagram of an exemplary interaction view provided by an embodiment of the present application; as Figure 10 shown, in the virtual scene 10-1, the area presented in the dotted line is the interaction view 10-11. In addition to including Figure 9 the information included in the detailed view 9-11 in Figure 10 it also includes combat attributes and building attributes (
[0151] not shown in
[0152] In an embodiment of the present application, in the presented virtual scene, the client realizes the switching between the brief view 7-11, the outline view 8-11, the detailed view 9-11 and the interaction view 10-11 of the manor based on the distance from the player character. Below, the process of switching the manor between the brief view 7-11, the outline view 8-11, the detailed view 9-11 and the interaction view 10-11 is described. Figure 11 Refer to Figure 11 which is a schematic flowchart of an exemplary rendering switch provided by an embodiment of the present application; as Figure 11 shown, after the player character (referred to as the first virtual object) enters the game, the game client running on the terminal (collectively referred to as the rendering device with the server) presents the virtual scene and presents the brief view 7-11 of the manor (referred to as the to-be-rendered object) rendered at the first specified rendering accuracy in the virtual scene.
[0153] When presenting the brief view 7-11 or the outline view 8-11 or the interaction view 10-11, in response to the trigger instruction of the timer (i.e., the instruction generated when the movement duration meets the movement duration condition), the distance between each manor and the player character is obtained. When it is determined that the manor is within the specified range corresponding to the detailed view 9-11 based on the distance between each manor and the player character, the detailed view 9-11 of the manor is presented in the virtual scene. That is to say, in the virtual scene, it can be switched from the outline view 8-11 to the detailed view 9-11, or from the brief view 7-11 to the detailed view 9-11, or from the interaction view 10-11 to the detailed view 9-11; among them, when switching from the brief view 7-11 to the detailed view 9-11, it can be during the process of switching from the brief view 7-11 to the outline view 8-11, and when it is determined that the distance between the manor and the player character is within the specified range corresponding to the detailed view 9-11, the switch to the outline view 8-11 is skipped and switched to the detailed view 9-11.
[0154] When presenting the brief vision 7-11, the detailed vision 9-11, or the interactive vision 10-11, in response to the trigger instruction of the timer, obtain the distance between each manor and the player character. When it is determined that the distance between the manor and the player character is within the specified range corresponding to the outline vision 8-11, present the outline vision 8-11 of the manor in the virtual scene. That is to say, in the virtual scene, it can be switched from the brief vision 7-11 to the outline vision 8-11, or from the detailed vision 9-11 to the outline vision 8-11, or from the interactive vision 10-11 to the outline vision 8-11. Among them, when switching from the interactive vision 10-11 to the outline vision 8-11, it can be during the process of switching from the interactive vision 10-1 to the detailed vision 9-11. When it is determined that the distance between the manor and the player character is within the specified range corresponding to the outline vision 8-11, skip the switch to the detailed vision 9-11 and switch to the outline vision 8-11.
[0155] When presenting the outline vision 8-11, the detailed vision 9-11, or the interactive vision 10-11, in response to the trigger instruction of the timer, obtain the distance between each manor and the player character. When it is determined that the distance between the manor and the player character is within the specified range corresponding to the brief vision 7-11, present the brief vision 7-11 of the manor in the virtual scene. That is to say, in the virtual scene, it can be switched from the outline vision 8-11 to the brief vision 7-11, or from the detailed vision 9-11 to the brief vision 7-11, or from the interactive vision 10-11 to the brief vision 7-11. Among them, when switching from the interactive vision 10-11 to the brief vision 7-11, it can be during the process of switching from the interactive vision 10-1 to the detailed vision 9-11. When it is determined that the distance between the manor and the player character is within the specified range corresponding to the outline vision 8-11, skip the switch to the detailed vision 9-11 and switch to the outline vision 8-11, and during the process of switching to the outline vision 8-11, when it is determined that the distance between the manor and the player character is within the specified range corresponding to the brief vision 7-11, skip the switch to the outline vision 8-11 and switch to the brief vision 7-11. When switching from the detailed vision 9-11 to the brief vision 7-11, it can be during the process of switching from the detailed vision 9-11 to the outline vision 8-11. When it is determined that the distance between the manor and the player character is within the specified range corresponding to the brief vision 7-11, skip the switch to the outline vision 8-11 and switch to the brief vision 7-11.
[0156] When presenting the detailed vision 9-11, in response to the trigger instruction of the timer, obtain the distance between each manor and the player character. When it is determined that the distance between the manor and the player character is within the specified range corresponding to the interactive vision 10-11 (for example, when the player enters the manor), present the interactive vision 10-11 of the manor in the virtual scene.
[0157] It should be noted that the switching between the brief vision 7-11, the contour vision 8-11, the detailed vision 9-11, and the interactive vision 10-11 may also include Figure 11 switching methods other than those described above. For example, the switching from the contour vision 8-11 to the interactive vision 10-11, and so on.
[0158] In the embodiments of the present application, the client can also determine the number of manors in the detailed vision (referred to as the rendering result corresponding to the second specified rendering precision) and the contour vision (referred to as the rendering result corresponding to the third specified rendering precision) based on the configuration of the device on which the client runs; moreover, the client can preferentially create manors that are close based on the distance between the player character and the manor; and when the client switches between various visions, it is achieved through element difference updates; that is, after the client determines the vision precision based on the distance between the player character and the manor, it pulls the corresponding manor vision elements from the server, and determines the list of elements to be deleted and modified (referred to as material update information) of the elements corresponding to the current rendering result of the manor based on the manor vision elements. Thus, the client adds, deletes, and modifies the manor elements through the list of elements to be deleted and modified to achieve the switching.
[0159] It can be understood that by dividing the elements of the manor into multiple levels, determining the rendering precision of the manor based on the distance between the player character and the manor, and the creation of the manor being an active creation process, as well as the number of manors in different visions, the rendering efficiency and flexibility of the manor are improved, the consumption of rendering resources for the manor is reduced, and the rendering effect of the virtual scene is enhanced.
[0160] Next, continue to describe the exemplary structure of the software module for the implementation of the virtual object rendering device 455 provided in the embodiments of the present application. In some embodiments, as Figure 2 shown, the software module in the virtual object rendering device 455 stored in the memory 450 may include:
[0161] The precision acquisition module 4551 is configured to determine the target rendering precision of the object to be rendered based on the distance between the first virtual object and the object to be rendered in the virtual scene;
[0162] The precision acquisition module 4551 is further configured to acquire N rendering precisions less than or equal to the target rendering precision, where N is a positive integer;
[0163] The material acquisition module 4552 is configured to determine the material to be rendered corresponding to each of the N rendering precisions based on the correspondence between the rendering precision and the material to be rendered, and obtain N materials to be rendered;
[0164] An object rendering module 4553, configured to render the material to be rendered, and present a second virtual object corresponding to the target rendering accuracy of the object to be rendered in the virtual scene.
[0165] In an embodiment of the present application, the rendering device 455 of the virtual object further includes a material division module 4554, configured to determine M rendering accuracies based on a candidate distance between the first virtual object and the object to be rendered, where M is a positive integer greater than 1, and M≥N, and the M rendering accuracies include the target rendering accuracy; obtain the rendering material corresponding to the object to be rendered; divide the rendering material based on the M rendering accuracies to obtain the material to be rendered corresponding to each of the M rendering accuracies; and combine the materials to be rendered corresponding to each of the M rendering accuracies to obtain the correspondence between the rendering accuracy and the material to be rendered.
[0166] In an embodiment of the present application, the object rendering module 4553 is further configured to obtain the current rendering material corresponding to the object to be rendered in the virtual scene; determine the material update information corresponding to the current rendering material based on a comparison result between the N materials to be rendered and the current rendering material; render the material to be rendered based on the material update information; and present the second virtual object corresponding to the target rendering accuracy of the object to be rendered in the virtual scene through the rendering of the material to be rendered.
[0167] In an embodiment of the present application, the rendering device 455 of the virtual object further includes an initial rendering module 4555, configured to, in response to a presentation request for the virtual scene, obtain the object to be rendered within the field of view of the first virtual object; for the object to be rendered, obtain the data to be rendered corresponding to a first specified rendering accuracy, where the M rendering accuracies include the first specified rendering accuracy, and the first specified rendering accuracy refers to the rendering accuracy corresponding to the object to be rendered when presenting the virtual scene; and present a third virtual object corresponding to the first specified rendering accuracy of the object to be rendered in the virtual scene by rendering the data to be rendered.
[0168] Correspondingly, in an embodiment of the present application, the object rendering module 4553 is further configured to replace the presented third virtual object with the second virtual object corresponding to the target rendering accuracy of the object to be rendered in the virtual scene by rendering the material to be rendered.
[0169] In an embodiment of the present application, the rendering device 455 of the virtual object further includes a precision switching module 4556, configured to obtain the motion state corresponding to the first virtual object, where the motion state includes at least one of a motion distance and a motion duration; when it is determined that a rendering precision detection condition is satisfied based on the motion state, in the virtual scene, obtain the distance between the first virtual object and the object to be rendered, where the rendering precision detection condition includes at least one of a motion distance condition and a motion duration condition.
[0170] In an embodiment of the present application, the rendering device 455 of the virtual object further includes a quantity control module 4557, configured to obtain K target rendering precisions corresponding to K objects to be rendered within the field of view of the first virtual object, where K is a positive integer; obtain a specified quantity corresponding to a second specified rendering precision that is positively correlated with the device rendering performance index, where M rendering precisions include the second specified rendering precision; based on the K target rendering precisions, determine at least one object to be rendered with the second specified rendering precision from the K objects to be rendered; when the target quantity corresponding to at least one object to be rendered is greater than the specified quantity, obtain the quantity difference between the target quantity and the specified quantity, and determine the quantity difference number of objects to be rendered from at least one object to be rendered; among the quantity difference number of objects to be rendered, reduce the target rendering precision corresponding to each object to be rendered to a third specified rendering precision, where M rendering precisions include the third specified rendering precision, and the third specified rendering precision is lower than the second specified rendering precision.
[0171] In an embodiment of the present application, the quantity control module 4557 is further configured to determine the quantity difference number of objects to be rendered that are the farthest in distance from at least one object to be rendered based on at least one distance between the first virtual object and at least one object to be rendered.
[0172] In an embodiment of the present application, the rendering device 455 of the virtual object further includes a quantity control module 4557, configured to obtain the degree of association between at least one object to be rendered; determine the quantity difference number of objects to be rendered with the smallest degree of association as the quantity difference number of objects to be rendered.
[0173] In an embodiment of the present application, the precision switching module 4556 is further configured to obtain the updated distance between the first virtual object and the object to be rendered in the virtual scene; when the rendering precision corresponding to the updated distance is different from the target rendering precision, determine the rendering precision corresponding to the updated distance as the new target rendering precision corresponding to the object to be rendered.
[0174] In an embodiment of the present application, the object rendering module 4553 is further configured to obtain a virtual obstacle between the first virtual object and the object to be rendered in the virtual scene, and obtain a first field of view area between the first virtual object and the object to be rendered; when a second field of view area corresponding to the virtual obstacle is greater than the first field of view area, end the rendering process of the object to be rendered.
[0175] In an embodiment of the present application, the object rendering module 4553 is further configured to determine a sequence of objects to be rendered with the rendering priorities of K objects to be rendered corresponding to the K objects to be rendered arranged in descending order based on K distances between the first virtual object and the K objects to be rendered within the field of view in the virtual scene; and sequentially render each of the objects to be rendered based on the sequence of objects to be rendered.
[0176] In an embodiment of the present application, at least two of the M rendering precisions include a brief precision, a contour precision, a detailed precision, and an interaction precision, and the precisions among the brief precision, the contour precision, the detailed precision, and the interaction precision increase in sequence.
[0177] An embodiment of the present application provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device (rendering device) reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the virtual object rendering method described above in the embodiment of the present application.
[0178] An embodiment of the present application provides a computer-readable storage medium storing executable instructions, where the executable instructions are stored. When the executable instructions are executed by a processor, the processor will be caused to execute the virtual object rendering method provided in the embodiment of the present application. For example, Figure 3 as shown in the virtual object rendering method.
[0179] In some embodiments of the present application, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disc, or CD-ROM; or may be various devices including one or any combination of the above memories.
[0180] In some embodiments of the present application, the executable instructions may be in the form of a program, software, software module, script, or code, and may be written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including being deployed as an independent program or being deployed as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0181] As an example, the executable instructions may or may not correspond to files in a file system, and may be stored as part of a file that stores other programs or data. For example, they may be stored in one or more scripts in a Hyper Text Markup Language (HTML) document, stored in a single file dedicated to the program under discussion, or stored in multiple cooperating files (e.g., files that store one or more modules, subroutines, or code portions).
[0182] As an example, the executable instructions may be deployed to execute on one computer device (in which case, this one computer device is the rendering device), or on multiple computer devices located at one location (in which case, the multiple computer devices located at one location are the rendering devices), or on multiple computer devices distributed across multiple locations and interconnected by a communication network (in which case, the multiple computer devices distributed across multiple locations and interconnected by a communication network are the rendering devices).
[0183] In summary, in the embodiments of the present application, when rendering a to-be-rendered object, the target rendering accuracy of the to-be-rendered object is determined according to the distance between the to-be-rendered object and the first virtual object, and the rendering of the to-be-rendered object is implemented through N to-be-rendered materials corresponding to N rendering accuracies less than or equal to the target rendering accuracy; therefore, the rendering data corresponding to the to-be-rendered object is related to the distance from the first virtual object, so that to-be-rendered objects with different rendering accuracies can be rendered for different distances, reducing the consumption of rendering resources; thus, the rendering efficiency of virtual objects can be improved. In addition, when the terminal pulls N to-be-rendered materials from the server based on the determined target rendering accuracy, active rendering can be achieved, reducing the transmission consumption of rendering resources; and, by controlling the number of to-be-rendered objects with the second specified rendering accuracy by the rendering device, overall control of the rendering is achieved, and the rendering effect can also be improved.
[0184] The above is only the embodiments of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A rendering method for virtual objects, characterized in that, The method includes: Obtaining the motion state corresponding to the first virtual object, where the motion state includes at least one of a motion distance and a motion duration; When it is determined that the rendering accuracy detection condition is satisfied based on the motion state, in the virtual scene, obtaining the distance between the first virtual object and the object to be rendered, where the rendering accuracy detection condition includes at least one of a motion distance condition and a motion duration condition; Based on the candidate distance between the first virtual object and the object to be rendered, determining M rendering accuracies, where M is a positive integer greater than 1, and the M rendering accuracies include at least two of a brief accuracy, a contour accuracy, a detailed accuracy, and an interaction accuracy; Based on the distance between the first virtual object and the object to be rendered, determining the target rendering accuracy of the object to be rendered, and the M rendering accuracies include the target rendering accuracy; Obtain N rendering precisions less than or equal to the target rendering precision, where N is a positive integer, and ; Based on the correspondence between the rendering accuracy and the material to be rendered, determining the material to be rendered corresponding to each of the N rendering accuracies, and obtaining N materials to be rendered; By rendering the material to be rendered, presenting a second virtual object corresponding to the target rendering accuracy of the object to be rendered in the virtual scene; Wherein, the presenting a second virtual object corresponding to the target rendering accuracy of the object to be rendered in the virtual scene by rendering the material to be rendered includes: In response to the target rendering accuracy being the contour accuracy, presenting a second virtual object corresponding to the target rendering accuracy of the object to be rendered in the virtual scene by rendering the rendering material corresponding to the contour accuracy and the rendering material corresponding to the brief accuracy; In response to the target rendering accuracy being the detailed accuracy, presenting a second virtual object corresponding to the target rendering accuracy of the object to be rendered in the virtual scene by rendering the rendering material corresponding to the contour accuracy, the rendering material corresponding to the detailed accuracy, and the rendering material corresponding to the brief accuracy; In response to the target rendering accuracy being the interaction accuracy, presenting a second virtual object corresponding to the target rendering accuracy of the object to be rendered in the virtual scene by rendering the rendering material corresponding to the contour accuracy, the rendering material corresponding to the detailed accuracy, the rendering material corresponding to the brief accuracy, and the rendering material corresponding to the interaction accuracy.
2. The method according to claim 1, wherein Before determining the material to be rendered corresponding to each of the N rendering accuracies based on the correspondence between the rendering accuracy and the material to be rendered, the method further includes: Obtaining the rendering material corresponding to the object to be rendered; Dividing the rendering material based on the M rendering accuracies to obtain the material to be rendered corresponding to each of the M rendering accuracies; Combining the materials to be rendered corresponding to each of the M rendering accuracies to obtain the correspondence between the rendering accuracy and the material to be rendered.
3. The method according to claim 1 or 2, characterized in that, Rendering the material to be rendered to present a second virtual object corresponding to the target rendering accuracy of the object to be rendered in the virtual scene includes: Obtaining the current rendering material corresponding to the object to be rendered in the virtual scene; Determining the material update information corresponding to the current rendering material based on the comparison result between the N materials to be rendered and the current rendering material; Rendering the material to be rendered based on the material update information; Presenting the second virtual object corresponding to the target rendering accuracy of the object to be rendered in the virtual scene through the rendering of the material to be rendered.
4. The method according to claim 1 or 2, characterized in that Before determining the target rendering accuracy of the object to be rendered based on the distance between the first virtual object and the object to be rendered in the virtual scene, the method further includes: In response to the presentation request of the virtual scene, obtaining the object to be rendered within the field of view of the first virtual object; For the object to be rendered, obtaining the data to be rendered corresponding to the first specified rendering accuracy, where M rendering accuracies include the first specified rendering accuracy, and the first specified rendering accuracy refers to the rendering accuracy corresponding to the object to be rendered when presenting the virtual scene; Presenting a third virtual object corresponding to the first specified rendering accuracy of the object to be rendered in the virtual scene by rendering the data to be rendered; Rendering the material to be rendered to present a second virtual object corresponding to the target rendering accuracy of the object to be rendered in the virtual scene includes: In the virtual scene, replacing the presented third virtual object with the second virtual object corresponding to the target rendering accuracy of the object to be rendered by rendering the material to be rendered.
5. The method according to claim 1 or 2, characterized in that, After determining the target rendering accuracy of the object to be rendered based on the distance between the first virtual object and the object to be rendered in the virtual scene, the method further includes: Obtaining K target rendering accuracies corresponding to K objects to be rendered within the field of view of the first virtual object, where K is a positive integer; Obtaining the specified quantity corresponding to the second specified rendering accuracy that is positively correlated with the device rendering performance index, where M rendering accuracies include the second specified rendering accuracy; Determining at least one object to be rendered with the second specified rendering accuracy from the K objects to be rendered based on the K target rendering accuracies; When the target quantity corresponding to at least one object to be rendered is greater than the specified quantity, obtaining the quantity difference between the target quantity and the specified quantity, and determining the quantity difference number of objects to be rendered from at least one object to be rendered; Reducing the target rendering accuracy corresponding to each object to be rendered among the quantity difference number of objects to be rendered to a third specified rendering accuracy, where M rendering accuracies include the third specified rendering accuracy, and the third specified rendering accuracy is lower than the second specified rendering accuracy.
6. The method according to claim 5, wherein Determining the quantity difference number of objects to be rendered from at least one object to be rendered includes: Based on at least one distance between the first virtual object and at least one of the objects to be rendered, determine the quantity-difference number of the objects to be rendered that are the farthest away from among at least one of the objects to be rendered.
7. The method according to claim 5, wherein The determining the quantity-difference number of the objects to be rendered from among at least one of the objects to be rendered includes: Obtain the degree of association between at least one of the objects to be rendered; Determine the quantity-difference number of the objects to be rendered with the smallest degree of association as the quantity-difference number of the objects to be rendered.
8. The method according to claim 1 or 2, characterized in that After presenting, in the virtual scene, a second virtual object corresponding to the target rendering precision of the object to be rendered by rendering the material to be rendered, the method further includes: In the virtual scene, obtain the updated distance between the first virtual object and the object to be rendered; When the rendering precision corresponding to the updated distance is different from the target rendering precision, determine the rendering precision corresponding to the updated distance as the new target rendering precision corresponding to the object to be rendered.
9. The method according to claim 1 or 2, characterized in that, After determining, in the virtual scene, the target rendering precision of the object to be rendered based on the distance between the first virtual object and the object to be rendered, the method further includes: In the virtual scene, obtain the virtual obstacle between the first virtual object and the object to be rendered, and obtain the first field of view area between the first virtual object and the object to be rendered; When the second field of view area corresponding to the virtual obstacle is greater than the first field of view area, end the rendering process of the object to be rendered.
10. The method according to claim 5, characterized in that, After obtaining the K target rendering precisions corresponding to the K objects to be rendered within the field of view of the first virtual object, the method further includes: In the virtual scene, based on the K distances between the first virtual object and the K objects to be rendered within the field of view, determine a sequence of objects to be rendered with the rendering priorities of the K objects to be rendered arranged in descending order; Based on the sequence of objects to be rendered, render each of the objects to be rendered in sequence.
11. A rendering device for virtual objects, characterized in that The rendering device for the virtual object includes: An accuracy acquisition module is used to acquire the motion state corresponding to the first virtual object, where the motion state includes at least one of a motion distance and a motion duration; when it is determined that a rendering accuracy detection condition is satisfied based on the motion state, in the virtual scene, acquire the distance between the first virtual object and the object to be rendered, where the rendering accuracy detection condition includes at least one of a motion distance condition and a motion duration condition; based on the candidate distance between the first virtual object and the object to be rendered, determine M rendering accuracies, where M is a positive integer greater than 1, and the M rendering accuracies include at least two of a brief accuracy, a contour accuracy, a detailed accuracy, and an interaction accuracy; based on the distance between the first virtual object and the object to be rendered, determine the target rendering accuracy of the object to be rendered, and the M rendering accuracies include the target rendering accuracy; acquire N rendering accuracies less than or equal to the target rendering accuracy, where N is a positive integer, and ; A material acquisition module, configured to determine the material to be rendered corresponding to each of the N rendering precisions based on the correspondence between the rendering precision and the material to be rendered, to obtain N materials to be rendered; An object rendering module, configured to present, in the virtual scene, a second virtual object corresponding to the target rendering precision of the object to be rendered by rendering the material to be rendered; The object rendering module is further configured to, in response to the target rendering precision being the contour precision, present a second virtual object corresponding to the target rendering precision of the object to be rendered in the virtual scene by rendering the rendering materials corresponding to the contour precision and the rendering materials corresponding to the brief precision; in response to the target rendering precision being the detailed precision, present a second virtual object corresponding to the target rendering precision of the object to be rendered in the virtual scene by rendering the rendering materials corresponding to the contour precision, the rendering materials corresponding to the detailed precision, and the rendering materials corresponding to the brief precision; and in response to the target rendering precision being the interaction precision, present a second virtual object corresponding to the target rendering precision of the object to be rendered in the virtual scene by rendering the rendering materials corresponding to the contour precision, the rendering materials corresponding to the detailed precision, the rendering materials corresponding to the brief precision, and the rendering materials corresponding to the interaction precision.
12. A rendering device for virtual objects, characterized in that, The rendering device of the virtual object includes: a memory for storing executable instructions; a processor for implementing the rendering method of the virtual object according to any one of claims 1 to 10 when executing the executable instructions stored in the memory.
13. A computer-readable storage medium stores executable instructions, characterized in that, The executable instructions, when being executed by the processor, implement the rendering method of the virtual object according to any one of claims 1 to 10.
14. A computer program product, comprising computer-executable instructions or a computer program, characterized in that, The computer executable instructions or the computer program, when being executed by the processor, implement the rendering method of the virtual object according to any one of claims 1 to 10.
Citation Information
Patent Citations
Method and device for rendering game roles in virtual scene and electronic equipment
CN113181641A