Movatterモバイル変換


[0]ホーム

URL:


CN110262865B - Method and device for constructing game scene, computer storage medium and electronic equipment - Google Patents

Method and device for constructing game scene, computer storage medium and electronic equipment
Download PDF

Info

Publication number
CN110262865B
CN110262865BCN201910518007.5ACN201910518007ACN110262865BCN 110262865 BCN110262865 BCN 110262865BCN 201910518007 ACN201910518007 ACN 201910518007ACN 110262865 BCN110262865 BCN 110262865B
Authority
CN
China
Prior art keywords
model
terrain
height
game
height information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910518007.5A
Other languages
Chinese (zh)
Other versions
CN110262865A (en
Inventor
张积强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co LtdfiledCriticalNetease Hangzhou Network Co Ltd
Priority to CN201910518007.5ApriorityCriticalpatent/CN110262865B/en
Publication of CN110262865ApublicationCriticalpatent/CN110262865A/en
Application grantedgrantedCritical
Publication of CN110262865BpublicationCriticalpatent/CN110262865B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The disclosure relates to the technical field of scene modeling, and provides a method, a device, a storage medium and an electronic device for constructing a game scene, wherein the method comprises the following steps: acquiring a terrain height map and an object height map; respectively acquiring the height information of the terrain and the height information of the game object according to the terrain height map and the object height map; respectively constructing a terrain model and an object model according to the height information of the terrain and the height information of the game object; and loading the object model to the terrain model to obtain a game scene comprising the object model and the terrain model. According to the method, on one hand, the model is automatically generated and the game scene is built, so that the situation that a large amount of time is consumed for building the scene can be avoided, and the efficiency of building the game scene is improved; on the other hand, the method can avoid the handover of a plurality of business departments, and improve the execution efficiency of constructing the game scene.

Description

Method and device for constructing game scene, computer storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of scene modeling technologies, and in particular, to a method for constructing a game scene, an apparatus for constructing a game scene, a computer-readable storage medium, and an electronic device.
Background
With the popularization of intelligent devices, more and more people begin to use various intelligent terminal devices to play games. The main part of the game design is scene design, and the creation of a fine game scene can bring visual enjoyment to a user and improve the immersion feeling of the user.
At present, the process used in the early stage planning and production phase of a game scene includes: firstly, designing a scene layout plan according to a scene original picture or plan; then, establishing simple models such as box and the like through 3D max by using modeling software according to a layout of a scene, and then constructing the scene for the models; after the scene is built, the scene is led into a game engine, and the scene running test is carried out together with the staff of departments such as game planning and the like; and finally, modifying the part with problems in the running test process until a scene layout design scheme is determined. However, in the method, if a problem is found, the original layout needs to be modified, and all the steps are executed again until a plurality of parties confirm that no error exists, and then the scene layout design scheme can be finally determined.
In view of the above, there is a need in the art to develop a new method and apparatus for constructing a game scene.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The purpose of the present disclosure is to provide a method for constructing a game scene, an apparatus for constructing a game scene, a computer-readable storage medium, and an electronic device, so as to reduce, at least to a certain extent, time consumed for constructing a game scene and a handover procedure between different posts, and further improve efficiency of constructing a game scene.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the present disclosure, there is provided a method for constructing a game scene, by executing a software application on a processor of an electronic device and rendering a graphical user interface on a display of the electronic device, the graphical user interface including a part of the game scene, the method comprising: acquiring a terrain height map and an object height map; respectively acquiring the height information of the terrain and the height information of the game object according to the terrain height map and the object height map; respectively constructing a terrain model and an object model according to the height information of the terrain and the height information of the game object; and loading the object model to the terrain model to obtain a game scene comprising the object model and the terrain model.
In an exemplary embodiment of the present disclosure, the loading the object model onto the terrain model includes: obtaining a frame model of the object model; moving the frame model upwards for a preset distance along a normal direction, wherein the normal is vertical to the ground; projecting the frame model onto the terrain model to obtain a target object diagram; and adding the height value of each vertex on the target object graph to the height value of the corresponding vertex in the height information of the game object to obtain an object model on the terrain model.
In an exemplary embodiment of the present disclosure, the preset distance is greater than an upper limit value of the height of the terrain model.
In an exemplary embodiment of the present disclosure, the obtaining of the framework model of the object model includes: deleting a face with a first color attribute in the object model to obtain a frame model of the object model
In an exemplary embodiment of the present disclosure, the face having the first color attribute is a face having a height value of zero in the object model.
In an exemplary embodiment of the present disclosure, the acquiring height information of a terrain and height information of a game object from the terrain height map and the object height map, respectively, includes: respectively acquiring a terrain gray value and a game object gray value according to the terrain height map and the object height map; and converting the gray value of the terrain and the gray value of the game object into height information of the terrain and height information of the game object respectively according to a preset rule.
In an exemplary embodiment of the present disclosure, the building a terrain model according to the height information of the terrain includes: mapping the height information of the terrain to a preset first model to form a first terrain model; performing color mapping according to the height information corresponding to each point in the first terrain model to form a second terrain model; and converting the second terrain model into a grid model to obtain the terrain model.
In an exemplary embodiment of the present disclosure, the building an object model according to the height information of the game object includes: mapping the height information of the game object to a preset second model to form a first object model; performing color mapping according to the height information corresponding to each point in the first object model to form a second object model; converting the second object model into a mesh model to obtain the object model.
In an exemplary embodiment of the present disclosure, the method further comprises: and responding to preset operation of a user, and reducing the number of the grid surfaces of the game scene to a target number.
In an exemplary embodiment of the present disclosure, after reducing the number of mesh surfaces of the game scene to a target number, the method further comprises: and correcting the normal direction of each surface in the game scene.
In an exemplary embodiment of the present disclosure, the method further comprises: after loading the object model onto the terrain model, converting the visual properties of the terrain model from hidden to displayed.
According to another aspect of the present disclosure, there is provided an apparatus for constructing a game scene, a graphical user interface is obtained by executing a software application on a processor of an electronic device and rendering the software application on a display of the electronic device, and the graphical user interface includes a part of the game scene, the apparatus includes: the image acquisition module is used for acquiring a terrain height map and an object height map; the information acquisition module is used for respectively acquiring the height information of the terrain and the height information of the game object according to the terrain height map and the object height map; the model building module is used for respectively building a terrain model and an object model according to the height information of the terrain and the height information of the game object; and the scene construction model is used for loading the object model onto the terrain model to obtain a game scene containing the object model and the terrain model.
According to another aspect of the disclosure, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the method of constructing a game scene as described in the above embodiments.
According to another aspect of the present disclosure, there is provided an electronic device including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method of constructing a game scene as described in the above embodiments.
As can be seen from the foregoing technical solutions, the method and apparatus for constructing a game scene, the computer-readable storage medium, and the electronic device in the exemplary embodiments of the present disclosure have at least the following advantages and positive effects:
the method for constructing the game scene can acquire the height information of the terrain according to the terrain height map and acquire the height information of the game object according to the object height map; then, a terrain model is built according to the height information of the terrain, and an object model is built according to the height information of the game object; and finally, loading the object model onto the terrain model to obtain a game scene containing the object model and the terrain model. According to the method, on one hand, a terrain model and an object model are respectively constructed according to the height information of the terrain and the height information of the game object, the object model is loaded on the terrain model, the construction of a scene is automatically completed without designing a scene layout diagram in advance, then the modeling is carried out according to the scene layout diagram and the model is manually used for constructing the game scene, so that the construction work of a large number of models is reduced, the handover flow among different posts is reduced, and the construction efficiency of the game scene is improved; on the other hand, when the game scene is modified, the game scene can be modified only by modifying the terrain height map and/or the object height map, so that the model modification process is reduced, and the modification efficiency and accuracy are improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
FIG. 1 schematically illustrates a structural schematic of a prior art constructed model;
FIG. 2 schematically illustrates a flow diagram of a method of constructing a game scene according to an embodiment of the present disclosure;
FIG. 3A schematically illustrates a terrain height map plotted by Photoshop according to an embodiment of the present disclosure;
FIG. 3B schematically illustrates an object height map rendered by Photoshop according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow diagram for forming a terrain model from height information of the terrain, according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a flow diagram for building an object model from height information of game objects according to an embodiment of the present disclosure;
FIG. 6A schematically illustrates an interface diagram of a building model according to an embodiment of the present disclosure;
FIG. 6B schematically illustrates an interface diagram of a frame model of a building model according to an embodiment of the disclosure;
FIG. 7 schematically illustrates a flow diagram for projecting a framework model of an object model onto a terrain model according to an embodiment of the present disclosure;
FIG. 8 schematically illustrates a structural schematic of a game scene according to an embodiment of the present disclosure;
FIG. 9 schematically illustrates a structural diagram of a game scene after face subtraction according to an embodiment of the present disclosure;
FIG. 10 schematically illustrates a structural schematic of a game scene according to an embodiment of the present disclosure;
fig. 11 schematically shows a structural diagram of an apparatus for constructing a game scene according to an embodiment of the present disclosure;
FIG. 12 schematically shows a block schematic of an electronic device according to an embodiment of the disclosure;
FIG. 13 schematically shows a program product schematic according to an embodiment of the disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the embodiments of the disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flowcharts shown in the figures are illustrative only and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
In the related art in the field, a plurality of business departments cooperate with each other to perform game scene early-stage planning and production, when a game scene is produced, modeling software such as 3D max is generally used to construct a simple model such as box, scene construction is performed according to a scene layout, then the simple model is imported into a game engine to perform running test, and modification is performed according to a running test result, but the previously executed steps need to be re-executed during modification, and a scene layout design scheme can be determined only when a plurality of parties confirm that there is no problem, and fig. 1 shows a structural schematic diagram of a model constructed in the prior art.
However, the method for constructing the game scene in the related art has corresponding defects, and taking a 1000m × 1000m city scene as an example, the scene layout design occupies about 10% of the total workload, the game scene construction occupies about 60% of the total workload, the scene import running occupies about 30% of the total workload, and the scene construction using box occupies most of the workload. If unreasonable places in the design need to be modified, the design needs to be modified layer by layer, so that a large amount of cost is consumed, handover of different business departments is complicated, and execution efficiency is greatly influenced.
Based on the problems in the related art, the present disclosure provides a method for constructing a game scene, where a software application is executed on a processor of an electronic device and a graphical user interface is rendered on a display of the electronic device, where the graphical user interface includes a part of the game scene, and the method for constructing the game scene may be run on a server, or may be run on a server cluster or a cloud server, and of course, a person skilled in the art may also run the method of the present disclosure on other platforms as needed, and this is not limited in this exemplary embodiment. Fig. 2 illustrates a method of constructing a game scene, which includes at least the following steps, as shown in fig. 2:
step S210; acquiring a terrain height map and an object height map;
step S220: respectively acquiring the height information of the terrain and the height information of the game object according to the terrain height map and the object height map;
step S230: respectively constructing a terrain model and an object model according to the height information of the terrain and the height information of the game object;
step S240: and loading the object model to the terrain model to obtain a game scene comprising the object model and the terrain model.
According to the method for constructing the game scene, on one hand, the terrain model and the object model are respectively constructed according to the height information of the terrain and the height information of the game object, the object model is loaded on the terrain model, the construction of the scene is automatically completed without designing a scene layout diagram in advance, then the game scene construction is carried out according to the scene layout diagram modeling and the model is manually used, so that the situation that the scene construction consumes a large amount of time can be avoided, and the efficiency of constructing the game scene is improved; on the other hand, the construction, the running test and the modification of the game scene can be directly completed through the business departments for constructing the game scene, the handover of a plurality of business departments is avoided, and the execution efficiency for constructing the game scene is improved.
In order to make the technical solution of the present disclosure clearer, the following describes each step of the method for constructing a game scene by taking the game scene in a game as an example.
In step S210, a terrain height map and an object height map are acquired.
In an exemplary embodiment of the present disclosure, a person constructing a game scene may design a terrain height map and an object height map through image processing software, for example, the terrain height map and the object height map may be made through Photoshop and other software, fig. 3A and 3B respectively show the terrain height map and the object height map drawn through Photoshop, as can be seen from fig. 3A, the terrain height map includes black parts and gray parts, wherein the gray parts have a certain height relative to the black parts, different gray values in the terrain height map represent different terrain heights, and similarly, in fig. 3B, the drawn object height map presents different gray values, the parts with large gray values correspond to objects with higher heights, and the parts with small gray values correspond to objects with lower heights. Of course, the required terrain height map and/or object height map may also be obtained from some target databases, and may be directly used for building the game scene, which is not specifically limited by the present disclosure. In an exemplary embodiment of the present disclosure, the object located on the terrain may be a building, and may also be a river, an island, or the like, and in order to make the technical solution of the present disclosure clearer, the following description will be made with respect to the building as an object.
In step S220, altitude information of the terrain and altitude information of the game object are acquired from the terrain altitude map and the object altitude map, respectively.
In an exemplary embodiment of the disclosure, after the user finishes drawing in the terminal or obtains the terrain height map and the object height map through the terminal, the user may send the terrain height map and the object height map to the server, and the server may determine the gray value corresponding to each point in the terrain height map according to the terrain height map, that is, obtain a terrain gray value, and may also obtain the gray value corresponding to each point in the object height map, that is, a gray value of a game object, specifically, a gray value of a building object. And then, converting the terrain gray value and the gray value of the game object into height information of the terrain and height information of the game object according to a preset rule, wherein the height information of the game object can be specifically height information of a building. The preset rule may be a conversion rule set according to actual needs, for example, 1 gray represents 1 meter, that is, a point with a gray value of 50 in the terrain height map or the building height map is a point with a height of 50 meters in the terrain or the building model, and of course, the preset rule may also be other rules, for example, 1 gray represents 10 meters, 20 meters, and the like, which is not specifically limited by the present disclosure, as long as it is ensured that the conversion relationship between the gray value and the height is the same in the process of generating the terrain model and the object model.
In an exemplary embodiment of the disclosure, after the terminal finishes drawing or the terminal acquires the terrain height map and the object height map, the user may further acquire a terrain gray value corresponding to the terrain height map and an object gray value corresponding to the object height map through the terminal, convert the terrain gray value into height information of the terrain according to a preset rule, and convert the object gray value into height information of the game object.
In step S230, a terrain model and an object model are respectively constructed according to the height information of the terrain and the height information of the game object.
In an exemplary embodiment of the present disclosure, after acquiring the height information of the terrain, a terrain model may be formed from the height information of the terrain. Fig. 4 is a schematic flow chart illustrating the process of forming a terrain model according to the height information of the terrain, as shown in fig. 4, in step S401, the height information of the terrain is mapped onto a preset first model to form a first terrain model; the first model can be a patch with higher point density, and a terrain model with height is formed by correspondingly mapping terrain height information to the patch, wherein the terrain model with height is the first terrain model. In step S402, performing color mapping according to the height information corresponding to each point in the first terrain model to form a second terrain model; in the color mapping, the mapping may be performed according to the height percentage of the height corresponding to each point with respect to the highest point in the first terrain model, for example, the color of the point with the height percentage of 1 is set to white, the color of the point with the height percentage of 0 is set to black, the color of the point with the height percentage of 0.5 is set to green, and the like. Furthermore, a comparison relation table can be formed according to the height percentage and the corresponding color, and after the first model is formed, the system can automatically map the color according to the comparison relation table to form a second terrain model. In step S403, converting the second terrain model into a mesh model to obtain the terrain model; in order to improve the stereoscopic impression of the terrain and make the terrain model more vivid, the second terrain model can be converted to form a grid model, and then the terrain model can be obtained.
In an exemplary embodiment of the present disclosure, a method of constructing an object model according to height information of a game object is similar to a method of constructing a terrain model according to height information of terrain, and fig. 5 is a schematic flow chart illustrating a process of constructing an object model according to height information of a game object, as shown in fig. 5, in step S501, height information of a game object is mapped onto a preset second model to form a first object model; the second model may be the same model as the first model or may be a different model. In step S502, color mapping is performed according to the height information corresponding to each point in the first object model to form a second object model; in step S503, the second object model is converted into a mesh model to obtain an object model. The method for performing color mapping and converting into a mesh model is the same as the method for performing color mapping and converting into a mesh model in fig. 4, and the embodiment of the disclosure is not described herein again.
In step S240, the object model is loaded onto the terrain model, and a game scene including the object model and the terrain model is obtained.
In an exemplary embodiment of the present disclosure, after the construction of the terrain model and the object model is completed, the two may be projection-joined to form a complete game scene. In the process of loading the object model onto the terrain model, the construction of the game scene can be realized by projecting the object model onto the terrain model and then highly restoring the projection diagram.
In an exemplary embodiment of the present disclosure, a frame model of the object model may be first obtained from the object model and then projected onto the terrain model. Specifically, after the object model is formed, the user may set the color attributes of each surface in the object model, in an embodiment of the present disclosure, the user may set the color attributes of each vertex of the object model through a corresponding node in the model building software, and then transfer all the color attributes from inside the vertex to each surface for storage, and in an embodiment of the present disclosure, the object model may include a surface having a first color attribute and a surface having a second color attribute, where the first color attribute is different from the second color attribute. Specifically, the surface of the first color attribute may be a surface of the object model with a height value of zero, the surface of the second color attribute may be a surface of the object layout model with a height value of non-zero, the first color may be any color, such as red, yellow, etc., and the second color may be any color different from the first color, which is not specifically limited by the disclosure. Fig. 6A-6B are schematic interface diagrams of a building model and a frame model corresponding to the building model, as shown in fig. 6A, the building model formed according to the method shown in fig. 5 may be processed by deleting a surface having a first color attribute from the building model, and only a surface having a second color attribute is reserved, and a structure formed by the surfaces having the second color attribute is the frame model of the building model, as shown in fig. 6B.
In an exemplary embodiment of the present disclosure, after obtaining the frame model of the object model, a normal direction may be set for all vertices of the frame model, the frame model may be moved along the normal direction and then projected toward the ground, so that the projection image may be restored to the object model according to the height information of the object model. In the embodiment of the disclosure, the normal direction is a direction perpendicular to the horizontal plane, so that the restored object layout model can be guaranteed to be perpendicular to the horizontal plane, the visual habit of the player can be met, and the user can be provided with a better immersion feeling. Further, fig. 7 shows a flow chart of projecting the frame model of the object model on the terrain model, as shown in fig. 7, in step S701, the frame model of the object model is moved by a preset distance in the normal direction; the preset distance is greater than the upper limit value of the height of the terrain model, namely the height value corresponding to the highest point in the terrain model; in the present disclosure, the height value corresponding to the highest point in the terrain may be set to 100 meters, that is, the gray value corresponding to the point is 100 according to the rule that 1 gray represents 1 meter, and accordingly, the preset distance may be set to 200 or other values greater than 100, so that the frame model of the object model is completely located above the terrain model, and when the frame model of the object model is projected to the terrain model, the corresponding terrain exists. In step S702, projecting the frame model onto the terrain model to obtain a target object map; the corresponding nodes in the game scene construction software can be used for emitting rays downwards to the whole frame model of the object model and emitting the rays to the terrain model so as to obtain a building layout drawing flattened on the terrain model, wherein the building layout drawing is the target object drawing. In step S703, the height value of each vertex on the target object diagram is added to the height value of the corresponding vertex in the height information of the game object to obtain an object model on the terrain model; each feature point in the target object graph stores a height attribute value corresponding to the feature point, and when the height is reduced, the height attribute value stored by each feature point can be taken out and added with the height attribute value of the point corresponding to each feature point on the terrain model, and the coordinate position of each feature point is changed according to the numerical value obtained after addition, so that the reduction of the target object graph can be realized, the object model is ensured to be positioned on the terrain model, and the construction of a game scene is realized. Fig. 8 shows a schematic structural diagram of a game scene, and it is noted that in the game scene shown in fig. 8, the terrain model is not shown.
In an exemplary embodiment of the present disclosure, in order to further reduce consumption and improve game effect and user experience, the number of grid surfaces in a game scene may be processed to reduce the number of grid surfaces to a target number, as shown in a schematic structural diagram of the game scene after the number of surfaces is reduced in fig. 9, where the target number may be set according to actual needs, for example, the target number may be set to 80% of an original number, and so on, as long as consumption can be reduced while the overall effect of the game scene is ensured. The reduction of the number of mesh surfaces in the game scene may be specifically realized by corresponding nodes in the model building software, or may be realized by artificially performing topology surface reduction on the game scene, which is not specifically limited in the embodiment of the present disclosure.
In the exemplary embodiment of the present disclosure, in the process of reducing the number of the mesh surfaces, the normal direction corresponding to a surface in the game scene may change, for example, the original normal direction of a certain surface is (1,1,0), but after reducing the number of the mesh surfaces, the normal direction of the surface becomes (-1, -1,0), so that in the later illumination processing, the position that should be brightened becomes dark, which causes a deviation in the effect of the game scene, and therefore, in order to ensure the overall effect of the game scene, the normal direction of each surface of the game scene may be corrected and adjusted back to the normal state after reducing the number of the mesh surfaces.
In the exemplary embodiment of the present disclosure, different visual attributes may also be set for the terrain model according to the construction process of the game scene, for example, in the process of projecting the object model onto the terrain model, performing height reduction on the object model, and subtracting the area of the game scene, the visual attribute of the terrain model may be set to be hidden, and after the above operation is completed, the visual attribute of the terrain model may be converted into display, so that the terrain model and the object model are displayed together, and the construction of the game scene is completed. Fig. 10 shows a schematic structural view of a game scene, in fig. 10 both a terrain model and a building model are visible.
In the exemplary embodiment of the disclosure, after the game scene is constructed, the game scene may be exported to a game engine, such as Unity or UE4, and a scene test may be performed on the game scene by the game engine, and during the scene test, the game plan may perform the scene test using a first-person perspective of the game engine itself, so that a planner may tailor the experience and determine whether there is a part in the game scene that needs to be modified. If the game scene has a part needing to be modified, the planning personnel can modify the corresponding part in the terrain height map and/or the object height map, and then construct the game scene based on the modified terrain height map and/or the modified object height map.
According to the method for constructing the game scene, the terrain model and the object model can be automatically generated according to the terrain height map and the object height map, the game scene is constructed by using the models without designing a scene layout map in advance, then the model is built according to the scene layout map and the model is manually used for constructing the game scene, the workload is reduced by at least 50%, the handover process among different posts is reduced, and the efficiency of constructing the game scene is improved; in addition, when the game scene is modified, the game scene can be modified only by modifying the terrain height map and/or the object height map, so that the model modification process is reduced, and the modification efficiency and accuracy are improved. Furthermore, after the game scene is built, the game scene can be directly set to be semitransparent for further scene making, so that the model is built more accurately, and the error probability is greatly reduced.
The following describes embodiments of the apparatus of the present disclosure, which may be used to perform the above-mentioned method for constructing a game scene of the present disclosure. For details that are not disclosed in the embodiments of the apparatus of the present disclosure, please refer to the embodiments of the method for constructing a game scene described above in the present disclosure.
Fig. 11 schematically shows a block diagram of an apparatus for constructing a game scene according to an embodiment of the present disclosure.
Referring to fig. 11, according to anapparatus 1100 for constructing a game scene according to an embodiment of the present disclosure, theapparatus 1100 for constructing a game scene is applied to a terminal device capable of presenting an interactive interface, and theapparatus 1100 for constructing a game scene includes: animage acquisition module 1101, aninformation acquisition module 1102, amodel construction module 1103, and ascene construction module 1104. Specifically, the method comprises the following steps:
animage acquisition module 1101 for acquiring a terrain height map and an object height map; aninformation obtaining module 1102, configured to obtain height information of a terrain and height information of a game object according to the terrain height map and the object height map; amodel building module 1103, configured to respectively build a terrain model and an object model according to the height information of the terrain and the height information of the game object; and thescene construction model 1104 is used for loading the object model onto the terrain model to obtain a game scene containing the object model and the terrain model.
It should be noted that although in the above detailed description several modules or units of the apparatus for performing are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
Anelectronic device 1200 according to this embodiment of the invention is described below with reference to fig. 12. Theelectronic device 1200 shown in fig. 12 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 12, theelectronic device 1200 is embodied in the form of a general purpose computing device. The components of theelectronic device 1200 may include, but are not limited to: the at least oneprocessing unit 1210, the at least onememory unit 1220, abus 1230 connecting different system components (including thememory unit 1220 and the processing unit 1210), and adisplay unit 1240.
Wherein the memory unit stores program code that is executable by theprocessing unit 1210 such that theprocessing unit 1210 performs steps according to various exemplary embodiments of the present invention as described in the above section "exemplary methods" of the present specification. For example, theprocessing unit 1210 may perform step s210 as shown in fig. 2. obtain a terrain height map and an object height map; s220, respectively acquiring terrain height information and game object height information according to the terrain height map and the object height map; step S230, respectively constructing a terrain model and an object model according to the height information of the terrain and the height information of the game object; step S240: and loading the object model onto the terrain model to obtain a game scene containing the object model and the terrain model.
Thestorage unit 1220 may include a readable medium in the form of a volatile memory unit, such as a random access memory unit (RAM)12201 and/or acache memory unit 12202, and may further include a read only memory unit (ROM) 12203.
Storage unit 1220 may also include a program/utility 12204 having a set (at least one) ofprogram modules 12205,such program modules 12205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 1230 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
Theelectronic device 1200 may also communicate with one or more external devices 1500 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with theelectronic device 1200, and/or with any devices (e.g., router, modem, etc.) that enable theelectronic device 1200 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 1250. Also, theelectronic device 1200 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via thenetwork adapter 1260. As shown, thenetwork adapter 1260 communicates with the other modules of theelectronic device 1200 via thebus 1230. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with theelectronic device 1200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, to name a few.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
Referring to fig. 13, aprogram product 1300 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed, for example, synchronously or asynchronously in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is to be limited only by the terms of the appended claims.

Claims (11)

CN201910518007.5A2019-06-142019-06-14Method and device for constructing game scene, computer storage medium and electronic equipmentActiveCN110262865B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910518007.5ACN110262865B (en)2019-06-142019-06-14Method and device for constructing game scene, computer storage medium and electronic equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910518007.5ACN110262865B (en)2019-06-142019-06-14Method and device for constructing game scene, computer storage medium and electronic equipment

Publications (2)

Publication NumberPublication Date
CN110262865A CN110262865A (en)2019-09-20
CN110262865Btrue CN110262865B (en)2022-07-12

Family

ID=67918454

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910518007.5AActiveCN110262865B (en)2019-06-142019-06-14Method and device for constructing game scene, computer storage medium and electronic equipment

Country Status (1)

CountryLink
CN (1)CN110262865B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111340704B (en)*2020-02-252023-08-22网易(杭州)网络有限公司Map generation method and device, storage medium and electronic device
CN111617485B (en)*2020-06-042023-08-08广州西山居网络科技有限公司Virtual terrain scene manufacturing method and device
CN111957045B (en)*2020-09-012021-06-04网易(杭州)网络有限公司Terrain deformation method, device, equipment and storage medium
CN111957046B (en)*2020-09-032024-06-25网易(杭州)网络有限公司Game scene resource generation method and device and computer equipment
CN112704874B (en)*2020-12-212023-09-22北京信息科技大学 A method and device for automatically generating gothic scenes in 3D games
CN112907741B (en)*2021-02-052024-02-02深圳市润谦科技有限公司Terrain scene generation method and device, electronic equipment and storage medium
CN113470169B (en)*2021-06-302022-04-29完美世界(北京)软件科技发展有限公司Game scene generation method and device, computer equipment and readable storage medium
CN114022629B (en)*2021-11-092025-05-27广州博冠信息科技有限公司 Virtual terrain processing method, device, storage medium and electronic device
CN114053708B (en)*2021-11-122022-12-16北京冰封互娱科技有限公司Map generation method and device, computer equipment and computer readable storage medium
CN114119925B (en)*2021-11-302022-11-25完美世界(北京)软件科技发展有限公司Game image modeling method and device and electronic equipment
CN114272609B (en)*2021-12-282025-05-27完美世界(北京)软件科技发展有限公司 Scene terrain generation method and device, storage medium, and electronic device
CN116036605A (en)*2022-11-182023-05-02网易(杭州)网络有限公司 Terrain editing method and device, storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102214367A (en)*2011-06-152011-10-12南京信息工程大学Three dimensional (3D) modeling and visualizing method of prehistoric settlement sites
CN108171797A (en)*2017-12-052018-06-15北京像素软件科技股份有限公司Mesh generation method and device
WO2019111956A1 (en)*2017-12-082019-06-13アジア航測株式会社Feature/ground height color-differentiated image generation device and feature height color-differentiated image generation program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
AU2006332582A1 (en)*2005-12-202007-07-12Mental Images GmbhModeling the three-dimensional shape of an object by shading of a two-dimensional image
US20130231897A1 (en)*2012-03-012013-09-05Harris CorporationSystems and methods for efficient analysis of topographical models

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102214367A (en)*2011-06-152011-10-12南京信息工程大学Three dimensional (3D) modeling and visualizing method of prehistoric settlement sites
CN108171797A (en)*2017-12-052018-06-15北京像素软件科技股份有限公司Mesh generation method and device
WO2019111956A1 (en)*2017-12-082019-06-13アジア航測株式会社Feature/ground height color-differentiated image generation device and feature height color-differentiated image generation program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
三维虚拟城市自动化生成方法研究;王朝晖等;《地域研究与开发》;20080415(第02期);第118-122页*

Also Published As

Publication numberPublication date
CN110262865A (en)2019-09-20

Similar Documents

PublicationPublication DateTitle
CN110262865B (en)Method and device for constructing game scene, computer storage medium and electronic equipment
US20220180017A1 (en)Building information design synthesis (bids)
CN111008422B (en) A method and system for making a real-world map of a building
US20230120253A1 (en)Method and apparatus for generating virtual character, electronic device and readable storage medium
CN112717414B (en)Game scene editing method and device, electronic equipment and storage medium
CN112836064A (en) Knowledge graph completion method, device, storage medium and electronic device
CN112784002B (en)Virtual scene generation method, device, equipment and storage medium
CN110433495B (en)Configuration method and device of virtual scene in game, storage medium and electronic equipment
WO2015196784A1 (en)Visual software modeling method based on software meta-view for constructing software view
CN102142152A (en)Method, apparatus, and program for displaying an object on a computer screen
CN109960887A (en)Model production method and device, storage medium and electronic equipment based on LOD
CN116894912A (en) Virtual construction sandbox construction method and device based on integration of 3D GIS and BIM
CN112023400B (en)Altitude map generation method, device, equipment and storage medium
CN115294283B (en)Digital twin plant construction method, device, equipment and storage medium
CN112734900A (en)Baking method, baking device, baking equipment and computer-readable storage medium of shadow map
CN110728750B (en)Intelligent driving environment live-action modeling method, system, terminal and storage medium
CN115756471A (en) A page code generation method, device, electronic equipment and storage medium
CN118657883A (en) Engineering visualization display method, device, equipment and storage medium
CN109308394A (en)A kind of pre-buried map generalization method, apparatus of three-dimensional water power, equipment and storage medium
CN115544622B (en)Urban and rural participated three-dimensional planning design platform, method, equipment and storage medium
CN110378948B (en)3D model reconstruction method and device and electronic equipment
CN117994482A (en)Method, device, medium and equipment for reconstructing three-dimensional model based on image
CN116993883A (en)Virtual ground processing method and device, storage medium and electronic equipment
CN114693885B (en) Three-dimensional virtual object generation method, device, equipment, medium and program product
CN109325991A (en)A kind of pre-buried map generalization method, apparatus of three-dimensional water power, equipment and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp