Information processing method, device, electronic device and readable storage medium
By adding vegetation information in the virtual scene to the terrain information, a new terrain with vegetation characteristics is generated, and the impact of virtual vegetation in the game scene on rendering efficiency is solved, achieving more efficient rendering and generation effects.
Patent Information
- Application Number
- CN202411629271.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-04-08
AI Technical Summary
In game scenarios, manually placing virtual vegetation models leads to low scene rendering efficiency, and the prior art is difficult to effectively manage and render a large number of vegetation objects.
By obtaining the topographic information and vegetation information in the virtual scene, vegetation information is added to the topographic information, and a new terrain with vegetation is generated, thereby reducing the number of individual vegetation objects.
It improves the rendering efficiency of virtual scenes, reduces the number of individual vegetation objects in virtual scenes, and improves the generation effect.
Smart Images

Figure CN119770959A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to an information processing method, device, electronic device and computer-readable storage medium. Background Art
[0002] Currently, when generating virtual vegetation in a game scene, different types of vegetation models can be generated through programmatic plug-ins, and then developers use the Unity engine to manually place the various types of vegetation models in the game scene.
[0003] In the above method, when the developer manually places the vegetation model separately in the game scene, it is easy to cause a large number of vegetation objects in the game scene, resulting in low rendering efficiency of the game scene.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] In view of this, the present application provides an information processing method, device, electronic device and computer-readable storage medium, which can reduce the impact of virtual vegetation on the rendering efficiency of virtual scenes and improve the generation efficiency and generation effect of virtual vegetation in virtual scenes.
[0006] In a first aspect, an embodiment of the present application provides an information processing method, the method comprising:
[0007] Acquire first terrain information of a first terrain in a virtual scene, and scene vegetation information of scene vegetation in the virtual scene;
[0008] Adding the scene vegetation information to the first terrain information to obtain second terrain information;
[0009] A second terrain with scene vegetation is generated according to the second terrain information, and the second terrain includes at least part of the features of the first terrain.
[0010] In a second aspect, an embodiment of the present application provides an information processing device, the device comprising: an acquisition unit, an adding unit, and a generation unit;
[0011] An acquisition unit, configured to acquire first terrain information of a first terrain in a virtual scene, and scene vegetation information of scene vegetation in the virtual scene;
[0012] an adding unit, configured to add the scene vegetation information to the first terrain information to obtain second terrain information;
[0013] A generating unit is used to generate a second terrain with the scene vegetation according to the second terrain information, wherein the second terrain includes at least part of the features of the first terrain.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0015] Processor; and
[0016] The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the method of the first aspect is executed.
[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a data processing program, which is executed by a processor to perform the method of the first aspect.
[0018] The information processing method provided in the present application obtains first terrain information of a first terrain in a virtual scene, and scene vegetation information of scene vegetation in the virtual scene; adds the scene vegetation information to the first terrain information to obtain second terrain information; and generates a second terrain with scene vegetation based on the second terrain information, wherein the second terrain includes at least some features of the first terrain.
[0019] That is, the present application can add the vegetation information of scene vegetation located in the virtual scene to the terrain information so as to treat the original scene vegetation as terrain vegetation, that is, the scene vegetation that was originally a separate vegetation object is managed as part of the terrain object rather than as a separate vegetation object in the virtual scene, thereby reducing the number of separate vegetation objects existing in the virtual scene, thereby improving the rendering efficiency of the virtual scene. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0021] Figure 1 A flowchart of an example of an information processing method provided in an embodiment of the present application;
[0022] Figure 2 A schematic diagram of an example of a bounding box of scene vegetation provided in an embodiment of the present application;
[0023] Figure 3 A schematic diagram of a first scene vegetation and non-first scene vegetation in the scene vegetation provided in an embodiment of the present application;
[0024] Figure 4 Schematic diagram of different second scene vegetation provided in the embodiments of the present application;
[0025] Figure 5 A schematic diagram of an example of adjusting the position of vegetation in a scene provided in an embodiment of the present application;
[0026] Figure 6 A schematic diagram of an interface display example of the first prompt information and the second prompt information provided in an embodiment of the present application;
[0027] Figure 7 A schematic diagram of an interface display example for replacing the type of terrain and vegetation in a virtual scene provided in an embodiment of the present application;
[0028] Figure 8 A schematic diagram of the structure of an information processing device provided in an embodiment of the present application;
[0029] Fig. 9 A structural block diagram of an electronic device for implementing an information processing method is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0030] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application 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 the present application, so the present application is not limited by the specific implementation disclosed below.
[0031] It should be noted that the terms "first", "second", "third", etc. in the claims, description and drawings of the present application are used to distinguish similar objects and are not used to describe a specific order or sequence. The data used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including", "having" and their variants are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] It should be understood that in the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" is merely a way to describe the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "Including A, B and / or C" means including any one, any two, or any three of A, B, and C.
[0033] It should be understood that in the embodiments of the present application, "B corresponding to A", "B corresponding to A", "A corresponds to B", or "B corresponds to A" means that B is associated with A, and B can be determined according to A. Determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.
[0034] To facilitate understanding, the technical terms that may be involved in the embodiments of the present application are first briefly introduced.
[0035] 1. Unity engine is a cross-platform integrated game development, real-time 3D creation and simulation tool platform that supports the creation of 2D and 3D games, animations, architecture, etc. This embodiment implements information processing through the Unity engine.
[0036] 2. Bounding box, which is used to approximate the geometric structure of the boundary of an object. Bounding box is mainly used for collision detection, distance calculation between objects, window clipping and other operations, so as to improve the efficiency of the algorithm. Bounding box can be divided into many types, mainly including axis-aligned bounding box (AABB), oriented bounding box (OBB) and bounding sphere. In this embodiment, an axis-aligned bounding box can be set for the vegetation object to detect the distance between the vegetation object and other game objects or to detect the vegetation size of the vegetation object.
[0037] 3. GameObject refers to the basic functional unit in the Unity engine, in other words, the basic element that makes up the virtual scene. Simply put, GameObject is a container used by the Unity engine to represent all visible or invisible entities in the game world. A GameObject can be any object, such as a three-dimensional model (such as a character model, terrain model, vegetation model, etc.), a particle system, a light source, a camera, or just an empty game object for mounting scripts and other components; it can be understood that the data of a game object is usually stored in the components of the game object itself. The more GameObjects there are in the virtual scene, the lower the rendering efficiency of the virtual scene. In this embodiment, the first terrain is a separate game object, and each scene vegetation in the virtual scene is also a separate game object.
[0038] Furthermore, the relevant technologies are further introduced.
[0039] Currently, in a related technology, different types of vegetation models can be generated through a programmatic plug-in, and then the developer uses the Unity engine to manually place the various types of vegetation models in the game scene.
[0040] In the above method, when developers manually place various types of vegetation models in the game scene, it is easy to cause a large number of vegetation objects in the game scene, resulting in low rendering efficiency of the game scene.
[0041] In addition, in a related technology, the terrain tool in the Unity engine can automatically generate vegetation models of preset types in the terrain tool, and then the vegetation types that do not exist in the terrain tool can be manually placed by the developer. However, in this way, although the impact of vegetation objects on the rendering efficiency of the game scene can be reduced to a certain extent, the terrain tool usually contains large vegetation objects, which have poor rendering effects when rendered simultaneously with the terrain. In addition, the basic type of vegetation models contained in the terrain tool cannot meet the growing needs of large world scenes;
[0042] Regardless of the above methods, there is a problem of improper placement of the vegetation model. For example, the vegetation model is suspended in the air, located below the surface, etc., which requires manual adjustment by the developer.
[0043] In view of this, embodiments of the present application provide an information processing method, device, electronic device, and computer-readable storage medium.
[0044] The information processing method provided in the embodiment of the present application can be performed by an electronic device, which can be a terminal or a server. The terminal can be a terminal device such as a smart phone, a tablet computer, or a laptop computer. The server can be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (such as software or software modules for providing distributed services), or it can be implemented as a single software or software module. The embodiment of the present application does not specifically limit this.
[0045] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0046] like Figure 1 As shown, Figure 1 This is a flowchart of an example of an information processing method provided in an embodiment of the present application. It should be noted that the steps shown may be performed in a logical order different from that shown in the flowchart of the method. The method may include the following steps S110 to S130.
[0047] Step S110: acquiring first terrain information of a first terrain in a virtual scene and scene vegetation information of scene vegetation in the virtual scene.
[0048] Step S120: adding the scene vegetation information to the first terrain information to obtain second terrain information.
[0049] Step S130: generating a second terrain having the scene vegetation according to the second terrain information, wherein the second terrain includes at least part of the features of the first terrain.
[0050] In this embodiment, the information processing method described in the above steps can be applied to a game engine, and the game engine can be a Unity engine, a UE4 engine, etc., without specific limitation.
[0051] The following describes each of the above steps in detail.
[0052] The above virtual scene is a virtual environment built by the user in the Unity engine, which may include scene objects such as virtual terrain, virtual characters, virtual vegetation, and virtual buildings.
[0053] The first terrain is a terrain model built by the user for the virtual scene, and the first terrain can be regarded as a game object in the virtual scene. For example, the terrain model can be a preset terrain in the terrain generation tool in the Unity engine, or a terrain model built by the user using other tools, which is not specifically limited in this embodiment.
[0054] The first terrain information is the attribute information of the first terrain, and the attribute information may include but is not limited to: heightmap, texture map, terrain vegetation information, etc., which are not specifically limited. It should be noted that the vegetation information included in the first terrain information is usually basic vegetation information, for example, commonly used vegetation such as shrubs or grass.
[0055] It should be noted that, depending on the different storage locations of vegetation information, two types of vegetation objects, terrain vegetation and scene vegetation, may be included in the virtual scene;
[0056] Among them, terrain vegetation refers to the vegetation inside the terrain. The vegetation information of this type of vegetation is directly included in the terrain information, that is, terrain vegetation is usually processed as part of the terrain. For example, the vegetation position, rotation angle, scaling information and other attributes of the terrain vegetation are all present in the terrain data and are usually rendered at the same time as the terrain; that is, the terrain vegetation is not a separate game object in the virtual scene, but belongs to the above-mentioned terrain object.
[0057] Scene vegetation means that although the vegetation model is located in the virtual scene, the vegetation information of this type of vegetation is not included in the terrain data. Instead, it is placed in the scene as an independent game object (GameObject). Its position information, rotation angle (orientation), scaling information and other properties are stored in their respective corresponding game object components. In addition, scene vegetation is not restricted to the terrain in the virtual scene and can also be placed on non-terrain surfaces.
[0058] In this embodiment, the number of scene vegetation in the above virtual scene may include one or more, and is not specifically limited.
[0059] The scene vegetation information of the above-mentioned scene vegetation is all associated information of the scene vegetation in the virtual scene, which may include vegetation geometry information and vegetation material information, wherein the vegetation geometry information is mainly used to describe the physical position and morphological characteristics of the vegetation in the virtual scene, and the vegetation geometry information may include but is not limited to: vegetation position, angle (direction) information, scaling information, etc.; the vegetation material information is mainly used to describe the visual performance of the vegetation, and the vegetation material information may include but is not limited to: texture information, color information, lighting information, etc., without specific restrictions.
[0060] In this embodiment, after obtaining the scene vegetation information of the scene vegetation, the vegetation information of the scene vegetation can be added to the first terrain information to obtain the second terrain information containing the above-mentioned scene vegetation information, and then the terrain baking is performed according to the second terrain information to obtain the terrain texture map. The terrain texture map may include the scene vegetation information of the above-mentioned added scene vegetation and the vegetation information of the original terrain vegetation. Furthermore, when rendering a virtual scene, the second terrain can be directly rendered through the terrain texture map.
[0061] It should be noted that, in this embodiment, the second terrain includes at least some features of the first terrain, the difference being that the type or quantity of vegetation rendered during the rendering process of the second terrain is different from that of the first terrain. It can be seen that in the information processing method provided by the present application, the scene vegetation information of the scene vegetation can be added to the first terrain information, so that the scene vegetation that was originally a separate vegetation object in the virtual scene can be managed as an additional part of the terrain object, that is, the scene vegetation is managed through the terrain object instead of treating the scene vegetation as a separate vegetation object. In this way, the number of vegetation objects in the virtual scene can be reduced, thereby reducing the impact on the rendering performance of the virtual scene and improving the rendering efficiency of the virtual scene.
[0062] Next, the information processing method provided by this application is further described.
[0063] In some optional implementations, the above step S120 can be specifically implemented through the following steps S121 to S122.
[0064] Step S121: determining the first scene vegetation in the scene vegetation.
[0065] Step S122: adding the scene vegetation information of the first scene vegetation to the first terrain information to obtain the second terrain information.
[0066] The purpose of step S121 to step S122 is to select the first scene vegetation that meets the conditions from the various scene vegetations, so as to add only the scene vegetation information corresponding to the first scene vegetation that meets the conditions to the first terrain information, so as to improve the terrain rendering effect in the subsequent rendering process.
[0067] In an optional specific embodiment, the above step S121 can be specifically implemented through the following steps S1210 to S1211.
[0068] Step S1210: Determine a first vegetation size of the scene vegetation.
[0069] Step S1211: Determine the scene vegetation whose maximum length in the first vegetation size is smaller than the reference length as the first scene vegetation.
[0070] That is, the purpose of the specific example shown in steps S1210 to S1211 is to determine the first scene vegetation that meets the conditions in each scene vegetation through the vegetation size, that is, to pre-process the scene vegetation according to the vegetation size attribute, filter out the small scene vegetation in the scene vegetation, and not add the scene vegetation information of the large scene vegetation to the first terrain information.
[0071] The reason for not adding large-scale scene vegetation to the first terrain information is that, due to the large size of large-scale scene vegetation, if it is rendered simultaneously with the terrain object as part of the terrain object, it is easy to cause visual mutation problems in the vegetation, while small-scale vegetation with smaller size does not have this problem; therefore, when comparing vegetation types to determine the first vegetation type that is missing from the terrain vegetation, it is determined only based on the vegetation types corresponding to the small-scale vegetation scenes, thereby reducing the problem of vegetation mutation during terrain rendering.
[0072] The first vegetation size is used to describe the vegetation size of the scene vegetation. The first vegetation size can be determined by the bounding box size of the bounding box set for the scene vegetation. For the introduction of the bounding box, please refer to the previous description and will not be repeated here.
[0073] The maximum length in the first vegetation size may be understood as a length value corresponding to the longest side length among the sides of the bounding box representing the vegetation in the scene.
[0074] The above-mentioned reference length is a reference value for dividing large vegetation and small vegetation. In a specific embodiment, the reference length is a model height value of a reference character model preset for a virtual scene.
[0075] By comparing the longest side length of the bounding box of the scene vegetation with the reference length, the scene vegetation whose longest side length is less than the reference length is determined, and then the scene vegetation whose longest side length is less than the reference length is determined as the first scene vegetation. In short, only small scene vegetation (i.e., scene vegetation with a small vegetation size) is used as the first scene vegetation, and further, the vegetation information corresponding to the small scene vegetation is added to the first terrain information. In this way, the vegetation information of the large scene vegetation is added to the terrain information, which may cause a sudden change in the large scene vegetation when rendering the terrain.
[0076] like Figure 2 As shown, Figure 2 A schematic diagram of the bounding box of a scene vegetation is provided. Figure 2The bounding box shown is a cuboid, and the length value of the bounding box is: 70 cm; the height value is: 181 cm; the width value is: 82 cm; the maximum value is: 181 cm; assuming that the model height value of the reference character model corresponding to the virtual scene is 180 cm, the scene vegetation corresponding to the bounding box can be determined as large vegetation, and it cannot be determined as the first scene vegetation mentioned above. The method of removing large terrain vegetation in terrain vegetation is similar, and it will not be repeated here.
[0077] As shown in Table 1, Table 1 provides examples of scene vegetation in a virtual scene.
[0078] Table 1 Examples of scene vegetation in virtual scenes
[0079]
[0080] As shown in Table 1, the scene vegetation in the virtual scene may include: poplar 1, poplar 2, poplar 3, willow 1, willow 2, peach tree 1, flower 1, flower 2, moss 1, moss 2, vine 1, etc.
[0081] Among them, assuming that the character height of the benchmark character preset for the virtual scene is 180 cm, the benchmark length used to screen large-scene vegetation and small-scene vegetation is 180 cm. The first vegetation size corresponding to Poplar 1 is 70×82×181, and its length unit can be centimeters. The maximum length in its first vegetation size is the height value 181, and the height value of Poplar 1 is greater than the benchmark length. Therefore, Poplar 1 cannot be used as the first scene vegetation; The first vegetation size corresponding to Willow 2 is 70×82×90, and the maximum length in the first vegetation size is the height value 90, and the height value of Tree 2 is less than the benchmark length. Therefore, Poplar 1 can be used as the first scene vegetation;
[0082] Similarly, each scene vegetation shown in Table 1 above can be traversed and filtered in the same way. The first scene vegetation that can be filtered out may include: willow 1, willow 2, peach tree 1, flowers and plants 1, and moss 1. Therefore, the scene vegetation information corresponding to willow 1, willow 2, peach tree 1, flowers and plants 1, and moss 1 can be added to the first terrain information respectively.
[0083] In some preferred embodiments, the scene vegetation in the virtual scene can be classified according to the vegetation model and material properties of the scene vegetation, that is, the scene vegetation using the same model and material are classified into one category. In other words, the scene vegetation of the same type are all copied through a basic vegetation model. Therefore, the vegetation shape, structure, appearance material, etc. of the scene vegetation of the same type are the same. However, the vegetation size, position, orientation properties, etc. of different scene vegetation of the same type can be the same or different, and there is no restriction on this. For example, a virtual scene includes multiple willow tree objects, and the multiple willow tree vegetation objects are all generated using the same willow tree model. Therefore, the shapes and material properties of the multiple willow tree objects are the same, and only the geometric properties such as the size, position or orientation of the willow tree are different. These multiple willow tree objects can be regarded as vegetation objects of the same type;
[0084] However, usually, the vegetation sizes of multiple vegetation objects of the same type are similar, that is, multiple vegetation objects of the same vegetation type are large vegetation at the same time, or small vegetation at the same time, and large vegetation and small vegetation will not appear at the same time in the same vegetation type. Based on this, in this embodiment, the "determining the first vegetation size of the scene vegetation" in the above step S1210 can be specifically implemented in the following way: first determine the first vegetation type to which each of the scene vegetation in the virtual scene belongs, determine the basic vegetation model corresponding to each of the first vegetation types, and determine the model size of the basic vegetation model corresponding to each of the first vegetation types as the first vegetation size;
[0085] Correspondingly, after determining the model size of the basic vegetation model corresponding to each first vegetation type, the maximum length in the model size of each basic vegetation model is compared with the first reference length, and the multiple scene vegetations included in the first vegetation type whose maximum length in the model size of each basic vegetation model is less than the first reference length are all taken as first scene vegetation.
[0086] That is, in this embodiment, for multiple scene vegetations of the same vegetation type, only one size comparison may be performed. Specifically, the model size of the basic vegetation model corresponding to one vegetation type is compared with the first reference length. There is no need to compare the vegetation sizes of multiple scene vegetations of the same vegetation type with the first reference length respectively. In this way, the amount of calculation in determining the first scene vegetation can be further reduced, thereby further improving the rendering efficiency.
[0087] It should be noted that the vegetation sizes of multiple vegetation objects of the same type may not be similar. In this case, the size judgment may be performed on a single vegetation object, and this embodiment does not specifically limit this.
[0088] As shown in Table 2, Table 2 provides examples of first vegetation sizes corresponding to different first vegetation types.
[0089]
[0090] As shown in Table 2, the virtual scene includes six scene vegetations, namely, poplar 1, poplar 2, poplar 3, willow 1, willow 2 and peach 1, and poplar 1, poplar 2 and poplar 3 are all copies of poplar model A1, that is, the appearance textures of poplar 1, poplar 2 and poplar 3 are exactly the same, therefore, poplar 1, poplar 2 and poplar 3 all belong to poplar A1 class, similarly, willow 1 and willow 2 use the same willow model A2 and have the same appearance texture, therefore, willow 1 and willow 2 belong to willow A2 class, peach 1 uses peach model, and peach 1 belongs to peach A3 class.
[0091] Furthermore, the model size of the poplar model A1 is 70×82×181. However, as described above, when the poplar model A1 is copied to obtain the vegetation objects such as poplar 1, poplar 2 and poplar 3, different scaling parameters can be used to scale the model size of the basic poplar model A1. For example, the basic poplar model A1 is copied and not scaled to obtain poplar 1, and the size of poplar 1 is consistent with the size of the basic poplar model A1, both of which are 70×82×181. The vegetation size of poplar 2 is increased in width and height compared to the model size of the basic poplar model A1, and the corresponding specific vegetation size is 70×82×181. The size of the vegetation is 70×90×180. Similarly, the vegetation size of Poplar 3 is 70×110×183. It can be seen that the sizes of the poplar vegetation under the Poplar A1 type are similar. Based on this, the model size of the basic poplar model A1, 70×82×181, can be used as the first vegetation size. The model size of the basic poplar model A1, 70×82×181, is compared with the first benchmark length. Since the maximum length of the model size of the basic poplar model A1 is 181, which is greater than the first benchmark length, Poplar 1, Poplar 2 and Poplar 3 included in the Poplar A1 class cannot be used as the first scene vegetation.
[0092] Similarly, the model size of willow model A2 (70×82×90) is compared with the first benchmark scene to determine that willow 1 and willow 2 included in willow A2 class can be used as the first scene vegetation, and the model size of peach model A3 (65×40×70) is compared with the first benchmark length to determine that peach tree 1 included in peach A3 class can be used as the first scene vegetation.
[0093] It should be noted that, in this embodiment, the vegetation type corresponding to the scene vegetation in the virtual scene is called the first vegetation type, and correspondingly, the vegetation type corresponding to the terrain vegetation is called the second vegetation type. For details, please refer to the following description and will not be repeated here.
[0094] Alternatively, in some optional specific embodiments, the step of "determining the first scene vegetation in the scene vegetation" in the above step S121 can also be implemented through the following steps S1212 to S1213.
[0095] Step S1212: Determine the vegetation position of the scene vegetation in the virtual scene.
[0096] Step S1213: determining the first scene vegetation in the scene vegetation according to the vegetation position.
[0097] It should be noted that the position of the virtual vegetation in the virtual scene usually refers to the root position of the virtual vegetation, that is, the root is used as a reference point and the root position is used as the position reference of the virtual vegetation. Therefore, in this embodiment, the vegetation position of each scene vegetation corresponding to the first vegetation type in the virtual scene is the vegetation root position of each scene vegetation.
[0098] According to the vegetation position, the first scene vegetation whose root position meets the preset conditions can be screened out.
[0099] It should be noted that in the embodiment of the present application, when determining the first scene vegetation according to the vegetation position, in addition to screening from the scene vegetation corresponding to the first vegetation type as shown in the above step S1213, that is, directly screening is performed when the large scene vegetation is not eliminated, or, it can also be as described in the previous introduction of step S1211: screening from the small vegetation remaining after eliminating the large scene vegetation to obtain the first scene vegetation whose root position meets the preset conditions, and this embodiment is not limited.
[0100] In an optional specific embodiment, the first scene vegetation in the above step S1213 can be specifically determined by the following step S10.
[0101] Step S10: emitting a first ray along a preset direction through the vegetation position, and determining a first scene vegetation in the scene vegetation according to the first ray;
[0102] In this embodiment, the above-mentioned preset direction is a direction perpendicular to the preset ground plane of the virtual scene and vertically downward; based on this, the first ray emitted along the preset direction through the vegetation position is a vertically downward ray emitted from the root position of the scene vegetation.
[0103] Based on the first ray, the first scene vegetation can be determined from a plurality of scene vegetations corresponding to the first vegetation type.
[0104] In an optional specific embodiment, the above step S10 can be implemented by the following step S10-1.
[0105] Step S10-1: Determine the scene vegetation that satisfies the first condition of the emitted first ray as the first scene vegetation; the first condition is: the first ray collides with any preset object in the virtual scene, and the preset object that the first ray collides with for the first time is the first terrain.
[0106] The above-mentioned preset object is any game object existing in the virtual scene. For example, the preset object can be a terrain model, a building model, a vegetation model, a stone model, a character model, etc., without specific limitation.
[0107] The purpose of this step S10-1 is to detect which game object in the virtual scene each scene vegetation is associated with. The association can be understood as which game object the scene vegetation fits into or has a fixed relationship with, so as to determine whether the scene vegetation is rendered as terrain vegetation.
[0108] For example, if the scene vegetation is not associated with the first terrain, such as the scene vegetation grows on stones, grows on walls, or adheres to other carrier objects, then the scene vegetation cannot be used as terrain vegetation and rendered simultaneously with the terrain. In this way, only the scene vegetation whose first emitted ray first collides with the first terrain is determined as the first scene vegetation, and then the scene vegetation information corresponding to the first scene vegetation is added to the first terrain information.
[0109] like Figure 3 As shown, Figure 3 A schematic diagram of the first scene vegetation and non-first scene vegetation in the scene vegetation is provided. Figure 3 As shown in (a), a stone is placed on the preset ground plane of the first terrain, and the scene vegetation A is attached to the top of the stone. At this time, if the first ray is emitted vertically downward from the root position of the scene vegetation, the preset object that the first ray first collides with is the stone, not the first terrain. Therefore, Figure 3 The scene vegetation A shown in (a) cannot be used as the first scene vegetation. Figure 3 As shown in (b), the scene vegetation B is attached to the preset ground plane of the first terrain. Therefore, when the root position of the scene vegetation B emits the first ray vertically downward, the preset object that the first ray first collides with is the first terrain. Therefore, Figure 3 The scene vegetation B shown in (b) can be used as the first scene vegetation.
[0110] Alternatively, in some optional specific embodiments, the above step S10 may also be implemented through the following steps S10-2 to S10-3.
[0111] Step S10-2: determining a second scene vegetation in the scene vegetation; the first ray corresponding to the second scene vegetation does not collide with any preset object in the virtual scene.
[0112] Step S10 - 3 : deleting the second scene vegetation in the scene vegetation, and determining the remaining scene vegetation as the first scene vegetation.
[0113] That is, the purpose of steps S10-2 to S10-3 is to screen out the second scene vegetation whose root position is located under the first terrain in the scene vegetation, and then remove the second scene vegetation from the multiple scene vegetation, so as to determine the remaining scene vegetation after removing the second scene vegetation as the first scene vegetation. In this way, the scene vegetation information of the scene vegetation whose root position is located under the first terrain can be not added to the first terrain information, that is, the scene vegetation located under the first terrain is not regarded as terrain vegetation, which can further improve the rendering effect of the terrain vegetation.
[0114] The above-mentioned second scene vegetation means that when the first ray sent from the root position of the second scene vegetation is emitted along the preset direction, it does not collide with the preset object in the virtual scene, that is, it does not collide with any preset object, that is, there is no preset object below the second scene vegetation. In this way, it can be considered that the second scene vegetation is located below the first terrain, that is, below the ground surface.
[0115] In some optional specific embodiments, in the above step S10-3, "deleting the second scene vegetation from the scene vegetation corresponding to the first vegetation type, and determining the remaining scene vegetation as the first scene vegetation" can be specifically implemented through the following steps S01 to S02.
[0116] Step S01: determining a bounding box of vegetation in a second scene; the bounding box includes a plurality of vertices.
[0117] Step S02: deleting the second scene vegetation that meets the second condition in the scene vegetation, and determining the remaining scene vegetation as the first scene vegetation; the second condition is: there is no intersection between the second rays emitted by each vertex of the bounding box along the preset direction and the preset ground plane.
[0118] It should be noted that the above-mentioned first ray is emitted from the root of the scene vegetation, and some scene vegetation may be partially located below the terrain and partially located above the terrain. For example, the root position is located below the first terrain, and the stem and leaf parts are located above the first terrain. In this way, when the first ray is emitted in a vertical downward direction at the root position, the first ray will not collide with any preset object, but the stem and leaf parts are located above the first terrain. It can be considered that the root position is closer to the first terrain. If the root position is reset so that the root position is located on the first terrain, this type of scene vegetation can be rendered as terrain vegetation. Therefore, the second scene vegetation described in this embodiment may include two types, one is completely located below the first terrain, and the other is partially located below the first terrain and partially located above the first terrain.
[0119] In this embodiment, in order to distinguish between the two situations where the second scene vegetation is completely located under the terrain and partially located under the terrain, the above steps S01 to S02 can be further used to detect whether the second rays emitted by each vertex of the bounding box of the second scene vegetation intersect with the first terrain.
[0120] If the second ray emitted by any vertex intersects with the first terrain (there is at least one intersection point), it is considered that part of the second scene vegetation is located above the terrain, and this type of second scene vegetation may not be deleted, but used as the target scene vegetation that can be used as terrain vegetation, so that in the subsequent solution, the root position of this type of second scene vegetation is reset so that the root position of the second scene vegetation is located on the first terrain;
[0121] If the second rays emitted by each vertex do not intersect with the first terrain (no intersection exists), it is considered that the second scene vegetation is completely located under the first terrain, and the root position is far from the ground surface. The second scene vegetation is deleted from multiple scene vegetations and is not determined as terrain vegetation. Therefore, the remaining scene vegetation after deleting the second scene vegetation is determined as the first scene vegetation.
[0122] The “second scene vegetation satisfying the fourth condition” in the above step S02 refers to the second scene vegetation in which the second rays emitted by the vertices of the corresponding bounding box do not collide with the first terrain, thereby generating no intersection.
[0123] For the relevant introduction of the above-mentioned bounding box, please refer to the previous description, which will not be repeated here.
[0124] like Figure 4 As shown, Figure 4 Schematic diagrams of different second-scenario vegetation are provided.
[0125] like Figure 4 As shown in (a), Figure 4 (a) provides a scene vegetation that is partially located above the first terrain and partially located below the first terrain. When the root position of the scene vegetation emits a first ray, the first ray will not collide with any game object in the virtual scene; however, when the vertices A, B, C, D, E, F, G, and H of the bounding box of the scene vegetation respectively emit second rays in the vertical downward direction, the second ray emitted by vertex A, the second ray emitted by vertex B, the second ray emitted by vertex C, and the second ray emitted by vertex D can collide with the first terrain and there is an intersection. Therefore, the scene vegetation can be regarded as the first scene vegetation, and its corresponding scene vegetation information is added to the first terrain information corresponding to the first terrain.
[0126] Figure 4(b) provides a second scene vegetation completely under the terrain. Since there are no other game objects below the second scene vegetation, the first ray emitted from the root position of the second scene vegetation in the vertical downward direction will not collide with any game object. Based on this, it is further detected whether the second ray emitted by each vertex of the bounding box of the scene vegetation collides with any game object. Figure 4 As shown in (b), the bounding box of the scene vegetation is also located below the first terrain, and the second rays emitted from each vertex in the vertical downward direction are all located at the intersection of the first terrain. Therefore, it is indicated that the scene vegetation is not suitable as terrain vegetation. In this embodiment, the scene vegetation information of the scene vegetation is not added to the first terrain information.
[0127] After the first scene vegetation in the scene vegetation is determined through the above-mentioned embodiments, as shown in the above-mentioned step S122, the scene vegetation information of the first scene vegetation is added to the first terrain information to obtain the second terrain information.
[0128] Optionally, in this embodiment, in addition to preprocessing the scene vegetation to add only the scene vegetation information of the first scene vegetation that meets the conditions to the first terrain information, preprocessing can also be performed on the terrain vegetation in the first terrain to improve the performance of the first terrain. Optionally, the virtual scene provided by the present application can also include at least one type of terrain vegetation. Based on this, step S122 described above can be specifically implemented through the following steps S1220 to S1222.
[0129] Step S1220: Determine the first terrain vegetation in the terrain vegetation.
[0130] Step S1221: deleting the terrain-vegetation information corresponding to the first terrain-vegetation in the first terrain information to obtain the third terrain information.
[0131] Step S1222: Add the scene vegetation information of the first scene vegetation to the third terrain information to obtain the second terrain information.
[0132] The purpose of step S1220 to step S1222 is to screen out the first terrain vegetation that does not meet the conditions from the various terrain vegetations, and then delete the terrain vegetation information of the first terrain vegetation that does not meet the conditions in the first terrain information to obtain the third terrain information. In this way, the terrain performance effect of the subsequently generated second terrain can be better.
[0133] In an optional specific embodiment, the large-scale scene vegetation in the scene vegetation can be removed as described above. Based on the same reason, the terrain vegetation information corresponding to the large-scale terrain vegetation in the first terrain information can be deleted to delete the large-scale terrain vegetation in the terrain vegetation, thereby improving the rendering effect of subsequent terrain vegetation. That is, the "determining the first terrain vegetation in the terrain vegetation" in the above step S1220 can be specifically implemented through the following steps S20 to S21.
[0134] Step S20: Determine a second vegetation size of the terrain vegetation.
[0135] Step S21: deleting the terrain vegetation whose maximum length in the second vegetation size is equal to or greater than the second reference length from the terrain vegetation, and determining the remaining terrain vegetation as the first terrain vegetation.
[0136] The second vegetation size is used to describe the vegetation size of the terrain vegetation. The second vegetation size can be determined by the bounding box size of the bounding box set for the terrain vegetation. For the introduction of the bounding box, please refer to the previous description and will not be repeated here.
[0137] The maximum length of the second vegetation size and the second reference length can refer to the introduction of the maximum length of the first vegetation size and the first reference length in the previous text, which will not be repeated here.
[0138] In this way, large vegetation in the terrain vegetation can be removed, and only small terrain vegetation in the terrain vegetation can be retained, reducing the vegetation mutation problem during terrain rendering and improving the vegetation performance during terrain rendering.
[0139] In the following, in combination with Table 3 and a specific example, the above-described method of determining the first terrain vegetation according to the second vegetation size is exemplarily described.
[0140] Table 3 Examples of terrain vegetation in virtual scenes
[0141]
[0142]
[0143] As shown in Table 3, the second vegetation type of the terrain vegetation in the virtual scene includes poplar A1 class, willow A2 class, flower and grass B1 class and flower and grass B2 class, among which the poplar A1 class includes one poplar vegetation, namely poplar 4, the willow A2 class includes one willow vegetation, namely willow 5, the flower and grass B1 class includes one flower and grass vegetation, namely flower and grass 3, and the flower and grass B2 class includes one flower and grass vegetation, namely flower and grass 4.
[0144] Among them, assuming that the character height of the benchmark character preset for the virtual scene is 180 cm, the benchmark length for screening large scene vegetation and small scene vegetation is 180 cm. Referring to the screening method described in Table 1, it can be determined that the first terrain vegetation includes poplar 4, and the terrain vegetation information about the poplar 4 in the first terrain information can be deleted, and the terrain information after deleting the poplar 4 is determined as the third terrain information. In this way, the scene vegetation information corresponding to willow 1, willow 2, peach 1, flowers and plants 1, and moss 1 shown in Table 1 can be added to the third terrain information to obtain the second terrain information. At this time, the second terrain information can include terrain vegetation information of terrain vegetation such as willow 1, willow 2, peach 1, willow 5, flowers and plants 1, flowers and plants 3, flowers and plants 4, and moss 1.
[0145] It is understandable that the vegetation type corresponding to the scene vegetation in the virtual scene and the vegetation type corresponding to the terrain vegetation may be the same or different. Therefore, when adding the scene vegetation information of the scene vegetation to the first terrain information, it is necessary to further consider the correspondence between the vegetation type of the scene vegetation and the vegetation type of the terrain vegetation.
[0146] In this embodiment, the specific types of the first vegetation type and the second vegetation type may be the same or different, and the quantities may be the same or different, and there is no limitation on this.
[0147] Based on this, when adding the scene vegetation information of the scene vegetation to the first terrain information, specifically, the scene vegetation information of the scene vegetation is added to the position in the first terrain information for storing terrain vegetation information, and at this time, a data adding process is involved.
[0148] Based on this, in some optional specific embodiments, the above-described step S1222 of "adding the scene vegetation information of the first scene vegetation to the third terrain information to obtain the second terrain information" can be specifically implemented through the following steps S30 to S32.
[0149] Step S30: Determine the first vegetation type missing from the third terrain information according to the target first vegetation type corresponding to the first scene vegetation and the target second vegetation type corresponding to the second terrain vegetation; the second terrain vegetation is the terrain vegetation remaining after deleting the first terrain vegetation from the terrain vegetation;.
[0150] Step S31: creating the missing first vegetation type in the third terrain information so that the target first vegetation type and the target second vegetation type correspond one to one.
[0151] Step S32: according to the correspondence between the target first vegetation type and the target second vegetation type, the scene vegetation information of the first scene vegetation is added to the third terrain information to obtain the second terrain information.
[0152] It can be understood that if the number of vegetation in the scene vegetation or terrain vegetation changes, the corresponding vegetation type will also change. Therefore, in the present steps S30 to S32, after determining the first scene vegetation that meets the adding conditions and the second terrain vegetation that meets the conditions, it is necessary to further determine, among each first vegetation type, the target first vegetation type currently corresponding to the first scene vegetation and the target second vegetation type currently corresponding to the second terrain vegetation.
[0153] In this way, the target first vegetation type and the target second vegetation type can be further compared to determine whether a target first vegetation type is missing in the current third terrain information. If missing, the target first vegetation type can be created in the third terrain information so that the target first vegetation type has a unique corresponding target second vegetation type in the third terrain information. Based on this, the scene vegetation information corresponding to different target first vegetation types can be added one by one to the data storage location corresponding to each target second vegetation type.
[0154] In the following, in combination with Table 2 and a specific example, an exemplary description is given of a method for determining the target first vegetation type of the first scene vegetation.
[0155] Referring to Table 2, the first vegetation types to which the first scene vegetation: willow 1, willow 2 and peach 1 belong respectively are willow A2 and peach A3. Therefore, in this specific example, the target first vegetation types include willow A2 and peach A3.
[0156] Referring to Table 3, based on the elimination method introduced in Table 3, the first terrain vegetation eliminated is poplar 4. Correspondingly, the remaining second terrain vegetation in the virtual scene may include: willow 5, flowers and plants 3, and flowers and plants 4. The target second vegetation types corresponding to these second terrain vegetations are willow A2, flowers and plants B1, and flowers and plants B2.
[0157] Comparing Table 2 and Table 3, the vegetation type missing in the third terrain information is peach tree A3 class. Therefore, peach tree A3 class can be created in the third terrain information. That is, after creating peach tree A3 class, the second vegetation type in the third terrain information can include five types, namely: poplar A1, willow A2, peach tree A3, flowers and plants B1 and flowers and plants B2; in this way, the poplar A1, willow A2 and peach tree A3 shown in Table 2 can have a unique corresponding second vegetation type in the third terrain information.
[0158] Based on this, the scene vegetation information corresponding to Willow 1 and Willow 2 is added to the data storage space preset for willow A2 class in the third terrain information, and the scene vegetation information corresponding to peach tree 1 is added to the data storage space preset for peach A3 class in the third terrain information.
[0159] In this way, scene vegetation information of different first vegetation types can be stored in the third terrain information in a “categorized” manner, thereby improving the efficiency of information adding.
[0160] It should be noted that the above is only an exemplary introduction to comparing the target first vegetation type and the target second vegetation type to determine the missing target first vegetation type in the third terrain information. It can be understood that before screening the qualified first scene vegetation and second terrain vegetation, the comparison can be performed based on the original first vegetation type and the second vegetation type to achieve the addition of the missing first vegetation type in the first terrain information. This will not be elaborated herein.
[0161] In some optional embodiments, the step of "adding the scene vegetation information to the first terrain information to obtain the second terrain information" in the above-described step S120 can be specifically implemented through the following steps S40 to S42.
[0162] Step S40: determining the distance between the vegetation position of the scene vegetation in the virtual scene and the preset ground plane of the first terrain.
[0163] Step S41: if the distance is greater than the distance threshold, adjust the scene position in the original scene vegetation information corresponding to the scene vegetation so that the distance between the scene position of the scene vegetation and the preset ground plane is less than the distance threshold, and obtain the target scene vegetation information corresponding to the scene vegetation.
[0164] Step S42: Add the target scene vegetation information to the first terrain information.
[0165] The purpose of steps S40 to S42 is to pre-process the original vegetation information corresponding to the scene vegetation before adding the scene vegetation information to the first terrain information, so as to improve the rendering effect when the scene vegetation is rendered as terrain vegetation. For example, the vegetation position (root position) of the scene vegetation that is "suspended", "partially underground, partially above ground" and / or "completely underground" is adjusted so that the root of each scene vegetation is located on the surface that fits the first terrain, thereby making the rendering effect of each scene vegetation as terrain vegetation more natural and improving the realism of the terrain vegetation in the virtual scene.
[0166] Since scene vegetation that is "completely underground" can be regarded as scene vegetation that does not need to be displayed on the terrain surface, if this type of scene vegetation is rendered as terrain vegetation, it is easy to cause the vegetation objects in the virtual scene to not meet expectations. Therefore, in a preferred embodiment, only the vegetation position of the scene vegetation that is "suspended" and / or "partially underground and partially above ground" can be adjusted.
[0167] The above-mentioned scene vegetation "partially located underground and partially located above ground" can be referred to the previous description and will not be repeated here.
[0168] The above-mentioned "suspended" scene vegetation is that the first ray emitted from the vegetation position first collides with the preset object which is the first terrain, but the distance between the vegetation position and the first terrain is far, so the first scene vegetation presents a "suspended" effect in visual effect.
[0169] The preset ground plane of the first terrain mentioned above can be understood as the surface grid plane of the first terrain.
[0170] For scene vegetation of this type of vegetation located at a distance greater than a distance threshold from a preset ground plane of the first terrain, the position of the vegetation may be reset to fit the position of the vegetation onto the surface of the first terrain.
[0171] The original scene vegetation information in the above step S41 refers to the scene vegetation information including the original scene position corresponding to the scene vegetation before the position is reset, and the target scene vegetation information refers to the scene vegetation information including the target scene position corresponding to the scene position after the position is reset.
[0172] The above-mentioned making the distance between the scene position of the target scene vegetation and the preset ground plane smaller than the distance threshold means that the target scene vegetation can be fitted onto the surface grid of the first terrain.
[0173] This embodiment does not describe in detail the specific method of resetting the position.
[0174] The above-mentioned distance threshold refers to the distance value used to determine whether the target scene vegetation is "fitted" to the first terrain. For example, the distance threshold may be 0. When the distance between the root position of the target scene vegetation and the preset ground plane of the first terrain is equal to 0, it indicates that the target scene vegetation is fitted to the first terrain. When the distance between the root position of the target scene vegetation and the preset ground plane of the first terrain is greater than 0, it indicates that the target scene vegetation is "suspended in the air" or the root position is located below the first terrain.
[0175] It should be noted that after determining the first scene vegetation according to the above description, the distance between the vegetation position of the first scene vegetation in the virtual scene and the preset ground plane of the first terrain can be determined, and then when the distance is greater than the distance threshold, the scene position in the original scene information corresponding to the first scene vegetation whose distance is greater than the distance threshold is adjusted so that the distance between the scene position of the first scene vegetation and the preset ground plane is equal to or less than the distance threshold, and the target scene vegetation information corresponding to the first scene vegetation is obtained; thereby, the target scene vegetation information of the first scene vegetation is added to the third terrain information to obtain the second terrain information. This will not be elaborated on.
[0176] like Figure 5 As shown, Figure 5 Provides a schematic diagram for adjusting the vegetation position of the scene vegetation.
[0177] Assume that the distance threshold is 0. Figure 5 As shown in (a), Figure 5 (a) provides a process for resetting the position of a "suspended" scene vegetation. The distance between the root position of the scene vegetation and the preset ground plane of the first terrain is 0.5 cm. The distance 0.5 cm is greater than the distance threshold 0. The root position of the scene vegetation can be moved 0.5 cm in the vertical downward direction indicated by the dotted arrow, and the scene vegetation can be fitted on the first terrain. In other words, the coordinate value (such as Z value or Y value) used to represent the distance between the root position and the preset ground plane in the original root position coordinates is reduced by 0.5 cm to obtain a new root position coordinate, and the scene vegetation information corresponding to the scene vegetation when it is fitted on the first terrain (including the new root position coordinate) is added to the first terrain information of the first terrain.
[0178] like Figure 5 As shown in (b), Figure 5 (b) provides a process for resetting the position of scene vegetation that is "partially located above the first terrain and partially located below the first terrain". The root of the scene vegetation is located 5 cm away from the preset ground plane of the first terrain, and the root position is located below the first terrain. The distance 5 cm is greater than the distance threshold 0. The root position of the scene vegetation can be moved 5 cm in the vertical upward direction indicated by the dotted arrow, and the scene vegetation can be fitted on the first terrain. In other words, the coordinate value used to represent the distance between the root position and the preset ground plane in the original root position coordinates is increased by 5 cm to obtain new root position coordinates, and the scene vegetation information corresponding to the scene vegetation when it is fitted on the first terrain (including the new root position coordinates) is added to the first terrain information of the first terrain.
[0179] In some optional embodiments, the information processing method provided in the present application may further include the following step S140.
[0180] Step S140: before adding the scene vegetation information of the first scene vegetation to the first terrain information, displaying first prompt information through a graphical user interface; the first prompt information includes: a target first vegetation type corresponding to the first scene vegetation, and the quantity of the first scene vegetation.
[0181] In this embodiment, the first prompt information may include text prompt information and / or graphic prompt information. This embodiment does not specifically limit the specific form of the first prompt information.
[0182] The above-mentioned first prompt information is used to prompt the user which types of scene vegetation corresponding to the scene vegetation information currently added to the first terrain information, as well as the number of the first scene vegetation. Through the first prompt information, the user is assisted in understanding the distribution of terrain vegetation and scene vegetation in the virtual scene.
[0183] The above-mentioned graphical user interface is a visual representation and operation interface for users to interact with virtual scenes, which includes virtual scenes and UI (User Interface) elements for guiding user operations.
[0184] In some optional embodiments, a virtual scene is displayed through a graphical user interface, and a plurality of first scene vegetations are displayed in the virtual scene; based on this, the information processing method provided in the present application may further include the following step S150.
[0185] Step S150: displaying second prompt information at the vegetation position in the virtual scene according to the vegetation position in the scene vegetation information of the first scene vegetation, wherein the second prompt information is used to prompt the vegetation position of the first scene vegetation.
[0186] That is, a preview function is provided for the user before adding information, so that the user can intuitively view the location information of the first scene vegetation to be added to the first terrain information in the virtual scene through the graphical user interface. In this way, it is convenient for the user to view the distribution of each first scene vegetation in real time and adjust unreasonable data in time, such as adjusting the distance threshold used to determine whether the scene vegetation is "suspended".
[0187] like Figure 6 As shown, Figure 6 An example interface display schematic diagram for displaying first prompt information and second prompt information is provided.
[0188] A virtual scene 100 is displayed in a graphical user interface 1000, and the virtual scene 100 includes a plurality of scene vegetations, including a plurality of first scene vegetations. Before the scene vegetation information corresponding to the first scene vegetation determined in the foregoing text is added to the first terrain information, a first prompt message 10 and a second prompt message 20 can be displayed in the graphical user interface 1000, wherein the first prompt message 10 includes a text prompt message "type and quantity of scene vegetation to be added: 100 B1-type flowers and plants, 50 B2-type flowers and plants", which is used to prompt that 100 B1-type scene vegetations and 50 B2-type scene vegetations are baked into the first terrain this time. The second prompt message 20 is a graphic mark, which is used to be displayed at the vegetation position where each first scene vegetation to be baked into the terrain is located, so as to prompt the user of the vegetation position of each first scene vegetation, so that the user can intuitively view which scene vegetations are baked into the terrain.
[0189] Optionally, the first prompt information 10 may also include a confirmation control and a cancel control, wherein the confirmation control is used to trigger the game logic of baking the first scene vegetation into the first terrain, that is, triggering the game logic of adding the scene vegetation information corresponding to the first scene vegetation to the first terrain information to obtain the second terrain information, and the cancel control is used to cancel the game logic of baking the first scene vegetation into the first terrain, that is, after applying the corresponding trigger operation to the cancel control, the first prompt information 10 and the second prompt information 20, etc. can be not displayed in the graphical user interface.
[0190] In some optional implementations, after adding the scene vegetation information of the scene vegetation to the first terrain information to obtain the second terrain information, there may be a need to replace the terrain vegetation information of some terrain vegetation. Therefore, the information processing method provided in the embodiment of the present application may also include the following steps S170 to S200.
[0191] Step S170: In response to the vegetation replacement instruction, obtain the first target vegetation type and the second target vegetation type indicated by the vegetation adjustment instruction, and first vegetation information corresponding to the first target vegetation type, the first vegetation information including: vegetation geometry information corresponding to the first target vegetation type.
[0192] Step S180: deleting the first vegetation information corresponding to the first target vegetation type in the second terrain information.
[0193] Step S190: assigning vegetation geometric information to second vegetation information corresponding to the second target vegetation type to obtain target second vegetation information corresponding to the second target vegetation type; the target second vegetation information includes vegetation geometric information.
[0194] Step S200: According to the target second vegetation information, the terrain vegetation corresponding to the first target vegetation type displayed on the second terrain is switched to the terrain vegetation corresponding to the second target vegetation type.
[0195] The purpose of steps S170 to S200 is to replace the current terrain vegetation type in the second terrain information.
[0196] The vegetation replacement instruction may refer to a processing instruction for replacing the terrain vegetation type in the second terrain information. The vegetation replacement instruction may be generated in the following exemplary manner:
[0197] Example 1: A vegetation replacement control is displayed in a graphical user interface, and in response to a trigger operation on the replacement control, the vegetation replacement instruction is generated. In the above example 1, the trigger operation on the replacement control may include, but is not limited to: a click operation, a press operation, a slide operation, etc. acting on the replacement control, which is not specifically limited in this embodiment.
[0198] Example 2: In response to a change in the scene vegetation information of the scene vegetation in the virtual scene, the vegetation replacement instruction is generated. For example, the scene vegetation type in the virtual scene increases or decreases, or the number of scene vegetation corresponding to a certain scene vegetation type increases or decreases, etc. This will not be described in detail.
[0199] The first target vegetation type is the terrain vegetation type to be replaced in the first terrain information indicated by the vegetation replacement instruction; the second target vegetation type is the vegetation type used to replace the first target vegetation type. For example, if the user wants to replace grass vegetation in the terrain vegetation with shrub vegetation, the grass is the first target vegetation type and the shrub is the second target vegetation type.
[0200] It should be noted that when the above-mentioned vegetation replacement instruction is generated by the method of the above-mentioned example one, in this case, the above-mentioned vegetation replacement control corresponds to an information input function and an information acquisition function, that is, the user can input the above-mentioned first target vegetation type and the above-mentioned second target vegetation type through the vegetation replacement control, so that the electronic device can obtain the first target vegetation type and the above-mentioned second target vegetation type.
[0201] When the vegetation replacement instruction is generated by the method of the above example 1, if the user places scene vegetation at the vegetation position of a certain terrain vegetation in the virtual scene, the scene vegetation type corresponding to the newly added scene vegetation is used as the second target vegetation type, and the terrain vegetation corresponding to the vegetation position is determined as the first target vegetation type. The above method of determining the first target vegetation type and the second target vegetation type is only an example and does not constitute a limitation on the embodiments of the present application.
[0202] The first vegetation information is vegetation information corresponding to the first target vegetation type, and may include vegetation geometry information and vegetation material information. For the introduction of vegetation geometry information and vegetation material information, reference may be made to the previous description, which will not be repeated here.
[0203] After the first target vegetation type is acquired, the first vegetation information corresponding to the first target vegetation type in the second terrain information may be deleted, so as to delete all terrain vegetation corresponding to the first target vegetation type generated on the second terrain.
[0204] The above-mentioned assigning of vegetation geometric information to the second vegetation information corresponding to the second target vegetation type means adding the vegetation geometric information to the second vegetation information corresponding to the second target vegetation type, or replacing the original vegetation geometric information included in the second vegetation information with the vegetation geometric information. In short, the vegetation geometric information is included in the second vegetation information corresponding to the second target vegetation type. Specifically, the specific method of assigning the vegetation geometric information to the second vegetation information is determined by detecting whether the second target vegetation type exists in the second terrain information.
[0205] Optionally, if the second terrain information includes the second target vegetation type, the vegetation geometry information is added to the second vegetation information corresponding to the second target vegetation type to obtain the target second vegetation information corresponding to the second target vegetation type. That is, the original second vegetation information existing in the second terrain information is not modified, but the vegetation geometry information is added to the original second vegetation information, so that terrain vegetation of the second target vegetation type indicated by the vegetation material information in the second vegetation information can be generated at each vegetation position indicated by the vegetation geometry information.
[0206] Optionally, if the second target vegetation type is not included in the second terrain information, it indicates that the second target vegetation type is a new vegetation type. For example, the virtual vegetation corresponding to the second target vegetation type is currently the scene vegetation. Based on this, the second target vegetation type can be created in the second terrain information as described above. After the second target vegetation type is successfully created, the above-mentioned vegetation geometry information and preset material information can be used as the target second vegetation information corresponding to the created second target vegetation type. Among them, the preset material information is the texture information, color information, lighting information, etc. of the scene vegetation corresponding to the second target vegetation type, and is not specifically limited.
[0207] It should be noted that the preset material information may be information stored locally in the electronic device, and when the second target vegetation type is obtained, it is loaded into the game engine to implement the addition of the preset material information.
[0208] In this embodiment, the second vegetation information after the vegetation geometric information is assigned to the second vegetation information corresponding to the second target vegetation type is called target second vegetation information. Furthermore, based on the target second vegetation information, the terrain vegetation corresponding to the second target vegetation type can be displayed at the vegetation position where the first target vegetation type was originally displayed.
[0209] like Figure 7 As shown, Figure 7 An example interface display diagram for replacing the type of terrain vegetation in a virtual scene is provided.
[0210] Based on the graphical user interface 1001, if the user places a vegetation model of the "cactus" class generated by a third-party plug-in tool at the location of the flower and grass vegetation 30, a vegetation replacement instruction can be generated. In response to the vegetation replacement instruction, the "cactus" class is determined as the second target vegetation type, and the flower and grass class is determined as the first target vegetation type;
[0211] Further, the vegetation information corresponding to the flower and grass vegetation 30 in the second terrain information currently displayed in the virtual scene 100 is deleted; then, it is detected whether there is the vegetation type of the "cactus" class in the second terrain information. If not, the vegetation type of the "cactus" class is added to the second terrain information, and the vegetation geometry information corresponding to the flower and grass vegetation 30 is assigned to the vegetation information corresponding to the "cactus" class. Specifically, the vegetation material information set for the "cactus" class can be obtained locally from the electronic device, and the above-mentioned vegetation geometry information and vegetation material information are jointly determined as the target second vegetation information corresponding to the "cactus" class;
[0212] After obtaining the target second vegetation information, rendering can be performed based on the target second vegetation information to switch the graphical user interface 1001 to the graphical user interface 1002. In the virtual scene 101 displayed in the graphical user interface 1002, the flower and grass type terrain vegetation 30 originally displayed on the second terrain displayed in the virtual scene 100 is switched to terrain vegetation corresponding to the "cactus" type.
[0213] In this way, the vegetation types of various terrains in the second terrain can be replaced quickly and conveniently while ensuring that the vegetation geometric attributes such as vegetation position and vegetation size do not change.
[0214] It should be noted that Figure 6 The dotted lines in the figure are fictitious lines for the sake of ease of understanding and do not exist on the graphical user interface displayed on the terminal device.
[0215] So far, the method provided by the present embodiment has been described. The embodiment of the present application can add the vegetation information of the scene vegetation located in the virtual scene to the terrain information so as to treat the original scene vegetation as the terrain vegetation, that is, the scene vegetation that was originally a separate vegetation object is managed as part of the terrain object rather than as a separate vegetation object in the virtual scene, thereby reducing the number of separate vegetation objects existing in the virtual scene, thereby improving the rendering efficiency of the virtual scene.
[0216] In addition, before adding the scene vegetation information of the scene vegetation to the first terrain information, large scene vegetation in the scene vegetation and large terrain vegetation in the terrain vegetation can be eliminated, so that only small scene vegetation can be added to the first terrain including only small terrain vegetation, thereby improving the rendering effect of the terrain; further, each scene vegetation can be screened according to the vegetation position of the scene vegetation, and only the scene vegetation whose vegetation position meets the requirements can be rendered as terrain vegetation, thereby improving the rendering effect of the terrain vegetation.
[0217] Corresponding to the information processing method provided in the embodiment of the present application, the embodiment of the present application also provides an information processing device 2000, such as Figure 8 As shown, the device 2000 includes: an acquisition unit 2001, an adding unit 2002 and a generating unit 2003.
[0218] An acquisition unit 2001 is used to acquire first terrain information of a first terrain in a virtual scene and scene vegetation information of scene vegetation in the virtual scene;
[0219] An adding unit 2002, configured to add scene vegetation information to the first terrain information to obtain second terrain information;
[0220] The generating unit 2003 is used to generate a second terrain with scene vegetation according to the second terrain information, where the second terrain includes at least part of the features of the first terrain.
[0221] Optionally, the adding unit 2002 is specifically configured to determine a first scene vegetation in the scene vegetation; and add the scene vegetation information of the first scene vegetation to the first terrain information to obtain the second terrain information.
[0222] Optionally, the virtual scene includes at least one type of terrain vegetation;
[0223] The adding unit 2002 is specifically used to determine the first terrain vegetation in the terrain vegetation; delete the terrain vegetation information corresponding to the first terrain vegetation in the first terrain information to obtain the third terrain information; and add the scene vegetation information of the first scene vegetation to the third terrain information to obtain the second terrain information.
[0224] Optionally, the scene vegetation information includes at least one first vegetation type corresponding to the scene vegetation, and the first terrain information includes at least one second vegetation type corresponding to the terrain vegetation;
[0225] The adding unit 2002 is specifically used to determine the first vegetation type missing in the third terrain information according to the target first vegetation type corresponding to the first scene vegetation and the target second vegetation type corresponding to the second terrain vegetation; the second terrain vegetation is the terrain vegetation remaining after deleting the first terrain vegetation from the terrain vegetation; create the missing first vegetation type in the third terrain information so that the target first vegetation type has a corresponding target second vegetation type in the third terrain information; according to the correspondence between the target first vegetation type and the target second vegetation type, add the scene vegetation information of the first scene vegetation to the third terrain information to obtain the second terrain information.
[0226] Optionally, the adding unit 2002 is specifically configured to determine a first vegetation size of the scene vegetation; and determine the scene vegetation whose maximum length in the first vegetation size is less than the first reference length as the first scene vegetation.
[0227] Optionally, an additional unit 2002 is specifically configured to determine a vegetation position of the scene vegetation in the virtual scene; and determine a first scene vegetation in the scene vegetation according to the vegetation position.
[0228] Optionally, the adding unit 2002 is specifically configured to emit a first ray along a preset direction through the vegetation position, and determine a first scene vegetation in the scene vegetation according to the first ray.
[0229] Optionally, a unit 2002 is added, which is specifically used to determine the scene vegetation that satisfies the first condition of the emitted first ray as the first scene vegetation; the first condition is: the first ray collides with any preset object in the virtual scene, and the preset object that the first ray collides with for the first time is the first terrain.
[0230] Optionally, adding unit 2002 is specifically used to determine the second scene vegetation in the scene vegetation; the first ray corresponding to the second scene vegetation does not collide with any preset object in the virtual scene; deleting the second scene vegetation in the scene vegetation, and determining the remaining scene vegetation as the first scene vegetation.
[0231] Optionally, add unit 2002, which is specifically used to determine the bounding box of the second scene vegetation; the bounding box includes multiple vertices; delete the second scene vegetation that meets the second condition in the scene vegetation, and determine the remaining scene vegetation as the first scene vegetation; the fourth condition is: there is no intersection between the second rays emitted from each vertex of the bounding box along the preset direction and the preset ground plane.
[0232] Optionally, the adding unit 2002 is specifically used to determine a second vegetation size of the terrain vegetation; delete the terrain vegetation whose maximum length in the second vegetation size is equal to or greater than the second reference length from the terrain vegetation, and determine the remaining terrain vegetation as the first terrain vegetation.
[0233] Optionally, adding unit 2002 is specifically used to determine the distance between the vegetation position of the scene vegetation in the virtual scene and the preset ground plane of the first terrain; if the distance is greater than a distance threshold, adjust the scene position in the original scene vegetation information corresponding to the scene vegetation so that the distance between the scene position of the scene vegetation and the preset ground plane is equal to or less than the distance threshold, and obtain the target scene vegetation information corresponding to the scene vegetation; add the target scene vegetation information to the first terrain information to obtain the second terrain information.
[0234] Optionally, the above device 2000 further includes a display unit 2004;
[0235] The display unit 2004 is used to display first prompt information through a graphical user interface before adding the scene vegetation information of the first scene vegetation to the first terrain information; the first prompt information includes: the target first vegetation type corresponding to the first scene vegetation, and the number of the first scene vegetation.
[0236] Optionally, the display unit 2004 is also used to display a virtual scene through a graphical user interface, where the virtual scene includes a first scene vegetation; based on the vegetation position in the scene vegetation information of the first scene vegetation, a second prompt information is displayed at the vegetation position in the virtual scene, and the second prompt information is used to prompt the vegetation position of the first scene vegetation.
[0237] Optionally, the above device 2000 further includes a replacement unit 2005;
[0238] The replacement unit 2005 is used to respond to the vegetation replacement instruction, obtain the first target vegetation type and the second target vegetation type indicated by the vegetation adjustment instruction, and the first vegetation information corresponding to the first target vegetation type, wherein the first vegetation information includes: vegetation geometry information corresponding to the first target vegetation type; delete the first vegetation information in the second terrain information; assign the vegetation geometry information to the second vegetation information corresponding to the second target vegetation type, and obtain the target second vegetation information corresponding to the second target vegetation type; the target second vegetation information includes vegetation geometry information; according to the target second vegetation information, switch the terrain vegetation corresponding to the first target vegetation type displayed on the second terrain to the terrain vegetation corresponding to the second target vegetation type.
[0239] Optionally, replacement unit 2005 is specifically used to add vegetation geometry information to the second vegetation information corresponding to the second target vegetation type to obtain target second vegetation information corresponding to the second target vegetation type if the second terrain information includes the second target vegetation type; if the second terrain information does not include the second target vegetation type, create the second target vegetation type in the second terrain information, and use the vegetation geometry information and preset material information as the target second vegetation information corresponding to the created second target vegetation type.
[0240] Corresponding to an information processing method provided in an embodiment of the present application, an electronic device 3000 for implementing the information processing method is also provided in an embodiment of the present application. Fig. 9 As shown, the electronic device 3000 includes: a processor 3001; and a memory 3002, which is used to store the program of the information processing method. After the device is powered on and runs the program of the information processing method through the processor, any one of the embodiments described in the above information processing method is executed. For example, the following steps can be executed:
[0241] Acquire first terrain information of a first terrain in a virtual scene, and scene vegetation information of scene vegetation in the virtual scene;
[0242] Adding the scene vegetation information to the first terrain information to obtain second terrain information;
[0243] A second terrain with scene vegetation is generated according to the second terrain information, and the second terrain includes at least part of the features of the first terrain.
[0244] Corresponding to the information processing method provided in the embodiment of the present application, the embodiment of the present application further provides a computer-readable storage medium storing a program of the information processing method, the program is executed by a processor to execute any one of the embodiments described in the above information processing method, for example, the following steps may be executed:
[0245] Acquire first terrain information of a first terrain in a virtual scene, and scene vegetation information of scene vegetation in the virtual scene;
[0246] Adding the scene vegetation information to the first terrain information to obtain second terrain information;
[0247] A second terrain with scene vegetation is generated according to the second terrain information, and the second terrain includes at least part of the features of the first terrain.
[0248] It should be noted that for the detailed description of the device, electronic device and computer-readable storage medium provided in the embodiments of the present application, reference can be made to the relevant description of the information processing method embodiment provided in the embodiments of the present application, and no further details will be given here.
[0249] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
[0250] In a typical configuration, an electronic device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0251] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0252] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable operations, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.
[0253] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0254] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
Claims
1. An information processing method, characterized in that: The method comprises: Acquire first terrain information of a first terrain in a virtual scene, and scene vegetation information of scene vegetation in the virtual scene; Adding the scene vegetation information to the first terrain information to obtain second terrain information; A second terrain having the scene vegetation is generated according to the second terrain information, wherein the second terrain includes at least part of the features of the first terrain.
2. The method according to claim 1, characterized in that The step of adding the scene vegetation information to the first terrain information to obtain second terrain information includes: Determining a first scene vegetation among the scene vegetation; The scene vegetation information of the first scene vegetation is added to the first terrain information to obtain the second terrain information.
3. The method according to claim 2, characterized in that The virtual scene includes at least one type of terrain vegetation; and the step of adding the scene vegetation information of the first scene vegetation to the first terrain information to obtain the second terrain information includes: Determining a first terrain vegetation among the terrain vegetation; Deleting terrain and vegetation information corresponding to the first terrain and vegetation in the first terrain information to obtain third terrain information; The scene vegetation information of the first scene vegetation is added to the third terrain information to obtain the second terrain information.
4. The method according to claim 3, characterized in that The scene vegetation information includes at least one first vegetation type corresponding to the scene vegetation, and the first terrain information includes at least one second vegetation type corresponding to the terrain vegetation; The adding the scene vegetation information of the first scene vegetation to the third terrain information to obtain the second terrain information includes: Determine the first vegetation type missing from the third terrain information according to the target first vegetation type corresponding to the first scene vegetation and the target second vegetation type corresponding to the second terrain vegetation; the second terrain vegetation is the terrain vegetation remaining after deleting the first terrain vegetation from the terrain vegetation; Creating the missing first vegetation type in the third terrain information so that the target first vegetation type has the corresponding target second vegetation type in the third terrain information; According to the correspondence between the target first vegetation type and the target second vegetation type, the scene vegetation information of the first scene vegetation is added to the third terrain information to obtain the second terrain information.
5. The method according to claim 2, characterized in that: The determining of the first scene vegetation among the scene vegetation comprises: Determining a first vegetation size of the scene vegetation; The scene vegetation whose maximum length in the first vegetation size is smaller than the first reference length is determined as the first scene vegetation.
6. The method according to claim 2, characterized in that The determining of the first scene vegetation among the scene vegetation comprises: Determining a vegetation position of the scene vegetation in the virtual scene; The first scene vegetation in the scene vegetation is determined according to the vegetation position.
7. The method according to claim 6, characterized in that The step of determining the first scene vegetation in the scene vegetation according to the vegetation position includes: A first ray is emitted along a preset direction through the vegetation position, and a first scene vegetation in the scene vegetation is determined according to the first ray.
8. The method according to claim 7, characterized in that The determining, according to the first ray, a first scene vegetation in the scene vegetation includes: The scene vegetation that satisfies a first condition when the first ray is emitted is determined as the first scene vegetation; the first condition is that the first ray collides with any preset object in the virtual scene, and the preset object that the first ray collides with for the first time is the first terrain.
9. The method according to claim 7, characterized in that: The determining, according to the first ray, a first scene vegetation in the scene vegetation includes: Determining a second scene vegetation in the scene vegetation; the first ray corresponding to the second scene vegetation does not collide with any of the preset objects in the virtual scene; The second scene vegetation in the scene vegetation is deleted, and the remaining scene vegetation is determined as the first scene vegetation.
10. The method according to claim 9, characterized in that The deleting the second scene vegetation from the scene vegetation and determining the remaining scene vegetation as the first scene vegetation includes: Determine a bounding box of the vegetation in the second scene; the bounding box includes a plurality of vertices; The second scene vegetation that meets the second condition in the scene vegetation is deleted, and the remaining scene vegetation is determined as the first scene vegetation; the fourth condition is that there is no intersection between the second rays emitted by each of the vertices of the bounding box along the preset direction and the preset ground plane.
11. The method according to claim 3, characterized in that The determining of the first terrain vegetation among the terrain vegetation comprises: determining a second vegetation size of the terrain vegetation; From the terrain vegetation, the terrain vegetation whose maximum length in the second vegetation size is equal to or greater than the second reference length is deleted, and the remaining terrain vegetation is determined as the first terrain vegetation.
12. The method according to claim 1, characterized in that The step of adding the scene vegetation information to the first terrain information to obtain second terrain information includes: Determining a distance between a vegetation position of the scene vegetation in the virtual scene and a preset ground plane of the first terrain; If the distance is greater than the distance threshold, adjusting the scene position in the original scene vegetation information corresponding to the scene vegetation so that the distance between the scene position of the scene vegetation and the preset ground plane is equal to or less than the distance threshold, and obtaining the target scene vegetation information corresponding to the scene vegetation; The target scene vegetation information is added to the first terrain information to obtain the second terrain information.
13. The method according to claim 2, characterized in that The method further comprises: Before adding the scene vegetation information of the first scene vegetation to the first terrain information, first prompt information is displayed through a graphical user interface; the first prompt information includes: a target first vegetation type corresponding to the first scene vegetation, and the quantity of the first scene vegetation.
14. The method according to claim 13, characterized in that Displaying the virtual scene by means of a graphical user interface, wherein the virtual scene includes the first scene vegetation; the method further comprises: According to the vegetation position in the scene vegetation information of the first scene vegetation, second prompt information is displayed at the vegetation position in the virtual scene, and the second prompt information is used to prompt the vegetation position of the first scene vegetation.
15. The method according to claim 1, characterized in that The method further comprises: In response to the vegetation replacement instruction, acquiring a first target vegetation type and a second target vegetation type indicated by the vegetation adjustment instruction, and first vegetation information corresponding to the first target vegetation type, wherein the first vegetation information includes: vegetation geometry information corresponding to the first target vegetation type; deleting the first vegetation information in the second terrain information; Assigning the vegetation geometric information to the second vegetation information corresponding to the second target vegetation type to obtain target second vegetation information corresponding to the second target vegetation type; the target second vegetation information includes the vegetation geometric information; According to the target second vegetation information, the terrain vegetation corresponding to the first target vegetation type displayed on the second terrain is switched to be displayed as the terrain vegetation corresponding to the second target vegetation type.
16. The method according to claim 15, characterized in that The step of assigning the vegetation geometric information to the second vegetation information corresponding to the second target vegetation type to obtain the target second vegetation information corresponding to the second target vegetation type includes: If the second terrain information includes the second target vegetation type, adding the vegetation geometry information to the second vegetation information corresponding to the second target vegetation type to obtain the target second vegetation information corresponding to the second target vegetation type; If the second terrain information does not include the second target vegetation type, the second target vegetation type is created in the second terrain information, and the vegetation geometry information and the preset material information are used as the target second vegetation information corresponding to the created second target vegetation type.
17. An information processing device, characterized in that: The device comprises: an acquisition unit, an adding unit and a generation unit; An acquisition unit, configured to acquire first terrain information of a first terrain in a virtual scene, and scene vegetation information of scene vegetation in the virtual scene; an adding unit, configured to add the scene vegetation information to the first terrain information to obtain second terrain information; A generating unit is used to generate a second terrain with the scene vegetation according to the second terrain information, wherein the second terrain includes at least part of the features of the first terrain.
18. An electronic device, characterized in that: include: processor; as well as The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the method according to any one of claims 1 to 16 is executed.
19. A computer-readable storage medium, characterized in that: A data processing program is stored, and the program is run by a processor to execute the method according to any one of claims 1 to 16.