Object rendering method and device, computer equipment and readable storage medium

By obtaining the location information and movement time of virtual characters on virtual terrain in the game, and using rendering texture cache sampling path patterns, the effect of character walking through leaving luminous and halo residues is achieved, solving the high performance consumption in the existing technology and The problem of poor results improves rendering efficiency and visual experience.

CN119280799APending Publication Date: 2025-01-10SHANGHAI PERFECT WORLD SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311657425.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-05
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The prior art uses real-time point light sources in games to achieve the effect of character passing through the luminescence and halo residual effects, which consumes high performance, resulting in a reduced rendering efficiency and the effect of gradual disappearance of halos cannot be achieved.

Method used

By obtaining the position information of the virtual character on the virtual terrain, calculating UV information, sampling the moving path pattern based on the rendering texture cache, and obtaining transition parameters based on the movement time, rendering the mask object to achieve the luminous gradient effect, so that the character can pass by and leave it to luminous. and halo residual effect.

Benefits of technology

Save rendering batches, improve player interaction and visual effects, achieve the effect of gradually disappearing halos, and reduce performance consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119280799A_ABST
    Figure CN119280799A_ABST
Patent Text Reader

Abstract

The invention provides an object rendering method and device, computer equipment and a readable storage medium, and relates to the field of game making. The method comprises the steps that the position of a virtual character on a virtual terrain in a current frame is acquired, and UV information of the contact position of the virtual character and the virtual terrain is calculated according to the position; a current moving path pattern of the virtual character is sampled in a rendering texture cache based on the UV information, the rendering texture cache is used for superposing the path pattern of each frame of the virtual character, and the current moving path pattern is the superposition of the path pattern of the current frame and the path pattern of the frame before the current frame; obtaining a transition parameter, wherein the transition parameter is related to the moving time of the virtual character on the virtual terrain; the current moving path pattern serves as a mask object, the mask object is rendered according to transition parameters, and the transition parameters are used for controlling the light emitting gradual change effect of the mask object along with the moving time. According to the invention, the effect of light emission and halo residue after the role passes is achieved, and the operation rendering batch is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of game production, and in particular to an object rendering method, device, computer equipment and readable storage medium. Background Art

[0002] In game scenes, some special effects are required, such as leaving glowing and halo effects when a character walks on flowers and plants. In related technologies, a real-time point light source is hung on the character, which makes the point light brighter when the character moves and turns off when the character stops. However, the use of real-time point light sources consumes a lot of performance, increases rendering batches, and significantly reduces the efficiency of scene rendering. In addition, it can only achieve glowing, but cannot achieve the effect of the halo gradually disappearing. Summary of the invention

[0003] In view of this, the present application provides an object rendering method, apparatus, computer device and readable storage medium, which achieve the effect of leaving glow and halo residue when a character walks by.

[0004] In a first aspect, an embodiment of the present application provides an object rendering method, comprising:

[0005] Acquire the position of the virtual character on the virtual terrain in the current frame, and calculate UV information of the contact position between the virtual character and the virtual terrain according to the position;

[0006] Based on the UV information, a current moving path pattern of the virtual character is sampled in a rendering texture cache, wherein the rendering texture cache is used to superimpose the path pattern of the virtual character in each frame, and the current moving path pattern is a superposition of the path pattern of the current frame and the path pattern of the frame before the current frame;

[0007] Acquire a transition parameter, wherein the transition parameter is related to a movement time of the virtual character on the virtual terrain;

[0008] The current moving path pattern is used as a mask object, and the mask object is rendered according to the transition parameters, wherein the transition parameters are used to control the gradual luminescence effect of the mask object along with the moving time.

[0009] According to the above method of the embodiment of the present application, the following additional technical features may also be provided:

[0010] In the above technical solution, optionally, the method further includes:

[0011] Determining a rendering texture cache according to a terrain size of the virtual terrain;

[0012] The walking path patterns of the virtual character in each frame are superimposed to generate a plurality of moving path patterns, and the plurality of moving path patterns are stored in the rendering texture cache.

[0013] In any of the above technical solutions, optionally, a method for determining the path pattern of any frame includes:

[0014] Calculating UV information of a contact position between the virtual character and the virtual terrain according to the terrain size of the virtual terrain and the character world space position of the virtual character;

[0015] The pattern texture of the preset luminous pattern is sampled through the UV information to obtain the path pattern of the virtual character walking in any frame.

[0016] In any of the above technical solutions, optionally, superimposing the walking path patterns of the virtual character in all frames to generate a moving path pattern includes:

[0017] The path pattern of any frame is copied to the rendering texture cache, and the path pattern is superimposed with the path patterns of all frames before the any frame to generate the moving path pattern of the any frame.

[0018] In any of the above technical solutions, optionally, the method further includes:

[0019] The moving path pattern in the rendering texture cache is downsampled to achieve edge blurring of the moving path pattern.

[0020] In any of the above technical solutions, optionally, the method further includes:

[0021] During the movement of the virtual character, the transition parameter is calculated according to the movement time of the virtual character.

[0022] In any of the above technical solutions, optionally, rendering the luminous effect of the mask object in combination with the transition parameter includes:

[0023] According to the transition parameter, the brightness value of the mask object as the light and dark changes over the moving time is calculated;

[0024] The luminous gradient effect of the mask object is rendered according to the brightness value.

[0025] In a second aspect, an embodiment of the present application provides an object rendering device, including:

[0026] A first information acquisition module is used to acquire the position of the virtual character on the virtual terrain in the current frame, and calculate UV information of the contact position between the virtual character and the virtual terrain according to the position;

[0027] A second information acquisition module is configured to sample the current moving path pattern of the virtual character in a rendering texture cache based on the UV information, the rendering texture cache being used to superimpose the path pattern of the virtual character in each frame, the current moving path pattern being the superposition of the path pattern of the current frame and the path pattern of the frame before the current frame; and to acquire a transition parameter, the transition parameter being related to the moving time of the virtual character on the virtual terrain;

[0028] A rendering module is used to use the current moving path pattern as a mask object and render the mask object according to the transition parameters, wherein the transition parameters are used to control the luminous gradient effect of the mask object along with the moving time.

[0029] In a third aspect, an embodiment of the present application provides a computer device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be executed on the processor, and when the programs or instructions are executed by the processor, the steps of the method of the first aspect are implemented.

[0030] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method of the first aspect are implemented.

[0031] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method of the first aspect.

[0032] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method of the first aspect.

[0033] In the embodiment of the present application, when the virtual character moves on the virtual terrain, multiple frames of images are generated. The position of the virtual character on the virtual terrain is determined in the current frame image, and the UV information of the contact position between the virtual character and the virtual terrain is calculated according to the position of the virtual character, that is, the UV information of the foot of the virtual character. Further, the current moving path pattern of the virtual character is sampled in the rendering texture cache according to the UV information, that is, the rendering texture cache pre-stores the moving path pattern superimposed with the path pattern of the virtual character walking in each frame image, and there is a corresponding relationship between a moving path pattern and a UV information, so that the current moving path pattern corresponding to the UV information can be obtained from the multiple moving path patterns stored in the rendering texture cache. And, the transition parameters related to the moving time of the virtual character on the virtual terrain are obtained, and the transition parameters can control the luminous gradient effect of the moving path pattern of the virtual character when rendering is performed later. When rendering, the current moving path pattern is used as a mask object, and the mask object is rendered according to the transition parameters, so that the mask object can achieve the effect of luminescence and gradual change over time.

[0034] In the embodiment of the present application, during the movement of the virtual character, the movement path pattern sampled in the rendering texture cache is used as a mask object, and the mask object is gradually changed over the movement time according to the transition parameters, thereby achieving the effect of leaving glow and halo residues as the character passes by, saving running rendering batches and enhancing the player's sense of interaction and visual effects.

[0035] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0037] Figure 1 One of the flowcharts of the object rendering method according to an embodiment of the present application is shown;

[0038] Figure 2 A second flowchart of the object rendering method according to an embodiment of the present application is shown;

[0039] Figure 3 A schematic diagram showing the rendering effect of an embodiment of the present application;

[0040] Figure 4A structural block diagram of an object rendering device according to an embodiment of the present application is shown;

[0041] Figure 5 A structural block diagram of a computer device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0043] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0044] The object rendering method, apparatus, computer device, and readable storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0045] The present application embodiment provides an object rendering method, such as Figure 1 As shown, the method includes:

[0046] Step 101, obtaining the position of the virtual character on the virtual terrain in the current frame, and calculating UV information of the contact position between the virtual character and the virtual terrain according to the position;

[0047] Step 102, sampling the current moving path pattern of the virtual character in the rendering texture cache based on the UV information, the rendering texture cache is used to superimpose the path pattern of the virtual character in each frame, and the current moving path pattern is the superposition of the path pattern of the current frame and the path pattern of the frame before the current frame;

[0048] Step 103, obtaining a transition parameter, where the transition parameter is related to the moving time of the virtual character on the virtual terrain;

[0049] Step 104: Use the current moving path pattern as a mask object and render the mask object according to transition parameters, wherein the transition parameters are used to control the gradual luminescence effect of the mask object over the moving time.

[0050] In this embodiment, when the virtual character moves on the virtual terrain, multiple frames of images are generated. The position of the virtual character on the virtual terrain is determined in the current frame image, and the UV information of the contact position between the virtual character and the virtual terrain is calculated based on the position of the virtual character, that is, the UV information of the virtual character's feet.

[0051] Furthermore, the current moving path pattern of the virtual character is sampled in a render texture (RT) cache according to the UV information. That is, the render texture cache pre-stores a moving path pattern superimposed with the path pattern of the virtual character in each frame image. For example, the current moving path pattern of the current frame is obtained by superimposing the path pattern of the current frame with the path patterns of all frames before the current frame, and there is a corresponding relationship between one moving path pattern and one UV information, so that the current moving path pattern corresponding to the UV information can be obtained from multiple moving path patterns stored in the render texture cache.

[0052] Furthermore, a transition parameter related to the moving time of the virtual character on the virtual terrain is obtained, and the transition parameter can control the luminous gradient effect of the moving path pattern of the virtual character during subsequent rendering.

[0053] The current moving path pattern is used as a mask object (also known as a path mask), and the mask object is rendered according to the transition parameters, so that the mask object can achieve the effect of luminescence and gradual change over time. For example, in the plant material, the current moving path pattern is used as a mask object, and the brightness of the mask object is gradually increased over time, so that the mask object gradually turns white. Figure 3 As shown, the rendering effect of the plant's glow gradually disappearing when the character approaches is achieved.

[0054] It should be noted that the order of step 102 and step 103 is not specifically limited, and the transition parameters may be obtained first and then the current moving path pattern of the virtual character, or both may be obtained at the same time.

[0055] In the embodiment of the present application, during the movement of the virtual character, the movement path pattern sampled in the rendering texture cache is used as a mask object, and the mask object is gradually changed over the movement time according to the transition parameters, thereby achieving the effect of leaving glow and halo residues as the character passes by, saving running rendering batches and enhancing the player's sense of interaction and visual effects.

[0056] As a refinement and extension of the above embodiment, the embodiment of the present invention provides another object rendering method, such as Figure 2 As shown, the method includes:

[0057] Step 201, determining a rendering texture cache according to the terrain size of the virtual terrain;

[0058] Step 202, superimposing the walking path patterns of the virtual character in each frame to generate multiple moving path patterns, and storing the multiple moving path patterns in the rendering texture cache;

[0059] Step 203, obtaining the position of the virtual character on the virtual terrain in the current frame, and calculating UV information of the contact position between the virtual character and the virtual terrain according to the position;

[0060] Step 204, sampling the current moving path pattern of the virtual character in the rendering texture cache based on the UV information, the rendering texture cache is used to superimpose the path pattern of the virtual character in each frame, and the current moving path pattern is the superposition of the path pattern of the current frame and the path pattern of the frame before the current frame;

[0061] Step 205, obtaining a transition parameter, where the transition parameter is related to the moving time of the virtual character on the virtual terrain;

[0062] Step 206: Use the current moving path pattern as a mask object and render the mask object according to transition parameters, wherein the transition parameters are used to control the gradual luminescence effect of the mask object over the moving time.

[0063] Among them, step 203 to step 206 are the same as or similar to step 101 to step 104 in the above embodiment, and are not described again here.

[0064] In this embodiment, a rendering texture cache is applied according to the terrain size of the virtual terrain. For example, if the terrain size of the virtual terrain is 512, a rendering texture cache of 512 is applied. By applying for a rendering texture cache of a suitable size according to the terrain size ratio of the virtual terrain, the subsequent rendering effect is ensured while avoiding memory occupation.

[0065] Furthermore, multiple movement path patterns of the virtual character are stored in the rendering texture cache. Specifically, the walking path pattern of the virtual character in each frame is superimposed with the walking path pattern of the virtual character in the previous frame to obtain multiple different movement path patterns, one frame of image corresponds to one movement path pattern, and the movement path pattern is stored in the rendering texture cache.

[0066] In an embodiment of the present application, the path patterns of the characters walking in all frames are superimposed in advance to obtain a moving path pattern corresponding to each frame image, and the moving path pattern is stored in a rendering texture cache. In subsequent rendering, the moving path pattern is used as a mask to achieve a luminous effect.

[0067] In one embodiment of the present application, a method for determining a path pattern of any frame includes:

[0068] Calculate UV information of a contact position between the virtual character and the virtual terrain according to the terrain size of the virtual terrain and the character world space position of the virtual character;

[0069] The pattern texture of the preset luminous pattern is sampled through UV information to obtain the path pattern of the virtual character walking in any frame.

[0070] In one embodiment of the present application, the walking path patterns of the virtual characters in all frames are superimposed to generate a moving path pattern, including:

[0071] The path pattern of any frame is copied to the rendering texture cache, and the path pattern is superimposed with the path patterns of all frames before any frame to generate the moving path pattern of any frame.

[0072] In this embodiment, the path pattern of each frame is obtained by sampling the pattern texture according to the UV information of the contact position between the virtual character and the virtual terrain.

[0073] Specifically, for any frame of image, firstly, the world coordinate ratio and the character rotation angle are calculated according to the data such as the character world space position of the virtual character and the terrain size of the virtual terrain, and then the UV information of the contact position between the virtual character and the virtual terrain is calculated according to the world coordinate ratio and the character rotation angle. For example, the coordinate XZ of the character world space position of the virtual character is divided by the terrain size, and the coordinate Y of the character world space position of the virtual character is divided by 180 and multiplied by 3.14. Based on the obtained two world coordinate ratio data, the UV information is obtained by the following calculation:

[0074] UV_rotated.x=cos(theta)×UV.x+sin(theta)×UV.y;

[0075] UV_rotated.y=-sin(theta)×UV.x+cos(theta)×UV.y;

[0076] Among them, (UV.x, UV.y) is the original world coordinate scale data, (UV_rotated.x, UV_rotated.y) is the UV information, and theta is the character rotation angle.

[0077] Then, a pattern texture of a preset luminous pattern is sampled through UV information sampling as the path pattern for the virtual character to walk in the frame.

[0078] Through the above method, a corresponding path pattern can be obtained for each frame. Furthermore, the path pattern is stored in the rendering texture cache, and the path patterns corresponding to different frames are stored in the rendering texture cache. Subsequently, the path pattern corresponding to a frame image and the path pattern corresponding to the frame before the frame image are superimposed to obtain the moving path pattern of the frame. For example, the path patterns from the 1st frame to the i-th frame are superimposed to obtain the moving path pattern of the i-th frame image; the path patterns from the 1st frame to the i+1th frame are superimposed to obtain the moving path pattern of the i+1th frame image. And the multiple moving path patterns obtained are stored in the rendering texture cache for subsequent rendering.

[0079] In an embodiment of the present application, a moving path pattern that is subsequently used as a mask object is obtained by acquiring a path pattern of a virtual character's walking and superimposing the path patterns, thereby achieving an effect of gradually disappearing light based on the mask object when the character moves.

[0080] In one embodiment of the present application, the method further includes:

[0081] The moving path pattern in the rendering texture cache is downsampled to achieve edge blurring of the moving path pattern.

[0082] In this embodiment, after the moving path pattern is generated and stored in the rendering texture cache, the moving path pattern in the rendering texture cache is downsampled to achieve edge blurring of the moving path pattern. For example, the resolution of the moving path pattern is divided by a coefficient to achieve blurring of the moving path pattern, thereby avoiding abrupt mask edges and improving visual effects.

[0083] In one embodiment of the present application, the method further includes:

[0084] During the movement of the avatar, the transition parameter is calculated according to the movement time of the avatar.

[0085] In this embodiment, a value that gradually changes over time, namely a transition parameter, is calculated according to the movement of the virtual character and the movement time of the virtual character. The transition parameter is used in the subsequent production of the gradient of the mask object, thereby achieving a luminous gradient effect of the moving path.

[0086] In one embodiment of the present application, rendering the luminous effect of the mask object in combination with the transition parameters includes:

[0087] According to the transition parameters, the brightness value of the mask object as the light and dark changes over the moving time is calculated;

[0088] Renders a glow gradient effect of the masked object based on the brightness value.

[0089] In this embodiment, as the virtual character moves over time, the brightness value of the mask object is gradually changed using transition parameters to achieve the effect of the light gradually disappearing. For example, on a white virtual terrain image, there is a black moving path pattern, and the brightness of the moving path pattern is gradually increased, and finally the moving path pattern becomes completely white, making the black path disappear.

[0090] Through the above method, the luminous and halo residual effects of the moving path of the virtual character are achieved.

[0091] In summary, in the embodiment of the present application, a rendering texture cache is determined according to the size of the terrain, and the rendering texture cache continuously superimposes the path pattern of the virtual character walking in each frame to obtain multiple moving path patterns, and the moving path pattern in the rendering texture cache is downsampled to achieve edge blur. The UV information of the contact position between the virtual character and the virtual terrain is calculated according to the position of the virtual character, and the moving path pattern in the rendering texture cache is sampled by UV information and used as a mask in the plant material to achieve a luminous effect, and according to the transition parameters, the mask gradually disappears as the virtual character moves over time.

[0092] Furthermore, as a specific implementation of the above object rendering method, an embodiment of the present application provides an object rendering device. Figure 4 As shown, the object rendering device 400 includes: a first information acquisition module 401 , a second information acquisition module 402 and a rendering module 403 .

[0093] The first information acquisition module 401 is used to acquire the position of the virtual character on the virtual terrain in the current frame, and calculate the UV information of the contact position between the virtual character and the virtual terrain according to the position;

[0094] The second information acquisition module 402 is used to sample the current moving path pattern of the virtual character in the rendering texture cache based on the UV information, the rendering texture cache is used to superimpose the path pattern of the virtual character in each frame, and the current moving path pattern is the superposition of the path pattern of the current frame and the path pattern of the frame before the current frame; and obtain transition parameters, which are related to the moving time of the virtual character on the virtual terrain;

[0095] The rendering module 403 is used to use the current moving path pattern as a mask object and render the mask object according to transition parameters, wherein the transition parameters are used to control the luminous gradient effect of the mask object over the moving time.

[0096] In this embodiment, when the virtual character moves on the virtual terrain, multiple frames of images are generated. The position of the virtual character on the virtual terrain is determined in the current frame image, and the UV information of the contact position between the virtual character and the virtual terrain is calculated according to the position of the virtual character, that is, the UV information of the foot of the virtual character. Further, the current moving path pattern of the virtual character is sampled in the rendering texture cache according to the UV information, that is, the rendering texture cache pre-stores the moving path pattern superimposed with the path pattern of the virtual character walking in each frame image, and there is a corresponding relationship between a moving path pattern and a UV information, so that the current moving path pattern corresponding to the UV information can be obtained from the multiple moving path patterns stored in the rendering texture cache. And, the transition parameters related to the moving time of the virtual character on the virtual terrain are obtained, and the transition parameters can control the luminous gradient effect of the moving path pattern of the virtual character when rendering is performed later. When rendering, the current moving path pattern is used as a mask object, and the mask object is rendered according to the transition parameters, so that the mask object can achieve the effect of luminescence and gradient change over time.

[0097] In the embodiment of the present application, during the movement of the virtual character, the movement path pattern sampled in the rendering texture cache is used as a mask object, and the mask object is gradually changed over the movement time according to the transition parameters, thereby achieving the effect of leaving glow and halo residues as the character passes by, saving running rendering batches and enhancing the player's sense of interaction and visual effects.

[0098] In the above technical solution, optionally, the device further includes:

[0099] A cache determination module, used for determining a rendering texture cache according to a terrain size of the virtual terrain;

[0100] The pattern cache module is used to superimpose the path patterns of the virtual character in each frame to generate multiple moving path patterns, and store the multiple moving path patterns in the rendering texture cache.

[0101] In any of the above technical solutions, optionally, a method for determining a path pattern of any frame includes:

[0102] Calculate UV information of a contact position between the virtual character and the virtual terrain according to the terrain size of the virtual terrain and the character world space position of the virtual character;

[0103] The pattern texture of the preset luminous pattern is sampled through UV information to obtain the path pattern of the virtual character walking in any frame.

[0104] In any of the above technical solutions, optionally, the pattern cache module is specifically used to:

[0105] The path pattern of any frame is copied to the rendering texture cache, and the path pattern is superimposed with the path patterns of all frames before any frame to generate the moving path pattern of any frame.

[0106] In any of the above technical solutions, optionally, the pattern cache module is further used to:

[0107] The moving path pattern in the rendering texture cache is downsampled to achieve edge blurring of the moving path pattern.

[0108] In any of the above technical solutions, optionally, the second information acquisition module 402 is specifically used to:

[0109] During the movement of the avatar, the transition parameter is calculated according to the movement time of the avatar.

[0110] In any of the above technical solutions, optionally, the rendering module 403 is specifically used to:

[0111] According to the transition parameters, the brightness value of the mask object as the light and dark changes over the moving time is calculated;

[0112] Renders a glow gradient effect of the masked object based on the brightness value.

[0113] The object rendering device 400 in the embodiment of the present application can be a computer device, or a component in the computer device, such as an integrated circuit or a chip. The computer device can be a terminal, or other devices other than a terminal. Exemplarily, the computer device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted computer device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (Augmented Reality, AR) / virtual reality (Virtual Reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (Ultra-Mobile Personal Computer, UMPC), a netbook or a personal digital assistant (Personal Digital Assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (Personal Computer, PC), a television (Television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0114] The object rendering device 400 provided in the embodiment of the present application can achieve Figure 1 and Figure 2 To avoid repetition, the various processes implemented in the object rendering method embodiment are not described here.

[0115] The present application also provides a computer device, such as Figure 5 As shown, the computer device 500 includes a processor 501 and a memory 502. The memory 502 stores programs or instructions that can be executed on the processor 501. When the program or instruction is executed by the processor 501, the various steps of the above-mentioned object rendering method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0116] It should be noted that the computer devices in the embodiments of the present application include mobile computer devices and non-mobile computer devices.

[0117] The memory 502 can be used to store software programs and various data. The memory 502 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 502 may include a volatile memory or a non-volatile memory, or the memory 502 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 502 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0118] The processor 501 may include one or more processing units; optionally, the processor 501 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 501.

[0119] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned object rendering method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0120] An embodiment of the present application also provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned object rendering method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0121] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0122] An embodiment of the present application also provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned object rendering method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0123] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0124] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. An object rendering method, characterized in that: include: Acquire the position of the virtual character on the virtual terrain in the current frame, and calculate UV information of the contact position between the virtual character and the virtual terrain according to the position; Based on the UV information, a current moving path pattern of the virtual character is sampled in a rendering texture cache, wherein the rendering texture cache is used to superimpose the path pattern of the virtual character in each frame, and the current moving path pattern is a superposition of the path pattern of the current frame and the path pattern of the frame before the current frame; Acquire a transition parameter, wherein the transition parameter is related to a movement time of the virtual character on the virtual terrain; The current moving path pattern is used as a mask object, and the mask object is rendered according to the transition parameters, wherein the transition parameters are used to control the gradual luminescence effect of the mask object along with the moving time.

2. The method according to claim 1, characterized in that The method further comprises: Determining a rendering texture cache according to a terrain size of the virtual terrain; The walking path patterns of the virtual character in each frame are superimposed to generate a plurality of moving path patterns, and the plurality of moving path patterns are stored in the rendering texture cache.

3. The method according to claim 2, characterized in that The method for determining the path pattern of any frame includes: Calculating UV information of a contact position between the virtual character and the virtual terrain according to the terrain size of the virtual terrain and the character world space position of the virtual character; The pattern texture of the preset luminous pattern is sampled through the UV information to obtain the path pattern of the virtual character walking in any frame.

4. The method according to claim 3, characterized in that The step of superimposing the walking path patterns of the virtual character in all frames to generate a moving path pattern comprises: The path pattern of any frame is copied to the rendering texture cache, and the path pattern is superimposed with the path patterns of all frames before the any frame to generate the moving path pattern of the any frame.

5. The method according to claim 2, characterized in that: The method further comprises: The moving path pattern in the rendering texture cache is downsampled to achieve edge blurring of the moving path pattern.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: During the movement of the virtual character, the transition parameter is calculated according to the movement time of the virtual character.

7. The method according to any one of claims 1 to 5, characterized in that The rendering of the luminous effect of the mask object in combination with the transition parameter comprises: According to the transition parameter, the brightness value of the mask object as the light and dark changes over the moving time is calculated; The luminous gradient effect of the mask object is rendered according to the brightness value.

8. An object rendering device, characterized in that: include: A first information acquisition module is used to acquire the position of the virtual character on the virtual terrain in the current frame, and calculate UV information of the contact position between the virtual character and the virtual terrain according to the position; A second information acquisition module is configured to sample the current moving path pattern of the virtual character in a rendering texture cache based on the UV information, the rendering texture cache being used to superimpose the path pattern of the virtual character in each frame, the current moving path pattern being the superposition of the path pattern of the current frame and the path pattern of the frame before the current frame; and to acquire a transition parameter, the transition parameter being related to the moving time of the virtual character on the virtual terrain; A rendering module is used to use the current moving path pattern as a mask object and render the mask object according to the transition parameters, wherein the transition parameters are used to control the luminous gradient effect of the mask object along with the moving time.

9. A computer device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction running on the processor, and when the program or instruction is executed by the processor, the steps of the object rendering method according to any one of claims 1 to 7 are implemented.

10. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by a processor, the steps of the object rendering method according to any one of claims 1 to 7 are implemented.