Methods, apparatus, storage media and electronic devices for virtual resource fragmentation
By acquiring attack information and a cutting model, the target fragments are identified and their edges are randomly generated, solving the problem of poor edge effects of fragments after virtual resource fragmentation, achieving more realistic fragmentation performance and optimizing computer performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2023-02-21
- Publication Date
- 2026-06-30
AI Technical Summary
Existing real-time physics engines produce fragments with regular edges after cutting, resulting in a discrepancy between the actual fragmentation effect and the real-world situation.
By acquiring attack information and cutting models, the activated target fragments are identified, and edges are randomly generated based on preset cutting models. The generated edge models are then used for rendering.
It improves the fragmentation effect of virtual resources, making the edges of blocks more realistic, and reduces the consumption of computer performance.
Smart Images

Figure CN116251355B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer processing technology, specifically to a method for breaking down virtual resources, a device for breaking down virtual resources, a storage medium, and an electronic device. Background Technology
[0002] With the development of modern game technology, players have higher demands for all aspects of game performance, including real-time physics performance, and shattering is a common and tricky problem in physics performance.
[0003] Current real-time physics engines use pre-made cut fragments for the crushing process. While this eliminates the need for real-time cutting and reduces the performance overhead of computer processing, the edges of the cut fragments are regular, and the crushing effect differs from reality.
[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] The purpose of this disclosure is to provide a method for processing the fragmentation of virtual resources, which aims to solve the problem of poor edge fragmentation effect after virtual resources are broken.
[0006] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.
[0007] According to one aspect of the embodiments of this disclosure, a method for processing the fragmentation of virtual resources is provided, including:
[0008] In response to an attack on a target virtual resource, the attacker acquires attack information and a segmentation model of the target virtual resource; wherein the segmentation model includes multiple fragments obtained by segmenting the target virtual resource.
[0009] Based on the attack information and the cutting model, the target fragment activated by the attack is determined, and at least one edge patch is determined based on the target fragment and the cutting model;
[0010] The edge models of each edge patch are obtained by randomly generating edges of the edge patches according to the preset facet model, and the target virtual resource is rendered according to the edge models.
[0011] According to a second aspect of the present disclosure, a virtual resource fragmentation processing apparatus is provided, characterized in that it includes:
[0012] An acquisition module is used to respond to attacks against a target virtual resource by acquiring attack information and a segmentation model of the target virtual resource; wherein the segmentation model includes multiple fragments obtained by segmenting the target virtual resource.
[0013] The determination module is used to determine the target fragment activated by the attack based on the attack information and the cutting model, and to determine at least one edge patch based on the target fragment and the cutting model;
[0014] The filling module is used to randomly generate the edges of the edge patches according to a preset facet model to obtain the edge model of each edge patch, so as to render the target virtual resource according to the edge model.
[0015] According to a third aspect of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements a virtual resource fragmentation method as described in the above embodiments.
[0016] According to a fourth aspect of the present disclosure, an electronic device is provided, characterized in that it includes: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement a virtual resource fragmentation processing method as described in the above embodiments.
[0017] The exemplary embodiments disclosed herein may have some or all of the following beneficial effects:
[0018] In some embodiments of this disclosure, after a target virtual resource is attacked, the activated target fragments are determined based on the attack information and the cutting model of the target virtual resource. This results in edge patches that require random edge generation. Then, edges are randomly generated according to a preset facet model, resulting in edge models for rendering the broken effect. Based on the method provided in this disclosure, on the one hand, when a resource breaks, the broken edge facets can be randomly processed, resulting in a broken appearance with edge models in subsequent rendering, making the edges of the blocks more realistic and improving the broken appearance of the virtual resource. On the other hand, the random generation of edges based on a pre-configured facet model reduces computer performance consumption compared to calculating the edge effects of each fragment in real time.
[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0021] Figure 1 This schematic diagram illustrates a flowchart of a virtual resource fragmentation method according to an exemplary embodiment of the present disclosure;
[0022] Figure 2 This schematic diagram illustrates a virtual resource after being segmented according to an exemplary embodiment of the present disclosure;
[0023] Figure 3 This illustration schematically shows a virtual resource segmentation model in an exemplary embodiment of the present disclosure;
[0024] Figure 4 (a) to Figure 4 (b) A schematic diagram illustrating a virtual resource edge before and after generation in an exemplary embodiment of the present disclosure;
[0025] Figure 5 (a) to Figure 5 (b) A schematic diagram illustrating another virtual resource edge generation before and after in an exemplary embodiment of the present disclosure;
[0026] Figure 6 A schematic diagram of a cross-sectional model in an exemplary embodiment of this disclosure is shown.
[0027] Figure 7 The illustration schematically shows a partial edge patch in an exemplary embodiment of the present disclosure;
[0028] Figure 8 (a) to Figure 8 (d) A schematic diagram illustrating a cross-section model filling in an exemplary embodiment of the present disclosure;
[0029] Figure 9 This schematic diagram illustrates the composition of a virtual resource fragmentation processing apparatus according to an exemplary embodiment of the present disclosure;
[0030] Figure 10 This schematic diagram illustrates a computer-readable storage medium according to an exemplary embodiment of the present disclosure;
[0031] Figure 11 The schematic diagram illustrates the structure of a computer system of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation
[0032] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art.
[0033] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0034] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0035] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0036] The implementation details of the technical solutions of the embodiments of this disclosure are described in detail below.
[0037] Figure 1 This schematically illustrates a flowchart of a method for handling the fragmentation of virtual resources according to an exemplary embodiment of this disclosure. Figure 1 As shown, the method for handling the fragmentation of virtual resources includes steps S101 to S103:
[0038] Step S101: In response to an attack on the target virtual resource, obtain attack information and a segmentation model of the target virtual resource; wherein, the segmentation model includes multiple fragments obtained by segmenting the target virtual resource;
[0039] Step S102: Based on the attack information and the cutting model, determine the target fragment activated by the attack, and based on the target fragment and the cutting model, determine at least one edge patch;
[0040] Step S103: Based on the preset facet model, the edge patches are randomly generated to obtain the edge model of each edge patch, so as to render the target virtual resource according to the edge model.
[0041] In some embodiments of this disclosure, after a target virtual resource is attacked, the activated target fragments are determined based on the attack information and the cutting model of the target virtual resource. This results in edge patches that require random edge generation. Then, edges are randomly generated according to a preset facet model, resulting in edge models for rendering the broken effect. Based on the method provided in this disclosure, on the one hand, when a resource breaks, the broken edge facets can be randomly processed, resulting in a broken appearance with edge models in subsequent rendering, making the edges of the blocks more realistic and improving the broken appearance of the virtual resource. On the other hand, the random generation of edges based on a pre-configured facet model reduces computer performance consumption compared to calculating the edge effects of each fragment in real time.
[0042] The following will describe in more detail each step of the virtual resource fragmentation method in this exemplary embodiment, with reference to the accompanying drawings and embodiments.
[0043] In step S101, in response to an attack on the target virtual resource, attack information and a segmentation model of the target virtual resource are obtained; wherein, the segmentation model includes multiple fragments obtained by segmenting the target virtual resource.
[0044] In a game scene, the game engine includes virtual resources, which can be models in the game scene that need to be rendered with a broken effect, such as a wall, a cup, a table, etc.
[0045] In the real-time runtime environment of a game engine, when a virtual resource is attacked, the virtual resource is used as the target virtual resource, and the runtime environment provides attack information, which may include the attack trigger point and the attack damage result, for use in the physical calculation of the fragmentation.
[0046] Simultaneously, a segmentation model of the target virtual resource needs to be obtained. The segmentation model is a model composed of individual fragments obtained by pre-segmenting the target virtual resource. Therefore, the virtual resource needs to be segmented beforehand, either using a 3D Worley map or manually. The key is to make the cut surfaces as flat as possible, which can save a large number of geometric triangles and reduce computer processing performance.
[0047] Figure 2 This illustration schematically depicts a virtual resource segmentation process according to an exemplary embodiment of this disclosure. For example... Figure 2 As shown, a virtual resource is divided into multiple fragments.
[0048] In one embodiment of this disclosure, obtaining the segmentation model of the target virtual resource includes: changing the target virtual resource from a non-segmented state to a segmented state; and obtaining the segmentation model based on the segmented state.
[0049] Specifically, to avoid the problem of too many geometric triangles in the resource model stored in the game engine, which would further reduce the computer's processing performance, the virtual resource can remain in an uncut state when it is not attacked, that is, a complete model that is not cut. When it is attacked, it is changed to a cut state, that is, a cut model composed of cut fragments.
[0050] Figure 3 This illustration schematically depicts a virtual resource segmentation model according to an exemplary embodiment of this disclosure. For example... Figure 3 As shown, the virtual resource is a wall, which is composed of multiple fragments in the cutting model.
[0051] Step S102: Based on the attack information and the cutting model, determine the target fragment activated by the attack, and based on the target fragment and the cutting model, determine at least one edge patch.
[0052] Specifically, after obtaining the attack information and the cutting model, the runtime environment starts physical calculation and obtains the activated target fragments that participate in the calculation, which are the fragments that need to be dropped after being hit by this attack.
[0053] In one embodiment of this disclosure, determining the edge patch in step S102 includes: determining a first number of the target fragments and obtaining a second number of all fragments in the cutting model; and determining at least one edge patch based on the relationship between the first number and the second number.
[0054] Specifically, there are two main types of fragmentation: one is that only a portion of the target virtual resource is involved in the calculation, and this portion of the fragment falls, while the other fragments that are not involved in the calculation remain; the other is that all fragments of the target virtual resource are involved in the calculation, meaning that the entire target virtual resource is completely fragmented.
[0055] Therefore, it is first necessary to determine the relationship between the number of fragments involved in the solution (first quantity) and the total number of fragments in the cutting model (second quantity). The method for determining the edge patches will vary depending on the situation.
[0056] In the first case, where the first quantity is less than the second quantity, determining at least one edge patch based on the relationship between the first quantity and the second quantity includes: determining a remaining model based on the target fragment and the cutting model; wherein the remaining model includes non-target fragments that have not been activated by the attack; determining edge patches according to the cutting surfaces of the non-target fragments in the remaining model; and traversing all the target fragments to determine edge patches according to the cutting surfaces of each target fragment.
[0057] Specifically, when the part involved in the calculation is a fragment of the target virtual resource, it is necessary not only to generate the edges of the fallen target fragments, but also to generate the edges of the cut surfaces where the fragments fell.
[0058] Figure 4 The illustration schematically shows a virtual resource edge generation diagram before and after an exemplary embodiment of the present disclosure. Figure 4 (a) is a schematic diagram before the virtual resource edge is generated. Figure 4 (b) is a schematic diagram after the virtual resource edge is generated. (Refer to...) Figure 4 As shown in (b), edge generation was performed on the fallen cut surface.
[0059] refer to Figure 4 As shown, the middle of the wall is hit. After removing the target fragment from the middle of the cutting model, the remaining model is obtained. The non-target fragments in the remaining model are connected and combined, and some cut surfaces are exposed. In order to improve the display of the broken effect, these cut surfaces are used as edge patches for subsequent edge generation.
[0060] Based on the continuity of the cut surfaces, they can be divided into an indefinite number of edge patches. Interconnected cut surfaces can be considered as one edge patch, while unconnected cut surfaces are considered as different edge patches.
[0061] The target fragments (not shown in the figure) are complete fragments that fall off one by one. The cut surfaces of each fragment are connected to each other, and an edge patch can be generated independently based on its cut surface.
[0062] In the second case, where the first quantity equals the second quantity, determining at least one edge patch based on the relationship between the first quantity and the second quantity includes: traversing all the target fragments to determine the edge patch according to the cutting surface of each target fragment.
[0063] Compared to the first quantity being less than the second quantity, the processing method does not require generating edge patches based on the remaining model. The generation of edge patches for fragments is the same as before, so we will not go into details here.
[0064] Figure 5The illustration schematically shows a diagram before and after another virtual resource edge generation in an exemplary embodiment of this disclosure. Figure 5 (a) is a schematic diagram before the virtual resource edge is generated. Figure 5 (b) is a schematic diagram after the virtual resource edge is generated. (Refer to...) Figure 5 As shown in (b), the cut surfaces of each fragment were edge-generated.
[0065] It should be noted that edge patches are composed only of cut surfaces; the edge portions of virtual resources that are not cut are not considered edge patches and are not used for edge generation. For example... Figure 5 As shown in (b), the edges around the wall were not treated.
[0066] In step S103, edge models of each edge patch are obtained by randomly generating edges of the edge patches according to a preset facet model, so as to render the target virtual resource according to the edge models.
[0067] In step S103, the random edge generation includes: obtaining the triangular facets of the edge patch to generate a strip composed of multiple connected cutting faces; determining filling sampling points based on the cutting faces in the strip; and randomly filling the cutting facet with a preset cutting facet model according to the filling sampling points for each cutting facet in the edge patch to obtain the edge model.
[0068] Specifically, after obtaining the edge facets of the cut, edge models are generated on them. These models are scattered across the surface to create different cut effects. For the remaining static model, edge details will "grow," and for activated target fragments, the edges will also have detailed content. First, the triangular faces of the edge facets are obtained to generate strips composed of multiple connected cutting faces. Figure 7 This diagram schematically illustrates a partial edge patch according to an exemplary embodiment of the present disclosure. (Reference) Figure 7 As shown, the edge patch is strip-shaped, consisting of multiple connected cut surfaces with the same width but different lengths.
[0069] Then, fill sampling points are determined based on the cut surfaces in the strip. Specifically, each cut surface needs to be filled, and the upper left and lower left corners of each cut surface can be used as fill sampling points for that cut surface rectangle, thus enabling precise filling.
[0070] For one of the cut surfaces, the random filling process is as follows: randomly select a cut surface model; adaptively adjust the cut surface model according to the size value of the cut surface; fill the cut surface with the adaptively adjusted cut surface model.
[0071] Specifically, the cut surface model needs to be randomly filled into all the cut surfaces of the edge patch. When filling each cut surface, one can be randomly selected from the cut surface models, and then the cut surface model can be adjusted before filling, such as shrinking or enlarging it. Matching can be done according to the length of the cut surface, with any portion exceeding the width being trimmed, or matching can be done according to the width of the cut surface, with any portion exceeding the length being trimmed.
[0072] The cross-section model can be pre-configured and imported into the runtime environment. The cross-section model can have various styles and sizes. Preferably, the cross-section model has a trapezoidal edge shape, which can better adapt to edge patches with different degrees of curvature.
[0073] Figure 6 A schematic diagram of a cross-sectional model in an exemplary embodiment of this disclosure is shown. Reference Figure 6 As shown, the cross-section model primarily presents a trapezoidal shape with a regular bottom, while the edges can be artistically expressed by the artist. It should be noted that the random filling here can be applied to each cross-section; for each cross-section, the cross-section model can be randomly selected and placed to generate edge effects.
[0074] After filling a cut surface, a verification process can be added, which checks whether the adaptively adjusted cut surface model completely covers the cut surface. If it completely covers it, the filling is considered complete. If it does not completely cover it, the cut surface model can be replaced and the filling can be repeated. Figure 8 This schematic diagram illustrates a cross-section model filling method according to an exemplary embodiment of this disclosure. Figure 8 (a) illustrates a schematic diagram of a three-dimensional edge patch; during filling, the edge patch can be tiled first to convert the three-dimensional solid model into a two-dimensional planar model, such as... Figure 8 (b) As shown; based on the edge pieces after tiling, use as follows Figure 8 (c) shows different styles of cut surface models. Each cut surface is filled sequentially, and the filled styles are obtained after adaptive adjustment. Figure 8 As shown in (d).
[0075] Referring to the above Figure 4 and Figure 5 The rendering effect presented when using the fragmentation method of this application is as follows: Figure 4 (a) and Figure 5 As shown in (a), the style after edge generation of the cut surface is as follows: Figure 4 (b) and Figure 5 As shown in (b), the edge cuts are more realistic and the rendering effect is better than before.
[0076] In one embodiment of this disclosure, when rendering the target virtual resource according to the edge model, the method further includes: determining an activation position based on the target fragment; and playing particle effects at the activation position.
[0077] Specifically, during the fragmentation rendering process, in order to improve the realism of the fragmentation effect, particle effects may be played around the attack starting point (i.e., the activation position) to cover the edge transitions. Among these particle effects, some stones will be included to simulate small fragments. These fragments will not participate in the physics calculation, which can save performance consumption.
[0078] The activation positions and the number of activation positions can be flexibly determined based on the degree of fragmentation and the location of the fragments. For example, the centroid of all activated target fragments can be used as the activation position to play particle effects, or the target fragments can be randomly assigned into multiple fragment groups, with the centroid of each group of target fragments used as the activation position. In this way, when the fragmentation is extensive, playing particle effects simultaneously at multiple points will be more realistic.
[0079] In one embodiment of this disclosure, the method for handling virtual resource fragmentation can be mainly divided into three stages:
[0080] (I) Pre-fabrication section
[0081] First, cut the broken object. This can be done using a 3D Worley model or manually, the key is to make the cut surface as flat as possible. A flat cut surface saves a lot of geometric triangles and prepares the material for the following steps.
[0082] On the other hand, in order to generate facets in real time for the next stage, we need to create some facet models first. The models should mainly be trapezoidal, and the edges can be artistically expressed according to the artist's ideas. Several such models are needed. Of course, facet models can also be other types, such as right-angled edges, etc.
[0083] Finally, the static, uncut virtual resource model and the cut model are packaged and imported into the game engine, while the created faceted model is also imported into the runtime environment.
[0084] (II) Real-time Operation Section
[0085] The real-time operation phase refers to the stage where virtual resources are attacked and then enter physical computation.
[0086] Before being triggered, the target virtual resource will remain in a non-cut state. When a point of the target virtual resource is hit in the scene, the calculation of edge fragments will begin from the trigger frame.
[0087] At this point, a switch from a non-cutting state to a cutting state can be made. This is to alleviate the problem of too many geometric triangles before being triggered. Simultaneously, attack information provided by the runtime environment can be obtained, and physical calculation can be initiated based on this information, such as the attack trigger point and attack damage results, to obtain the target fragments that are activated and participate in the calculation.
[0088] Then, upon activation, edge generation occurs based on the target fragment. After acquiring the edge facets of the cut piece, cut models are generated on top of them. These models are scattered across the surface to create different cut effects. Since the edge details come from pre-made models and are dynamically and randomly generated, there is room for optimization.
[0089] (III) Termination of Processing Section
[0090] After the settlement, the retained fragments can be manually controlled. These retained fragments will fully participate in the physics calculation, while the others are destroyed upon triggering the fall. They do not participate in collision calculation and are only affected by gravity, which is also to save performance. The retained fragments will then enter a dormant state, waiting to be activated again. This completes the entire fragmentation process.
[0091] Based on the above method, on the one hand, when generating edges randomly, since the cross-sectional model is pre-made, it only needs to be adaptively filled during use. Compared with real-time calculation of the edge part, this can reduce the performance consumption of physical calculation, thus achieving better results with less performance consumption. On the other hand, since it is randomly filled, the edge effect under different attacks on different virtual resources is dynamically random, the result is not unique and has room for optimization, thus improving the fragmentation display effect.
[0092] Figure 9 This schematic diagram illustrates the composition of a virtual resource fragmentation processing apparatus according to an exemplary embodiment of the present disclosure, such as... Figure 9 As shown, the virtual resource fragmentation processing device 900 may include an acquisition module 901, a determination module 902, and a filling module 903. Wherein:
[0093] The acquisition module 901 is used to respond to an attack on a target virtual resource and acquire attack information and a segmentation model of the target virtual resource; wherein, the segmentation model includes multiple fragments obtained by segmenting the target virtual resource;
[0094] The determination module 902 is used to determine the target fragment activated by the attack based on the attack information and the cutting model, and to determine at least one edge patch based on the target fragment and the cutting model;
[0095] The filling module 903 is used to randomly generate the edges of the edge patches according to the preset cross-sectional model to obtain the edge model of each edge patch, so as to render the target virtual resource according to the edge model.
[0096] According to an exemplary embodiment of the present disclosure, the determining module 902 is used to determine a first number of the target fragments and to obtain a second number of all fragments in the cutting model; and to determine at least one edge patch based on the relationship between the first number and the second number.
[0097] According to an exemplary embodiment of this disclosure, when the first quantity is less than the second quantity, the determining module 902 is configured to determine a remaining model based on the target fragments and the cutting model; wherein the remaining model includes non-target fragments that have not been activated by the attack; determine edge patches based on the cutting surfaces of the non-target fragments in the remaining model; and traverse all the target fragments to determine edge patches based on the cutting surfaces of each target fragment.
[0098] According to an exemplary embodiment of this disclosure, when the first quantity is equal to the second quantity, the determining module 902 is used to traverse all the target fragments to determine edge patches according to the cutting surface of each target fragment.
[0099] According to an exemplary embodiment of the present disclosure, the filling module 903 is used to obtain the triangular facets of the edge patch to generate a strip composed of multiple connected cutting faces; determine filling sampling points based on the cutting faces in the strip; and randomly fill the cutting facets with a preset cutting facet model according to the filling sampling points for each cutting facet in the edge patch to obtain the edge model.
[0100] According to an exemplary embodiment of the present disclosure, the filling module 903 is used to randomly select a facet model; adaptively adjust the facet model according to the size value of the facet; and fill the facet model with the adaptively adjusted facet model.
[0101] According to an exemplary embodiment of this disclosure, the acquisition module 901 is used to change the target virtual resource from a non-segmented state to a segmented state; and to acquire the segmentation model based on the segmented state.
[0102] According to an exemplary embodiment of this disclosure, the acquisition module 901 further includes a rendering module, configured to determine an activation position based on the target fragment and play particle effects at the activation position.
[0103] The specific details of each module in the virtual resource fragmentation processing device 900 described above have been described in detail in the corresponding virtual resource fragmentation processing method, so they will not be repeated here.
[0104] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0105] In an exemplary embodiment of this disclosure, a storage medium capable of implementing the above-described method is also provided. Figure 10 This schematic diagram illustrates a computer-readable storage medium according to an exemplary embodiment of the present disclosure, such as... Figure 10 As shown, a program product 1000 for implementing the above-described method according to an embodiment of the present disclosure is described. This product may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a mobile phone. However, the program product of the present disclosure is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0106] In an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided. Figure 11 The schematic diagram illustrates the structure of a computer system of an electronic device according to an exemplary embodiment of the present disclosure.
[0107] It should be noted that, Figure 11 The computer system 1100 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0108] like Figure 11 As shown, the computer system 1100 includes a Central Processing Unit (CPU) 1101, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 1102 or programs loaded from storage section 1108 into Random Access Memory (RAM) 1103. The RAM 1103 also stores various programs and data required for system operation. The CPU 1101, ROM 1102, and RAM 1103 are interconnected via a bus 1104. An Input / Output (I / O) interface 1105 is also connected to the bus 1104.
[0109] The following components are connected to I / O interface 1105: an input section 1106 including a keyboard, mouse, etc.; an output section 1107 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to I / O interface 1105 as needed. Removable media 1111, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1110 as needed so that computer programs read from them can be installed into storage section 1108 as needed.
[0110] In particular, according to embodiments of this disclosure, the processes described below with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1109, and / or installed from removable medium 1111. When the computer program is executed by central processing unit (CPU) 1101, it performs various functions defined in the system of this disclosure.
[0111] It should be noted that the computer-readable medium shown in the embodiments of this disclosure can be a computer-readable signal medium or 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 thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0112] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0113] The units described in the embodiments of this disclosure can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the unit itself.
[0114] In another aspect, this disclosure also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.
[0115] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0116] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this disclosure.
[0117] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein.
[0118] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for processing the fragmentation of virtual resources, characterized in that, include: In response to an attack on a target virtual resource, the attacker acquires attack information and a segmentation model of the target virtual resource; wherein the segmentation model includes multiple fragments obtained by segmenting the target virtual resource. Based on the attack information and the cutting model, the target fragment activated by the attack is determined, and at least one edge patch is determined based on the target fragment and the cutting model; The triangular faces of the edge patch are obtained to generate strips composed of multiple connected cutting faces; filling sampling points are determined based on the cutting faces in the strips; for each cutting face in the edge patch, a preset cutting face model is randomly filled into the cutting face according to the filling sampling points to obtain the edge model of each edge patch, so as to render the target virtual resource according to the edge model.
2. The method for processing virtual resources according to claim 1, characterized in that, The step of determining at least one edge patch based on the target fragment and the cutting model includes: Determine the first number of the target fragments, and obtain the second number of all fragments in the cutting model; At least one edge patch is determined based on the relationship between the first quantity and the second quantity.
3. The method for processing virtual resources according to claim 2, characterized in that, When the first quantity is less than the second quantity, determining at least one edge patch based on the relationship between the first quantity and the second quantity includes: The remaining model is determined based on the target fragment and the cutting model; wherein, the remaining model includes non-target fragments that were not activated by the attack; The edge patches are determined based on the cutting surfaces of the non-target fragments in the remaining model; and Traverse all the target fragments to determine edge patches based on the cut surfaces of each target fragment.
4. The method for processing virtual resources according to claim 2, characterized in that, When the first quantity equals the second quantity, determining at least one edge patch based on the relationship between the first quantity and the second quantity includes: Traverse all the target fragments to determine edge patches based on the cut surfaces of each target fragment.
5. The method for processing virtual resources according to claim 1, characterized in that, The step of randomly filling the pre-set cross-section model onto the cut surface includes: A cross-section model is randomly selected; wherein the cross-section model has a trapezoidal edge shape. The cutting surface model is adaptively adjusted based on the dimensions of the cutting surface; The adaptively adjusted section model is filled into the cutting surface.
6. The method for processing virtual resources according to claim 1, characterized in that, Obtaining the segmentation model of the target virtual resource includes: Change the target virtual resource from a non-segmented state to a segmented state; The cutting model is obtained based on the cutting state.
7. The method for processing virtual resources according to claim 1, characterized in that, When rendering the target virtual resource based on the edge model, the method further includes: The activation location is determined based on the target fragment; Play particle effects at the activated location.
8. A virtual resource crushing and processing device, characterized in that, include: An acquisition module is used to respond to attacks against a target virtual resource by acquiring attack information and a segmentation model of the target virtual resource; wherein the segmentation model includes multiple fragments obtained by segmenting the target virtual resource. The determination module is used to determine the target fragment activated by the attack based on the attack information and the cutting model, and to determine at least one edge patch based on the target fragment and the cutting model; A filling module is used to obtain the triangular faces of the edge patch to generate a strip composed of multiple connected cutting faces; determine filling sampling points based on the cutting faces in the strip; for each cutting face in the edge patch, randomly fill the cutting face with a preset cutting face model according to the filling sampling points to obtain the edge model of each edge patch, so as to render the target virtual resource according to the edge model.
9. A computer-readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the virtual resource fragmentation method as described in any one of claims 1 to 7.
10. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the virtual resource fragmentation method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Crushing model generation method and device, electronic equipment and storage medium
CN115601524A
Information processing method and device in game, storage medium and electronic device
CN115607966A