Scene ground damage processing method, device, equipment and storage medium

By presetting two sets of ground maps in the undamaged and damaged states in the game scene and drawing mask maps by storing skill damage characteristic parameters, the problem of unnatural ground destruction effects in the existing technology is solved, the accumulation of ground destruction effects and the seamless integration of multiple destructions are achieved, and the equipment performance requirements are reduced.

CN114247134BActive Publication Date: 2025-09-23SHANGHAI PERFECT WORLD SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111585011.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-22
Publication Date
2025-09-23
Estimated Expiration
2041-12-22

AI Technical Summary

Technical Problem

The existing ground destruction scheme uses decal components to achieve ground destruction effects, which has high requirements on equipment performance. In addition, the destruction effect is not natural enough and cannot meet the needs of rich combat skills.

Method used

Two sets of textures are preset in the game scene, one for the undamaged state and the other for the damaged state. Mask textures are drawn to store skill damage information, and destruction effects are rendered through interpolation.

Benefits of technology

It achieves the seamless integration of cumulative ground destruction and multiple destruction without affecting device performance, presenting a more realistic ground destruction effect and reducing the performance requirements of players' devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114247134B_ABST
    Figure CN114247134B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and storage medium for processing scene ground damage. The method pre-sets two sets of maps for the initial ground material in the combat area of ​​the game scene, namely, a ground map in an undamaged state and a ground map in a completely damaged state. First, a mask map is drawn according to the ground damage characteristic parameters corresponding to the skills released in the combat area, which is used to store the damage information of the ground under the action of the released skills; then, when drawing the ground, the above two sets of maps preset in the initial ground material are interpolated according to the mask map, and the ground damaged by the skill is rendered according to the interpolation result, thereby realizing the ground damage effect after the skill is destroyed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for processing scene ground damage. Background Art

[0002] The richness of game scenes is a key factor in evaluating game quality. The richer the scenes, the more realistic they are for players. Battles are crucial scenes in competitive games, and if ground destruction occurs at the battle location and persists until the battle ends, it can enrich the game scene.

[0003] Current ground destruction solutions are typically implemented using decal components. This involves generating a patch model at the combat location and applying the appropriate texture to create a damaged ground effect. However, using decals to achieve ground destruction requires high device performance and can produce unnatural looking damage. Summary of the Invention

[0004] The embodiments of the present invention provide a method, apparatus, device and storage medium for processing scene ground damage, which can effectively improve the above-mentioned problems.

[0005] In a first aspect, an embodiment of the present invention provides a method for processing ground damage in a scene, the method comprising:

[0006] Determining an initial ground material within a combat area in a game scene, wherein the initial ground material is preset with a first ground texture and a second ground texture, the first ground texture being a ground texture in an undamaged state, and the second ground texture being a ground texture in a completely damaged state;

[0007] Acquire ground damage characteristic parameters corresponding to the skill released in the combat area, and draw a mask map according to the ground damage characteristic parameters, wherein the mask map is used to store damage information of the ground under the effect of the skill released;

[0008] According to the mask map, the first ground map and the second ground map preset in the initial ground material are interpolated, and the ground damaged by the skill is rendered according to the interpolation result.

[0009] Furthermore, determining the initial ground material in the battle area of ​​the game scene includes:

[0010] Creating a vertically downward orthographic camera in the battle area of ​​the game scene, wherein the viewport of the orthographic camera covers the entire battle area;

[0011] The initial ground material in the combat area is determined by the orthographic camera.

[0012] Furthermore, before drawing the mask map according to the ground damage characteristic parameters, the method further includes:

[0013] A single-channel mask texture with a preset resolution is created as a rendering target of the orthographic camera, for storing the shape and extent of damage to the ground caused by skills released in the combat area.

[0014] Furthermore, the ground damage characteristic parameters include: release position information, damage graphic information, and skill strength information. Drawing a mask map based on the ground damage characteristic parameters includes:

[0015] A preset drawing interface is called to draw the mask map according to the release position information, the damage graphic information and the skill strength information, and the brightness value distribution of the mask map is determined according to the skill strength information.

[0016] Furthermore, the release position information includes the skill release position and release direction; the damage graphic information includes: damage shape and size.

[0017] Furthermore, interpolating a first ground map and a second ground map preset in the initial ground material according to the mask map includes:

[0018] When drawing the ground, the coordinates of the currently drawn pixel are converted from the world space to the image space corresponding to the mask map in the shader;

[0019] Sampling the mask brightness value corresponding to the current drawing pixel from the mask map, and sampling the color value corresponding to the current drawing pixel from the first ground map and the second ground map, which are respectively the first color value and the second color value;

[0020] An interpolation operation is performed on the first color value and the second color value using the mask brightness value to obtain a color of the texture map corresponding to the current drawing pixel.

[0021] Furthermore, rendering the ground damaged by the skill according to the interpolation result includes:

[0022] Lighting calculations are performed on the colors of the interpolated texture map to render the ground damaged by the skill.

[0023] In a second aspect, an embodiment of the present invention provides a scene ground damage processing device, the device comprising:

[0024] A ground material determination module, configured to determine an initial ground material within a combat area in a game scene, wherein the initial ground material is preset with a first ground texture and a second ground texture, wherein the first ground texture is a ground texture in an undamaged state, and the second ground texture is a ground texture in a completely damaged state;

[0025] A map drawing module, configured to obtain ground damage characteristic parameters corresponding to the skills released in the combat area, and to draw a mask map based on the ground damage characteristic parameters, wherein the mask map is used to store the ground damage information under the action of the skills released;

[0026] A ground rendering module is used to interpolate the first ground map and the second ground map preset in the initial ground material according to the mask map, and render the ground damaged by the skill according to the interpolation result.

[0027] In a third aspect, an embodiment of the present invention provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the scene ground damage processing method provided in the first aspect are implemented.

[0028] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the scene ground damage processing method provided in the first aspect above.

[0029] The scene ground damage processing method provided by the embodiment of the present invention abandons the traditional decal technology. By pre-setting two sets of maps for the initial ground material in the combat area of ​​the game scene, namely the ground map in the undamaged state and the ground map in the completely damaged state, a mask map is first drawn according to the ground damage characteristic parameters corresponding to the skills released in the combat area, which is used to store the ground damage information under the action of the released skills; then, when drawing the ground, the above two sets of maps preset in the above initial ground material are interpolated according to the mask map, and the ground damaged by the skills is rendered according to the interpolation result to achieve the ground damage effect after the skill damage. Since the ground damage information corresponding to multiple skills released in the combat area is drawn into the same mask map, on the one hand, the ground damage can be accumulated without affecting the performance of the device, and on the other hand, multiple damages with relatively close positions can be seamlessly merged together, making the presented ground damage effect more realistic. In addition, compared with the decal technology, this technical solution does not require additional image drawing interface calls (drawcalls) and triangles for scene drawing, which is conducive to reducing the requirements for the player's device performance.

[0030] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, 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 invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:

[0032] Figure 1 A flowchart of a method for handling scene ground damage provided by an embodiment of this specification is shown;

[0033] Figure 2 It shows a module block diagram of the scene ground damage processing device provided by the embodiment of this specification;

[0034] Figure 3 A schematic structural diagram of an exemplary electronic device in an embodiment of this specification is shown. DETAILED DESCRIPTION

[0035] The inventors discovered in actual application scenarios that if decal technology is used to achieve ground destruction effects in the combat zone of a game scene, as the combat lasts longer, the ground destruction caused by releasing skills will increase, and the number of decals will also accumulate, thus affecting device performance. If the maximum number of decals is limited for performance reasons, decals will not be generated in subsequent battles, and the interactivity between the combat and the ground will be lost. In addition, decals are grids that can only be superimposed one on top of another. When two skill destructions occur consecutively at the same location or two relatively close locations, the two consecutive decal models can only be overlapped and cannot be well integrated into a large ground destruction, resulting in poor authenticity of the destruction effect. Moreover, due to the limitations of the destruction style in the texture, the decal shape cannot vary much and cannot fit the rich combat skills.

[0036] In view of this, the embodiment of this specification abandons the traditional decal technology and instead introduces a mask map to record the ground damage caused by the skills released in the combat area, and pre-produces two sets of maps for the ground material, one set of ground maps in an undamaged state, and the other set of ground maps in a completely damaged state. When drawing the ground, the two sets of maps are interpolated using the sampling results of the mask map, and the ground damaged by the skill is obtained based on the interpolation results, thereby achieving the ground damage effect after the skill is destroyed.

[0037] Because ground damage corresponding to multiple skills released within the combat zone is mapped to the same mask, cumulative ground damage can be achieved without impacting device performance. Furthermore, multiple instances of damage occurring in close proximity can be seamlessly blended together, resulting in a more realistic ground damage effect. Furthermore, compared to decal technology, this solution eliminates the need for additional drawcalls and triangles for scene rendering, reducing the performance requirements of the player's device.

[0038] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0039] In the first aspect, the embodiments of this specification provide a method for processing scene ground damage, such as Figure 1 As shown, the method may at least include the following steps S101 to S103.

[0040] Step S101, determining the initial ground material in the battle area of ​​the game scene, wherein the initial ground material is preset with a first ground texture and a second ground texture, the first ground texture is a ground texture in an undamaged state, and the second ground texture is a ground texture in a completely damaged state.

[0041] Combat is an important part of competitive games, such as role-playing games, where players can use various skills to attack enemies. In this embodiment, the combat zone refers to the area where combat takes place. In practice, the combat zone requiring ground damage processing can be set according to actual needs. For example, it can be the entire main map scene, a partial area of ​​the main map scene, or a separately set PVP (Player vs. Player) dungeon scene or PVE (Player vs. Environment) dungeon scene, etc. This embodiment does not limit this.

[0042] The skill effects released by players in the combat zone will inevitably cause some damage to the ground in that area. Therefore, to create a more realistic combat effect, it is necessary to first determine the ground area involved in the combat zone and the initial ground material of that ground area. Then, the following steps S102 and S103 are performed to mask the ground area in a targeted manner to create the ground damage effect caused by the skill release in the scene.

[0043] For example, you can create an orthographic camera pointing vertically downward in the battle area, and make the viewport of the orthographic camera cover the entire battle area. For example, you can set the viewport of the orthographic camera to completely cover the battle area. In this way, you can shoot the ground area corresponding to the battle area from a bird's-eye view, obtain a two-dimensional image of the ground in the battle area, and determine the range of the ground area that needs to be masked and the initial ground material corresponding to this part of the ground area.

[0044] In this embodiment, two sets of ground maps are pre-created for the initial ground material. Each set of ground maps includes a diffuse map, a specular map, a normal map, and an emission map. One set of ground maps is for the undamaged ground, i.e., the maps used for the undamaged ground. The other set of ground maps is for the fully damaged ground, i.e., the ground after it has been completely damaged. Hereinafter, the undamaged ground map is referred to as the first ground map, and the fully damaged ground map is referred to as the second ground map.

[0045] After determining the initial ground material of the battle area, the following step S102 can be executed to draw the mask map. Of course, before drawing the mask map, it is necessary to create a mask texture first. The specific creation time of the mask texture can be configured according to the needs of the actual application scenario. For example, the mask texture can be created when a battle is detected, and then the mask map can be drawn according to the ground damage characteristic parameters corresponding to the battle release skills. Alternatively, when the battle area in the game scene is initially determined, the mask texture corresponding to the battle area can be created. In this way, the mask map can be directly drawn when the battle is detected, which is conducive to reducing the time consumed by the mask map drawing, thereby improving the rendering speed of the ground damage effect.

[0046] For example, a single-channel mask texture with a preset resolution can be created as the render target for the orthographic camera. This texture stores the shape and extent of ground damage caused by skills in the combat zone. The preset resolution can be determined based on the actual application scenario, ensuring that cracks and crevices in the rendered ground damage are smooth and improve image quality.

[0047] Step S102: Obtain ground damage characteristic parameters corresponding to the skill released in the combat area, and draw a mask map based on the ground damage characteristic parameters. The mask map is used to store ground damage information under the action of the skill released.

[0048] For example, the ground damage characteristic parameters corresponding to the skill can be pre-configured in the skill special effects, and the drawing interface for drawing the mask map can be pre-configured. The configuration of the drawing interface can refer to the relevant technology and will not be described in detail here. Among them, the ground damage characteristic parameters are used to characterize the degree of damage to the ground under the action of the skill. For example, it can include but is not limited to release position information, damage graphic information and skill strength information. The release position information may include the release position and release angle; the damage graphic information may include the damage shape and size.

[0049] It should be noted that the skill release position and release angle are determined in real time based on the user's skill release operation in the actual combat area. The damage shape and size can be designed in advance according to the characteristics of the skill and configured into the skill special effects.

[0050] In specific implementation, when a skill is detected to be released in the combat area, the ground damage characteristic parameters corresponding to the released skill can be obtained first, including the release position information, damage graphic information and skill strength information; then the preset drawing interface is called to draw a mask map according to the release position information, damage graphic information and skill strength information, and the brightness value distribution of the mask map is determined according to the skill strength information.

[0051] For example, a script for writing a mask map can be pre-configured in the skill special effects, and the execution of the above script can be triggered when the skill is released in battle. The script will obtain the release position, release angle, ground damage shape and size of the skill and pass them to the drawing interface to draw the mask map. It should be noted that the information of the release position, release angle and ground damage size obtained are all in world space, and these parameters need to be converted to the camera space through the transformation matrix of the above-mentioned orthogonal camera for drawing. Specifically, the target position in the mask map that is adapted to the ground destruction position this time can be determined based on the converted release position and release angle, and then the area to be drawn in the mask map can be determined based on the target position, ground damage shape and converted size, and then the brightness value of each pixel in the area can be determined based on the skill strength information.

[0052] It is understandable that different skill strengths will result in different degrees of ground damage, and the brightness value of each pixel in the mask map, i.e., the mask value, determines the ground color obtained after subsequent interpolation, and thus determines the degree of ground damage presented. Therefore, the correspondence between skill strength and mask value can be pre-configured. This correspondence can be set according to the needs of the actual game scene and multiple experiments, and must meet the following requirements: the greater the skill strength, the closer the ground color obtained after interpolation of the corresponding mask value should be to the color of the ground when it is completely damaged, and the more severe the ground damage effect presented; conversely, the smaller the skill strength, the closer the ground color obtained after interpolation of the corresponding mask value should be to the color of the ground in an undamaged state, and the less severe the ground damage effect presented. For example, the greater the skill strength, the larger the corresponding mask value, and the closer the final ground color drawn is to the color when it is completely damaged.

[0053] Therefore, during specific implementation, the brightness value of each pixel in the corresponding destruction area in the mask map can be determined according to the skill strength information of the skills released in the combat area and the above-mentioned pre-configured correspondence.

[0054] It should be noted that the ground damage information corresponding to the skills released successively by each player in the same combat area is all drawn on the same mask map, so that the accumulation of ground damage can be achieved without affecting the performance of the device. For example, the mask drawing cycle, that is, the refresh cycle of the mask map, can be configured in advance according to the needs of the actual scene. The drawing of the mask map is triggered according to the refresh cycle, and the ground damage information corresponding to the newly released skills in the scene within the current cycle is drawn into the mask map together. The mask map is updated to add the new ground damage information in the current cycle. For example, in the process of drawing the mask map, the mask values ​​corresponding to different skill damages at the same ground position can be accumulated to present a more serious damage effect. In this way, multiple damages at relatively close positions can be seamlessly integrated, making the presented ground damage effect more realistic.

[0055] After the mask map is drawn, the following step S103 may be continued to render the ground effect damaged by the skill in combination with the mask map.

[0056] Step S103: interpolate the first ground map and the second ground map preset in the initial ground material according to the mask map, and render the ground damaged by the skill according to the interpolation result.

[0057] Specifically, in the above step S103, the process of interpolating the first ground map and the second ground map preset in the initial ground material determined in the above step S101 according to the mask map may include: when drawing the ground, in the shader, converting the coordinates of the current drawing pixel from the world space to the image space corresponding to the mask map; sampling the mask brightness value corresponding to the current drawing pixel from the mask map, hereinafter referred to as the mask value, and sampling the color value corresponding to the current drawing pixel from the first ground map and the second ground map, respectively, which are the first color value and the second color value; using the sampled mask value to perform an interpolation operation on the first color value and the second color value to obtain the color of the texture map corresponding to the current drawing pixel.

[0058] It's understandable that when drawing the ground, the world-space coordinates of the currently drawn pixel must first be converted to the image space corresponding to the mask map before the ground damage information recorded in the mask map can be aligned with the ground in the combat zone. Specifically, the VP matrix of the orthographic camera can be used to convert the coordinates of the currently drawn pixel from world space to the image (UV) space corresponding to the mask map.

[0059] After completing the coordinate transformation for the currently drawn pixel, the mask value for the corresponding pixel is sampled from the mask map. Furthermore, the first and second color values ​​for the corresponding pixel are sampled from the first and second ground maps, respectively. The first color value represents the color of the pixel when the ground is intact, while the second color value represents the color of the pixel when the ground is completely damaged. The mask value is then used to interpolate the first and second color values ​​to obtain the texture color corresponding to the currently drawn pixel.

[0060] For example, 0 represents the color of undamaged ground, 1 represents the color of completely damaged ground, and intermediate values ​​between 0 and 1 represent the color of the intermediate state of damage between completely damaged and undamaged. Through the above interpolation operation, we can get the color value of the intermediate state of damage corresponding to the release of skills.

[0061] Furthermore, the color of the texture map corresponding to the currently drawn pixel is subjected to lighting calculations and output to the display cache. After all pixels of the ground are drawn, the ground effect damaged by the skill can be rendered.

[0062] To sum up, the scene ground damage processing method provided in the embodiment of this specification can achieve the ground damage effect after skill destruction in the game combat area, and realize the accumulation of ground damage without affecting the performance of the equipment. It can also seamlessly integrate multiple destructions with relatively close positions, making the presented ground damage effect more realistic.

[0063] Moreover, the performance overhead of the above technical solution only includes the storage space of a mask map and a set of damaged ground texture storage space. The computing consumption is mainly the sampling of one more mask map when drawing the ground, the sampling of one more set of material textures and one interpolation operation. It will not increase the drawcall and triangle faces of scene drawing. Compared with decal technology, it is beneficial to reduce the requirements for player device performance.

[0064] In addition, since the damage shape, size, skill strength, and the correspondence between skill strength and mask value corresponding to the skills can all be configured according to the needs of the actual game scene, that is to say, the ground effect after destruction is controllable. Compared with decals, which require pre-prepared materials to achieve destruction effects and have relatively fixed destruction styles, this solution can meet the needs of various shapes of destruction, which is conducive to adapting to the increasingly rich game combat skills.

[0065] In the second aspect, based on the same inventive concept, the embodiments of this specification also provide a scene ground damage processing device, such as Figure 2 As shown, the scene ground damage processing device 20 may include:

[0066] A ground material determination module 21 is configured to determine an initial ground material within a combat area in a game scene, wherein the initial ground material is pre-set with a first ground texture and a second ground texture, wherein the first ground texture is a ground texture in an undamaged state, and the second ground texture is a ground texture in a completely damaged state;

[0067] A map drawing module 22 is used to obtain ground damage characteristic parameters corresponding to the skills released in the combat area, and draw a mask map based on the ground damage characteristic parameters, wherein the mask map is used to store the ground damage information under the action of the skills released;

[0068] The ground rendering module 23 is used to interpolate the first ground map and the second ground map preset in the initial ground material according to the mask map, and render the ground damaged by the skill according to the interpolation result.

[0069] In an optional embodiment, the ground material determination module 21 is configured to:

[0070] Creating a vertically downward orthographic camera in the battle area of ​​the game scene, wherein the viewport of the orthographic camera covers the entire battle area;

[0071] The initial ground material in the combat area is determined by the orthographic camera.

[0072] In an optional embodiment, the above-mentioned scene ground damage processing device 20 also includes: a texture creation module, which is used to create a single-channel mask texture with a preset resolution as a rendering target of the orthogonal camera, and is used to store the shape and degree of damage to the ground caused by skills released in the combat area.

[0073] In an optional embodiment, the above-mentioned texture drawing module 22 includes:

[0074] The parameter acquisition submodule 221 is used to obtain ground damage characteristic parameters corresponding to the skill released in the combat area, and the ground damage characteristic parameters include: release position information, damage graphic information and skill strength information;

[0075] The drawing submodule 222 is used to call a preset drawing interface to draw the mask map according to the release position information, damage graphic information and skill strength information, and the brightness value distribution of the mask map is determined according to the skill strength information.

[0076] In an optional embodiment, the release position information includes the skill release position and release direction. The damage graphic information includes: damage shape and size.

[0077] In an optional embodiment, the ground rendering module 23 includes:

[0078] The conversion submodule 231 is used to convert the coordinates of the current pixel being drawn from the world space to the image space corresponding to the mask map in the shader when drawing the ground;

[0079] The sampling submodule 232 is configured to sample the mask brightness value corresponding to the current drawing pixel from the mask map, and sample the color value corresponding to the current drawing pixel from the first ground map and the second ground map, which are the first color value and the second color value, respectively.

[0080] An interpolation submodule 233 is configured to perform an interpolation operation on the first color value and the second color value using the mask brightness value to obtain a color of the texture map corresponding to the currently drawn pixel;

[0081] The rendering submodule 234 is used to perform lighting calculation on the color of the texture map obtained after interpolation, and render the ground damaged by the skill.

[0082] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0083] It should be noted that the above modules can be implemented by software code or by hardware such as an integrated circuit chip.

[0084] In a third aspect, an embodiment of this specification further provides an electronic device, comprising a processor and a memory, wherein the memory is coupled to the processor, and the memory stores instructions, and when the instructions are executed by the processor, the electronic device executes the steps of the scene ground damage processing method provided in the first aspect above. The specific implementation process can refer to the method embodiment provided in the first aspect above, and will not be repeated here. For example, the electronic device can be a user terminal with a game scene rendering function, such as a mobile phone, a laptop computer, a tablet computer, a smart TV, or a smart head-mounted device.

[0085] Figure 3 This is a schematic diagram of the structure of the electronic device in the embodiment of this specification when it is a user terminal. Figure 3 As shown, electronic device 30 may include one or more of the following components: a processing component 302 , a memory 304 , a power component 306 , a multimedia component 308 , an audio component 310 , an input / output interface 312 , a sensor component 314 , and a communication component 316 .

[0086] The processing component 302 generally controls the overall operation of the electronic device 30, such as operations associated with display, phone calls, data communications, camera operation, and recording. The processing component 302 may include one or more processors 320 to execute instructions to complete all or part of the steps of the scene ground damage processing method provided in the first aspect above. Furthermore, the processing component 302 may include one or more modules to facilitate interaction between the processing component 302 and other components. For example, the processing component 302 may include a multimedia module to facilitate interaction between the multimedia component 308 and the processing component 302.

[0087] The memory 304 is configured to store various types of data to support operations on the device 30. Examples of such data include instructions for any application or method operating on the electronic device 30, contact data, phone book data, messages, pictures, videos, etc. The memory 304 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0088] The power supply assembly 306 provides power to the various components of the electronic device 30. The power supply assembly 306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 30.

[0089] The multimedia component 308 includes a screen that provides an output interface between the electronic device 30 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 308 includes a front camera and / or a rear camera. When the electronic device 30 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.

[0090] The audio component 310 is configured to output and / or input audio signals. For example, the audio component 310 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 30 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 304 or transmitted via the communication component 316. In some embodiments, the audio component 310 also includes a speaker for outputting audio signals.

[0091] The input / output interface 312 provides an interface between the processing component 302 and peripheral interface modules, such as a keyboard, a click wheel, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0092] The sensor assembly 314 includes one or more sensors for providing various aspects of status assessment for the electronic device 30. For example, the sensor assembly 314 can detect the open / closed state of the device 30, the relative positioning of components, such as the display and keypad of the electronic device 30. The sensor assembly 314 can also detect changes in the position of the electronic device 30 or a component of the electronic device 30, the presence or absence of user contact with the electronic device 30, the orientation or acceleration / deceleration of the electronic device 30, and temperature changes of the electronic device 30. The sensor assembly 314 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 314 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 314 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0093] The communication component 316 is configured to facilitate wired or wireless communication between the electronic device 30 and other devices. The electronic device 30 can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G or a combination thereof. In an exemplary embodiment, the communication component 316 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 316 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0094] In an exemplary embodiment, the electronic device 30 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described methods.

[0095] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory including instructions. The instructions can be executed by a processor of an electronic device to complete the scene ground damage processing method provided in the first aspect, specifically comprising: determining the initial ground material in the combat area of ​​the game scene, wherein the initial ground material is preset with a first ground map and a second ground map, the first ground map is a ground map in an undamaged state, and the second ground map is a ground map in a completely damaged state; obtaining ground damage feature parameters corresponding to the skills released in the combat area, drawing a mask map according to the ground damage feature parameters, and the mask map is used to store the damage information of the ground under the action of the released skills; interpolating the first ground map and the second ground map preset in the initial ground material according to the mask map, and rendering the ground damaged by the skill according to the interpolation result. The specific implementation process can refer to the method embodiment provided in the first aspect, which will not be repeated here. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a tape, a floppy disk, and an optical data storage device.

[0096] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein.

[0097] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope of the present invention. The scope of the present invention is limited only by the appended claims. The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of protection of the present invention.

Claims

1. A method for processing scene ground damage, characterized in that: The method comprises: Determining an initial ground material within a combat area in a game scene, wherein the initial ground material is preset with a first ground texture and a second ground texture, the first ground texture being a ground texture in an undamaged state, and the second ground texture being a ground texture in a completely damaged state; Obtaining ground damage characteristic parameters corresponding to skills released in the combat zone, and drawing a mask map based on the ground damage characteristic parameters, wherein the mask map is used to store ground damage information under the effect of the released skill. Specifically, ground damage characteristic parameters corresponding to skills released successively by players in the same combat zone are drawn on the same mask map to achieve accumulation of ground damage information. The ground damage characteristic parameters include release position information, damage graphic information, and skill strength information. According to the mask map, the first ground map and the second ground map preset in the initial ground material are interpolated, and the ground damaged by the skill is rendered according to the interpolation result.

2. The method according to claim 1, characterized in that Determining the initial ground material in the combat area of ​​the game scene includes: Creating a vertically downward orthographic camera in the battle area of ​​the game scene, wherein the viewport of the orthographic camera covers the entire battle area; The initial ground material in the combat area is determined by the orthographic camera.

3. The method according to claim 2, characterized in that Before drawing the mask map according to the ground damage characteristic parameters, the method further includes: A single-channel mask texture with a preset resolution is created as a rendering target of the orthographic camera, for storing the shape and extent of damage to the ground caused by skills released in the combat area.

4. The method according to claim 1, wherein Drawing a mask map according to the ground damage characteristic parameters includes: A preset drawing interface is called to draw the mask map according to the release position information, the damage graphic information and the skill strength information, and the brightness value distribution of the mask map is determined according to the skill strength information.

5. The method according to claim 4, characterized in that The release position information includes the skill release position and release direction; the damage graphic information includes: damage shape and size.

6. The method according to claim 1, characterized in that Interpolating a first ground map and a second ground map preset in the initial ground material according to the mask map, comprising: When drawing the ground, the coordinates of the currently drawn pixel are converted from the world space to the image space corresponding to the mask map in the shader; Sampling the mask brightness value corresponding to the current drawing pixel from the mask map, and sampling the color value corresponding to the current drawing pixel from the first ground map and the second ground map, which are respectively the first color value and the second color value; An interpolation operation is performed on the first color value and the second color value using the mask brightness value to obtain a color of the texture map corresponding to the current drawing pixel.

7. The method according to claim 6, characterized in that Rendering the ground damaged by the skill according to the interpolation result includes: Lighting calculations are performed on the colors of the interpolated texture map to render the ground damaged by the skill.

8. A scene ground damage processing device, characterized in that: The device comprises: A ground material determination module, configured to determine an initial ground material within a combat area in a game scene, wherein the initial ground material is preset with a first ground texture and a second ground texture, wherein the first ground texture is a ground texture in an undamaged state, and the second ground texture is a ground texture in a completely damaged state; A texture drawing module is used to obtain ground damage characteristic parameters corresponding to skills released in the combat zone, and draw a mask texture based on the ground damage characteristic parameters. The mask texture is used to store the ground damage information under the action of the released skills. The ground damage characteristic parameters corresponding to skills released by players in the same combat zone are drawn on the same mask texture to achieve accumulation of ground damage information. The ground damage characteristic parameters include release position information, damage graphic information, and skill strength information. A ground rendering module is used to interpolate the first ground map and the second ground map preset in the initial ground material according to the mask map, and render the ground damaged by the skill according to the interpolation result.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the steps of the method according to any one of claims 1 to 7 are implemented when the processor executes the program.

10. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Terrain model rendering method and device, electronic equipment and storage medium

    CN113546410A

  • Water body surface rendering method and device, equipment and storage medium

    CN113617024A