Object processing method, computing device, storage medium and computer program product

By determining the target line segment model and terrain position in the virtual scene and placing and fusing the target objects, the problem of overlapping obstacles and terrain is solved, the authenticity and generation efficiency of the virtual scene are improved, and the fun of the game or animation scene is enhanced.

CN119215404APending Publication Date: 2024-12-31ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411256530.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

In virtual scenes, the problem of overlapping or collision between obstacles and terrain leads to poor authenticity of virtual scenes, and the prior art is difficult to effectively solve, affecting the fun and generation efficiency of game or animation scenes.

Method used

By determining the target line segment model, the target object is generated, and the terrain position that meets the preset terrain conditions is determined in the initial terrain model, the target object is placed at this position, and the fusion process is performed to avoid overlap and collision, and the target terrain model is generated.

Benefits of technology

It improves the authenticity and generation performance of virtual scenes, reduces the use of computing resources, and improves the efficiency and fun of scene construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119215404A_ABST
    Figure CN119215404A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of computers, in particular to an object processing method, computing equipment, a storage medium and a computer program product.The object processing method comprises the steps that a target line segment model is determined, and a target object is generated according to the target line segment model; in the initial terrain model, determining a terrain position meeting a preset terrain condition, and determining the terrain position as a target placement position of the target object; and placing the target object at the target placement position, and carrying out fusion processing on the target object and the initial terrain model to obtain a target terrain model. The conditions that the target object overlaps with other terrains in the initial terrain model and collides with the other terrains are avoided, the target terrain model is obtained after the target object placed at the target placement position and the initial terrain model are fused, and therefore the authenticity of a virtual scene corresponding to the generated target terrain model is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the field of computer technology, and in particular, to object processing methods, computing devices, storage media, and computer program products. Background Art

[0002] With the development of computer technology, 3D technology is increasingly being used in the field of virtual scene rendering, such as game scene rendering, animation scene rendering, etc. In the field of game scene rendering, in order to create a relatively realistic environment and provide richer game scenes or animation scenes, objects can be added to the scene during the production of games or animations. For example, in a game battle scene, some obstacles can be placed between two opposing camps to increase the difficulty and fun of the game.

[0003] Usually, during the process of obstacle generation, multiple obstacles are usually placed in the virtual scene. If there are other terrains in the virtual scene, the obstacles may overlap or collide with other terrains. For example, if there are roads, rivers, snow-capped mountains and other terrains in the virtual scene, obstacles may cross the road or river, thus affecting the authenticity of the virtual scene. Therefore, an effective technical solution is urgently needed to solve the above problems. Summary of the invention

[0004] In view of this, an embodiment of the present specification provides an object processing method. One or more embodiments of the present specification also relate to an object processing device, a computing device, a computer-readable storage medium and a computer program product to solve the technical defect of poor virtual scene authenticity in the prior art.

[0005] According to a first aspect of an embodiment of this specification, there is provided an object processing method, including:

[0006] Determine a target line segment model, and generate a target object according to the target line segment model;

[0007] In the initial terrain model, determining a terrain position that meets a preset terrain condition, and determining the terrain position as a target placement position of the target object;

[0008] The target object is placed at the target placement position, and the target object and the initial terrain model are fused to obtain a target terrain model.

[0009] According to a second aspect of an embodiment of this specification, there is provided an object processing device, including:

[0010] A generating module is configured to determine a target line segment model and generate a target object according to the target line segment model;

[0011] A determination module is configured to determine a terrain position that meets a preset terrain condition in the initial terrain model, and determine the terrain position as a target placement position of the target object;

[0012] The fusion module is configured to place the target object at the target placement position, and fuse the target object with the initial terrain model to obtain a target terrain model.

[0013] According to a third aspect of an embodiment of this specification, a computing device is provided, including:

[0014] Memory and processor;

[0015] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above method are implemented.

[0016] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores a computer program / instruction, and the steps of the above method are implemented when the computer program / instruction is executed by a processor.

[0017] According to a fifth aspect of the embodiments of this specification, a computer program product is provided, comprising a computer program / instruction, which implements the steps of the above method when executed by a processor.

[0018] An embodiment of the present specification provides an object processing method, including: determining a target line segment model, and generating a target object based on the target line segment model; determining a terrain position that meets a preset terrain condition in an initial terrain model, and determining the terrain position as a target placement position of the target object; placing the target object at the target placement position, and fusing the target object with the initial terrain model to obtain a target terrain model.

[0019] The method determines a target line segment model and generates a target object according to the target line segment model. In the initial terrain model, a terrain position that meets a preset terrain condition is determined, and the terrain position is determined as a target placement position of the target object. The target object is placed at the target placement position, thereby avoiding overlap or collision between the target object and other terrains in the initial terrain model. After the target object placed at the target placement position is fused with the initial terrain model, the target terrain model is obtained, thereby ensuring the authenticity of the virtual scene corresponding to the generated target terrain model. Moreover, after the target placement position is determined, the target object and the initial terrain model are fused, thereby reducing the occupation of computing resources and further ensuring the generation performance and efficiency of the target terrain model. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a flow chart of an object processing method provided by an embodiment of this specification;

[0021] FIG. 2( a ) and FIG. 2( b ) are schematic diagrams of object generation in an object processing method provided in one embodiment of the present specification;

[0022] Figure 3 is a processing flow chart of an object processing method provided by an embodiment of this specification;

[0023] Figure 4 is a schematic diagram of the structure of an object processing device provided by an embodiment of this specification;

[0024] Figure 5 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0025] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0026] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0027] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0028] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0029] First, the terms involved in one or more embodiments of this specification are explained.

[0030] In practical applications, multiple obstacles are usually placed in the virtual scene. When there are other terrains in the virtual scene, such as roads, rivers, snow-capped mountains and other terrains, obstacles may cross the road or river. In addition, in the process of generating obstacles, a fixed-style obstacle model can usually be used to directly generate obstacles. This will cause the style of the obstacles in the scene to be fixed and homogenized, further affecting the authenticity of the virtual scene and reducing its fun. Artificial modification of different obstacle styles will also lead to an increase in computing resources and human resources.

[0031] In the field of games, in a battle or real-time battle scene, some obstacles (such as trenches) are placed between the two camps to increase the difficulty and fun of the battle. There are usually two methods. One is to manually paint the terrain to form a trench. This method is time-consuming and labor-intensive, and once a modification is required, the terrain will be repeatedly painted and corrected, which is time-consuming and labor-intensive; the other is to use fixed-style trenches and bunker models to splice into a circular battlefield with different styles. This method will result in very limited styles of battlefield scenes, obvious homogeneity, and repeated rework once modification is required. Therefore, an effective technical solution is urgently needed to solve the above problems.

[0032] In this specification, an object processing method is provided. This specification also relates to an object processing apparatus, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.

[0033] See also Figure 1 , Figure 1 A flowchart of an object processing method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.

[0034] Step 102: Determine a target line segment model, and generate a target object according to the target line segment model.

[0035] Specifically, the object processing method provided in the embodiments of this specification can be applied to virtual scene generation tasks, and specifically can be applied to the generation of virtual objects in virtual scenes. For example, it can be the generation of virtual objects in a game virtual scene, and can also be applied to the generation of virtual objects in virtual scenes in other fields, such as the film and television fields, architectural design fields, education fields, and product design fields. Specifically, in the film and television fields, movie special effects, animated films, and television programs can use virtual scene rendering to create visual effects. In the field of architectural design, virtual scene rendering can be used to display unbuilt buildings or interior designs to achieve a preview of the final effect of architectural design. In the field of education, scene rendering in virtual reality and augmented reality can provide students with an immersive learning experience. In the field of product design, virtual scene rendering can be used to simulate the appearance and function of a product, so as to achieve product display to users and performance testing of products under different conditions. This embodiment of this specification does not limit this. For ease of understanding, the embodiments of this specification take the application of the object processing method to the generation of virtual objects in a game scene as an example for explanation.

[0036] Among them, the target object can be understood as an object to be generated in a virtual scene. When the virtual scene is a game scene, the target object can be understood as an obstacle placed in the game scene, such as trenches, tunnels, hills, towers, fortresses, etc. The target line segment model can be understood as a guide line segment used to generate the target object. The target line segment model can include guide line segments of various shapes, such as single line, double line, triple line, cross, etc. Referring to Figure 2, Figure 2 shows a schematic diagram of object generation in an object processing method provided according to an embodiment of the present specification, as shown in Figure 2(a), a1 shows guide line segments of various shapes.

[0037] Based on this, a guide line segment can be determined, and corresponding obstacles can be generated according to the guide line segment.

[0038] In practical applications, determining the target line segment model includes:

[0039] Determine any one of a plurality of line segment models of different shapes as a target line segment model; or

[0040] In response to a point selection instruction for the plurality of line segment models of different shapes, a target line segment model is determined.

[0041] Among them, the line segment models of multiple different shapes can be understood as the guide line segments of multiple different shapes, such as the single-line shape, double-line shape, triple-line shape, and cross-shaped guide line segments mentioned above. The selection instructions for the line segment models of multiple different shapes can be understood as the user's click selection instructions for the line segment models of multiple different shapes.

[0042] In one embodiment of the present specification, any one of a plurality of line segment models of different shapes may be randomly determined as a target line segment model.

[0043] In another embodiment of the present specification, multiple line segment models of different shapes can be displayed on a display interface of the client, and the user clicks on the multiple line segment models of different shapes on the display interface to select one of the line segment models of different shapes as the target line segment model.

[0044] For example, the display interface of the client displays single-line, double-line, triple-line and cross-shaped line segment models. The user clicks on these line segment models on the display interface of the client and selects one of the double-line line segment models as the target line segment model.

[0045] In summary, by selecting a target line segment model from a plurality of line segment models of different shapes, the line segment model can be randomly determined, and the user can also customize the shape of the target object, thereby meeting the personalized customization needs of target object generation.

[0046] In a specific implementation, generating a target object according to the target line segment model includes:

[0047] Adjusting the size and posture of the target line segment model to obtain an adjusted target line segment model;

[0048] Generating a target patch model according to the adjusted target line segment model;

[0049] A target object is generated according to the target patch model.

[0050] The target patch model may be understood as a patch used to generate a target object.

[0051] Based on this, the target line segment model can be randomly resized and adjusted in posture to obtain an adjusted target line segment model, and a corresponding target patch model can be generated according to the adjusted target line segment model, and a target object can be generated according to the target patch model.

[0052] In practical applications, as shown in a3 in FIG. 2( a), in the composition of adjusting the size and posture of the target line segment model, the target line segment model can be randomly differentiated, such as randomly adjusting the length and offset value of the target line segment model, randomly distorting the target line segment model, and randomly setting the width of the target line segment model.

[0053] In summary, by adjusting the size and posture of the target line segment model, it is convenient to realize random simulation of different styles of the target object, thereby achieving the diversity and richness of the generated target objects.

[0054] In a specific implementation, generating a target surface model according to the adjusted target line segment model includes:

[0055] Copying the adjusted target line segment model to obtain multiple adjusted target line segment models;

[0056] A target patch model is generated according to the multiple adjusted target line segment models.

[0057] Specifically, in order to realize generation from line to surface, the adjusted target line segment model may be copied to obtain a plurality of adjusted target line segment models, and a target surface model may be composed according to the plurality of adjusted target line segment models.

[0058] In one embodiment of the present specification, as shown by a4 in FIG. 2( a ), the width of the adjusted target line segment model may also be set to obtain a target patch model.

[0059] In addition, the target patch model may be generated according to the adjusted target line segment model in other ways, such as rotating or parallel moving the adjusted target line segment model, etc., which is not limited in the embodiments of this specification.

[0060] In summary, by copying the adjusted target line segment model, the target patch model is generated, and then the target object is generated according to the target patch model.

[0061] In a specific implementation, generating a target object according to the target patch model includes:

[0062] Determine the edge area and the center area of ​​the target patch model;

[0063] Performing a distortion process on the edge area and a collapse process on the center area to obtain an initial object;

[0064] The initial object is subjected to shape adjustment and edge processing to obtain a target object.

[0065] Specifically, as shown in a5 and a6 in FIG2(a), the edge area and the central area of ​​the target patch model can be determined, and after the edge area is resampled, the edge area is distorted according to a preset interval and a preset amplitude, and the central area is randomly collapsed according to a preset value to obtain an initial object, and the shape of the initial object is adjusted, and the edge area of ​​the initial object is enlarged, as shown in a7 in FIG2(a), so as to facilitate edge transition during subsequent terrain collapse, thereby obtaining the target object.

[0066] In summary, by performing the above processing on the target patch model, the generation of the target object is achieved.

[0067] In practical applications, multiple obstacles may be placed in the virtual scene, that is, there are multiple target objects;

[0068] The step of determining a target line segment model and generating a target object according to the target line segment model comprises:

[0069] A plurality of target line segment models are determined, and a plurality of target objects are generated according to each of the plurality of target line segment models.

[0070] The shapes of the multiple target line segment models may be the same or different.

[0071] Specifically, a plurality of target line segment models may be determined, and a corresponding target object may be generated according to each of the plurality of target line segment models.

[0072] In practical applications, points can be randomly scattered in the initial terrain model corresponding to the virtual scene, and the trench type (i.e., shape) can be randomly matched according to the point sequence number. The target line segment model corresponding to each trench type is placed at the position of the randomly scattered points, and the target object is generated according to the target line segment model.

[0073] For example, target line segment model 1, target line segment model 2 and target line segment model 3 may be determined, and target object 1 may be generated according to target line segment model 1, target object 2 may be generated according to target line segment model 2, and target object 3 may be generated according to target line segment model 3.

[0074] In summary, by determining multiple target line segment models, multiple target objects can be generated, which facilitates the subsequent placement of multiple target objects in a virtual scene.

[0075] Step 104: In the initial terrain model, determine a terrain position that meets a preset terrain condition, and determine the terrain position as a target placement position for the target object.

[0076] The initial terrain model can be understood as the terrain model corresponding to the virtual scene to be generated. Meeting the preset terrain conditions can be understood as being able to place the target object. For example, the terrain positions of the cliff terrain, river terrain, and road terrain included in the initial terrain model do not meet the preset terrain conditions. The target placement position can be understood as the terrain position in the initial terrain model where the target object can be placed.

[0077] In practical applications, a terrain location that meets the preset terrain conditions may be a terrain location with a slope of less than 30 degrees and relative to (-50,300) meters. In the case where the virtual scene is a game scene, the manual stronghold area, restricted area, and road area in the game scene do not belong to the terrain location that meets the preset terrain conditions.

[0078] Based on this, a terrain position where the target object can be placed can be determined in the initial terrain model, and the terrain position is determined as the target placement position of the target object.

[0079] In one embodiment of the present specification, as shown in a2 in FIG. 2(a), points can be randomly scattered in the initial terrain model, and trench types (i.e., target line segment models of different shapes) can be randomly matched according to the point numbers of the randomly scattered points, and corresponding trench guide lines (i.e., target line segment models) can be placed at positions corresponding to the randomly scattered points, and positions that are not suitable for placing trenches can be excluded to obtain the final available target placement positions and corresponding trench guide lines, and trenches can be generated according to the trench guide lines. In practical applications, when the shape and size of the trench guide lines are adjusted, that is, the trench guide lines are randomly differentiated, and at this time, the point numbers of the randomly scattered points can be used as random values ​​to randomly expand or contract the length of the trench guide lines.

[0080] In another embodiment of the present specification, the target placement positions where trenches can be placed can be first determined in the initial terrain model, and the point numbers of the scattered points at each target placement position can be determined, the trench types can be randomly matched according to the point numbers, corresponding trench guide lines can be placed at each target placement position, and trenches can be generated according to the trench guide lines.

[0081] Furthermore, in the case where there are multiple target objects, determining a terrain position that meets a preset terrain condition in the initial terrain model, and determining the terrain position as a target placement position of the target object includes:

[0082] In the initial terrain model, a plurality of terrain positions satisfying preset terrain conditions are determined, and the plurality of terrain positions are determined as a plurality of target placement positions of the plurality of target objects.

[0083] Specifically, a plurality of terrain positions satisfying preset terrain conditions may be determined in the initial terrain model, and the plurality of terrain positions may be determined as a plurality of target placement positions corresponding to the plurality of target objects.

[0084] Continuing with the above example, in the initial terrain model, terrain position 1, terrain position 2, and terrain position 3 that meet the preset terrain conditions can be determined, and terrain position 1 can be determined as target placement position 1 corresponding to target object 1, terrain position 2 can be determined as target placement position 2 corresponding to target object 2, and terrain position 3 can be determined as target placement position 3 corresponding to target object 3.

[0085] In summary, by obtaining multiple target placement positions, it is convenient to place multiple target objects later.

[0086] Step 106: placing the target object at the target placement position, and fusing the target object with the initial terrain model to obtain a target terrain model.

[0087] Specifically, placing the target object at the target placement position and fusing the target object with the initial terrain model includes:

[0088] The target object is mapped to the target placement position in the initial terrain model, and a fusion process is performed on an edge area of ​​the target object and an edge area of ​​the target placement position.

[0089] In practical applications, the target object can be mapped to the target placement position in the initial terrain model to obtain a concave trench terrain pattern, as shown by a8 in FIG2(a), and the edge area of ​​the target object and the edge area of ​​the target placement position are fused according to the edge expansion value and edge reduction value of the target object, the preset terrain blur intensity, and the preset edge distortion spacing.

[0090] In summary, through terrain mapping and edge fusion, the target object can be generated on the initial terrain model, the terrain can be automatically mapped instead of manually painting the terrain, the textured roads can be automatically connected, the surface texture can be automatically calculated, and the work of repeated manual follow-up and modification can be reduced.

[0091] Furthermore, in the case where there are multiple target objects, placing the target objects at the target placement positions and fusing the target objects with the initial terrain model to obtain the target terrain model includes:

[0092] For each target object among the multiple target objects, randomly matching the corresponding target placement position to obtain a matching result;

[0093] According to the preset placement rule and the matching result, the multiple target objects are placed in corresponding target placement positions in sequence, and the multiple target objects and the initial terrain model are fused in sequence to obtain a target terrain model;

[0094] The preset placement rule is used to indicate that the distance between any two target objects satisfies a preset distance threshold.

[0095] Specifically, multiple target objects can be randomly matched to multiple target placement positions, and according to preset placement rules, the multiple target objects can be mapped to corresponding target placement positions in sequence, and the multiple target objects and the initial terrain model can be fused in sequence to obtain the target terrain model, as shown in b1 in Figure 2(b).

[0096] In practical applications, the preset distance threshold may be that the distance between any two target objects is not less than 30 meters. Alternatively, the preset distance threshold may be that the distance between any two target objects is a preset interval of 150 meters. This specification embodiment does not limit this.

[0097] Continuing with the above example, target object 1 can be mapped to target placement position 1, target object 2 can be mapped to target placement position 2, target object 3 can be mapped to target placement position 3, and target object 1 can be fused with the initial object model, target object 2 can be fused with the initial object model, and target object 3 can be fused with the initial object model.

[0098] In summary, by sequentially mapping and fusing multiple target objects, overlapping layers between multiple target objects can be avoided, which facilitates the subsequent generation of a virtual scene containing the target objects.

[0099] In addition, after fusing the target object with the initial terrain model and before obtaining the target terrain model, the method further includes:

[0100] Detecting the multiple target objects, and determining an overlapping area when it is determined according to the detection result that at least two target objects among the multiple target objects overlap;

[0101] The overlapping area is processed.

[0102] The overlapping area may be understood as an overlapping surface between at least two target objects.

[0103] In practical applications, rays can be used to detect multiple target objects. When the rays irradiate multiple target objects and at least two target objects overlap, the overlapping surface can be determined and deleted, and then the lowest point of the at least two target objects can be taken to map the terrain.

[0104] Specifically, when processing the overlapping area, the overlapping surfaces may be deleted and only one surface may be retained, or the overlapping surfaces may be flattened, which is not limited in the embodiments of this specification.

[0105] In summary, by processing the overlapping areas, the stacking of multiple target objects can be avoided, further ensuring the authenticity of the generated virtual scene.

[0106] Specifically, after fusing the target object with the initial terrain model and before obtaining the target terrain model, the method further includes:

[0107] An associated object associated with the target object is obtained, and the associated object is fused with the initial terrain model.

[0108] In the case where the target object is understood as a trench, the associated objects associated with the target object can be understood as shelters around the trench.

[0109] In practical applications, the associated object may be a preset shelter model in the resource library, such as a stone pillar shelter or a stone shelter of three different sizes: large, medium, and small, as shown in b2 in FIG2( b ).

[0110] Based on this, a shelter resource table may be configured, and a shelter model may be read from the shelter resource table, and the shelter model may be fused with the initial terrain model.

[0111] In one embodiment of this specification, the associated object includes a first associated object;

[0112] The step of fusing the associated object with the initial terrain model to obtain a target terrain model includes:

[0113] The first associated object is tiled and mapped to the target object in the initial terrain model to obtain a target terrain model.

[0114] The first associated object may be understood as a shelter surrounding the trench.

[0115] Based on this, the edge bunkers can be tiled and mapped onto the trenches in the initial terrain model to obtain the target terrain model.

[0116] In practical applications, the tiling and mapping of the first associated object can be achieved according to the UV layout method. Specifically, as shown in b3 in Figure 2(b), the range of the trench cliff is obtained, and this part of the terrain is converted into a geometric surface, which is tiled on the UV of 0-1 in the two-dimensional space. The placeholder geometry of the edge cover is taken, and the placeholder geometry of all sizes is tiled as much as possible on the UV according to the tiling rule, and reversely mapped to the geometry of the three-dimensional space to achieve a three-dimensional paving effect. As shown in b4 in Figure 2(b), the bottom surface of the placeholder box is taken, the shortest distance from the ground is obtained upward, and the box is pulled up to the ground; the top surface of the placeholder box is taken, the shortest distance from the ground is obtained downward, and the box is lowered to the ground, so that the placeholder box is embedded in the mountain. As shown in b5 in Figure 2(b), the edge cover has thickness, and the terrain is pulled up to the top of the cover, so that the terrain and the model are integrated to form a seamless effect.

[0117] In summary, by tiling the edge cover, the generated trench is made more realistic.

[0118] In another embodiment of this specification, the associated object includes a second associated object;

[0119] The step of fusing the associated object with the initial terrain model to obtain a target terrain model includes:

[0120] The associated objects are randomly placed in the initial terrain model, and the associated objects and the initial terrain model are fused to obtain a target terrain model.

[0121] The second associated object may be understood as a pillar shelter around the target object.

[0122] Based on this, the pillar shelters can be randomly placed in the initial terrain model, and the pillar shelters and the initial terrain model are fused to obtain the target terrain model.

[0123] In practical applications, as shown in b6 in FIG2(b), points can be randomly scattered within a preset range in the initial terrain model, a plurality of pillar shelters can be placed at the positions of the randomly scattered points, and the pillar shelters can be fused with the initial terrain model to obtain a target terrain model.

[0124] In addition, the areas in the initial terrain model where pillar shelters cannot be placed can be detected, and the pillar shelters randomly scattered in the areas can be deleted. The areas where pillar shelters cannot be placed can include road terrain areas, river terrain areas, and edge terrain areas, etc.

[0125] In summary, by randomly placing pillars and bunkers around the trenches, the occlusion relationship between the strongholds in the game scene is increased, and the terrain in the middle is shown to have some additional ups and downs due to human influence, which enriches the fun of the battle.

[0126] In practical applications, after obtaining the target terrain model, the following steps are further included:

[0127] Setting textures on the target object and associated objects in the target terrain model to obtain a set target terrain model;

[0128] The set target terrain model is rendered to obtain a virtual scene including the target object and the associated objects.

[0129] Specifically, textures may be set for trenches and bunkers in the target terrain model to obtain the set target terrain model, and the set target terrain model may be rendered to obtain a virtual scene including trenches and bunkers.

[0130] In practical applications, different colors and other textures can be set for trenches, bunkers, and other terrains in the target terrain model. As shown in b7 in FIG. 2( b ), the colors of the road layer inside the trench, the trench cliff, and the bunker are different.

[0131] In the gaming field, the set target terrain model can be connected to the game engine, and the set target terrain model can be rendered in the game engine, combined with the terrain material and lighting effects, and set to no vegetation in the trench area to obtain a virtual scene including trenches and bunkers, as shown in b8 in Figure 2(b).

[0132] In summary, the trench adopts the method of pre-calculating the trench morphology line segments into a geometric model and then changing the terrain. This process can be a random segment shape, or a preset V-shaped, X-shaped, Y-shaped and other trench shapes. It focuses on obtaining the shielding relationship of the dimensionality of the terrain depression area downward, and simulating the terrain characteristics of artificial trenches dug between low mountains. At the same time, it also includes an obstacle model parallel to the ground. This can not only reduce the tedious work of repeatedly laying out shielding obstacles due to terrain changes, but also can instantly preview the expected effect, thereby improving the efficiency of scene construction.

[0133] In summary, the method determines a target line segment model, generates a target object according to the target line segment model, determines a terrain position that meets preset terrain conditions in the initial terrain model, determines the terrain position as the target placement position of the target object, and places the target object at the target placement position, thereby avoiding overlap and collision between the target object and other terrains in the accident terrain model. After fusing the target object placed at the target placement position with the initial terrain model, the target terrain model is obtained, thereby ensuring the authenticity of the virtual scene corresponding to the generated target terrain model, and after determining the target placement position, the target object and the initial terrain model are fused to reduce the occupation of computing resources and further ensure the generation performance and efficiency of the target terrain model.

[0134] The following combination Figure 3 , taking the application of the object processing method provided in this specification in trench generation as an example, the object processing method is further described. Figure 3 A processing flow chart of an object processing method provided by an embodiment of the present specification is shown, which specifically includes the following steps.

[0135] Step 302: Preset trench guide lines.

[0136] Among them, the trench guide line can be understood as the above-mentioned target line segment model.

[0137] Step 304: Get the trench placement area mask and randomly scatter points.

[0138] The trench placement area may be understood as the terrain location that satisfies the preset terrain conditions.

[0139] Step 306: Use the point number as a random value to match different trench guide lines.

[0140] Step 308: For each trench guide line, the endpoints are randomly stretched and the line segments are randomly twisted to produce a random trench pattern.

[0141] Step 310: Expand the line into a surface, and enlarge the outer edge of the surface as a transition.

[0142] The expanded surface can be understood as the above-mentioned target patch model.

[0143] Step 312: Step up the inner edge line and the outer edge line to form a stepped and pocket-shaped trench.

[0144] Step 314: Adhere to the terrain to make the trench transition area smoothly connect to the terrain.

[0145] Among them, the terrain can be understood as an initial terrain model.

[0146] Step 316: Take the lowest point of the trench to map the terrain and obtain a concave trench terrain pattern.

[0147] Step 318: Get the trench cliff area and convert it into a geometric body.

[0148] Step 320: Read the edge shelter resource modeling from the trench shelter resource table and record the attributes such as size and path.

[0149] Step 322: According to the 0.6 scale modeling size of the edge shelter, lay the edge shelter flat on the trench cliff geometry.

[0150] Step 324: Take the top surface of the bunker and pull up the terrain.

[0151] Step 326: Replace to 1 scale high poly preview.

[0152] Step 328: extracting and assigning point cloud attributes of the center point of the edge cover.

[0153] Step 330: Acquire the trench edge area and merge the terrain.

[0154] Step 332: Obtain the maximum area inverse of the moat including the outer edge.

[0155] Step 334: Exclude areas such as cliffs, roads, and rivers, and randomly scatter points at intervals of 150 meters.

[0156] Step 336: Read the pillar shelter resource modeling from the trench shelter resource table and record the attributes such as size and path.

[0157] Step 338: Match different pillar shelter models and assign attributes.

[0158] Step 340: Replace to 1 scale high poly preview.

[0159] Step 342: respectively obtain the trench, the trench cliff, the trench internal access road layer, and the bunker layer, and preset the surface texture.

[0160] Step 344: Obtain the point cloud of terrain and shelters affected by the trench.

[0161] The above method determines a target line segment model, generates a target object according to the target line segment model, determines a terrain position that meets preset terrain conditions in the initial terrain model, determines the terrain position as the target placement position of the target object, and places the target object at the target placement position, thereby avoiding overlap and collision between the target object and other terrains in the accident terrain model. After the target object placed at the target placement position is fused with the initial terrain model, the target terrain model is obtained, thereby ensuring the authenticity of the virtual scene corresponding to the generated target terrain model, and after determining the target placement position, the target object and the initial terrain model are fused to reduce the occupation of computing resources and further ensure the generation performance and efficiency of the target terrain model.

[0162] Corresponding to the above method embodiment, this specification also provides an object processing device embodiment, Figure 4 FIG. 1 shows a schematic diagram of the structure of an object processing device provided by an embodiment of the present specification. Figure 4 As shown, the device comprises:

[0163] The generating module 402 is configured to determine a target line segment model and generate a target object according to the target line segment model;

[0164] The determination module 404 is configured to determine a terrain position satisfying a preset terrain condition in the initial terrain model, and determine the terrain position as a target placement position of the target object;

[0165] The fusion module 406 is configured to place the target object at the target placement position, and fuse the target object with the initial terrain model to obtain a target terrain model.

[0166] In an optional embodiment, the generating module 402 is further configured to:

[0167] Adjusting the size and posture of the target line segment model to obtain an adjusted target line segment model;

[0168] Generating a target patch model according to the adjusted target line segment model;

[0169] A target object is generated according to the target patch model.

[0170] In an optional embodiment, the generating module 402 is further configured to:

[0171] Copying the adjusted target line segment model to obtain multiple adjusted target line segment models;

[0172] A target patch model is generated according to the multiple adjusted target line segment models.

[0173] In an optional embodiment, the generating module 402 is further configured to:

[0174] Determine the edge area and the center area of ​​the target patch model;

[0175] Performing a distortion process on the edge area and a collapse process on the center area to obtain an initial object;

[0176] The initial object is subjected to shape adjustment and edge processing to obtain a target object.

[0177] In an optional embodiment, the fusion module 406 is further configured to:

[0178] The target object is mapped to the target placement position in the initial terrain model, and a fusion process is performed on an edge area of ​​the target object and an edge area of ​​the target placement position.

[0179] In an optional embodiment, there are multiple target objects;

[0180] In an optional embodiment, the generating module 402 is further configured to:

[0181] A plurality of target line segment models are determined, and a plurality of target objects are generated according to each of the plurality of target line segment models.

[0182] In an optional embodiment, the determining module 404 is further configured to:

[0183] In the initial terrain model, a plurality of terrain positions satisfying preset terrain conditions are determined, and the plurality of terrain positions are determined as a plurality of target placement positions of the plurality of target objects.

[0184] In an optional embodiment, the fusion module 406 is further configured to:

[0185] For each target object among the multiple target objects, randomly matching the corresponding target placement position to obtain a matching result;

[0186] According to the preset placement rule and the matching result, the multiple target objects are placed in corresponding target placement positions in sequence, and the multiple target objects and the initial terrain model are fused in sequence to obtain a target terrain model;

[0187] The preset placement rule is used to indicate that the distance between any two target objects satisfies a preset distance threshold.

[0188] In an optional embodiment, the device further includes a detection module, which is further configured to:

[0189] Detecting the multiple target objects, and determining an overlapping area when it is determined according to the detection result that at least two target objects among the multiple target objects overlap;

[0190] The overlapping area is processed.

[0191] In an optional embodiment, the fusion module 406 is further configured to:

[0192] An associated object associated with the target object is obtained, and the associated object is fused with the initial terrain model.

[0193] In an optional embodiment, the associated object includes a first associated object;

[0194] In an optional embodiment, the fusion module 406 is further configured to:

[0195] The first associated object is tiled and mapped to the target object in the initial terrain model to obtain a target terrain model.

[0196] In an optional embodiment, the associated object includes a second associated object;

[0197] In an optional embodiment, the fusion module 406 is further configured to:

[0198] The associated objects are randomly placed in the initial terrain model, and the associated objects and the initial terrain model are fused to obtain a target terrain model.

[0199] In an optional embodiment, the device further includes a rendering module configured to:

[0200] Setting textures on the target object and associated objects in the target terrain model to obtain a set target terrain model;

[0201] The set target terrain model is rendered to obtain a virtual scene including the target object and the associated objects.

[0202] In an optional embodiment, the generating module 402 is further configured to:

[0203] Determine any one of a plurality of line segment models of different shapes as a target line segment model; or

[0204] In response to a point selection instruction for the plurality of line segment models of different shapes, a target line segment model is determined.

[0205] The above-mentioned device determines a target line segment model, generates a target object according to the target line segment model, determines a terrain position that meets preset terrain conditions in the initial terrain model, determines the terrain position as the target placement position of the target object, and places the target object at the target placement position, thereby avoiding overlap and collision between the target object and other terrains in the accident terrain model. After fusing the target object placed at the target placement position with the initial terrain model, the target terrain model is obtained, thereby ensuring the authenticity of the virtual scene corresponding to the generated target terrain model, and after determining the target placement position, the target object and the initial terrain model are merged to reduce the occupation of computing resources and further ensure the generation performance and efficiency of the target terrain model.

[0206] The above is a schematic scheme of an object processing device of this embodiment. It should be noted that the technical scheme of the object processing device and the technical scheme of the object processing method described above are of the same concept, and the details not described in detail in the technical scheme of the object processing device can be referred to the description of the technical scheme of the object processing method described above.

[0207] Figure 5 The structure block diagram of a computing device 500 provided according to an embodiment of the present specification is shown. The components of the computing device 500 include but are not limited to a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and the database 550 is used to store data.

[0208] The computing device 500 also includes an access device 540 that enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).

[0209] In one embodiment of the present specification, the above components of the computing device 500 and Figure 5 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 5 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0210] The computing device 500 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 500 may also be a mobile or stationary server.

[0211] The processor 520 is used to execute the following computer program / instruction, which implements the steps of the above-mentioned object processing method when executed by the processor.

[0212] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computing device embodiment, since it is basically similar to the object processing method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the object processing method embodiment.

[0213] An embodiment of the present specification further provides a computer-readable storage medium storing a computer program / instruction, which implements the steps of the above-mentioned object processing method when executed by a processor.

[0214] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computer-readable storage medium embodiment, since it is basically similar to the object processing method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the object processing method embodiment.

[0215] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned object processing method when executed by a processor.

[0216] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the object processing method described above are of the same concept, and the details not described in detail in the technical scheme of the computer program product can be referred to the description of the technical scheme of the object processing method described above.

[0217] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0218] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0219] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0220] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0221] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. An object processing method, characterized in that: include: Determine a target line segment model, and generate a target object according to the target line segment model; In the initial terrain model, determining a terrain position that meets a preset terrain condition, and determining the terrain position as a target placement position of the target object; The target object is placed at the target placement position, and the target object and the initial terrain model are fused to obtain a target terrain model.

2. The method according to claim 1, characterized in that Generating a target object according to the target line segment model includes: Adjusting the size and posture of the target line segment model to obtain an adjusted target line segment model; Generating a target patch model according to the adjusted target line segment model; A target object is generated according to the target patch model.

3. The method according to claim 2, characterized in that Generating a target object according to the target patch model comprises: Determine the edge area and the center area of ​​the target patch model; Performing a distortion process on the edge area and a collapse process on the center area to obtain an initial object; The initial object is subjected to shape adjustment and edge processing to obtain a target object.

4. The method according to claim 1, characterized in that: There are multiple target objects; The step of determining a target line segment model and generating a target object according to the target line segment model comprises: A plurality of target line segment models are determined, and a plurality of target objects are generated according to each of the plurality of target line segment models.

5. The method according to claim 4, characterized in that The step of determining a terrain position satisfying a preset terrain condition in the initial terrain model and determining the terrain position as a target placement position of the target object comprises: In the initial terrain model, a plurality of terrain positions satisfying preset terrain conditions are determined, and the plurality of terrain positions are determined as a plurality of target placement positions of the plurality of target objects.

6. The method according to claim 5, characterized in that Placing the target object at the target placement position and fusing the target object with the initial terrain model to obtain a target terrain model includes: For each target object among the multiple target objects, randomly matching the corresponding target placement position to obtain a matching result; According to the preset placement rule and the matching result, the multiple target objects are placed in corresponding target placement positions in sequence, and the multiple target objects and the initial terrain model are fused in sequence to obtain a target terrain model; The preset placement rule is used to indicate that the distance between any two target objects satisfies a preset distance threshold.

7. The method according to claim 4, characterized in that After fusing the target object with the initial terrain model and before obtaining the target terrain model, the method further includes: Detecting the multiple target objects, and determining an overlapping area when it is determined according to the detection result that at least two target objects among the multiple target objects overlap; The overlapping area is processed.

8. The method according to any one of claims 1 to 7, characterized in that: After fusing the target object with the initial terrain model and before obtaining the target terrain model, the method further includes: An associated object associated with the target object is obtained, and the associated object is fused with the initial terrain model.

9. The method according to claim 8, characterized in that The associated objects include a first associated object; The fusing the associated object and the initial terrain model to obtain a target terrain model includes: The first associated object is tiled and mapped to the target object in the initial terrain model to obtain a target terrain model.

10. The method according to claim 8, characterized in that After obtaining the target terrain model, the method further includes: Setting textures on the target object and associated objects in the target terrain model to obtain a set target terrain model; The set target terrain model is rendered to obtain a virtual scene including the target object and the associated objects.

11. A computing device, characterized in that: include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the method described in any one of claims 1 to 10 are implemented.

12. A computer-readable storage medium, characterized in that: It stores a computer program / instruction, which implements the steps of the method described in any one of claims 1 to 10 when executed by a processor.

13. A computer program product, characterized in that The invention comprises a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 10.