Method and apparatus for generating game scenes, storage medium, and electronic device

By receiving and generating rendering resource files, the problem that users cannot customize virtual game scenes is solved, efficient and personalized game scene generation is achieved, and the diversification and production efficiency of virtual game scenes are improved.

CN114288664BActive Publication Date: 2025-07-04BEIJING PERFECT WORLD SOFTWARE TECH DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111626290.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2025-07-04
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

In the prior art, individual users cannot efficiently customize virtual game scenes, resulting in limited diversified development of game scenes.

Method used

By receiving scene requirements information sent by the scene customization platform, obtain the target component model collection and layout parameter collection, generate a rendering resource file, and send it to the client to realize the customized generation of virtual game scenes.

Benefits of technology

It realizes efficient customization and diversification of virtual game scenes, meets users' personalized needs, and improves the flexibility and efficiency of game scene production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114288664B_ABST
    Figure CN114288664B_ABST
Patent Text Reader

Abstract

The present invention provides a method and apparatus for generating a game scene, a storage medium, and an electronic device. The method includes: receiving scene requirement information sent by a scene customization platform, where the scene requirement information is sent by a first client to the scene customization platform, and the scene requirement information is used to describe component models included in a target virtual game scene and detail parameters of each component model; obtaining a target component model set and a target layout parameter set according to the scene requirement information, where the target layout parameter set is used to describe the detail parameters corresponding to the target component models; generating a rendering resource file according to the target component model set and the target layout parameter set; and sending the rendering resource file to the scene customization platform so that the scene customization platform forwards the rendering resource file to the first client. By means of the present invention, the technical problem in the related art that a virtual game scene cannot be customized by a user is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular, to a method and device for generating a game scene, a storage medium, and an electronic device. Background Art

[0002] In the related art, the production of game scenes is a large project that requires a large number of tools, models, material libraries, etc. Generally, it is completed by game manufacturers, including the use and design of materials. Individual users cannot customize game scenes personalizedly and can only passively use and select the already produced scenes. With the rise of virtual games such as the metaverse, there are more and more elements of private customization in virtual scenes. The inability to efficiently produce game scenes is a limiting factor for the diversified development of games.

[0003] In view of the above problems existing in the related art, no effective solution has been found yet. Summary of the Invention

[0004] Embodiments of the present invention provide a method and device for generating a game scene, a storage medium, and an electronic device.

[0005] According to an embodiment of the present invention, there is provided a method for generating a game scene, including: receiving scene requirement information sent by a scene customization platform, where the scene requirement information is sent by a first client to the scene customization platform, and the scene requirement information is used to describe component models included in a target virtual game scene and detail parameters of each component model; obtaining a target component model set and a target layout parameter set according to the scene requirement information, where the target layout parameter set is used to describe detail parameters corresponding to the target component models; generating a rendering resource file according to the target component model set and the target layout parameter set, where the rendering resource file is used to render and generate the target virtual game scene; and sending the rendering resource file to the scene customization platform so that the scene customization platform forwards the rendering resource file to the first client.

[0006] According to another embodiment of the present invention, there is provided a device for generating a game scene, including: a receiving module, configured to receive scene requirement information sent by a scene customization platform, where the scene requirement information is sent by a first client to the scene customization platform, and the scene requirement information is used to describe component models included in a target virtual game scene and detailed parameters of each component model; an obtaining module, configured to obtain a target set of component models and a target set of layout parameters according to the scene requirement information, where the target layout parameters are used to describe the detailed parameters of the corresponding target component models; a generating module, configured to generate a rendering resource file according to the target set of component models and the target set of layout parameters, where the rendering resource file is used to render and generate the target virtual game scene; and a sending module, configured to send the rendering resource file to the scene customization platform, so that the scene customization platform forwards the rendering resource file to the first client.

[0007] According to still another embodiment of the present invention, there is also provided a storage medium storing a computer program, where the computer program is configured to execute the steps in any one of the above method embodiments when running.

[0008] According to still another embodiment of the present invention, there is also provided an electronic device including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0009] Through the present invention, the scene requirement information sent by the scene customization platform is received, where the scene requirement information is sent by the first client to the scene customization platform, and the scene requirement information is used to describe component models included in the target virtual game scene and detailed parameters of each component model; the target set of component models and the target set of layout parameters are obtained according to the scene requirement information, where the target set of layout parameters is used to describe the detailed parameters of the corresponding target component models; the rendering resource file is generated according to the target set of component models and the target set of layout parameters, where the rendering resource file is used to render and generate the target virtual game scene; and the rendering resource file is sent to the scene customization platform, so that the scene customization platform forwards the rendering resource file to the first client. By forwarding the scene requirement information of the first client through the scene customization platform, the production terminal generates a rendering resource file of the target virtual game scene based on the scene requirement information, connecting the client accessing the scene customization and the scene production terminal, and the first client submits the scene requirement information for scene production to the scene customization platform, which is received and completed by the scene production terminal, solving the technical problem in the related art that the virtual game scene cannot be customized by users, realizing the efficient operation of scene customization, and further realizing the diversification and personalization of the virtual game scene. Description of the Drawings

[0010] The accompanying drawings described herein are used to provide a further understanding of the present invention and form a part of this application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0011] Figure 1 is a hardware structure block diagram of a game scene generation server according to an embodiment of the present invention;

[0012] Figure 2 is a schematic flowchart of a game scene generation method according to an embodiment of the present invention;

[0013] Figure 3 is a schematic diagram showing the display of a first sub-model and a second sub-model on a preview interface according to an embodiment of the present invention;

[0014] Figure 4 is a schematic diagram showing the output of construction parameters using a tool panel according to an embodiment of the present invention;

[0015] Figure 5 is a schematic diagram of a point cloud network and a preview interface according to an embodiment of the present invention;

[0016] Figure 6 is a structure block diagram of a game scene generation device according to an embodiment of the present invention;

[0017] Figure 7 is a structure diagram of an electronic device according to an embodiment of the present invention. Detailed Embodiments

[0018] In order to enable those skilled in the art of this technology to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the scope of protection of this application. It should be noted that, without conflict, the embodiments in this application and the features in the embodiments may be combined with each other.

[0019] It should be noted that the terms "first", "second", etc. in the description, claims and the above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of this application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0020] Embodiment 1

[0021] The method embodiment provided by the first embodiment of this application can be executed on a mobile phone, tablet, server, computer or similar electronic terminal. Taking running on a server as an example, Figure 1 is a hardware structure block diagram of a game scene generation server according to an embodiment of the present invention. As Figure 1 shown, the server may include one or more ( Figure 1 only one is shown in the figure) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the above-mentioned server may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above-mentioned server. For example, the server may further include more or fewer components than Figure 1 shown in the figure, or have a different configuration from Figure 1 shown in the figure.

[0022] The memory 104 can be used to store server programs, such as software programs and modules of application software, such as the server program corresponding to a method for generating a game scene in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the server program stored in the memory 104, that is, the above-mentioned method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories can be connected to the server through a network. Examples of the above-mentioned network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof. In this embodiment, the processor 104 is used to respond to human-computer interaction instructions and game strategies, and control the target virtual character to execute specified operations to complete game tasks. The memory 104 is used to store program scripts, configuration information, rendering resource information, etc. of the electronic game.

[0023] The transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wireless network provided by a communication provider of the server. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (Radio Frequency, abbreviated as RF) module, which is used to communicate with the Internet wirelessly.

[0024] Optionally, the input / output device 108 further includes a human-computer interaction screen for obtaining human-computer interaction instructions through a human-computer interaction interface, and is also used to present the pictures in the virtual scene;

[0025] In this embodiment, a method for generating a game scene is provided. Figure 2 It is a schematic flowchart of a method for generating a game scene according to an embodiment of the present invention, as Figure 2 shown, and the process includes the following steps:

[0026] Step S202, receiving scene requirement information sent by a scene customization platform, where the scene requirement information is sent by a first client to the scene customization platform, and the scene requirement information is used to describe the component models included in the target virtual game scene and the detailed parameters of each component model;

[0027] Optionally, this embodiment can be applied to virtual scenarios such as virtual game scenarios, virtual teaching scenarios, and virtual demonstration scenarios. The virtual scenario includes component models of multiple scenario components. In this embodiment, the virtual scenario is taken as an example of a virtual game scenario for illustration.

[0028] In this embodiment, when a user wants to create a target virtual game scenario, various types of requirement data involved in the target virtual game scenario can be digitalized in the form of an order to form scenario requirement information, and the order is sent to the scenario customization platform. At the same time, when the user has ready-made scenario materials, they can also be carried in the scenario requirement information and submitted to the platform together when initiating the order.

[0029] Step S204: Obtain a target component model set and a target layout parameter set according to the scenario requirement information, where the target layout parameter set is used to describe the detailed parameters corresponding to the target component model.

[0030] Optionally, the detailed parameters include size parameters, style parameters, position parameters, texture maps, etc.

[0031] Step S206: Generate a rendering resource file according to the target component model set and the target layout parameter set, where the rendering resource file is used to render and generate the target virtual game scenario.

[0032] Step S208: Send the rendering resource file to the scenario customization platform so that the scenario customization platform forwards the rendering resource file to the first client.

[0033] After receiving the order, the scenario customization platform can use the scenario requirement information as an order to dispatch it to the corresponding production terminal, so as to enable the production terminal to receive the order and produce a customized rendering resource file for the game scenario according to the scenario requirement information in the order. After completion, the rendering resource file is returned to the first client through the scenario customization platform. Thus, the three-party customization and generation of the game virtual scenario are realized by means of issuing and receiving orders.

[0034] Through the above steps, receive the scenario requirement information sent by the scenario customization platform. Among them, the scenario requirement information is sent from the first client to the scenario customization platform, and the scenario requirement information is used to describe the component models included in the target virtual game scenario and the detailed parameters of each component model; obtain the target component model set and the target layout parameter set according to the scenario requirement information, where the target layout parameter set is used to describe the detailed parameters corresponding to the target component model; generate a rendering resource file according to the target component model set and the target layout parameter set, where the rendering resource file is used to render and generate the target virtual game scenario; send the rendering resource file to the scenario customization platform so that the scenario customization platform forwards the rendering resource file to the first client. By forwarding the scenario requirement information of the first client through the scenario customization platform, the production terminal generates a rendering resource file for the target virtual game scenario based on the scenario requirement information. Connect the client accessing the scenario customization and the scenario production terminal. The first client submits the scenario requirement information for scenario production to the scenario customization platform, and the scenario production terminal receives and completes the order, solving the technical problem in the related art that the virtual game scenario cannot be customized by users, realizing the efficient operation of scenario customization, and further realizing the diversification and personalization of the virtual game scenario.

[0035] In this embodiment, obtaining the target component model set and the target layout parameter set according to the scenario requirement information may include but is not limited to the following examples:

[0036] If the scenario requirement information is the scenario resources and custom information of the first virtual scenario, disassemble the first virtual scenario to obtain the first component model set and the corresponding first layout parameter set; output the first component model set and the custom information as the target component model set and the target layout parameter set respectively, or output the custom information and the first layout parameter set as the target component model set and the target layout parameter set respectively, where the first virtual scenario is a complete virtual game scenario;

[0037] In this example, the user wants to use some materials in virtual scene A (such as component models, layout parameters, etc.) to create a new virtual scene B. In this case, the resources of the entire scene A can be packaged as scene requirement information and sent to the platform. After receiving the information, the platform splits scene A into units of materials and uses them as materials to be used in scene B. The component model set in scene A can be selected, and the layout parameters of the component model set in scene A can be reconfigured using custom information to achieve a renovation effect. The layout parameter set in scene A can also be selected, and the component models corresponding to the layout parameter set in scene A can be reconfigured using custom information to rebuild the virtual scene while retaining the existing scene. The custom information in this example is custom information designed by the user based on the first virtual scene, which can be either a component model (such as a model blueprint drawn by the user himself) or a layout parameter (such as scaling parameters and position adjustment parameters for the first component model).

[0038] If the scene requirement information is a scene resource of a second virtual scene, extract a second component model set and a second layout parameter set of the second virtual scene, and output the second component model set and the second layout parameter set as a target component model set and a target layout parameter set, respectively, wherein the second virtual scene is an incomplete virtual game scene;

[0039] In this example, the first client directly sends an incomplete virtual scene to the scene customization platform. The incomplete virtual scene only retains the materials that the user wants to keep (such as component models, layout parameters, etc.) and the scene framework. The scene production terminal continues to improve the incomplete virtual scene and creates a complete target virtual game scene.

[0040] If the scenario requirement information is a component identifier and detail parameters, a third component model set that matches the component identifier is searched in the preset component library, and a third layout parameter set of the third component model set is configured according to the detail parameters, and the third component model set and the third layout parameter set are output as a target component model set and a target layout parameter set, respectively.

[0041] In this example, the scene requirement information sent by the first client does not include an incomplete or complete virtual game scene, but only some component identifiers and detailed parameter information about the target virtual game scene (such as which models / components are needed in the virtual scene, and the requirements for the specific location / quantity of each model / component, etc.).

[0042] In this embodiment, after receiving an order, the scenario customization platform can split the order corresponding to the target virtual game scenario into multiple sub-orders. For example, a building sub-order can be split out, and this sub-order records various requirements for the buildings and the building components inside each building in the customized game scenario. The split sub-orders can be snatched by multiple scenario production parties (production terminals). After the sub-orders are produced by the corresponding scenario production parties and the sub-scenarios are returned, the scenario customization platform combines multiple sub-scenarios to obtain the overall building, that is, the target virtual game scenario, so as to produce a customized game virtual scenario that meets the requirements through multiple scenario production parties, and improve the production efficiency and speed through team operation.

[0043] In some examples, the target component model set includes a first sub-model and a second sub-model. Generating a rendering resource file according to the target component model set and the target layout parameter set includes:

[0044] S11, obtain a first model prefab, and generate a first sub-model using the first model prefab and the corresponding first target layout parameter at the first model production terminal;

[0045] S12, obtain the rendering resources of the second sub-model from the second production terminal, where the second production terminal is used to generate the second sub-model using the second model prefab and the corresponding second target layout parameter;

[0046] S13, use the rendering resources to display the second sub-model in the preview interface of the first sub-model, and configure the second sub-model to be in an uneditable state;

[0047] In one example, using the rendering resources to display the second sub-model in the preview interface of the first sub-model includes: rendering the second sub-model using the rendering resources; locating the hanging points in the first sub-model that match the second sub-model; and aligning and displaying the second sub-model in the preview interface of the first sub-model based on the hanging points.

[0048] Figure 3 FIG. is a schematic diagram of the first sub-model and the second sub-model displayed in the preview interface in the embodiment of the present invention. The second sub-model is displayed by a dotted line different from the first sub-model, and the two sub-models are connected based on the hanging points.

[0049] S14, after the first sub-model and the second sub-model are produced, output a rendering resource sub-file corresponding to the first sub-model, where the rendering resource file includes multiple rendering resource sub-files, and each rendering resource sub-file corresponds to a production terminal.

[0050] In this example, in order to achieve collaborative association and synchronization among multiple sub-orders, after a certain order is divided into multiple sub-orders, the platform can also synchronously obtain the production progress of each sub-order and render the unfinished or completed sub-scenes in the associated production engine, so that each engine can refer to other sub-scenes in the entire scene to make the sub-scenes rendered by itself more coordinated.

[0051] For example, the order for the target virtual game scene is to produce an overall building. The platform splits it into three sub-orders: the building exterior wall, the building doors and windows, and the building interior components. They are respectively snatched by production terminals A, B, and C. When production terminal A produces the building exterior wall in the engine, the platform synchronously obtains the production progress of the building doors and windows and the building interior components in production terminals B and C, and sends the scene resources to production terminal A. In addition to displaying the currently produced building exterior wall, the engine of production terminal A will also display the building doors and windows and the building interior components (which may be incomplete or complete, depending on the production progress of production terminals B and C. The display effects of the building doors and windows and the building interior components can be distinguished from the building exterior wall. For example, the display color of the building exterior wall is darker, and the display colors of the building doors and windows and the building interior components are lighter, or they are distinguished in the form of solid lines and dashed lines), but production terminal A cannot edit the building doors and windows and the building interior components, and can only edit the building exterior wall. Since the entire scene is a whole, for the harmony of the entire scene, each sub-scene needs to be matched and adapted to each other in order to be made into a large scene with a unified style and harmonious picture. Therefore, each production terminal after splitting needs to see the pictures of other associated sub-scenes.

[0052] In some examples, a session channel can also be established among production terminals A, B, and C, and production personnel can discuss with each other.

[0053] In an implementation manner of this embodiment, generating a rendering resource file according to the target component model set and the target layout parameter set includes:

[0054] S21, obtaining the frame geometry data of the frame model of the target virtual game scene and the layout parameters of the component models, where the layout parameters are used to characterize the distribution sparsity of the component models, and the component models are arranged within the frame model;

[0055] In this implementation manner, the target component model set includes a frame model (the boundary of the frame model corresponds to the scene boundary of the target virtual game scene) and the component models within the frame model, and the target layout parameter set includes the frame geometry data of the frame model and the layout parameters of the component models within the frame model.

[0056] The target virtual game scene can be a virtual outdoor or indoor scene. Taking the virtual indoor scene as an example, the virtual indoor scene includes a scene framework and scene components. The scene framework is like the outer framework of a house, and the scene components are some small objects inside the scene framework or embedded on the framework, such as internal seats, furniture, doors and windows embedded on the framework, balconies, etc.

[0057] Optionally, the framework geometry data of the framework model includes: vertex data, corner point data, patch data, and geometric structure data.

[0058] Optionally, the component model includes at least one of the following component models: room, door, wall window, skylight, roof, skirting board, plaster line, window frame, door frame, roof beam, column, floor, bar.

[0059] S22. Calculate the construction parameters of the component model according to the framework geometry data and layout parameters, where the construction parameters are used to represent the construction position of the component model in the target virtual game scene;

[0060] In this embodiment, the position parameters corresponding to the construction position include: three-dimensional coordinate position, orientation, etc.

[0061] S23. Generate a rendering resource file for the target virtual game scene based on the construction parameters.

[0062] In this embodiment, the rendering resource file can be a file in a specified format such as an FBX (film box) file that can be imported and rendered in a scene editing tool.

[0063] By obtaining the framework geometry data of the framework model and the layout parameters of the component model, and calculating the construction parameters of the component model to generate a rendering resource file, the technical problem of low efficiency caused by manually making virtual game scenes in the related art is solved, the modeling flexibility of virtual game scenes is improved, the standardization and unity of each component model in the virtual game scene are ensured, and the production efficiency of virtual game scenes is improved.

[0064] In an implementation manner of this embodiment, obtaining the framework geometry data of the framework model of the target virtual game scene includes: determining the framework shape of the framework model; obtaining the room size parameters of the framework model, obtaining the ceiling parameters of the ceiling inside the framework model, where the ceiling parameters include shape parameters and size parameters; preprocessing the framework shape, room size parameters, and ceiling parameters based on the position of the surface to generate the framework geometry data of the framework model.

[0065] In some examples, obtain the virtual indoor scene size and the models of indoor components as the basic input sources, and preprocess them (mainly according to the position of the surface) to generate programmable unit modules and data, and generate the framework geometry data of the framework model.

[0066] The above embodiments can generate an indoor space available in a virtual game, which can be default rectangular (the length, width, and height can be adjusted respectively, lines can be added, the quantity direction can be adjusted, facilitating vertex color painting, and the plane of the ceiling can be switched to an arc surface or other shapes).

[0067] In one example, in the tool control panel, taking the parameters as the basic input source, a cuboid with a length, width, and height of 6x6x9 is generated. The unit of the room size is meters. The ceiling is designed as a trapezoid, and the height and inclination angle can be adjusted, facilitating the manufacture of the inclined surface for window opening, and it can also be switched to a dome.

[0068] In an implementation manner of this embodiment, obtaining the layout parameters of the component model of the virtual game scene to be built includes: responding to the editing instruction of the component model of the virtual game scene to be built, and displaying the editing interface of the component model, where the editing interface includes the storage path of the model prefab of the component model and multiple editing items; detecting the first layout parameter at the position of the first editing item in the editing interface, where the first layout parameter is used to describe the total number of arrangements of the component model within the frame model; detecting the second layout parameter at the position of the second editing item in the editing interface, where the second layout parameter is used to describe the distribution direction of the component model within the frame model; detecting the third layout parameter at the position of the third editing item in the editing interface, where the third layout parameter is used to describe the spacing distance of the component model within the frame model; detecting the fourth layout parameter at the position of the fourth editing item in the editing interface, where the fourth layout parameter is used to indicate the adjustment style of the model prefab of the component model; detecting the fifth layout parameter at the position of the fifth editing item in the editing interface, where the fifth layout parameter is used to indicate adding a closed wrapper to the outer wall surface of the frame model.

[0069] In this implementation manner, input the parameters of the component model (such as the specific parameters of the distribution sparsity such as the height of the window, the length and width of the door, etc., and optional components such as skirting boards and gypsum lines), and calculate the number n, normal N (orientation), and position P of the component model according to the frame geometry data of the house frame (including point vertices, vertex corners, primitive patches, detail geometry information, etc.).

[0070] Taking the preprocessing of floor distribution data as an example, the input is carried out on the tool panel, including specifying the number of windows to be opened, the length and width values are adjustable, and the window position is adjustable. It can be switched whether the top of the window is flat, arc or pointed, and it is default to have a basic rectangular cross-section window frame. The window frame can be closed and a customized model can be inserted. In some cases, it can be switched to a custom distribution to facilitate the artist to manually control and make a custom distribution. After adjusting the floor, continue to adjust the relevant parameters of other component models to produce the indoor module parameters expected by the art design. In one example, the sparsity of the distribution can specify the wall where the door needs to be opened, the number of doors to be opened, default is 1, the default bottom edge is flush with the ground, the position is adjustable, with a rectangular cross-section door frame and a threshold. The door frame can be closed and a customized model can be inserted. It is default to have a rectangular cross-section skirting board, attached to the ground, and the height is adjustable. It can be switched to a wainscoting mode with decorative strips at the upper and lower edges. Decorative elements such as skirting board gypsum lines can be enabled or disabled. If selected to be enabled, its style can be designed by adjusting the parameters. It is default to have a top decorative strip, the width is adjustable, the number is adjustable, it can be closed, and the top is attached to the ceiling. The cross-section can be selected as rectangular or without thickness. There is an enclosure outdoors to prevent light leakage in single-piece baking. Or the wall and roof have thickness. The bounding box option is the enclosure, which automatically leaves the doors and windows that need to transmit light empty, and the rest is a closed grid. The direction angle of the corner columns is adjustable. A skylight is added to the roof.

[0071] Based on the above implementation manners of this embodiment, calculating the construction parameters of the component model according to the framework geometry data and the layout parameters includes:

[0072] S31, replicating and generating a plurality of identical model prefabricates within the framework model based on the first layout parameter;

[0073] For example, if 10 stools are needed in the virtual indoor scene, then 10 identical stool model prefabricates are replicated.

[0074] S32, calculating the position parameters of the multiple model prefabricates within the framework model respectively according to the second layout parameter and the third layout parameter, wherein the position parameters include: three-dimensional coordinate position and orientation azimuth;

[0075] In one example, calculating the position parameters of the multiple model prefabricates within the framework model respectively according to the second layout parameter and the third layout parameter includes: determining the layout space of the component model within the framework model; evenly dividing the layout space into a plurality of sub-spaces based on the interval distance, wherein the number of sub-spaces is the same as the number of model prefabricates; positioning the center point of each sub-space, determining the center point as the coordinate position of the model prefabricate within the corresponding sub-region, and configuring the same normal information for the model prefabricates within each sub-region based on the distribution direction.

[0076] S33, adjusting the prefabricate style of the model prefabricate according to the fourth layout parameter;

[0077] It can be personalized adjustment for each model prefab, or stylized adjustment for all model prefabs.

[0078] S34, add a closed enclosure on the outer wall of the frame model based on the fifth layout parameter, and leave a light-transmitting area on the enclosure.

[0079] The user first inputs the model files to be arranged (in the engine, drag the models in.fbx or.prefab format to the position of the arrangement object), and the model files are used to generate model prefabs; then inputs the total number to be arranged; finally sets the distribution direction and the spacing distance, so as to modify the numerical values of the x, y, and z components of the model position P. In the tool panel, it is implemented by using nodes such as object_merge, copy, bound, and CTRL. object_merge is the input model, the function of the copy node is to copy out the total number to be arranged, the bound node obtains the dimensions of the length, width, and height of the model, switchX, switchY, and switchZ are used to enable or disable the modification in the X, Y, and Z directions, and the CTRL node is used to pass in the numerical value of the spacing. Figure 4 It is a schematic diagram of the tool panel outputting the construction parameters adopted in the embodiment of the present invention.

[0080] In this embodiment, the rendering resource file for generating the virtual game scene based on the construction parameters includes: for each component model, adding the texture mapping parameters of the component model; generating a sub-model file of the component model according to the texture mapping parameters and the construction parameters, where the sub-model file includes sub-mesh information and sub-material information; merging the sub-model files of all component models in the virtual game scene to generate a rendering resource file in a predetermined format, where the rendering resource file includes several types of sub-model files, and each type of sub-model file includes several sub-model files.

[0081] Sort and merge the generated component models with parameter adjustment, and output the sorting and standardization of the models, including the UV distribution texture mapping and submesh (sub-grid). Finally, the entire indoor scene is output as an FBX file, and each part uses sub-mesh and sub-material (material). In one example, set the UV distribution in the uvuunwrap node of the tool panel for applying materials; the groupdelete and attribdelete nodes are used to delete the temporary data generated during the tool production process, and an attribute for splitting the submesh (sub-grid) is set in the attribcreate node. In one example, the virtual indoor scene is a tavern in the game, and in the resource structure of the rendering resource file, the floor, wall, skirting board, decorative line, window frame, and door frame are separate meshes, and there is a name above which is the pinyin of the tavern, that is, the identification information of the rendering resource file.

[0082] In the rendering resource file of this embodiment, each component model includes normals and two sets of UVs. Among them, UV1 is used for texturing, and UV2 is used for baking the lightmap.

[0083] In some scenarios of this embodiment, after generating the rendering resource file of the virtual game scene based on the building parameters, it further includes: importing the rendering resource file into the rendering engine, and importing the point cloud data of the virtual game scene into the rendering engine; in the rendering engine, performing personalized modification on the sub-material information of the component model and generating the three-dimensional scene image of the virtual game scene according to the modified building parameters and point cloud data; or directly generating the three-dimensional scene image of the virtual game scene in the rendering engine by using the rendering resource file and the point cloud data.

[0084] In this embodiment, the component model composed of several identical or similar model prefabs is a component kit. Generating the three-dimensional scene image of the virtual game scene includes: first generating a point cloud network based on the point cloud data. The point cloud network includes several sets of hanging points, and each set of hanging points has at least 3 points. The multiple model prefabs of each component kit are positioned in the frame model of the virtual game scene through the corresponding 3 hanging points. Since the positions of the multiple model prefabs in the component kit are relatively fixed, by using 3 hanging points to position three of the model prefabs respectively, the overall positioning of the component kit can be realized in the point cloud network. When the number of model prefabs is 2, a new origin of the three-dimensional coordinate system is added as a hanging point. By using the hanging points of the component kit and the three-dimensional coordinate positions of the model prefabs for double positioning, it is possible to prevent the model prefabs from shifting or being incorrect within the frame model of the virtual game scene.

[0085] Figure 5 It is a schematic diagram of the point cloud network and the preview interface in the embodiment of the present invention, presenting the point clouds and hanging points of the positions of modules such as doors, windows, and columns, used to load the door and window model prefabs in the engine, thereby saving the number of faces of the generated indoor scene model itself and improving the positioning accuracy.

[0086] In the tool panel, three output interfaces are set. The first Preview node represents the complete result including the finally generated model resources and point cloud resources; the second FBX node represents the model file exported by the tool; the third PointsCloud node represents the point cloud data exported by the tool, in the format of.bgeo.sc. Among them, the resources output by the second and third interfaces are used to be imported into the engine.

[0087] Import the generated FBX file into Unity, and it can be seen that the model contains circular material balls, which can be further replaced and modified in the engine. In the scene editing tool (Unity), import the generated point cloud file. Use the output point cloud file (.bgeo.sc) to import it into the scene editing tool. For example, drag the reading tool of the point cloud file into it. In the scene editing tool, drag the fbx into the Hierarchy panel, and the structure of the indoor model is displayed in the scene view. Use the arrangement tool in the present invention to place indoor furnishings, such as model presets in the engine like desks, chairs, bookshelves, beds, wardrobes, etc.

[0088] In this embodiment, through node-based programming, the components that are necessary or optional for building the scene (such as rooms, doors, windows, skylights, roofs, decorative skirting boards and plaster lines, roof beams, columns, floors, etc.) and other special modules (such as the bar in this example) are adjusted in position and quantity through parameters to solve the conflicts between components. The input source is the parameters exposed by the tool panel. According to the input parameters, the relationships between various modules are established (such as the room size affecting the floor size and the position of the wall, and the wall position affecting the position of the windows on the wall). Modify the position P(x, y, z) and quantity n of each module, automatically unfold the UV, batch the models (merge meshes of the same material into one) and name them. The output of this tool is an FBX file that can be imported into the game engine, and textures can be applied in the engine to present the effect of the indoor scene.

[0089] Adopting the solution of this embodiment avoids a large amount of repetitive modeling work. Manual operations are prone to errors. For example, if there are multiple windows in a building space, the same processing needs to be done manually for the walls at each window position, and it is not easy to ensure standardization and unity. It avoids a large amount of repetitive placement work. Manual operations are time-consuming and laborious, and the positions are inaccurate. For example, when dragging the desks and chairs in the tavern lobby furnishings, they need to be placed neatly according to the rules. It avoids being inconvenient for iteration. For example, in the case of window opening, after performing a destructive operation on the wall and then changing the window opening position and quantity, a series of operations need to be performed again. Another example is the problem of placing desks and chairs. When the number of chairs around a round table changes, the position of each chair needs to be readjusted one by one.

[0090] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions to enable a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.

[0091] Embodiment 2

[0092] In this embodiment, a game scene generation device is further provided to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" may be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0093] Figure 6 is a structural block diagram of a game scene generation device according to an embodiment of the present invention, as Figure 6 shown, the device includes: a receiving module 60, an obtaining module 62, a generating module 64, and a sending module 66, where

[0094] The receiving module 60 is configured to receive the scene requirement information sent by the scene customization platform, where the scene requirement information is sent by the first client to the scene customization platform, and the scene requirement information is used to describe the component models included in the target virtual game scene and the detailed parameters of each component model;

[0095] The obtaining module 62 is configured to obtain a target component model set and a target layout parameter set according to the scene requirement information, where the target layout parameters are used to describe the detailed parameters of the corresponding target component models;

[0096] The generating module 64 is configured to generate a rendering resource file according to the target component model set and the target layout parameter set, where the rendering resource file is used to render and generate the target virtual game scene;

[0097] The sending module 66 is configured to send the rendering resource file to the scene customization platform, so that the scene customization platform forwards the rendering resource file to the first client.

[0098] Optionally, the obtaining module includes: a first obtaining unit, configured to, if the scenario requirement information is the scenario resources and custom information of a first virtual scenario, disassemble the first virtual scenario to obtain a first component model set and a corresponding first layout parameter set; output the first component model set and the custom information respectively as the target component model set and the target layout parameter set, or output the custom information and the first layout parameter set respectively as the target component model set and the target layout parameter set, where the first virtual scenario is a complete virtual game scenario; or a second obtaining unit, configured to, if the scenario requirement information is the scenario resources of a second virtual scenario, extract a second component model set and a second layout parameter set of the second virtual scenario, and output the second component model set and the second layout parameter set respectively as the target component model set and the target layout parameter set, where the second virtual scenario is a defective virtual game scenario; or a third obtaining unit, configured to, if the scenario requirement information is a component identifier and detail parameters, search in a preset component library for a third component model set matching the component identifier, and configure a third layout parameter set of the third component model set according to the detail parameters, and output the third component model set and the third layout parameter set respectively as the target component model set and the target layout parameter set.

[0099] Optionally, the target component model set includes a first sub-model and a second sub-model, and the generating module includes: a first generating unit, configured to obtain a first model prefabrication body, and generate the first sub-model by using the first model prefabrication body and corresponding first target layout parameters at a first model production terminal; a first obtaining unit, configured to obtain rendering resources of the second sub-model from a second production terminal, where the second production terminal is configured to generate the second sub-model by using a second model prefabrication body and corresponding second target layout parameters; a display unit, configured to display the second sub-model in a preview interface of the first sub-model by using the rendering resources, and configure the second sub-model to be in a non-editable state; and an output unit, configured to, after the first sub-model and the second sub-model are produced, output a rendering resource sub-file corresponding to the first sub-model, where the rendering resource file includes a plurality of rendering resource sub-files, and each rendering resource sub-file corresponds to a production terminal.

[0100] Optionally, the display unit includes: a generating sub-unit, configured to render and generate the second sub-model by using the rendering resources; a positioning sub-unit, configured to locate a hanging point matching the second sub-model in the first sub-model; and a display sub-unit, configured to align and display the second sub-model in the preview interface of the first sub-model based on the hanging point.

[0101] Optionally, the generation module includes: a second acquisition unit, configured to acquire the framework geometry data of the framework model of the target virtual game scene and the layout parameters of the component models, where the layout parameters are used to characterize the distribution sparsity of the component models, and the component models are arranged within the framework model; a calculation unit, configured to calculate the construction parameters of the component models according to the framework geometry data and the layout parameters, where the construction parameters are used to characterize the construction positions of the component models in the target virtual game scene; and a second generation unit, configured to generate a rendering resource file of the target virtual game scene based on the construction parameters.

[0102] Optionally, the second acquisition unit includes: a determination subunit, configured to determine the framework shape of the framework model; an acquisition subunit, configured to acquire the room size parameters of the framework model and the ceiling parameters of the ceiling within the framework model, where the ceiling parameters include shape parameters and size parameters; and a generation subunit, configured to perform preprocessing on the framework shape, the room size parameters, and the ceiling parameters based on the position of the plane to generate the framework geometry data of the framework model.

[0103] Optionally, the second acquisition unit includes: a display subunit, configured to respond to an editing instruction of a component model of the target virtual game scene and display an editing interface of the component model, where the editing interface includes the storage path of the model prefabrication of the component model and a plurality of editing items; a first detection subunit, configured to detect a first layout parameter at a first editing item position of the editing interface, where the first layout parameter is used to describe the total number of arrangements of the component models within the framework model; a second detection subunit, configured to detect a second layout parameter at a second editing item position of the editing interface, where the second layout parameter is used to describe the distribution direction of the component models within the framework model; a third detection subunit, configured to detect a third layout parameter at a third editing item position of the editing interface, where the third layout parameter is used to describe the spacing distance between the component models within the framework model; a fourth detection subunit, configured to detect a fourth layout parameter at a fourth editing item position of the editing interface, where the fourth layout parameter is used to indicate the adjustment style of the model prefabrication of the component model; and a fifth detection subunit, configured to detect a fifth layout parameter at a fifth editing item position of the editing interface, where the fifth layout parameter is used to indicate adding a closed package to the outer wall surface of the framework model.

[0104] Optionally, the computing unit includes: a replication subunit, configured to replicate a plurality of model prefabricates of the component model within the framework model based on the first layout parameter; a computing subunit, configured to calculate position parameters of the plurality of model prefabricates within the framework model according to the second layout parameter and the third layout parameter, where the position parameters include: three-dimensional coordinate positions and orientation azimuths; an adjustment subunit, configured to adjust the prefabricate style of the model prefabricate according to the fourth layout parameter; and an addition subunit, configured to add a closed enclosure to the outer wall surface of the framework model based on the fifth layout parameter, and leave a light-transmitting area empty on the enclosure.

[0105] Optionally, the computing subunit is further configured to: determine a layout area of the component model within the framework model; evenly divide the layout area into a plurality of sub-areas based on the interval distance, where the number of the sub-areas is the same as the number of the model prefabricates; locate the center point of each sub-area, determine the center point as the coordinate position of the model prefabricate within the corresponding sub-area, and configure the same normal information for the model prefabricates within each sub-area.

[0106] Optionally, the second generation unit includes: an addition subunit, configured to add texture mapping parameters of the component model for each component model; a generation subunit, configured to generate a sub-model file of the component model according to the texture mapping parameters and the building parameters, where the sub-model file includes sub-mesh information and sub-material information; and a merging subunit, configured to merge the sub-model files of all component models within the target virtual game scene to generate a rendering resource file in a predetermined format, where the rendering resource file includes several types of sub-model files, and each type of sub-model file includes several sub-model files.

[0107] It should be noted that the above-mentioned various modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above-mentioned modules are all located in the same processor; or, the above-mentioned various modules are respectively located in different processors in any combination form.

[0108] Embodiment 3

[0109] The embodiment of the present application further provides an electronic device. Figure 7 It is a structural diagram of an electronic device according to an embodiment of the present invention. As Figure 7 shown, it includes a processor 71, a communication interface 72, a memory 73, and a communication bus 74. Among them, the processor 71, the communication interface 72, and the memory 73 complete communication with each other through the communication bus 74. The memory 73 is used to store a computer program.

[0110] The processor 71 is used to execute the program stored in the memory 73, and implements the following steps: receiving scene requirement information sent by the scene customization platform, wherein the scene requirement information is sent by the first client to the scene customization platform, and the scene requirement information is used to describe the component models included in the target virtual game scene and the detailed parameters of each component model; obtaining a target component model set and a target layout parameter set according to the scene requirement information, wherein the target layout parameter set is used to describe the detailed parameters of the corresponding target component models; generating a rendering resource file according to the target component model set and the target layout parameter set, wherein the rendering resource file is used to render and generate the target virtual game scene; and sending the rendering resource file to the scene customization platform so that the scene customization platform forwards the rendering resource file to the first client.

[0111] Optionally, obtaining a target component model set and a target layout parameter set according to the scene requirement information includes: if the scene requirement information is scene resources and custom information of a first virtual scene, disassembling the first virtual scene to obtain a first component model set and a corresponding first layout parameter set; outputting the first component model set and the custom information as the target component model set and the target layout parameter set, respectively, or, outputting the custom information and the first layout parameter set as the target component model set and the target layout parameter set, respectively, wherein the first virtual scene is a complete virtual game scene; or, if the scene requirement information is a scene resource of a second virtual scene, scene resources, extracting a second component model set and a second layout parameter set of the second virtual scene, and outputting the second component model set and the second layout parameter set as the target component model set and the target layout parameter set, respectively, wherein the second virtual scene is an incomplete virtual game scene; or, if the scene requirement information is a component identifier and detail parameters, searching a third component model set that matches the component identifier in a preset component library, configuring a third layout parameter set of the third component model set according to the detail parameters, and outputting the third component model set and the third layout parameter set as the target component model set and the target layout parameter set, respectively.

[0112] Optionally, the target component model set includes a first sub-model and a second sub-model. Generating a rendering resource file according to the target component model set and the target layout parameter set includes: obtaining a first model prefab, and generating the first sub-model by using the first model prefab and the corresponding first target layout parameter at a first model production terminal; obtaining the rendering resource of the second sub-model from a second production terminal, where the second production terminal is used to generate the second sub-model by using a second model prefab and the corresponding second target layout parameter; using the rendering resource to display the second sub-model in the preview interface of the first sub-model, and configuring the second sub-model to be in an uneditable state; after the first sub-model and the second sub-model are produced, outputting a rendering resource sub-file corresponding to the first sub-model, where the rendering resource file includes multiple rendering resource sub-files, and each rendering resource sub-file corresponds to a production terminal.

[0113] Optionally, using the rendering resource to display the second sub-model in the preview interface of the first sub-model includes: rendering and generating the second sub-model by using the rendering resource; locating a hanging point in the first sub-model that matches the second sub-model; and aligning and displaying the second sub-model in the preview interface of the first sub-model based on the hanging point.

[0114] Optionally, generating a rendering resource file according to the target component model set and the target layout parameter set includes: obtaining the frame geometric body data of the frame model of the target virtual game scene and the layout parameters of the component model, where the layout parameters are used to characterize the distribution sparsity of the component model, and the component model is arranged within the frame model; calculating the building parameters of the component model according to the frame geometric body data and the layout parameters, where the building parameters are used to characterize the building position of the component model in the target virtual game scene; and generating the rendering resource file of the target virtual game scene based on the building parameters.

[0115] Optionally, obtaining the frame geometric body data of the frame model of the target virtual game scene includes: determining the frame shape of the frame model; obtaining the room size parameters of the frame model, and obtaining the ceiling parameters of the ceiling within the frame model, where the ceiling parameters include shape parameters and size parameters; and preprocessing the frame shape, the room size parameters, and the ceiling parameters based on the position of the surface to generate the frame geometric body data of the frame model.

[0116] Optionally, obtaining the layout parameters of the component model of the target virtual game scene includes: responding to an editing instruction of the component model of the target virtual game scene, and displaying an editing interface of the component model, where the editing interface includes a storage path of a model prefab of the component model and multiple editing items; detecting a first layout parameter at a first editing item position of the editing interface, where the first layout parameter is used to describe the total number of arrangements of the component model within the frame model; detecting a second layout parameter at a second editing item position of the editing interface, where the second layout parameter is used to describe the distribution direction of the component model within the frame model; detecting a third layout parameter at a third editing item position of the editing interface, where the third layout parameter is used to describe the spacing distance of the component model within the frame model; detecting a fourth layout parameter at a fourth editing item position of the editing interface, where the fourth layout parameter is used to indicate an adjustment style of the model prefab of the component model; detecting a fifth layout parameter at a fifth editing item position of the editing interface, where the fifth layout parameter is used to indicate adding a closed enclosure on the outer wall surface of the frame model.

[0117] Optionally, calculating the building parameters of the component model according to the frame geometry data and the layout parameters includes: copying multiple model prefabs of the component model within the frame model based on the first layout parameter; calculating the position parameters of the multiple model prefabs within the frame model respectively according to the second layout parameter and the third layout parameter, where the position parameters include: three-dimensional coordinate positions and orientation directions; adjusting the prefab style of the model prefab according to the fourth layout parameter; adding a closed enclosure on the outer wall surface of the frame model based on the fifth layout parameter, and leaving a light-transmitting area blank on the enclosure.

[0118] Optionally, calculating the position parameters of the multiple model prefabs within the frame model respectively according to the second layout parameter and the third layout parameter includes: determining a layout area of the component model within the frame model; evenly dividing the layout area into multiple sub-areas based on the spacing distance, where the number of sub-areas is the same as the number of model prefabs; positioning the center point of each sub-area, determining the center point as the coordinate position of the model prefab within the corresponding sub-area, and configuring the same normal information for the model prefabs within each sub-area.

[0119] Optionally, generating the rendering resource file of the target virtual game scene based on the building parameters includes: for each component model, adding the texture mapping parameters of the component model; generating a sub-model file of the component model according to the texture mapping parameters and the building parameters, where the sub-model file includes sub-mesh information and sub-material information; merging the sub-model files of all component models in the target virtual game scene to generate a rendering resource file in a predetermined format, where the rendering resource file includes several types of sub-model files, and each type of sub-model file includes several sub-model files.

[0120] The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0121] The communication interface is used for communication between the above terminal and other devices.

[0122] The memory may include a Random Access Memory (RAM), or may also include a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.

[0123] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0124] In another embodiment provided by the present application, a computer-readable storage medium is also provided. Instructions are stored in the computer-readable storage medium, and when it runs on a computer, it causes the computer to execute the method for generating a game scene described in any one of the above embodiments.

[0125] In another embodiment provided by the present application, a computer program product including instructions is further provided. When it runs on a computer, it causes the computer to execute the method for generating a game scene described in any one of the above embodiments.

[0126] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).

[0127] The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0128] In the above embodiments of the present application, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0129] In several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces, and the indirect coupling or communication connection of units or modules can be in an electrical or other form.

[0130] The unit described as a separation component may or may not be physically separated. The component displayed as a unit may or may not be a physical unit, that is, it may be located in one place or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0131] In addition, each functional unit in various embodiments of the present application may be integrated in a processing unit, may exist separately as individual physical units, or two or more units may be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0132] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks or optical discs that can store program codes.

[0133] The above is only the preferred embodiment of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.

Claims

1. A method for generating a game scene, characterized in that, include: Receiving scene requirement information sent by the scene customization platform, wherein the scene requirement information is sent by the first client to the scene customization platform, and the scene requirement information is used to describe the component models included in the target virtual game scene and the detailed parameters of each component model; Acquire a target component model set and a target layout parameter set according to the scenario requirement information, wherein the target layout parameter set is used to describe detailed parameters of the corresponding target component model; Generate a rendering resource file according to the target component model set and the target layout parameter set, wherein the rendering resource file is used to render and generate the target virtual game scene; Sending the rendering resource file to the scene customization platform, so that the scene customization platform forwards the rendering resource file to the first client; Among them, the target component model set includes a first sub-model and a second sub-model, and generating a rendering resource file according to the target component model set and the target layout parameter set includes: obtaining a first model prefabricated body, and generating the first sub-model by using the first model prefabricated body and the corresponding first target layout parameters at a first model production terminal; obtaining a rendering resource of the second sub-model from a second production terminal, wherein the second production terminal is used to generate the second sub-model by using the second model prefabricated body and the corresponding second target layout parameters; using the rendering resource to display the second sub-model in the preview interface of the first sub-model, and configuring the second sub-model to be in an uneditable state; after the first sub-model and the second sub-model are produced, outputting a rendering resource sub-file corresponding to the first sub-model, wherein the rendering resource file includes multiple rendering resource sub-files, and each rendering resource sub-file corresponds to a production terminal.

2. The method according to claim 1, wherein Acquiring a target component model set and a target layout parameter set according to the scenario requirement information includes: If the scene requirement information is the scene resources and custom information of the first virtual scene, disassemble the first virtual scene to obtain a first component model set and a corresponding first layout parameter set; output the first component model set and the custom information as the target component model set and the target layout parameter set, respectively, or, output the custom information and the first layout parameter set as the target component model set and the target layout parameter set, respectively, wherein the first virtual scene is a complete virtual game scene; or, If the scene requirement information is a scene resource of a second virtual scene, extract a second component model set and a second layout parameter set of the second virtual scene, and output the second component model set and the second layout parameter set as the target component model set and the target layout parameter set, respectively, wherein the second virtual scene is an incomplete virtual game scene; or If the scenario requirement information is a component identifier and detail parameters, search for a third component model set that matches the component identifier in a preset component library, configure a third layout parameter set for the third component model set according to the detail parameters, and output the third component model set and the third layout parameter set as the target component model set and the target layout parameter set respectively.

3. The method according to claim 1, wherein Using the rendering resources to display the second sub-model in the preview interface of the first sub-model includes: Rendering and generating the second sub-model using the rendering resources; Locating a hanging point in the first sub-model that matches the second sub-model; Aligning and displaying the second sub-model in the preview interface of the first sub-model based on the hanging point.

4. The method according to claim 1, characterized in that, Generating a rendering resource file according to the target component model set and the target layout parameter set includes: Obtaining the frame geometry data of the frame model of the target virtual game scene and the layout parameters of the component model, where the layout parameters are used to characterize the distribution sparsity of the component model, and the component model is arranged within the frame model; Calculating the construction parameters of the component model according to the frame geometry data and the layout parameters, where the construction parameters are used to characterize the construction position of the component model in the target virtual game scene; Generating a rendering resource file for the target virtual game scene based on the construction parameters.

5. The method according to claim 4, wherein Obtaining the frame geometry data of the frame model of the target virtual game scene includes: Determining the frame shape of the frame model; Obtaining the room size parameters of the frame model, and obtaining the ceiling parameters of the ceiling within the frame model, where the ceiling parameters include shape parameters and size parameters; Preprocessing the frame shape, the room size parameters, and the ceiling parameters based on the position of the surface to generate the frame geometry data of the frame model.

6. The method according to claim 4, wherein Obtaining the layout parameters of the component model of the target virtual game scene includes: Responding to an editing instruction for the component model of the target virtual game scene, and displaying an editing interface for the component model, where the editing interface includes the storage path of the model prefab of the component model and multiple editing items; Detecting a first layout parameter at the position of the first editing item in the editing interface, where the first layout parameter is used to describe the total number of arrangements of the component model within the frame model; Detecting a second layout parameter at the position of the second editing item in the editing interface, where the second layout parameter is used to describe the distribution direction of the component model within the frame model; Detecting a third layout parameter at the position of the third editing item in the editing interface, where the third layout parameter is used to describe the spacing distance of the component model within the frame model; Detecting a fourth layout parameter at the position of the fourth editing item in the editing interface, where the fourth layout parameter is used to indicate the adjustment style of the model prefab of the component model; Detecting a fifth layout parameter at the position of the fifth editing item in the editing interface, where the fifth layout parameter is used to indicate adding a closed wrapper to the outer wall surface of the frame model.

7. The method according to claim 6, characterized in that Calculating the construction parameters of the component model based on the frame geometry data and the layout parameters includes: Copying multiple model prefabricates of the component model within the frame model based on the first layout parameter; Calculating the position parameters of the multiple model prefabricates within the frame model according to the second layout parameter and the third layout parameter, where the position parameters include: three-dimensional coordinate positions and orientation directions; Adjusting the prefabricate style of the model prefabricate according to the fourth layout parameter; Adding a closed wrapper on the outer wall of the frame model based on the fifth layout parameter, and leaving a light-transmitting area empty on the wrapper.

8. The method according to claim 7, wherein Calculating the position parameters of the multiple model prefabricates within the frame model according to the second layout parameter and the third layout parameter includes: Determining the layout area of the component model within the frame model; Evenly dividing the layout area into multiple sub-areas based on the interval distance, where the number of sub-areas is the same as the number of model prefabricates; Positioning the center point of each sub-area, determining the center point as the coordinate position of the model prefabricate within the corresponding sub-area, and configuring the same normal information for the model prefabricates within each sub-area.

9. The method according to claim 4, wherein Generating the rendering resource file of the target virtual game scene based on the construction parameters includes: For each component model, adding the texture mapping parameters of the component model; Generating a sub-model file of the component model according to the texture mapping parameters and the construction parameters, where the sub-model file includes sub-mesh information and sub-material information; Merging the sub-model files of all component models within the target virtual game scene to generate a rendering resource file in a predetermined format, where the rendering resource file includes several types of sub-model files, and each type of sub-model file includes several sub-model files.

10. A generation device for a game scene, characterized in that Includes: A receiving module, configured to receive scene requirement information sent by a scene customization platform, where the scene requirement information is sent by a first client to the scene customization platform, and the scene requirement information is used to describe the component models included in the target virtual game scene and the detailed parameters of each component model; An obtaining module, configured to obtain a target component model set and a target layout parameter set according to the scene requirement information, where the target layout parameters are used to describe the detailed parameters of the corresponding target component models; A generating module, configured to generate a rendering resource file according to the target component model set and the target layout parameter set, where the rendering resource file is used to render and generate the target virtual game scene; A sending module, configured to send the rendering resource file to the scene customization platform, so that the scene customization platform forwards the rendering resource file to the first client; Among them, the target component model set includes a first sub-model and a second sub-model. The generation module includes: a first generation unit, configured to obtain a first model prefabrication body, and generate the first sub-model by using the first model prefabrication body and corresponding first target layout parameters at a first model production terminal; a first acquisition unit, configured to acquire rendering resources of the second sub-model from a second production terminal, where the second production terminal is configured to generate the second sub-model by using a second model prefabrication body and corresponding second target layout parameters; a display unit, configured to display the second sub-model in a preview interface of the first sub-model by using the rendering resources, and configure the second sub-model as an uneditable state; an output unit, configured to output a rendering resource sub-file corresponding to the first sub-model after the first sub-model and the second sub-model are produced, where the rendering resource file includes a plurality of rendering resource sub-files, and each rendering resource sub-file corresponds to a production terminal.

11. A storage medium, characterized in that, A computer program is stored in the storage medium, where the computer program is configured to execute the method described in any one of claims 1 to 9 when running.

12. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Commodity data processing method and device, commodity customization method and device, equipment and storage medium

    CN111144991A

  • Game data processing method and device and storage medium

    CN112316424A