Texture rendering method and device, medium, electronic equipment and program product

By determining the target tile in the game scene and performing local texture updates, the problem of insufficient dynamic refresh performance of event textures in the prior art is solved, and efficient event texture rendering and dynamic updates are achieved on mobile terminals.

CN120070703APending Publication Date: 2025-05-30BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510174403.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-17
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The prior art cannot realize dynamic refresh of event textures in game scenarios while taking into account the operating performance of the equipment. Especially on mobile terminals, the performance of massive event texture rendering and dynamic updates is insufficient.

Method used

By determining the target tiles whose event texture changes occur in the target virtual object, and based on the event texture after the target tiles is changed, the texture data corresponding to the target tiles in the virtual texture of the target virtual object is partially updated to obtain the updated virtual texture, and then display the target virtual object based on the updated virtual texture.

Benefits of technology

It supports dynamic refresh of event textures in game scenes while taking into account the performance of the equipment, reducing performance consumption, especially on mobile terminals, and supports massive event texture rendering and dynamic updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070703A_ABST
    Figure CN120070703A_ABST
Patent Text Reader

Abstract

The invention provides a texture rendering method, a texture rendering device, a medium, electronic equipment and a program product, and relates to the technical field of computers. According to the embodiment of the invention, the texture data corresponding to the target tile in the virtual texture of the target virtual object is updated to obtain the updated virtual texture, and then the target virtual object is displayed based on the updated virtual texture, so that on the basis of the virtual texture, local updating can be carried out on the texture data subjected to event texture change, and the texture change accuracy is improved. Therefore, the dynamic updating capability of the event texture is realized with relatively low performance cost, so that the event texture in a game scene can be dynamically refreshed under the condition of considering the running performance of equipment. Especially on a mobile terminal, massive event texture rendering and event texture dynamic updating can be supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to a texture rendering method, apparatus, medium, electronic device, and program product. Background Art

[0002] In a game scene, decals are generally used to make the game scene more realistic and vivid. For example, in a game scene, decals can be used to achieve effects such as bullet holes and stickers. In the related art, dynamic decals or static decals can generally be used to draw decals in a game scene. For dynamic decals, the scene depth needs to be used, and the OverDraw is relatively high. Especially when a large number of decals are drawn, it will cause a greater impact on the performance of the device. Static decals are pre-rendered and cannot be changed arbitrarily during operation. If the decals are refreshed, the static decals need to be re-rendered, and the rendering overhead is not less than that of dynamic decals. Therefore, the related art cannot provide a texture rendering technology that can be dynamically refreshed and can also take into account the running performance of the device. Summary of the Invention

[0003] This Summary of the Invention section is provided to introduce concepts in a brief form, which will be described in detail in the subsequent Detailed Description section. This Summary of the Invention section is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to be used to limit the scope of the claimed technical solution.

[0004] In a first aspect, the present disclosure provides a texture rendering method, including: responding to an event for triggering an event texture change of a target virtual object in a virtual scene, and determining a target tile where the event texture change of the target virtual object occurs; updating texture data corresponding to the target tile in the virtual texture of the target virtual object based on the event texture after the change of the target tile, to obtain an updated virtual texture; displaying the target virtual object based on the updated virtual texture.

[0005] In a second aspect, the present disclosure provides a texture rendering apparatus, including: a determination module configured to respond to an event for triggering an event texture change of a target virtual object in a virtual scene, and determine a target tile where the event texture change of the target virtual object occurs; an update module configured to update texture data corresponding to the target tile in the virtual texture of the target virtual object based on the event texture after the change of the target tile, to obtain an updated virtual texture; a display module configured to display the target virtual object based on the updated virtual texture.

[0006] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, and when the computer program is executed by a processing device, the steps of the method described in the first aspect are implemented.

[0007] In a fourth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; a processing device configured to execute the computer program in the storage device to implement the steps of the method described in the first aspect.

[0008] In a fifth aspect, the present disclosure provides a computer program product including a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0009] Based on the above technical solutions, by determining the target tile where the event texture of the target virtual object changes, and based on the changed event texture of the target tile, updating the texture data corresponding to the target tile in the virtual texture of the target virtual object to obtain an updated virtual texture, and then displaying the target virtual object based on the updated virtual texture, not only can the dynamic update ability of the event texture be achieved with a relatively small performance cost by locally updating the texture data where the event texture changes on the basis of the virtual texture, so as to support the dynamic refresh of the event texture in the game scene while taking into account the running performance of the device. Especially on mobile terminals, it can support the rendering of a large number of event textures and the dynamic update of event textures.

[0010] Other features and advantages of the present disclosure will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In combination with the drawings and with reference to the following specific implementation, the above and other features, advantages and aspects of the various embodiments of the present disclosure will become more obvious. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic, and the original components and elements are not necessarily drawn to scale. In the drawings: Figure 1 is a schematic diagram of a tile shown according to an exemplary embodiment.

[0012] Figure 2 is a flowchart of texture update of a tile shown according to an exemplary embodiment.

[0013] Figure 3 is an effect diagram of frame-by-frame update shown according to an exemplary embodiment.

[0014] Figure 4 is a flowchart of a texture rendering method shown according to an exemplary embodiment.

[0015] Figure 5 is Figure 4 The detailed flowchart of step 420 shown above.

[0016] Figure 6 is a schematic diagram of drawing a virtual texture shown according to an exemplary embodiment.

[0017] Figure 7 is a schematic diagram of updating a virtual texture shown according to an exemplary embodiment.

[0018] Figure 8 is a schematic diagram of updating a virtual texture shown according to another exemplary embodiment.

[0019] Figure 9 is a schematic diagram of determining a target tile shown according to an exemplary embodiment.

[0020] Figure 10 is a schematic diagram of updating a virtual texture shown according to an exemplary embodiment.

[0021] Figure 11 is a schematic structural diagram of a texture rendering device shown according to an exemplary embodiment.

[0022] Figure 12 is a schematic structural diagram of an electronic device shown according to an exemplary embodiment. Detailed implementation manners

[0023] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.

[0024] It should be understood that the steps recited in the method embodiments of the present disclosure can be executed in a different order and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.

[0025] As used herein, the term "including" and its variants are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0026] It should be noted that concepts such as "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or mutual dependence relationship of the functions performed by these devices, modules or units.

[0027] It should be noted that the modification of "one" and "multiple" mentioned in this disclosure is illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly specified in the context, it should be understood as "one or more".

[0028] The names of the messages or information exchanged between multiple devices in the embodiments of this disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.

[0029] Figure 1 It is a schematic diagram of a tile shown according to an exemplary embodiment. As Figure 1 shown, for the terrain in a game scene, from the perspective of a given virtual camera, the entire terrain is divided into individual tiles, and each Tile is equivalent to a plot unit.

[0030] The size of the Tile and the mip level (the multi-level progressive version of the texture) are related to the distance from the virtual camera. The closer the Tile, the lower the mip level, the higher the corresponding precision, and the smaller the coverage range. The farther the Tile, the higher the mip level, the lower the corresponding precision, and the larger the coverage range.

[0031] Figure 2 It is a flowchart of tile texture update shown according to an exemplary embodiment. As Figure 2 shown, for the update of each plot unit (tile), according to the terrain material of the terrain, the corresponding terrain texture is mixed, and then, on the basis of the terrain texture, the pixels of the corresponding decals are sequentially superimposed in the order of the number of decal layers on the Tile to obtain a complete terrain with decals.

[0032] When all the Tiles displayed on the screen need to be refreshed, the GPU (Graphics Processing Unit) resources consumed are very large. Therefore, when updating the terrain's Runtime Virtual Texture (RVT), considering the impact on running efficiency, it is usually updated frame by frame. That is to say, first update the Tiles with a higher mip level, and then update the Tiles with a lower mip level. In this way, during actual updates, players can clearly see the loading process of the game scene from blurred to clear, especially when there is a large-scale update of the terrain, which will be more incongruous. Therefore, in related technologies, a transition loading interface or transition special effects are usually used to block this loading process, and after the update is completed, the updated terrain is shown to the user.

[0033] Figure 3 is an effect diagram showing frame-by-frame update according to an exemplary embodiment. As Figure 3 shown, from the first frame to the third frame to the fifth frame to the ninth frame, the terrain gradually becomes clear from blurred.

[0034] In this regard, if there is a decal change in the terrain, the terrain's Runtime Virtual Texture is updated. When there are frequent decal changes in the game scene, it will result in huge and unacceptable performance consumption. Moreover, when there is a large-scale update of the Runtime Virtual Texture, there will be a relatively obvious loading process. If the Runtime Virtual Texture is continuously refreshed during the game process, the terrain will keep changing between blurred and clear.

[0035] Based on the above technical problems, the embodiments of the present disclosure provide a texture rendering method, which can not only support the dynamic refresh of event textures in the game scene while taking into account the running performance of the device to achieve the effect of dynamically changing the game scene, but also there will be no obvious loading process.

[0036] The following will describe in detail the texture rendering method proposed in the embodiments of the present disclosure with reference to the accompanying drawings.

[0037] Figure 4 is a flowchart of a texture rendering method according to an exemplary embodiment. As Figure 4 shown, the embodiments of the present disclosure provide a texture rendering method, which can specifically be executed by a texture rendering device, and this device can be implemented in a software and / or hardware manner and configured in an electronic device. As Figure 4 shown, the method may include the following steps.

[0038] In step 410, in response to an event for triggering an event texture change of a target virtual object in the virtual scene, determine the target tile where the event texture change of the target virtual object occurs.

[0039] Here, the target virtual object in the virtual scene can be the terrain, walls, etc. in the virtual scene. That is to say, the texture rendering method provided by the embodiments of the present disclosure can be applicable to both the event texture rendering of the terrain and the event texture rendering of the walls.

[0040] The event texture can refer to a kind of texture in the virtual scene. The event texture can be a texture newly added to the original texture of the target virtual object, and the event texture can be triggered by an event triggered in the virtual scene. Exemplarily, the event texture can refer to a decal. Decals are used to add patterns or specific materials to the surface of an object, and these patterns or materials can interact with the lighting in the virtual scene and produce realistic effects. It should be understood that the event texture can be used to achieve some special effects, such as bullet holes, bloodstains, marks, etc., to enhance the visual performance and immersion of the game. The occurrence of event texture change of the target virtual object in the virtual scene can refer to the increase or deletion of the event texture of the target virtual object.

[0041] It should be noted that the occurrence of event texture change of the target virtual object in the virtual scene is triggered by an event in the game. For example, when a virtual bomb explodes on the ground, a crater texture mark will be left on the ground. Another example is that when a virtual bullet hits the wall, a bullet hole texture mark will be left on the wall.

[0042] When detecting an event for triggering the event texture change of the target virtual object in the virtual scene, the electronic device determines the target tile where the event texture change of the target virtual object occurs. Here, a tile is an image block used to compose the target virtual object. For example, taking the terrain as an example, the terrain is cut into individual tiles, and each tile is equivalent to a plot unit.

[0043] It should be understood that the target tile where the event texture change of the target virtual object occurs refers to the tile where there is an increase or deletion of the event texture on the target virtual object. For example, when adding a layer of event texture to a certain area on the terrain, the tiles intersected by the event texture in this area are the target tiles.

[0044] It should be noted that the target tiles where the event texture change occurs can be determined before the rendering of each frame of the picture starts.

[0045] In step 420, based on the event texture after the change of the target tile, the texture data corresponding to the target tile in the virtual texture of the target virtual object is updated to obtain the updated virtual texture.

[0046] Here, the event texture after the target tile change may refer to the event texture currently still included on the target tile. For example, the event texture after the target tile change refers to all the event textures superimposed on the target tile. The virtual texture (VT) of the target virtual object is texture data formed through a graphics processing technology, aiming to optimize the memory usage and rendering performance of large scenes. By dynamically loading and unloading texture data, virtual textures load part of the texture data into memory when needed, thus achieving the effective utilization of huge texture sets.

[0047] It should be understood that when the types of target virtual objects are different, the types of virtual textures corresponding to the target virtual objects may also be different.

[0048] When the target virtual object is terrain, the virtual texture of the target virtual object is the runtime virtual texture (RVT). RVT is a texture management system that allows for the dynamic loading, updating, and management of texture data at runtime. By storing texture data in virtual memory and dynamically loading it into video memory as needed, RVT optimizes memory usage and rendering performance.

[0049] When the target virtual object is a wall, the virtual texture of the target virtual object is the streaming virtual texture (SVT). The streaming virtual texture is texture data formed through a texture streaming technology, aiming to optimize the memory usage and rendering performance of high-resolution textures in large scenes. SVT reduces memory occupancy and bandwidth consumption by splitting texture data into small pages (equivalent to tiles) and dynamically loading these pages into video memory as needed.

[0050] When the event texture of the target tile of the target virtual object changes, the texture data corresponding to the target tile in the virtual texture is updated to obtain the updated virtual texture. That is to say, for the virtual texture of the target virtual object, when the event texture of the target virtual object changes, the texture of the image block corresponding to the target tile on the virtual texture is locally updated, rather than updating the entire virtual texture again. Therefore, based on the virtual texture, by locally updating the texture data with event texture changes, the dynamic update ability of event textures can be achieved at a relatively small performance cost, thus supporting the dynamic refresh of event textures in game scenes while taking into account the device's operability. Especially on mobile terminals, it can support the rendering of a large number of event textures and the dynamic update of event textures.

[0051] It should be noted that when the event texture of the target virtual object changes again, the texture data of the target tile whose event texture changes currently is updated on the updated virtual texture. That is to say, only one virtual texture of the target virtual object needs to be maintained. When the event texture of the target virtual object changes, the texture data of the image block whose event texture changes in the virtual texture is updated.

[0052] In step 430, the target virtual object is displayed based on the updated virtual texture.

[0053] Here, the updated virtual texture can be rendered onto the target virtual object, so as to display the rendered target virtual object.

[0054] Thus, by determining the target tile whose event texture of the target virtual object changes, and based on the event texture after the change of the target tile, updating the texture data corresponding to the target tile in the virtual texture of the target virtual object to obtain the updated virtual texture, and then displaying the target virtual object based on the updated virtual texture, not only can the dynamic update ability of the event texture be realized with a small performance cost by locally updating the texture data whose event texture changes on the basis of the virtual texture, but also the event texture in the game scene can be supported to be dynamically refreshed while taking into account the running performance of the device. Especially on mobile terminals, it can support the rendering of a large number of event textures and the dynamic update of event textures.

[0055] It should be noted that rendering event textures (decals) through virtual textures generally can support the rendering of a large number of event textures. However, since real-time updating of virtual textures will cause excessive performance consumption, the event textures rendered through virtual textures generally cannot be dynamically updated. Through the texture rendering method provided by the embodiments of the present disclosure, the event textures that cannot be dynamically updated can be made to be dynamically updated, and the consumed performance is small.

[0056] Figure 5 Yes Figure 4 The detailed flowchart of step 420 shown is as follows. As Figure 5 shown, in some implementable embodiments, step 420 may include the following steps.

[0057] In step 421, according to the texture change type corresponding to the target tile, the first texture data corresponding to the target tile is obtained from the cache pool or the virtual texture corresponding to the target virtual object.

[0058] Here, the texture change types corresponding to the target tile may include a first texture change type for characterizing the addition of event textures on the target tile and a second texture change type for characterizing the deletion of event textures on the target tile. The first texture change type means that, based on the event textures originally included in the target tile, one or more layers of event textures are superimposed. The second texture change type means that, based on the event textures originally included in the target tile, one or more layers of event textures are deleted.

[0059] For different types of texture change types, the first texture data corresponding to the target tile can be obtained from the cache pool or the virtual texture corresponding to the target virtual object. For example, for the first texture change type, the first texture data corresponding to the target tile can be obtained from the virtual texture corresponding to the target virtual object. For the second texture change type, the first texture data corresponding to the target tile can be obtained from the cache pool.

[0060] Among them, the cache pool is used to cache the texture data of the virtual texture that does not contain event textures of the target virtual object. It should be understood that the cache pool can cache the texture data of the virtual texture corresponding to each Tile.

[0061] Figure 6 is a schematic diagram of drawing a virtual texture shown according to an exemplary embodiment. As Figure 6 shown, the runtime virtual texture corresponding to the terrain can be mixed according to the terrain material of the terrain. The runtime virtual texture at this time contains the terrain material but does not contain event textures. The obtained runtime virtual texture is not only written into the physical map, but also an additional cache pool is opened to cache the texture data of each tile of the runtime virtual texture. Therefore, the cache pool caches the original texture data of the virtual texture that does not contain event textures of the target virtual object.

[0062] In step 422, based on the event texture and the first texture data after the change of the target tile, the second texture data corresponding to the target tile is obtained.

[0063] Here, after obtaining the first texture data corresponding to the target tile from the cache pool or the virtual texture corresponding to the target virtual object, the second texture data corresponding to the target tile can be obtained based on the event texture and the first texture data after the change of the target tile.

[0064] For example, for the first texture change type, the newly added event texture can be superimposed on the first texture data to obtain the second texture data. For the second texture change type, the remaining event texture of the target tile can be superimposed on the first texture data to obtain the second texture data.

[0065] It should be noted that the second texture data of the target tile may refer to the texture data after the event texture of the target tile has changed. It is worth noting that by using the first texture data obtained from the cache pool or the virtual texture of the target virtual object to generate the second texture data, there is no need to regenerate the texture data of the target tile through the material, thereby further reducing performance consumption.

[0066] In step 423, update the second texture data to the position corresponding to the target tile in the virtual texture of the target virtual object to obtain the updated virtual texture.

[0067] Here, after obtaining the second texture data, update the second texture data to the position corresponding to the target tile in the virtual texture of the target virtual object to locally update the image block where the event texture of the virtual texture of the target virtual object has changed, and obtain the updated virtual texture.

[0068] Thus, through the above implementation, the tiles in the virtual texture where the event texture has changed can be updated based on the existing first texture data, without having to regenerate the texture data of the target tile through the material, thereby further reducing performance consumption.

[0069] In some implementable embodiments, in step 421, when the texture change type corresponding to the target tile indicates the addition of an event texture on the target tile, the first texture data corresponding to the target tile can be obtained from the virtual texture of the target virtual object. Correspondingly, in step 422, the added event texture can be superimposed on the first texture data to obtain the second texture data corresponding to the target tile.

[0070] Here, when the texture change type corresponding to the target tile is the first texture change type, directly copy the first texture data corresponding to the target tile from the virtual texture of the target virtual object to the RenderTarget (rendering target), and then, on the basis of the first texture data, superimpose and draw the added event texture to obtain the second texture data corresponding to the target tile.

[0071] It is worth noting that when the texture change type corresponding to the target tile indicates the addition of an event texture on the target tile, in fact, one or more layers of added event textures are drawn on the original texture data of the target tile, so the first texture data of the target tile can be copied from the virtual texture of the target virtual object.

[0072] Figure 7 is a schematic diagram of updating a virtual texture shown according to an exemplary embodiment. As Figure 7As shown in the figure, taking the event texture as a decal as an example, the first texture data corresponding to the target tile 702 can be copied from the runtime virtual texture 701 of the terrain. Then, the newly added decal (event texture) is superimposed on the first texture data to obtain the second texture data 703 by drawing. Next, the second texture data 703 is updated to the position corresponding to the target tile 702 on the runtime virtual texture 701 of the terrain, thereby realizing the partial update of the runtime virtual texture 701 of the terrain.

[0073] Thus, through the above-described embodiments, in the case of adding an event texture to the target tile, the new second texture data can be generated based on the first texture data corresponding to the target tile on the virtual texture of the target virtual object, thereby realizing the update of the virtual texture.

[0074] In some implementable embodiments, in step 421, in the case where the texture change type corresponding to the target tile indicates deleting the event texture on the target tile, the first texture data corresponding to the target tile can be obtained from the cache pool. Correspondingly, in step 422, the second texture data corresponding to the target tile can be obtained based on the remaining event textures and the first texture data on the target tile.

[0075] Here, in the case where the texture change type corresponding to the target tile is the second texture change type, since the event texture is deleted on the target tile and the second texture data of the target tile cannot be obtained by drawing based on the first texture data on the virtual texture, the first texture data corresponding to the target tile can be copied from the cache pool. Then, based on the first texture data, in the order of the remaining event textures on the target tile, the remaining event textures are superimposed and drawn on the first texture data to obtain the second texture data corresponding to the target tile.

[0076] It should be understood that since the cache pool is used to cache the texture data of the virtual texture of the target virtual object that does not contain event textures, the first texture data copied from the cache pool does not contain the data of the event texture.

[0077] Figure 8 is a schematic diagram of updating a virtual texture shown according to another exemplary embodiment. As Figure 8 shown, taking the event texture as a decal as an example, the first texture data corresponding to the target tile 802 can be copied from the cache pool corresponding to the terrain. Then, the remaining decals (event textures) of the target tile 802 are superimposed on the first texture data to obtain the second texture data 803 by drawing. Next, the second texture data 803 is updated to the position corresponding to the target tile 802 on the runtime virtual texture 801 of the terrain, thereby realizing the partial update of the runtime virtual texture 801 of the terrain.

[0078] In some embodiments, in the case where the cache pool does not cache the first texture data corresponding to the target tile, the texture materials of the target virtual object corresponding to the target tile are mixed to obtain the third texture data corresponding to the target tile, and the remaining decals of the target tile are overlaid on the third texture data to obtain the second texture data corresponding to the target tile.

[0079] Among them, when the cache pool does not cache the first texture data corresponding to the target tile, the texture data of the target tile cannot be found in the cache pool. At this time, it is necessary to regenerate the texture data of the target tile.

[0080] Such as Figure 8 As shown, in the case where the cache pool does not find the first texture data of the target tile 805, the terrain material of the target tile 805 is mixed to obtain the third texture data of the target tile 805. It should be noted that the third texture data is essentially the same as the first texture data copied from the cache pool. Then, the remaining decals of the target tile 805 are overlaid on the third texture data to obtain the second texture data 804 corresponding to the target tile 805. Then, the second texture data 804 is updated to the position corresponding to the target tile 805 on the runtime virtual texture 801 of the terrain, thereby realizing the partial update of the runtime virtual texture 801 of the terrain.

[0081] It is worth noting that it is generally difficult to trigger the situation where the cache pool does not cache the first texture data corresponding to the target tile during runtime. Because during actual rendering, all Tiles in the current view will be on the virtual texture, and the texture data of all Tiles will be updated to the cache pool for caching. During actual operation, the larger the cache pool, the higher the hit rate of the cache pool. The size of the cache pool can be set according to the actual memory situation.

[0082] Thus, through the above embodiments, in the case of deleting the event texture on the target tile, new second texture data can be generated based on the first texture data corresponding to the target tile in the cache pool, thereby realizing the update of the virtual texture. Even if the cache pool does not cache the first texture data corresponding to the target tile, since only the third texture data of the target tile needs to be regenerated, the performance consumption is not large.

[0083] In some implementable embodiments, in step 410, in response to an event for triggering an event texture change of a target virtual object in the virtual scene, according to the oriented bounding box corresponding to the changed event texture and the quadtree corresponding to the target virtual object, the target tile where the target virtual object has an event texture change is determined.

[0084] Here, an Oriented Bounding Box (OBB) is a cuboid that can be arbitrarily rotated according to the first moment of an object and is used to approximate the object more precisely. The OBB is essentially a cuboid, but different from the traditional Axis-Aligned Bounding Box (AABB), the faces of the OBB do not have to be parallel to any of the three coordinate planes and can be rotated according to the actual shape and orientation of the object, making the OBB more precise when approximating the object and significantly reducing the number of enclosing volumes.

[0085] Among them, each node of the quadtree includes a tile of the target virtual object. Taking the terrain of the target virtual object as an example, the quadtree is used to divide the terrain space, and the Tiles in the terrain are inserted into the quadtree, and each Tile will be assigned to a node of the quadtree.

[0086] The spatial range of the OBB bounding box can be used as a query condition to perform a spatial query in the quadtree to find all the nodes that intersect the OBB bounding box. For each intersecting node, check whether the Tile of the terrain contained in the node intersects the OBB bounding box. If it intersects, the Tile is covered by the event texture, and then the Tile is the target tile.

[0087] Figure 9 is a schematic diagram showing the determination of the target tile according to an exemplary embodiment. As Figure 9 shown, the target tile 902 where the terrain has an event texture change can be obtained through the oriented bounding box 901 corresponding to the event texture with changes and the quadtree of the terrain.

[0088] Thus, through the oriented bounding box and the quadtree, the target tile where the event texture of the target virtual object changes can be accurately determined.

[0089] In some implementable embodiments, in step 420, the tile update rate for updating the virtual texture of the target virtual object can be determined according to the data volume of the target tile, and then based on the event texture after the target tile changes, the texture data corresponding to the tile update rate in the virtual texture of the target virtual object is updated to obtain the updated virtual texture.

[0090] Here, the data volume of the target tile refers to the number of target tiles. For example, if a special effect covers all the terrain within the screen range, then all the Tiles of the terrain displayed on the screen are target tiles that need to be refreshed, and the data volume of the target tiles is all the Tiles of the terrain displayed on the screen. The tile update rate is the number of target tiles that can be updated in one frame of the screen. For example, the tile update rate can be 100 target tiles updated in one frame.

[0091] Among them, the data volume is directly proportional to the tile update rate. That is to say, the larger the data volume of the target tile, the greater the tile update rate. Correspondingly, the larger the number of target tiles that can be updated in a frame of the picture.

[0092] After determining the tile update rate, based on the event texture of the target tile after the change, the texture data of the corresponding number of target tiles in the virtual texture of the target virtual object corresponding to the tile update rate can be updated.

[0093] It should be noted that when the tile update rate for updating the target tiles in each frame of the picture is fixed, the tiles covered by the event texture will change from blurred to clear during the virtual texture update. In the embodiments of the present disclosure, the number of target tiles that can be updated in each frame can be dynamically adjusted according to the data volume of the target tiles, so as to avoid the change process from blurred to clear. Thus, by dynamically adjusting the tile update rate, the change process from blurred to clear can be avoided in the picture, greatly improving the game experience of players.

[0094] In some implementable embodiments, in step 420, during the update of the special effect resources corresponding to the event, based on the event texture of the target tile after the change, the texture data corresponding to the target tile in the virtual texture of the target virtual object can be updated to obtain the updated virtual texture.

[0095] Here, following the above embodiments, the change of the event texture of the target virtual object is triggered by an event, and this event can be a special effect event. For example, when a virtual bomb explodes on the ground, a texture mark such as a crater will be left. At this time, special effect resources and post-processing of the event will appear in the foreground. For example, special effects such as smoke, fire, and distortion caused by the virtual bomb will appear.

[0096] Correspondingly, during the update of the special effect resources corresponding to the event, the texture data corresponding to the target tile in the virtual texture of the target virtual object can be updated to block the update process of the target tile through the special effect resources corresponding to the event, so as to minimize the visually perceived change process of the terrain update.

[0097] Figure 10 It is a schematic diagram of updating a virtual texture shown according to an exemplary embodiment. As Figure 10 shown, after the explosion event occurs, during the process of displaying the explosion special effect corresponding to the explosion event, local updates are performed on the target tiles in the RVT of the terrain. When the explosion special effect is displayed, the RVT of the terrain is updated. Then, in the vision of the player, the change process of the terrain from blurred to clear will not be seen.

[0098] Thus, by updating the virtual texture during the update of the special effect resources corresponding to the event, the update process of the target tile can be blocked by the special effect resources corresponding to the event, thereby minimizing the visually perceived change process of the terrain update.

[0099] Figure 11 is a schematic structural diagram of a texture rendering device shown according to an exemplary embodiment. As Figure 11 shown, an embodiment of the present disclosure provides a texture rendering device 1100, and the texture rendering device 1100 includes: A determination module 1101, configured to determine a target tile in which an event texture change occurs for the target virtual object in response to an event for triggering an event texture change of the target virtual object in the virtual scene; An update module 1102, configured to update texture data corresponding to the target tile in the virtual texture of the target virtual object based on the event texture after the change of the target tile, to obtain an updated virtual texture; A display module 1103, configured to display the target virtual object based on the updated virtual texture.

[0100] Optionally, the update module 1102 is specifically configured to: Obtain first texture data corresponding to the target tile from a cache pool or the virtual texture corresponding to the target virtual object according to the texture change type corresponding to the target tile, where the cache pool is used to cache texture data of the virtual texture of the target virtual object that does not include event textures; Based on the event texture after the change of the target tile and the first texture data, obtain second texture data corresponding to the target tile; Update the second texture data to a position corresponding to the target tile in the virtual texture of the target virtual object, to obtain an updated virtual texture.

[0101] Optionally, the update module 1102 is specifically configured to: When the texture change type corresponding to the target tile indicates that an event texture is newly added on the target tile, obtain first texture data corresponding to the target tile from the virtual texture of the target virtual object; The obtaining second texture data corresponding to the target tile based on the event texture after the change of the target tile and the first texture data includes: Overlay the newly added event texture on the first texture data to obtain second texture data corresponding to the target tile.

[0102] Optionally, the update module 1102 is specifically configured to: When the texture change type corresponding to the target tile represents deleting event texture on the target tile, obtain the first texture data corresponding to the target tile from the cache pool; Obtaining the second texture data corresponding to the target tile based on the event texture after the change of the target tile and the first texture data includes: Obtain the second texture data corresponding to the target tile based on the remaining event texture on the target tile and the first texture data.

[0103] Optionally, the update module 1102 is further configured to: When the first texture data corresponding to the target tile is not cached in the cache pool, mix the texture materials corresponding to the target tile in the target virtual object to obtain the third texture data corresponding to the target tile, and superimpose the remaining event texture of the target tile on the third texture data to obtain the second texture data corresponding to the target tile.

[0104] Optionally, the determining module 1101 is specifically configured to: In response to an event for triggering event texture change of a target virtual object in a virtual scene, determine the target tile where the event texture change of the target virtual object occurs according to the oriented bounding box corresponding to the changed event texture and the quadtree corresponding to the target virtual object, where each node of the quadtree includes a tile of the target virtual object.

[0105] Optionally, the update module 1102 is specifically configured to: Determine the tile update rate for updating the virtual texture of the target virtual object according to the data volume of the target tile, where the data volume is proportional to the tile update rate; Update the texture data corresponding to the tile update rate in the virtual texture of the target virtual object based on the event texture after the change of the target tile to obtain the updated virtual texture.

[0106] Optionally, the update module 1102 is specifically configured to: During the update of the special effect resources corresponding to the event, update the texture data corresponding to the target tile in the virtual texture of the target virtual object based on the event texture after the change of the target tile to obtain the updated virtual texture.

[0107] Regarding the texture rendering device 1100 in the above embodiments, the method logics executed by each functional module have been described in detail in the part about the method, and will not be elaborated here.

[0108] Next, refer toFigure 12 , which shows a schematic structural diagram of an electronic device (such as a terminal device) 1200 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 12 The electronic device shown is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.

[0109] As Figure 12 shown, the electronic device 1200 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 1201, which can perform various appropriate actions and processes according to the programs stored in the read-only memory (ROM) 1202 or the programs loaded from the storage device 1208 into the random access memory (RAM) 1203. In the RAM 1203, various programs and data required for the operation of the electronic device 1200 are also stored. The processing device 1201, the ROM 1202, and the RAM 1203 are connected to each other through a bus 1204. The input / output (I / O) interface 1205 is also connected to the bus 1204.

[0110] Generally, the following devices may be connected to the I / O interface 1205: an input device 1206 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1207 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1208 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1209. The communication device 1209 can allow the electronic device 1200 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 12 the electronic device 1200 with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. More or fewer devices may be alternatively implemented or had.

[0111] In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program codes for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1209, or installed from the storage device 1208, or installed from the ROM 1202. When the computer program is executed by the processing device 1201, the above functions defined in the method of the embodiment of the present disclosure are executed.

[0112] It should be noted that the above computer-readable medium in the present disclosure can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program codes. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable signal medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program codes contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0113] In some embodiments, the electronic device may communicate using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.

[0114] The above computer-readable medium may be included in the above electronic device; or may exist separately and not be assembled into the electronic device.

[0115] The above computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: in response to an event for triggering an event texture change of a target virtual object in a virtual scene, determine a target tile where the event texture change of the target virtual object occurs; based on the event texture of the target tile after the change, update texture data corresponding to the target tile in the virtual texture of the target virtual object to obtain an updated virtual texture; and display the target virtual object based on the updated virtual texture.

[0116] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof. The programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partially on the user's computer, execute as a stand-alone software package, execute partially on the user's computer and partially on a remote computer, or execute entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).

[0117] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur in a different order than that noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or by a combination of dedicated hardware and computer instructions.

[0118] The modules described in the embodiments of the present disclosure can be implemented in software or in hardware. In some cases, the name of the module does not constitute a limitation on the module itself.

[0119] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. By way of example and not limitation, the types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0120] In the context of the present disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0121] The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the present disclosure.

[0122] In addition, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although a number of specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments may also be implemented combinatorially in a single embodiment. Conversely, the various features described in the context of a single embodiment may also be implemented separately or in any suitable sub-combination in multiple embodiments.

[0123] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. On the contrary, the specific features and acts described above are merely example forms for implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method, and will not be elaborated here.

Claims

1. A texture rendering method, characterized in that: include: In response to an event for triggering an event texture change of a target virtual object in a virtual scene, determining a target tile where the event texture change of the target virtual object occurs; Based on the event texture of the target tile after the change, updating the texture data corresponding to the target tile in the virtual texture of the target virtual object to obtain an updated virtual texture; Based on the updated virtual texture, the target virtual object is displayed.

2. The method according to claim 1, characterized in that The updating of texture data corresponding to the target tile in the virtual texture of the target virtual object based on the event texture after the target tile is changed to obtain an updated virtual texture includes: According to the texture change type corresponding to the target tile, obtaining first texture data corresponding to the target tile from a cache pool or a virtual texture corresponding to the target virtual object, wherein the cache pool is used to cache texture data of the virtual texture of the target virtual object that does not contain an event texture; Obtaining second texture data corresponding to the target tile based on the event texture of the target tile after the change and the first texture data; The second texture data is updated to a position of the virtual texture of the target virtual object corresponding to the target tile to obtain an updated virtual texture.

3. The method according to claim 2, characterized in that The acquiring, according to the texture change type corresponding to the target tile, first texture data corresponding to the target tile from a cache pool or a virtual texture corresponding to the target virtual object comprises: When the texture change type corresponding to the target tile represents adding an event texture to the target tile, acquiring first texture data corresponding to the target tile from the virtual texture of the target virtual object; The obtaining, based on the event texture after the target tile is changed and the first texture data, second texture data corresponding to the target tile comprises: The newly added event texture is superimposed on the first texture data to obtain second texture data corresponding to the target tile.

4. The method according to claim 2, characterized in that: The acquiring, according to the texture change type corresponding to the target tile, first texture data corresponding to the target tile from a cache pool or a virtual texture corresponding to the target virtual object comprises: When the texture change type corresponding to the target tile indicates that an event texture is deleted on the target tile, obtaining first texture data corresponding to the target tile from the cache pool; The obtaining, based on the event texture after the target tile is changed and the first texture data, second texture data corresponding to the target tile comprises: Based on the remaining event texture on the target tile and the first texture data, second texture data corresponding to the target tile is obtained.

5. The method according to claim 4, characterized in that The method further comprises: In the case that the cache pool does not cache the first texture data corresponding to the target tile, the texture material corresponding to the target tile in the target virtual object is mixed to obtain the third texture data corresponding to the target tile, and the remaining event texture of the target tile is superimposed on the third texture data to obtain the second texture data corresponding to the target tile.

6. The method according to claim 1, characterized in that The step of determining, in response to an event for triggering an event texture change of a target virtual object in a virtual scene, a target tile where the event texture change of the target virtual object occurs, comprises: In response to an event for triggering an event texture change of a target virtual object in a virtual scene, a target tile of the target virtual object where the event texture change occurs is determined based on a directed bounding box corresponding to the changed event texture and a quadtree corresponding to the target virtual object, wherein each node of the quadtree includes a tile of the target virtual object.

7. The method according to any one of claims 1 to 6, characterized in that The updating of texture data corresponding to the target tile in the virtual texture of the target virtual object based on the event texture after the target tile is changed to obtain an updated virtual texture includes: Determining a tile update rate for updating a virtual texture of the target virtual object according to the data amount of the target tile, wherein the data amount is proportional to the tile update rate; Based on the event texture after the target tile is changed, texture data corresponding to the tile update rate in the virtual texture of the target virtual object is updated to obtain an updated virtual texture.

8. The method according to any one of claims 1 to 6, characterized in that The updating of texture data corresponding to the target tile in the virtual texture of the target virtual object based on the event texture after the target tile is changed to obtain an updated virtual texture includes: During the update of the special effect resource corresponding to the event, based on the event texture after the target tile is changed, the texture data corresponding to the target tile in the virtual texture of the target virtual object is updated to obtain the updated virtual texture.

9. A texture rendering device, characterized in that: include: A determination module configured to determine a target tile where an event texture change occurs for a target virtual object in a virtual scene in response to an event for triggering an event texture change for the target virtual object in the virtual scene; An updating module, configured to update texture data corresponding to the target tile in the virtual texture of the target virtual object based on the event texture after the target tile is changed, to obtain an updated virtual texture; The display module is configured to display the target virtual object based on the updated virtual texture.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 8 are implemented.

11. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.