Method, device, electronic device, medium and product for arranging game models
The graphical user interface is generated by executing software applications through the processor, and the model label connection relationship is used to automatically recommend and place the game model, solving the problem of cumbersome and inefficient placement of game models in the existing technology, and achieving efficient game scene construction.
Patent Information
- Application Number
- CN202211591403.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-12
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-12-12
AI Technical Summary
In the prior art, the placement of game models is cumbersome and inefficient, and it takes a lot of time to build complex game scenes.
The software application is executed by the processor, a graphical user interface is generated, and the game model is automatically recommended and placed using the model tag connection relationship, including determining the target placement area and determining the location dependency from the database according to the preset relationship.
It improves the efficiency of placement of game models, saves time to look up and place them from the database, simplifies the operation process, and improves the richness of the details of the game scene.
Smart Images

Figure CN116370964B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of games, and in particular, to a method, device, electronic device, medium and product for placing game models. Background Art
[0002] The game scene is an important part of the game. For the production of the game scene, it is usually the developers who place the prefabricated models to build the game scene. For example, manually place models such as tables, beds, chairs, books, etc. to build an indoor game scene.
[0003] Currently, for placing game models, it is necessary to first select a suitable model from the database and then place it in the game scene. However, this series of operations is very cumbersome, and only a single model can be placed at a time. When building a complex game scene, it takes a lot of time and the efficiency is too low. Summary of the Invention
[0004] In view of the above problems, the present invention is proposed to provide a method, device, electronic device, medium and product for placing game models that can overcome the above problems or at least partially solve the above problems.
[0005] To achieve the above object, the present invention provides a method for placing game models. By a processor executing a software application and rendering on a display to obtain a graphical user interface, the graphical user interface at least includes a partial game scene, and the method includes the following steps:
[0006] In response to a user operation on a first game model, determine a target placement area from the placement areas associated with the first game model, where the first game model is a game model in the game scene;
[0007] Based on the target placement area, according to a preset model label connection relationship, determine game models that have a position dependency with the first game model from a preset database, where the model label connection relationship is used to represent the placement position dependency between different categories of game models, and each model label is associated with game models of the same category;
[0008] Determine a target game model from the game models that have a position dependency, and automatically place the target game model in the target placement area.
[0009] Preferably, before the step of determining the target placement area from the placement areas associated with the first game model in response to a user operation on the first game model, the method further includes:
[0010] Identify the game scene to obtain an identification result;
[0011] Determine a matching target model label according to the recognition result;
[0012] Determine a second game model associated with the target model label from a pre-set database;
[0013] Recommend the second game model to the outside;
[0014] When it is detected that an operation of selecting a target second game model from the second game model and placing it in the game scene is performed, load the selected target second game model in the game scene.
[0015] Preferably, the step of recognizing the game scene to obtain a recognition result includes:
[0016] Recognize the dimensional attributes of the game scene to obtain a recognition result, where the dimensional attributes include any one or a combination of scene attributes, color attributes, and size attributes.
[0017] Preferably, the model label connection relationship includes a parent-child hierarchical connection relationship, and the step of determining a matching target model label according to the recognition result includes:
[0018] Determine a matching model label according to the recognition result;
[0019] According to the parent-child hierarchical connection relationship, among the matching model labels, determine the model labels without a parent as the target model labels.
[0020] Preferably, before the step of determining a target storage area from the storage area associated with the first game model in response to a user operation on the first game model, further includes:
[0021] For the first game model, determine the storage attribute of the first game model;
[0022] Generate a storage area associated with the first game model according to the storage attribute.
[0023] Preferably, the storage attribute includes a flat storage attribute, and the step of generating a storage area associated with the first game model according to the storage attribute includes:
[0024] When the storage attribute of the first game model includes a flat storage attribute, obtain a top view of the first game model;
[0025] Determine the top view contour of the first game model according to the top view;
[0026] Generate a first closed figure based on the top-down contour, and generate a planar storage area according to the first closed figure.
[0027] Preferably, the step of determining the top-down contour of the first game model according to the top-down view includes:
[0028] Perform binarization processing on the top-down view, and determine the contour of the top-down view according to the binarization result.
[0029] Preferably, the storage attribute includes a surrounding storage attribute, and the step of generating a storage area associated with the first game model according to the storage attribute includes:
[0030] In the case where the storage attribute of the first game model includes a surrounding storage attribute, draw a second closed figure around the first game model on the scene area where the first game model is located according to a preset rule;
[0031] Generate the surrounding storage area of the first game model according to the second closed figure.
[0032] Preferably, after the step of determining the target storage area from the storage areas associated with the first game model, further includes:
[0033] Display a placement control, and the placement control corresponds to a preset placement method;
[0034] Respond to a trigger operation on the placement control to determine the target placement method;
[0035] The step of automatically placing the target game model in the target storage area includes:
[0036] Automatically place the target game model in the target storage area according to the target placement method.
[0037] To achieve the above object, the present invention also provides a method for placing game models. By a processor executing a software application and rendering a graphical user interface on a display, the graphical user interface at least includes a part of the game scene. The method includes the following steps:
[0038] When it is detected that a preset event is triggered, in response to a user operation on the first game model, set the first game model as the initial model, and determine the target storage area from the storage areas associated with the initial model, where the first game model is a game model in the game scene;
[0039] Based on the target storage area, according to the preset model label connection relationship, determine the next-level game model of the initial model from the preset database, and automatically place the next-level game model in the target storage area, where the model label connection relationship is used to represent the placement position dependence between different categories of game models, and each model label is associated with game models of the same category;
[0040] Set the next-level game model as the initial model, and loop through the steps of determining the target storage area from the storage area associated with the initial model to the step of automatically placing the next-level game model in the target storage area.
[0041] Preferably, when the model label connection relationship includes a same-level connection relationship, the step of determining the next-level game model of the initial model from the preset database includes:
[0042] Filter the game models in the preset database according to the preset volume filtering rule to obtain the corresponding filtering result;
[0043] Determine the next-level game model of the initial model according to the filtering result.
[0044] Preferably, when the model label connection relationship includes a same-level connection relationship, the step of determining the next-level game model of the initial model from the preset database includes:
[0045] Filter the game models in the preset database according to the preset volume filtering rule to obtain the corresponding filtering result;
[0046] Determine the next-level game model of the initial model according to the filtering result.
[0047] Preferably, before the step of, when detecting that a preset event is triggered, in response to a user operation on the first game model, setting the first game model as the initial model and determining the target storage area from the storage area associated with the initial model, further includes:
[0048] Identify the game scene to obtain an identification result;
[0049] Determine a matching target model label according to the identification result;
[0050] Determine a second game model associated with the target model label from the preset database;
[0051] Recommend the second game model to the outside;
[0052] When an operation of selecting a target second game model from the second game models and placing it in the game scene is detected, load the selected target second game model in the game scene.
[0053] Preferably, the step of identifying the game scene to obtain an identification result includes:
[0054] Identify the dimensional attributes of the game scene to obtain an identification result, where the dimensional attributes include any one or a combination of scene attributes, color attributes, and size attributes.
[0055] Preferably, the model label connection relationship includes a parent-child hierarchical connection relationship, and the step of determining a matching target model label according to the identification result includes:
[0056] Determine a matching model label according to the identification result;
[0057] According to the parent-child hierarchical connection relationship, among the matching model labels, determine the model labels without a parent as the target model labels.
[0058] Preferably, before the step of, when a preset event is detected to be triggered, in response to a user operation on the first game model, setting the first game model as the initial model and determining a target storage area from the storage areas associated with the initial model, further includes:
[0059] Determine the storage attribute of the first game model;
[0060] Generate a storage area associated with the first game model according to the storage attribute.
[0061] Preferably, the storage attribute includes a planar storage attribute, and the step of generating a storage area associated with the first game model according to the storage attribute includes:
[0062] When the storage attribute of the first game model includes a planar storage attribute, obtain a top view of the first game model;
[0063] Determine the top view contour of the first game model according to the top view;
[0064] Generate a first closed figure based on the top view contour and generate a planar storage area according to the first closed figure.
[0065] Preferably, the step of determining the top view contour of the first game model according to the top view includes:
[0066] Binarize the top view and determine the contour of the top view according to the binarization result.
[0067] Preferably, the placement attribute includes a surrounding placement attribute, and the step of generating a placement area associated with the first game model according to the placement attribute includes:
[0068] When the placement attribute of the first game model includes a surrounding placement attribute, on the scene area where the first game model is located, draw a second closed figure around the first game model according to a preset rule;
[0069] Generate a surrounding placement area for the first game model according to the second closed figure.
[0070] Preferably, after the step of determining a target placement area from the placement areas associated with the initial model, it further includes:
[0071] Display at least one placement control, and the placement control corresponds to a preset placement method;
[0072] In response to a trigger operation on the placement control, determine a target placement method;
[0073] The step of automatically placing the next-level game model into the target placement area includes:
[0074] Automatically place the next-level game model into the target placement area according to the target placement method.
[0075] In addition, to achieve the above object, the present invention further provides a device for placing game models. By a processor executing a software application and rendering on a display to obtain a graphical user interface, the graphical user interface at least includes a part of the game scene, and the device includes:
[0076] A first determination module, configured to, in response to a user operation on a first game model, determine a target placement area from the placement areas associated with the first game model, where the first game model is a game model in the game scene;
[0077] A second determination module, configured to, based on the target placement area, determine, from a preset database, a game model that has a position dependency with the first game model according to a preset model label connection relationship, where the model label connection relationship is used to represent the placement position dependency between different categories of game models, and each model label is associated with game models of the same category;
[0078] A placement module, configured to determine a target game model from the game models that have a position dependency and automatically place the target game model into the target placement area.
[0079] In addition, to achieve the above object, the present invention further provides a device for placing game models. The device renders a graphical user interface on a display by a processor executing a software application. The graphical user interface at least includes a part of a game scene. The device includes:
[0080] A trigger module, configured to, when detecting that a preset event is triggered, in response to a user operation on a first game model, set the first game model as an initial model, and determine a target storage area from the storage areas associated with the initial model, where the first game model is a game model in the game scene;
[0081] A determination module, configured to, based on the target storage area, determine a next-level game model of the initial model from a preset database according to a preset model label connection relationship, and automatically place the next-level game model in the target storage area, where the model label connection relationship is used to represent the dependence of the placement positions between different categories of game models, and each model label is associated with game models of the same category;
[0082] A loop module, configured to set the next-level game model as the initial model, and loop through the steps of determining the target storage area from the storage areas associated with the initial model to the step of automatically placing the next-level game model in the target storage area.
[0083] In addition, to achieve the above object, the present invention further provides an electronic device, including: a memory, a processor, and a program stored on the memory and executable on the processor. When the program is executed by the processor, the steps of the method described above are implemented.
[0084] In addition, to achieve the above object, the present invention further provides a computer-readable storage medium, on which a program is stored. When the program is executed by a processor, the steps of the method described above are implemented.
[0085] In addition, to achieve the above object, the present invention further provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the method described above are implemented.
[0086] Method, apparatus, electronic device, medium and product for placing game models proposed by the present invention; the present invention renders a graphical user interface on a display by a processor executing a software application, and the graphical user interface at least includes a part of a game scene, including: in response to a user operation on a first game model, determining a target storage area from the storage areas associated with the first game model, where the first game model is a game model in the game scene; based on the target storage area, determining, according to a preset model label connection relationship, a game model having a position dependency on the first game model from a preset database, where the model label connection relationship is used to represent the placement position dependency between different categories of game models, and each model label is associated with game models of the same category; determining a target game model from the game models having a position dependency, and automatically placing the target game model in the target storage area. The present invention realizes the recommendation of game models based on the model label connection relationship, saves the time and manpower for finding game models in the database, and selects a game model from the recommended game models in the graphical user interface and automatically places it in the game scene, thereby improving the placement efficiency of game models and saving the cumbersome model placement operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment solution of the present invention;
[0088] Figure 2 It is a schematic flowchart of a method for placing a game model provided in the first embodiment of the present invention;
[0089] Figure 3 It is a schematic diagram of the effect of recommending a game model having a position dependency on the first game model according to the label connection relationship provided in the first embodiment of the present invention;
[0090] Figure 4 It is a schematic diagram of the effect of generating a first closed figure according to the top view contour provided in the first embodiment of the present invention;
[0091] Figure 5 It is a schematic diagram of the effect of generating a first closed figure according to the top view contour provided in the first embodiment of the present invention;
[0092] Figure 6 It is a schematic diagram of the effect of the binarization result provided in the first embodiment of the present invention;
[0093] Figure 7 It is a schematic diagram of the effect of the binarization result provided in the first embodiment of the present invention;
[0094] Figure 8 It is a schematic flowchart of another method for placing a game model provided in the second embodiment of the present invention;
[0095] Figure 9 Schematic diagram of functional modules of a device for placing game models provided in the third embodiment of the present invention;
[0096] Figure 10 Schematic diagram of functional modules of a device for placing game models provided in the fourth embodiment of the present invention.
[0097] The implementation, functional features and advantages of the objectives of the present invention will be further described with reference to the embodiments and the accompanying drawings. Specific embodiments
[0098] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0099] As Figure 1 shown, Figure 1 is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment solution of the present invention.
[0100] The electronic device in the embodiment of the present invention can be a mobile terminal or a server device.
[0101] As Figure 1 shown, the device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard). Optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the foregoing processor 1001.
[0102] Those skilled in the art can understand that Figure 1 the device structure shown in
[0103] does not constitute a limitation on the device, and may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. Figure 1 shown, the memory 1005, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a program for placing game models.
[0104] Among them, the operating system is a program that manages and controls the electronic device and software resources, and supports the operation of the network communication module, the user interface module, the program for placing game models, and other programs or software; the network communication module is used to manage and control the network interface; the user interface module is used to manage and control the user interface.
[0105] In Figure 1 In the electronic device shown, the electronic device calls the program for placing game models stored in the memory 1005 through the processor 1001 and executes the operations in the various embodiments of the following method for placing game models.
[0106] Based on the above hardware structure, embodiments of the method for placing game models of the present invention are proposed.
[0107] In this embodiment, a method for placing game models is provided. By executing a software application through a processor and rendering on a display to obtain a graphical user interface, the graphical user interface at least includes a part of the game scene. Refer to Figure 2 , Figure 2 is a schematic flowchart of the first embodiment of the method for placing game models of the present invention. The method for placing game models may include the following steps:
[0108] Step S10, in response to a user operation on a first game model, determine a target placement area from the placement areas associated with the first game model, where the first game model is a game model in the game scene.
[0109] Among them, a game model refers to a three-dimensional model used to construct a game scene, such as a table model, a chair model, a bed cabinet model, a mechanical model, a firearm model, and so on.
[0110] The placement area may refer to an area on an object in the game scene for placing game models. The object in the game scene may be any game model in the game scene.
[0111] The first game model is a game model in the game scene. The placement area associated with it can be pre-generated for the game model in the game scene, and the associated placement area may at least include one of a planar placement area and a surrounding placement area.
[0112] The planar placement area is a placement area distributed on the first game model; for example, the desktop of a table model, and this desktop is the planar placement area of the table model.
[0113] The surrounding placement area is a placement area distributed around the first game model. The surrounding placement area may be located on the object where the first game model is located. For example, a circular surrounding placement area constructed with the table model as the center can be located on the terrain where the table model is located.
[0114] When a user operation on the first game model is detected, a target storage area can be determined from the storage areas associated with the first game model. Among them, the target storage area can be a flat storage area on the first game model, or a surrounding storage area distributed around the first game model.
[0115] As an example, if the storage areas associated with the first game model include a flat storage area and a surrounding storage area. When the mouse moves over the first game model, or clicks / touches the first game model, the flat storage area and the surrounding storage area associated with the first game model can be displayed, and then the flat storage area or the surrounding storage area can be selected by clicking as the target storage area.
[0116] Step S20: Based on the target storage area, according to the preset model label connection relationship, determine the game models that have a position dependency on the first game model from the preset database, where the model label connection relationship is used to represent the placement position dependency between different categories of game models, and each model label is associated with game models of the same category.
[0117] Among them, the model label refers to a label created according to the category of the game model for classification.
[0118] Each model label is associated with game models of the same category.
[0119] For example, models of indoor tables (such as round tables, square tables, desks, etc.) can be associated with the indoor table label; models of bunk beds, wooden beds, iron beds, etc. can be associated with the bed label; models of chairs such as wooden chairs and office chairs can be associated with the chair label; models of cups such as teacups, water cups, wine glasses, etc. can be associated with the cup label.
[0120] The preset database stores game models of various categories.
[0121] The placement position dependency means that the placement positions of different categories of game models depend on the placement position of another game model.
[0122] The model label connection relationship refers to the placement position dependency relationship between different categories of game models.
[0123] In specific implementation, according to the placement position relationship between different categories of game models, the model label connection relationship between model labels can be constructed by means of manual annotation or data mining.
[0124] In this embodiment, after establishing the model label connection relationship, based on the target storage area, according to the model label connection relationship, the game models that have a position dependency on the first game model can be determined from the preset database.
[0125] Further, in some embodiments, the model label connection relationship may include a same-level connection relationship established based on an adjacent placement relationship and a parent-child level connection relationship established based on a cascading placement relationship.
[0126] The adjacent placement relationship means that the placement position of one game model depends on the placement position of another game model. For example, chair models and trash can models are placed around a table model. In the same-level connection relationship established according to the adjacent placement relationship, different model labels can be regarded as the same level. The same-level connection relationship can be used to locate game models with an adjacent placement relationship.
[0127] The cascading placement relationship means that the placement position of one game model depends on another game model. For example, cup models and book models can be placed above a table model, and pillow models and quilt models can be placed above a bed model. In the parent-child level connection relationship established based on the cascading placement relationship, different model labels can be regarded as the parent-child level. The parent-child level connection relationship can be used to locate game models with a cascading placement relationship.
[0128] In a specific implementation, the parent-child level connection relationship can be set to correspond to a flat storage area, and the same-level connection relationship can be set to correspond to a surrounding storage area. Furthermore, according to the target storage area, it is possible to determine whether to specifically use the parent-child level connection relationship or the same-level connection relationship, and then according to the specifically used model label connection relationship, determine the game model that has a position dependence on the first game model.
[0129] As an example, when the determined target storage area is a flat storage area, the parent-child level connection relationship corresponding to the flat storage area can be determined, and then according to the parent-child level connection relationship, the game model that has a position dependence on the first game model can be determined from a pre-set database, that is, the game model that has a cascading placement relationship with the first game model is determined.
[0130] As another example, when the determined target storage area is a surrounding storage area, the same-level connection relationship corresponding to the surrounding storage area can be determined, and then according to the same-level connection relationship, the game model that has a position dependence on the first game model can be determined from a pre-set database, that is, the game model that has an adjacent placement relationship with the first game model is determined.
[0131] Step S30: Determine a target game model from the game models having a position dependence, and automatically place the target game model in the target storage area.
[0132] After determining one or more game models with location dependence, a target game model can be selected from the game models with location dependence, so that the target game model can be automatically placed in the target storage area.
[0133] As an example, the target game model can be randomly selected from one or more game models with location dependence.
[0134] As another example, the game models with location dependence can be recommended to the user, and then the user can select the target game model from the game models with location dependence through operations such as single-click selection or batch selection.
[0135] See the appendix Figure 3 The appendix Figure 3 is a schematic diagram of the effect of recommending game models based on the cascading placement relationship; in Figure 3 the recommended game models, such as gun models and other weapon models, are displayed in the small window on the left. In response to the user's selection operation on the recommended game models, one or more selected gun models can be automatically placed on the table.
[0136] In this embodiment, when a user operation on the first game model is detected, the target storage area is determined from the storage area associated with the first game model; according to the target storage area and the preset model label connection relationship, the game models with location dependence on the first game model are determined from the preset database; the target game model is determined from the game models with location dependence, and the target game model is automatically placed in the target storage area; thus, the recommendation of game models and the automatic placement of game models are realized according to the model label connection relationship, saving the process of searching for game models in the preset database and saving the cumbersome placement operation; the automatic placement of game models can greatly improve the detail richness of the game scene.
[0137] Further, in an embodiment, before step S10, the method may further include:
[0138] Step A10, identifying the game scene to obtain an identification result.
[0139] In this embodiment, the currently displayed game scene can be identified to obtain an identification result, so as to recommend to the user the game models that they may expect based on the identification result, and improve the efficiency of building the game scene.
[0140] Further, step A10 may include sub-step A11:
[0141] Sub-step A11: Identify the dimensional attributes of the game scene to obtain an identification result, where the dimensional attributes include any one or a combination of multiple of scene attributes, color attributes, and size attributes.
[0142] Among them, the dimensional attributes include any one or a combination of multiple of scene attributes (such as indoor, outdoor), color attributes (such as hue classification), and size attributes (such as large, medium, small).
[0143] In specific implementation, the specific elements of the current game scene can be identified to identify the dimensional attributes of the game scene and obtain the corresponding identification result.
[0144] As an example, the game models in the game scene can be identified to determine the scene attributes of the current game scene. For example, when it is identified that the current game scene has a bed-type game model, it can be determined that the current game scene is an indoor scene.
[0145] Step A20: Determine the matching target model label according to the identification result.
[0146] Model labels can support marking dimensional attributes. For example, the indoor scene attribute can be marked for the bed-type model label. The corresponding target model label is matched through the dimensional attributes.
[0147] When recommending model labels, filter items can be set based on the dimensional attributes in the identification result, and then the model labels that meet the conditions can be searched according to the filter items as the target model labels that match the current game scene.
[0148] As an example, when it is identified that the dimensional attributes of the current game scene are "indoor, red", the model labels containing the two attributes of "indoor, red" can be retrieved from the preset database and recommended externally to achieve more accurate positioning of the model labels.
[0149] Furthermore, in the case where the model label connection relationship includes a parent-child hierarchical connection relationship, step A20 may include the following sub-steps:
[0150] Sub-step A21: Determine the matching model label according to the identification result;
[0151] Sub-step A22: According to the parent-child hierarchical connection relationship, among the matching model labels, the model labels without a parent are determined as the target model labels.
[0152] In the case where the model label connection relationship includes a parent-child hierarchical connection relationship, the model label that matches the recognition result can be determined based on the above recognition result; furthermore, based on the parent-child hierarchical connection relationship, the model labels without a parent can be filtered out from the matching model labels, and the model labels without a parent can be determined as the target model labels.
[0153] Step A30, determine the second game model associated with the target model label from the preset database.
[0154] Among them, the second game model refers to the game model associated with the target model label in the preset database.
[0155] After determining the target model label, one or more second game models associated with the target model label can be determined from the preset database according to the target model label.
[0156] Step A40, perform an external-oriented recommendation on the second game model;
[0157] After determining one or more second game models, one or more second game models can be recommended to users so that users can select game models from one or more second game models.
[0158] Step A50, when it is detected that the operation of selecting the target second game model from the second game model and placing it in the game scene, load the selected target second game model in the game scene.
[0159] When it is detected that the operation of selecting the target second game model from one or more second game models and placing it in the game scene, determine the one or more target second game models selected by the operation, and load the one or more target second game models in the game scene.
[0160] As an example, in response to the drag-and-drop operation on one or more second game models, select the corresponding target second game model from one or more seconds.
[0161] In this embodiment, by recognizing the game scene, a recognition result is obtained; according to the recognition result, a matching target model label is determined; from the preset database, a second game model associated with the target model label is determined; an external-oriented recommendation is performed on the second game model; when it is detected that the operation of selecting the first game model from the second game model and placing it in the game scene, load the selected first game model in the game scene; thus, in the case where there is no game model in the game scene, game models are recommended according to the recognition result of the game scene, so as to achieve a more accurate positioning of the constructed game scene.
[0162] Further, in one embodiment, before step S10, the method may further include the following steps:
[0163] Step B10, for the first game model, determine the placement attribute of the first game model.
[0164] Among them, the placement attribute may include the surrounding placement attribute and the planar placement attribute.
[0165] The surrounding placement attribute means that other game models can be placed in the surrounding area of the game model. For example, in the game scene, if a trash can model and a chair model can be placed in the surrounding area of the table model, then the surrounding placement attribute can be marked for the table model label.
[0166] The planar placement attribute means that other game models can be placed on the game model itself. For example, in the game scene, if a book model and a cup model can be placed on the desktop of the table model, then the planar placement attribute can be marked for the table model label.
[0167] To generate the placement area associated with the first game model, the placement attribute of the first game model can be determined.
[0168] In some embodiments, the placement attribute can be pre-marked in the model label, and then the placement attribute of the first game model can be determined through the model label to which the first game model belongs.
[0169] Step B20, generate a placement area associated with the first game model according to the placement attribute.
[0170] In this embodiment, the placement area associated with the first game model can be determined according to the placement attribute of the first game model, and then the placement area associated with the first game model can be generated.
[0171] Further, in one embodiment, step B20 may include the following sub-steps:
[0172] Sub-step B201, when the placement attribute of the first game model includes the planar placement attribute, obtain the top view of the first game model;
[0173] Sub-step B202, determine the top view contour of the first game model according to the top view;
[0174] Sub-step B203, generate a first closed figure based on the top view contour and generate a planar placement area according to the first closed figure.
[0175] Among them, the first closed figure may be a closed figure such as an inscribed circle or an inscribed rectangle. The top view contour may be the contour of the game model in the top view.
[0176] When it is determined that the placement attribute of the first game model includes a planar placement attribute, a top view of the first game model can be obtained. By performing image preprocessing on the top view, the top contour of the first game model can be determined. Furthermore, a first closed figure can be generated based on the top contour, and a planar placement area can be generated based on the first closed figure.
[0177] Refer to Figures 4 - 5 , Figures 4 - 5 is a schematic diagram of the effect of generating a first closed figure based on the top contour; Figure 4 In, specifically, it can be by performing image preprocessing on the top view of a rectangular table to determine the contour of the top view of the table, and generating the corresponding largest inscribed rectangle based on the top contour; Figure 5 In, specifically, it can be by performing image preprocessing on the top view of a polygonal table to determine the top contour of the polygonal table, and generating the corresponding largest inscribed circle based on the top contour.
[0178] Furthermore, step B202 may include sub-steps: performing binarization processing on the top view, and determining the contour of the top view according to the binarization result.
[0179] In this embodiment, after obtaining the top view of the first game model as described above, binarization processing is performed on the top view. By binarization, the foreground area and the background area of the top view of the first game model are determined, and then the top contour of the first game model is determined based on the foreground area and the background area.
[0180] Refer to Figures 6 - 7 , Figures 6 - 7 is a schematic diagram of the binarization result; Figure 6 In, it can be by performing binarization processing on the top view of a rectangular table to obtain the corresponding top contour; Figure 7 In, it can be by performing binarization processing on the top view of a polygonal table to obtain the corresponding top contour.
[0181] Furthermore, when the placement attribute includes a surrounding placement attribute, step B20 may further include the following sub-steps:
[0182] Sub-step B204, when the placement attribute of the first game model includes a surrounding placement attribute, on the scene area where the first game model is located, draw a second closed figure around the first game model according to a preset rule;
[0183] Sub-step B205, generate the surrounding placement area of the first game model according to the second closed figure.
[0184] Among them, the scene area refers to the surface of the object where the first game model is located. For example, if a table is placed on the ground, the surface of the terrain model where the ground is located is the scene area.
[0185] The second closed figure may include figures with mathematically expressible shapes such as a ring shape, a square shape, a sector shape, a cone shape, and an oval shape.
[0186] The preset rule refers to a rule for generating a placement area with a mathematically expressible shape such as a ring shape, a square shape, a sector shape, a cone shape, and an oval shape that is preset.
[0187] When the placement attribute of the first game model includes the surrounding placement attribute, a second closed figure can be drawn around the first game model on the scene area where the first game model is located according to the preset rule; furthermore, a surrounding placement area of the first game model can be generated according to the second closed figure.
[0188] As an example, the preset rule may include a rule for generating a corresponding surrounding placement area according to the top-down contour of the first game model. For example, when the top-down contour of a table is rectangular, a square-shaped surrounding placement area can be generated on the scene area where the table is located according to the size of the top-down contour of the table.
[0189] In this embodiment, for the first game model, determine the placement attribute of the first game model; generate a placement area associated with the first game model according to the placement attribute; thus, in the game scene, generate a placement area associated with the first game model according to the placement attribute of the first game model, and furthermore, by operating on the placement area, the automatic placement of the game model based on the label connection relationship recommendation method can be triggered to improve the placement efficiency of the game model and quickly construct the game scene.
[0190] Further, in one embodiment, after step S10, the method may further include the following steps:
[0191] Step C10, display at least one placement control, and the placement control corresponds to a preset placement method;
[0192] Step C20, in response to a trigger operation on the placement control, determine it as the target placement method;
[0193] Step C30, the step of automatically placing the target game model into the target placement area includes:
[0194] Automatically place the target game model into the target placement area according to the target placement method.
[0195] Among them, the placement control corresponds to a preset placement method.
[0196] The preset placement method may include the placement rules of the game model in the target placement area.
[0197] As an example, it may include random placement, column-based placement, and circular placement.
[0198] After determining the target placement area, at least one placement control is displayed in the graphical user interface, and the preset placement methods provided for the user to select are provided through the placement control. When a trigger operation for the placement option in the placement control is detected, the corresponding placement method is selected from the placement control according to the user trigger operation, and this placement method is determined as the target placement method; then, after determining the target placement method, the target game model is placed in the target placement area according to the target placement method.
[0199] As an example, when the determined target placement method is column-based placement, the target game model is placed in the target placement area column by column.
[0200] In this embodiment, at least one placement control is displayed on the graphical display interface, and the placement control corresponds to the preset placement method; in response to the trigger operation for the placement control, the selected placement method is determined as the target placement method; the target game model is automatically placed in the target placement area according to the target placement method; thus, by selecting the target placement method from the placement control, the automatic placement of the game model can be realized, saving the cumbersome placement operation, and when constructing a complex game scene, the placement efficiency of the game model can be greatly improved.
[0201] Refer to Figure 8 , a method for placing a game model provided by the second embodiment of the present invention, through a processor executing a software application and rendering on a display to obtain a graphical user interface, the graphical user interface at least includes a part of the game scene, and the method for placing the game model may include the following steps:
[0202] Step S40, when it is detected that a preset event is triggered, in response to the user operation on the first game model, the first game model is set as the initial model, and the target placement area is determined from the placement area associated with the initial model, where the first game model is a game model in the game scene.
[0203] Wherein, the preset event is a cascading placement event set in advance.
[0204] The initial model may be a game model used to execute the loop steps triggered by the cascading placement scheme.
[0205] All other features are the same as those in the first embodiment, and the details can be referred to step S10 of the above first embodiment, which will not be elaborated here.
[0206] When a trigger for cascaded placement is detected, a user operation on the first game model can be responded to. Consequently, the first game model corresponding to the user operation can be set as the initial model, and a target storage area can be determined from the storage areas associated with the initial model.
[0207] As an example, if the storage areas associated with the initial model include a flat storage area and a surrounding storage area, when the mouse moves over the initial model, or when the initial model is clicked / touched, the flat storage area and the surrounding storage area associated with the initial model can be displayed. Subsequently, the flat storage area or the surrounding storage area can be selected by clicking as the target storage area.
[0208] Step S50: Based on the target storage area, according to the preset model label connection relationship, determine the next-level game model of the initial model from the preset database, and automatically place the next-level game model in the target storage area, where the model label connection relationship is used to represent the placement position dependency between different categories of game models, and each model label is associated with game models of the same category.
[0209] Among them, the next-level game model can be a game model for placement on the target storage area of the initial model.
[0210] All other features are the same as those in the first embodiment. For details, refer to step S20 of the above first embodiment, which will not be elaborated here.
[0211] After determining the target storage area of the initial model, the next-level game model of the initial model can be determined from the preset database according to the target storage area and the preset model label connection relationship, so that the next-level game model can be placed in the target storage area.
[0212] Step S60: Set the next-level game model as the initial model, and loop through the steps of determining the target storage area from the storage areas associated with the initial model to the step of automatically placing the next-level game model in the target storage area.
[0213] Among them, after placing the next-level game model in the target storage area of the initial model, the next loop step of the cascaded placement is triggered. The next-level game model can be set as the initial model. Subsequently, the steps of determining the target storage area from the storage areas associated with the initial model to the step of automatically placing the next-level game model in the target storage area can be looped through until the preset conditions are met, and the loop steps of the cascaded placement are ended.
[0214] Among them, the preset condition can be the level of cascaded placement specified by the user. For example, specifying the placement of a three-level game model or a five-level game model, or it can also be until there is no next-level game model of the initial model in the preset database.
[0215] As an example, the level of cascaded placement preset by the user is three levels. The first game model in a game scene is a table model, and the determined target placement area is the tabletop of the table model. According to the tabletop of the table model and the preset model label connection relationship, it can be determined that the next-level game model of the table model is a book model, so the book model is placed on the tabletop of the table model, and it can be determined that the upper surface of the book model is the target placement area of the book model. Furthermore, according to the upper surface of the book model and the preset model label connection relationship, it can be determined that the next-level game model of the book model is a pen model, so the pen model is placed on the book model. After placing the pen model on the book model, the cascaded placement of the game models is completed.
[0216] A method for placing game models provided in this embodiment, when detecting that a preset event is triggered, in response to a user operation on the first game model, sets the first game model as the initial model, and determines a target placement area from the placement areas associated with the initial model, where the first game model is a game model in the game scene; based on the target placement area, according to the preset model label connection relationship, determines the next-level game model of the initial model from the preset database, and automatically places the next-level game model in the target placement area, where the model label connection relationship is used to represent the placement position dependence between different categories of game models, and each model label is associated with game models of the same category; sets the next-level game model as the initial model, and loops through the steps of determining the target placement area from the placement areas associated with the initial model to the step of automatically placing the next-level game model in the target placement area; thus, in the case of triggering cascaded placement, realizes the recommendation of game models and the full-automatic cascaded placement of game models according to the model label connection relationship, saves the process of searching for game models in the preset database, and saves the cumbersome placement operation; the automatic placement of game models can greatly improve the detail richness of the game scene.
[0217] Combined with the above steps S40 - S60, the difference between the second embodiment and the first embodiment is that in the case of triggering cascading placement, for the first game model in the game scene, first determine the target placement area of the first game model; then, according to the target placement area and the model label connection relationship, determine the next - level game model, and place the next - level game model in the target placement area of the first game model, and then determine the target placement area of the next - level game model; that is, in the second embodiment, after determining the next - level game model of the first game model, it is necessary to re - determine the new target placement area and the new next - level game model, so as to implement the cascading placement scheme for the first game model in the game scene. In the first embodiment, first determine the target placement area of the first game model in the game scene, and then, according to the target placement area and the model label connection relationship, one or more game models associated with the first game model can be determined, and the target game model is determined from the one or more associated game models, and then the target game model is placed in the target placement area of the first game model. In addition, in the second embodiment, after each determination of a new next - level game model, it is necessary for the new next - level game model to re - determine the new target placement area, that is, the target placement area will change; while in the first embodiment, the target placement area has always been the target placement area of the first game model.
[0218] Further, in one embodiment, step S50 may include the following sub - steps:
[0219] Sub - step S51, according to the preset volume filtering rule, screen the game models in the preset database to obtain the corresponding screening result;
[0220] Sub - step S52, according to the screening result, determine the next - level game model of the initial model.
[0221] Among them, the preset volume filtering rule is set by the adjacent fully automatic random placement filtering rule, and only targets game models with a smaller sense of volume. For example, game models with a smaller sense of volume than the table model or the trash can model beside the table model or the trash can model.
[0222] In the case where the model label connection relationship includes the same - level connection relationship, according to the preset volume filtering rule, screen the game models in the preset database, remove the game models with a larger sense of volume, and obtain the corresponding screening result; determine the next - level game model of the corresponding initial model according to the screening result.
[0223] As an example, filter out the game models with a larger sense of volume in the preset database, and determine the remaining game models with a smaller sense of volume as the next - level game models of the initial model.
[0224] Further, in one embodiment, before step S40, the method may further include:
[0225] Step P10, identifying the game scene to obtain an identification result.
[0226] The explanation of this step is similar to step A10 in the above first embodiment. For details, refer to the above step A10 and will not be elaborated here.
[0227] Further, step P10 may include sub-step P11:
[0228] Sub-step P11, identifying the dimensional attributes of the game scene to obtain an identification result, where the dimensional attributes include any one or a combination of multiple of scene attributes, color attributes, and size attributes.
[0229] The explanation of this step is similar to step A11 in the above first embodiment. For details, refer to the above step A11 and will not be elaborated here.
[0230] Step P20, determining a matching target model label according to the identification result.
[0231] The explanation of this step is similar to step A20 in the above first embodiment. For details, refer to the above step A20 and will not be elaborated here.
[0232] Further, in the case where the model label connection relationship includes a parent-child hierarchical connection relationship, step P20 may further include the following sub-steps:
[0233] Sub-step P21, determining a matching model label according to the identification result;
[0234] Sub-step P22, according to the parent-child hierarchical connection relationship, determining, from the matching model labels, the model labels without a parent as the target model labels.
[0235] The explanation of this step is similar to sub-steps A21 - A22 in the above first embodiment. For details, refer to the above sub-steps A21 - A22 and will not be elaborated here.
[0236] Step P30, determining a second game model associated with the target model label from a pre-set database.
[0237] The explanation of this step is similar to step A30 in the above first embodiment. For details, refer to the above step A30 and will not be elaborated here.
[0238] Step P40, making an external recommendation for the second game model.
[0239] The explanation of the steps here is similar to step A40 in the first embodiment above. For details, please refer to step A40 above and will not be elaborated here.
[0240] Step P50: When detecting an operation of selecting a target second game model from the second game models and placing it in the game scene, load the selected target second game model in the game scene.
[0241] The explanation of the steps here is similar to step A50 in the first embodiment above. For details, please refer to step A50 above and will not be elaborated here.
[0242] In this embodiment, by identifying the game scene, an identification result is obtained; according to the identification result, a matching target model label is determined; from a preset database, a second game model associated with the target model label is determined; the second game model is recommended externally; when detecting an operation of selecting a first game model from the second game models and placing it in the game scene, load the selected first game model in the game scene; thus, in the case where there is no game model in the game scene, game models are recommended according to the identification result of the game scene to achieve a more accurate positioning of constructing the game scene.
[0243] Further, in an embodiment, before step S10, the method may further include the following steps:
[0244] Step L10: Determine the placement attribute of the first game model for the first game model.
[0245] The explanation of the steps here is similar to step B10 in the first embodiment above. For details, please refer to step B10 above and will not be elaborated here.
[0246] Step L20: Generate a placement area associated with the first game model according to the placement attribute.
[0247] The explanation of the steps here is similar to step B20 in the first embodiment above. For details, please refer to step B20 above and will not be elaborated here.
[0248] Further, step L20 may include the following sub-steps:
[0249] Sub-step L201: When the placement attribute of the first game model includes a planar placement attribute, obtain a top view of the first game model;
[0250] Sub-step L202: Determine the top view contour of the first game model according to the top view;
[0251] Sub-step L203: Generate a first closed figure based on the top view contour and generate a planar placement area according to the first closed figure.
[0252] The explanations of sub - steps L201 to L203 here are similar to those of sub - steps B201 to B203 in the above - mentioned first embodiment. For details, refer to the above - mentioned sub - steps B201 to B203, and they will not be elaborated here.
[0253] Further, step L202 may include sub - steps: binarize the top - down view, and determine the contour of the top - down view according to the binarization result.
[0254] The explanations of the sub - steps of sub - step L202 here are similar to those of the sub - steps of sub - step B202 in the above - mentioned first embodiment. For details, refer to the sub - steps of sub - step B202 above, and they will not be elaborated here.
[0255] Further, when the placement attribute includes the surrounding placement attribute, step L20 may include the following sub - steps:
[0256] Sub - step L204, when the placement attribute of the first game model includes the surrounding placement attribute, draw a second closed figure around the first game model on the scene area where the first game model is located according to a preset rule;
[0257] Sub - step L205, generate the surrounding placement area of the first game model according to the second closed figure.
[0258] The explanations of sub - steps L204 to L205 here are similar to those of sub - steps B204 to B205 in the above - mentioned first embodiment. For details, refer to the above - mentioned sub - steps B204 to B205, and they will not be elaborated here.
[0259] In this embodiment, for the first game model, determine the placement attribute of the first game model; generate a placement area associated with the first game model according to the placement attribute; thus, generate a placement area associated with the first game model in the game scene according to the placement attribute of the first game model. Furthermore, by operating on the placement area, the automatic placement of the game model based on the label connection relationship recommendation method can be triggered to improve the placement efficiency of the game model and quickly construct the game scene.
[0260] Further, in one embodiment, after step S10, the method may further include the following steps:
[0261] Step H10, display at least one placement control, and the placement control corresponds to a preset placement method;
[0262] Step H20, in response to the trigger operation on the placement control, determine the target placement method;
[0263] Step H30, the step of automatically placing the next-level game model in the target placement area includes:
[0264] Automatically place the next-level game model in the target placement area according to the target placement method.
[0265] The explanations of steps H10 to H30 here are similar to those of steps C10 to C30 in the above first embodiment. For details, refer to the above steps C10 to C30 and will not be elaborated here.
[0266] In this embodiment, at least one placement control is displayed, and the placement control corresponds to a preset placement method; in response to a trigger operation on the placement control, a target placement method is determined; the step of automatically placing the next-level game model in the target placement area includes: automatically placing the next-level game model in the target placement area according to the target placement method; thus, by selecting a target placement method from the placement controls, automatic placement of the game model can be achieved, saving the cumbersome placement operation, and greatly improving the placement efficiency of the game model when constructing a complex game scene.
[0267] Based on the same inventive concept, a device for placing a game model corresponding to the method for placing a game model in the first embodiment of the present invention is further provided in the third embodiment of the present invention. Since the principle of solving problems by the device in the third embodiment of the present invention is similar to that of the method for placing a game model in the first embodiment of the present invention, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be elaborated. By a processor executing a software application and rendering on a display to obtain a graphical user interface, the graphical user interface at least includes a part of the game scene, referring to Figure 9 , the device for placing a game model of the present invention includes:
[0268] The first determination module 10 is configured to, in response to a user operation on the first game model, determine a target placement area from the placement areas associated with the first game model, where the first game model is a game model in the game scene;
[0269] The second determination module 20 is configured to, based on the target placement area, determine, according to a preset model label connection relationship, a game model that has a position dependency on the first game model from a preset database, where the model label connection relationship is used to represent the placement position dependency between different categories of game models, and each model label is associated with the same category of game models;
[0270] The placement module 30 is configured to determine a target game model from the game models that have a position dependency, and automatically place the target game model in the target placement area.
[0271] Optionally, the device for placing the game models may further include:
[0272] A fourth module, configured to identify the game scene to obtain an identification result;
[0273] A fifth module, configured to determine a target model label that matches according to the identification result;
[0274] A sixth module, configured to determine a second game model associated with the target model label from a preset database;
[0275] A seventh module, configured to recommend the second game model to the outside;
[0276] An eighth module, configured to, when detecting an operation of selecting a target second game model from the second game models and placing it in the game scene, load the selected target second game model in the game scene.
[0277] Optionally, the fourth module may further include:
[0278] An identification unit, configured to identify the dimensional attributes of the game scene to obtain an identification result, where the dimensional attributes include any one or a combination of scene attributes, color attributes, and size attributes.
[0279] Optionally, the fifth module may further include:
[0280] A first determination unit, configured to determine a model label that matches according to the identification result;
[0281] A second determination unit, configured to determine, according to the parent-child hierarchical connection relationship, a model label without a parent from the matching model labels as the target model label.
[0282] Optionally, the device for placing the game models may further include:
[0283] A ninth module, configured to determine the placement attribute of the first game model for the first game model;
[0284] A tenth module, configured to generate a placement area associated with the first game model according to the placement attribute.
[0285] Optionally, the tenth module may further include:
[0286] An acquisition unit, configured to obtain a top view of the first game model when the placement attribute of the first game model includes a planar placement attribute;
[0287] A contour unit for determining a top view contour of the first game model according to the top view;
[0288] A generation unit for generating a first closed figure based on the top view contour and generating a planar storage area according to the first closed figure.
[0289] Optionally, the contour unit may further include:
[0290] A sub-unit for binarizing the top view and determining the contour of the top view according to the binarization result.
[0291] Optionally, the tenth module may further include:
[0292] A drawing unit for, when the storage attribute of the first game model includes a surrounding storage attribute, drawing a second closed figure around the first game model on the scene area where the first game model is located according to a preset rule;
[0293] A closing unit for generating a surrounding storage area of the first game model according to the second closed figure.
[0294] Optionally, the device for placing the game model may further include:
[0295] An eleventh module for displaying at least one placement control corresponding to a preset placement method;
[0296] A twelfth module for determining a target placement method in response to a trigger operation on the placement control;
[0297] A thirteenth module for automatically placing the target game model into the target storage area according to the target placement method.
[0298] Based on the same inventive concept, in the fourth embodiment of the present invention, there is also provided a device for placing a game model corresponding to the method for placing a game model in the second embodiment. Since the principle of solving problems by the device in the fourth embodiment of the present invention is similar to that of the method for placing a game model in the second embodiment of the present invention, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again. By a processor executing a software application and rendering on a display to obtain a graphical user interface, the graphical user interface at least includes part of the game scene. Refer to Figure 10 , the device for placing a game model of the present invention includes:
[0299] A trigger module, configured to, when detecting that a preset event is triggered, in response to a user operation on a first game model, set the first game model as an initial model, and determine a target storage area from the storage areas associated with the initial model, where the first game model is a game model in the game scene;
[0300] A determination module, configured to, based on the target storage area, determine, according to a preset model label connection relationship, a next-level game model of the initial model from a preset database, and automatically place the next-level game model in the target storage area, where the model label connection relationship is used to represent the placement position dependency between different categories of game models, and each model label is associated with game models of the same category;
[0301] A loop module, configured to set the next-level game model as the initial model, and loop through the steps of determining the target storage area from the storage areas associated with the initial model to automatically placing the next-level game model in the target storage area.
[0302] Optionally, the trigger module may further include:
[0303] A first determination unit, configured to screen the game models in the preset database according to a preset volume filtering rule to obtain a corresponding screening result;
[0304] A second determination unit, configured to determine the next-level game model of the initial model according to the screening result.
[0305] Optionally, the device for placing game models may further include:
[0306] A first module, configured to identify the game scene to obtain an identification result;
[0307] A second module, configured to determine a matching target model label according to the identification result;
[0308] A third module, configured to determine a second game model associated with the target model label from a preset database;
[0309] A fourth module, configured to recommend the second game model to the outside;
[0310] A fifth module, configured to, when detecting an operation of selecting a target second game model from the second game models and placing it in the game scene, load the selected target second game model in the game scene.
[0311] Optionally, the first module may further include:
[0312] A combined unit for identifying the dimensional attributes of the game scene to obtain an identification result, where the dimensional attributes include any one or a combination of multiple of scene attributes, color attributes, and size attributes.
[0313] Optionally, the second module may further include:
[0314] A first matching unit for determining a matching model label according to the identification result;
[0315] A second matching unit for determining, according to the parent-child hierarchical connection relationship, the model labels without a parent among the matching model labels as target model labels.
[0316] Optionally, the device for placing the game model may further include:
[0317] A sixth module for determining the placement attribute of the first game model for the first game model;
[0318] A seventh module for generating a placement area associated with the first game model according to the placement attribute.
[0319] Optionally, the seventh module may further include:
[0320] A first attribute unit for obtaining a top view of the first game model when the placement attribute of the first game model includes a flat placement attribute;
[0321] A second attribute unit for determining the top contour of the first game model according to the top view;
[0322] A third attribute unit for generating a first closed figure based on the top contour and generating a flat placement area according to the first closed figure.
[0323] Optionally, the second attribute unit may further include:
[0324] A first subunit for binarizing the top view and determining the contour of the top view according to the binarization result.
[0325] Optionally, the seventh module may further include:
[0326] A first rule unit for drawing a second closed figure around the first game model on the scene area where the first game model is located according to a preset rule when the placement attribute of the first game model includes a surrounding placement attribute;
[0327] A second rule unit for generating the surrounding placement area of the first game model according to the second closed figure.
[0328] Optionally, the device for arranging the game models may further include:
[0329] An eighth module, configured to display at least one arranging control, where the arranging control corresponds to a preset arranging method;
[0330] A ninth module, configured to determine a target arranging method in response to a triggering operation on the arranging control;
[0331] A tenth module, where the step of automatically arranging the next-level game model to the target storage area includes:
[0332] Automatically arranging the next-level game model to the target storage area according to the target arranging method.
[0333] In addition, the present invention further provides a computer-readable storage medium, on which a program for arranging game models is stored. When the program for arranging game models is executed by a processor, the steps of the method for arranging game models as described above are implemented.
[0334] Wherein, the method implemented when the program for arranging game models running on the processor is executed may refer to the various embodiments of the method for arranging game models of the present invention, which will not be elaborated here.
[0335] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or system including the element.
[0336] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.
[0337] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they 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. The computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions for causing an electronic device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0338] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be similarly included in the patent protection scope of the present invention.
Claims
1. A method for arranging a game model, characterized in that, A graphical user interface is obtained by a processor executing a software application and rendering it on a display, and the graphical user interface at least includes a part of a game scene. The method includes the following steps: In response to a user operation on a first game model, a target storage area is determined from the storage areas associated with the first game model, where the first game model is a game model in the game scene, and the target storage area at least includes one of a flat storage area on the first game model and a surrounding storage area distributed around the first game model; Based on the target storage area, according to a preset model label connection relationship, game models that have a position dependency with the first game model are determined from a preset database, where the model label connection relationship is used to represent the placement position dependency between different categories of game models, each model label is associated with game models of the same category, and the model label connection relationship includes a same-level connection relationship established based on an adjacent placement relationship and a parent-child hierarchical connection relationship established based on a cascading placement relationship; From the game models that have a position dependency, a target game model is determined and the target game model is automatically placed in the target storage area; Before the step of, in response to a user operation on a first game model, determining a target storage area from the storage areas associated with the first game model, the method further includes: For the first game model, determining the storage attribute of the first game model, where the storage attribute at least includes one of a flat storage attribute and a surrounding storage attribute; According to the storage attribute, a storage area associated with the first game model is generated.
2. The method according to claim 1, wherein Before the step of, in response to a user operation on a first game model, determining a target storage area from the storage areas associated with the first game model, the method further includes: Identifying the game scene to obtain an identification result; According to the identification result, determining a matching target model label; Determining a second game model associated with the target model label from a preset database; Performing an external recommendation for the second game model; When it is detected that an operation of selecting a target second game model from the second game models and placing it in the game scene is performed, the selected target second game model is loaded in the game scene.
3. The method according to claim 2, characterized in that, The step of, identifying the game scene to obtain an identification result, includes: Identifying the dimensional attributes of the game scene to obtain an identification result, where the dimensional attributes include any one or a combination of multiple of scene attributes, color attributes, and size attributes.
4. The method according to claim 2 or 3, characterized in that, The model label connection relationship includes a parent-child hierarchical connection relationship. The step of, according to the identification result, determining a matching target model label, includes: According to the identification result, determining a matching model label; According to the parent-child hierarchical connection relationship, from the matching model labels, the model labels without a parent are determined as the target model labels.
5. The method according to claim 1, wherein The step of, according to the storage attribute, generating a storage area associated with the first game model, includes: When the storage attribute of the first game model includes a flat storage attribute, obtain a top view of the first game model; Determine the top contour of the first game model according to the top view; Generate a first closed figure based on the top contour, and generate a flat storage area according to the first closed figure.
6. The method according to claim 5, wherein The step of determining the top contour of the first game model according to the top view includes: Perform binarization processing on the top view, and determine the contour of the top view according to the binarization result.
7. The method according to claim 1, characterized in that The step of generating a storage area associated with the first game model according to the storage attribute includes: When the storage attribute of the first game model includes a surrounding storage attribute, draw a second closed figure around the first game model on the scene area where the first game model is located according to a preset rule; Generate a surrounding storage area of the first game model according to the second closed figure.
8. The method according to claim 1, wherein After the step of determining a target storage area from the storage areas associated with the first game model, it further includes: Display at least one placement control, and the placement control corresponds to a preset placement method; In response to a trigger operation on the placement control, determine a target placement method; The step of automatically placing the target game model into the target storage area includes: Automatically place the target game model into the target storage area according to the target placement method.
9. A method for arranging game models, characterized in that, The graphical user interface is obtained by a processor executing a software application and rendering on a display, and the graphical user interface at least includes a part of the game scene. The method includes the following steps: When it is detected that a preset event is triggered, in response to a user operation on the first game model, set the first game model as the initial model, and determine a target storage area from the storage areas associated with the initial model, where the first game model is a game model in the game scene, and the target storage area at least includes one of a flat storage area on the first game model and a surrounding storage area distributed around the first game model; Based on the target storage area, determine the next-level game model of the initial model from a preset database according to a preset model label connection relationship, and automatically place the next-level game model into the target storage area, where the model label connection relationship is used to represent the placement position dependence between different categories of game models, each model label is associated with the same category of game models, and the model label connection relationship includes a same-level connection relationship established based on an adjacent placement relationship and a parent-child level connection relationship established based on a cascading placement relationship; Set the next-level game model as the initial model, and loop through the step of determining the target storage area from the storage areas associated with the initial model to the step of automatically placing the next-level game model into the target storage area until the loop ends when a preset condition is met, and the preset condition is the level of cascading placement specified by the user. Before the step of determining a target storage area from the storage areas associated with the first game model in response to a user operation on the first game model, the method further includes: Determining the storage attribute of the first game model, where the storage attribute includes at least one of a planar storage attribute and a surrounding storage attribute; Generating a storage area associated with the first game model according to the storage attribute.
10. The method according to claim 9, wherein When the model label connection relationship includes a same-level connection relationship, the step of determining the next-level game model of the initial model from the pre-set database includes: Filtering the game models in the pre-set database according to a pre-set volume filtering rule to obtain a corresponding filtering result; Determining the next-level game model of the initial model according to the filtering result.
11. The method according to claim 9, wherein Before the step of, when detecting that a pre-set event is triggered, in response to a user operation on the first game model, setting the first game model as the initial model and determining a target storage area from the storage areas associated with the initial model, the method further includes: Identifying the game scene to obtain an identification result; Determining a matching target model label according to the identification result; Determining a second game model associated with the target model label from the pre-set database; Performing an external recommendation on the second game model; When detecting an operation of selecting a target second game model from the second game model and placing it in the game scene, loading the selected target second game model in the game scene.
12. The method according to claim 11, wherein The step of identifying the game scene to obtain an identification result includes: Identifying the dimensional attribute of the game scene to obtain an identification result, where the dimensional attribute includes any one or a combination of a scene attribute, a color attribute, and a size attribute.
13. The method according to claim 11 or 12, characterized in that When the model label connection relationship includes a parent-child hierarchical connection relationship, the step of determining a matching target model label according to the identification result includes: Determining a matching model label according to the identification result; According to the parent-child hierarchical connection relationship, determining, from the matching model labels, the model labels without a parent as the target model labels.
14. The method according to claim 9, wherein The step of generating a storage area associated with the first game model according to the storage attribute includes: When the storage attribute of the first game model includes a planar storage attribute, obtaining a top view of the first game model; Determining the top view contour of the first game model according to the top view; Generating a first closed figure based on the top view contour and generating a planar storage area according to the first closed figure.
15. The method according to claim 14, wherein The step of determining the top view contour of the first game model according to the top view includes: Performing binarization processing on the top view and determining the contour of the top view according to the binarization result.
16. The method according to claim 9, characterized in that, The step of generating a storage area associated with the first game model according to the storage attribute includes: When the storage attribute of the first game model includes the surrounding storage attribute, on the scene area where the first game model is located, a second closed figure is drawn around the first game model according to a preset rule; According to the second closed figure, a surrounding storage area of the first game model is generated.
17. The method according to claim 9, characterized in that, After the step of determining the target storage area from the storage areas associated with the initial model, the method further includes: Displaying at least one placement control, where the placement control corresponds to a preset placement method; In response to a trigger operation on the placement control, determining a target placement method; The step of automatically placing the next-level game model into the target storage area includes: Automatically placing the next-level game model into the target storage area according to the target placement method.
18. A device for arranging game models, characterized in that, A graphical user interface is obtained by a processor executing a software application and rendering on a display, and the graphical user interface includes at least part of a game scene. The device includes: A first determination module, configured to, in response to a user operation on a first game model, determine a target storage area from the storage areas associated with the first game model, where the first game model is a game model in the game scene, and the target storage area includes at least one of a flat storage area on the first game model and a surrounding storage area distributed around the first game model; A second determination module, configured to, based on the target storage area, determine, according to a preset model label connection relationship, a game model that has a position dependency on the first game model from a preset database, where the model label connection relationship is used to represent the placement position dependency between different categories of game models, each model label is associated with the same category of game models, and the model label connection relationship includes a same-level connection relationship established based on an adjacent placement relationship and a parent-child level connection relationship established based on a cascading placement relationship; A placement module, configured to determine a target game model from the game models that have a position dependency, and automatically place the target game model into the target storage area; The first determination module is further configured to, before the step of determining a target storage area from the storage areas associated with the first game model in response to a user operation on the first game model, Determine the storage attribute of the first game model for the first game model, where the storage attribute includes at least one of a flat storage attribute and a surrounding storage attribute; Generate a storage area associated with the first game model according to the storage attribute.
19. A device for placing game models, characterized in that, A graphical user interface is obtained by a processor executing a software application and rendering on a display, and the graphical user interface includes at least part of a game scene. The device includes: A trigger module, configured to, when detecting that a preset event is triggered, in response to a user operation on a first game model, set the first game model as an initial model, and determine a target storage area from the storage areas associated with the initial model, where the first game model is a game model in the game scene, and the target storage area includes at least one of a flat storage area on the first game model and a surrounding storage area distributed around the first game model; A determination module, configured to, based on the target storage area, determine a next-level game model of the initial model from a preset database according to a preset model label connection relationship, and automatically place the next-level game model in the target storage area, where the model label connection relationship is used to represent the placement position dependency between different categories of game models, each model label is associated with game models of the same category, and the model label connection relationship includes a same-level connection relationship established based on an adjacent placement relationship and a parent-child level connection relationship established based on a cascading placement relationship; A loop module, configured to set the next-level game model as the initial model, and loop through the steps of determining a target storage area from the storage areas associated with the initial model to the step of automatically placing the next-level game model in the target storage area until the loop ends when a preset condition is met, and the preset condition is the level of cascading placement specified by the user; The trigger module is further configured to, before the step of determining a target storage area from the storage areas associated with the first game model in response to a user operation on the first game model, determine the storage attribute of the first game model for the first game model, where the storage attribute includes at least one of a flat storage attribute and a surrounding storage attribute; generate a storage area associated with the first game model according to the storage attribute.
20. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and a program stored on the memory and executable on the processor, and when the program is executed by the processor, the steps of the method according to any one of claims 1 to 8 or 9 to 17 are implemented.
21. A computer-readable storage medium, characterized in that, A program is stored on the computer-readable storage medium, and when the program is executed by the processor, the steps of the method according to any one of claims 1 to 8 or 9 to 17 are implemented.
22. A computer program product, characterized in that, It includes a computer program, and when the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 8 or 9 to 17 are implemented.
Citation Information
Patent Citations
Intelligent placement system of accessory for indoor design
CN108563841A
Unity-3D-based adaptive assembly guidance method and system
CN111833436A