Scene model generation method, device, electronic device and storage medium
By obtaining and adjusting the associated models and control parameters of the scene model, the problem of repeated work between multiple scene styles is solved, and the production efficiency of the scene model is improved.
Patent Information
- Application Number
- CN202111404730.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-24
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2041-11-24
AI Technical Summary
During the game production process, there are a lot of similarities between multiple scene styles, which results in low scene model production efficiency and the need to repeatedly build multiple scene models to adapt to different styles.
By obtaining the associated model of the target scene, including the sub-base model carrying style control nodes, and adjusting the control parameters of the sub-base model according to the target style control parameters, the target style model of the target scene is generated to avoid duplication of work.
It improves the production efficiency of scene models, reduces the workload of repetitive work, and enables flexible adjustment of different scene styles.
Smart Images

Figure CN114159798B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a scene model generation method, device, electronic device and computer-readable storage medium. Background Art
[0002] With the rapid development of computer technology, building scene models through modeling software has become an indispensable step in the production of many products. For example, when making games, it is necessary to build many three-dimensional models through modeling software, and then form a virtual scene of the game by combining the three-dimensional models.
[0003] Usually, the scene model is first built in the modeling software, and then the built scene model is imported into the game engine such as UE4 (Unreal Engine) in the form of a file for game scene rendering. That is, one scene style needs to build a scene model and import it into the game engine, and multiple scene styles need to build multiple scene models and import them into the game engine.
[0004] However, in some cases, there are many similarities between two different scene styles. If a scene model is made for each of the two scene styles, a lot of duplication of work will occur, resulting in low efficiency in scene model making. For example, when making models of two different styles of basketball court floors, although the two styles of basketball court floors are different in some patterns, lines, and regional colors, the two different styles of basketball court floors have a large number of similarities. If two models are made for the two different styles of basketball court floors, there will be a lot of duplication of work, resulting in low efficiency in model making. Summary of the invention
[0005] Embodiments of the present invention provide a scene model generation method, device, electronic device and computer-readable storage medium, which can avoid repeated workload when making scene models and improve the production efficiency of scene models.
[0006] In a first aspect, an embodiment of the present application provides a method for generating a scene model, comprising:
[0007] Acquire an associated model of a target scene, wherein the associated model includes at least one sub-base model of the target scene, and the sub-base model carries a style control node;
[0008] Obtaining target style control parameters of the target scene;
[0009] Based on the style control node, the control parameters of the sub-base model are adjusted according to the target style control parameters to obtain the target style model of the target scene, and the control parameters of the sub-base model are used to control the display of the scene style corresponding to the sub-base model.
[0010] In a second aspect, an embodiment of the present application further provides a scene model generation device, comprising:
[0011] A first acquisition unit, configured to acquire an associated model of a target scene, wherein the associated model includes at least one sub-basic model of the target scene, and the sub-basic model carries a style control node;
[0012] A second acquisition unit, configured to acquire a target style control parameter of the target scene;
[0013] An adjustment unit is used to adjust the control parameters of the sub-basic model according to the target style control parameters based on the style control node to obtain the target style model of the target scene, and the control parameters of the sub-basic model are used to control the display of the scene style corresponding to the sub-basic model.
[0014] In some embodiments, the sub-basic model includes at least one of a line model, a color matching area model, and a pattern model, and the first acquisition unit is specifically used to:
[0015] Acquire at least one line model of the target scene;
[0016] Acquire at least one color matching area model of the target scene;
[0017] Acquire at least one pattern model of the target scene;
[0018] The at least one line model, the at least one color matching area model and the at least one pattern model are merged through a preset merging control node to obtain the association model.
[0019] In some embodiments, the style control node includes a target display control node of the sub-base model, the target style control parameter includes at least one of a target hidden and visible parameter and a model color parameter of the sub-base model, and the adjustment unit is specifically used to:
[0020] Based on the target display control node, the control parameters of the sub-basic model are adjusted according to at least one of the target visibility parameter and the model color parameter to obtain the target style model.
[0021] In some embodiments, the sub-basic model includes a target line model of the target scene, the target display control node includes a first display control node of the target line model, the target hidden and visible parameter includes a first hidden and visible parameter of the target line model, and the adjustment unit is specifically used to:
[0022] Based on the first display control node, control parameters of the target line model are adjusted according to the first visibility parameter to obtain the target style model.
[0023] In some embodiments, the model color parameter further includes a first model color parameter of the target line model, and the adjustment unit is specifically configured to:
[0024] Based on the first display control node, control parameters of the target line model are adjusted according to the first model color parameters to obtain the target style model.
[0025] In some embodiments, the sub-basic model includes a target color matching area model of the target scene, the target display control node includes a second display control node of the target color matching area model, the target hidden and visible parameters include a second hidden and visible parameter of the target color matching area model, and the adjustment unit is specifically used to:
[0026] Based on the second display control node, the control parameters of the target color matching area model are adjusted according to the second visibility parameter to obtain the target style model.
[0027] In some embodiments, the target style control parameter further includes a second model color parameter of the target color matching area model, and the adjustment unit is specifically used to:
[0028] Based on the second display control node, control parameters of the target color matching area model are adjusted according to the second model color parameters to obtain the target style model.
[0029] In some embodiments, the style control node includes a material control node of the sub-base model, the target style control parameter includes a material parameter of a color matching area corresponding to the sub-base model, and the second acquisition unit is specifically used to:
[0030] Based on the lerp function, extract the color matching area corresponding to each sub-basic model in the association model;
[0031] Obtaining material parameters of the color matching area;
[0032] In some embodiments, the adjustment unit is specifically configured to:
[0033] Based on the material control node, the control parameters of the color matching area are adjusted according to the material parameters to obtain the target style model.
[0034] In some embodiments, the second acquiring unit is specifically configured to:
[0035] Obtain a target material ball for adjusting the target style model;
[0036] Based on the target material ball, obtaining material color parameters of the color matching area;
[0037] In some embodiments, the adjustment unit is specifically configured to:
[0038] Based on the material control node, the control parameters of the color matching area are adjusted according to the material color parameters to obtain the target style model.
[0039] In some embodiments, the second acquiring unit is specifically configured to:
[0040] Obtain material mapping parameters of the color matching area;
[0041] In some embodiments, the adjustment unit is specifically configured to:
[0042] Based on the material control node, the control parameters of the color matching area are adjusted according to the material mapping parameters to obtain the target style model.
[0043] In some embodiments, the second acquiring unit is specifically configured to:
[0044] When the material exposure parameter is 0, obtaining the material mapping parameter of the color matching area;
[0045] When the material exposure parameter is 1, the material color parameter of the color matching area is obtained.
[0046] In some embodiments, the sub-base model includes a target pattern model of the target scene, the style control node includes a pattern control node of the target pattern model, the target style control parameter includes a position parameter and a resource parameter of the target pattern model, and the adjustment unit is specifically used to:
[0047] Based on the pattern control node, control parameters of the pattern model are adjusted according to the position parameters and the resource parameters to obtain the target style model.
[0048] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory storing a plurality of instructions; the processor loads instructions from the memory to execute the steps in any one of the scene model generation methods provided in the embodiments of the present application.
[0049] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for a processor to load to execute the steps in any one of the scene model generation methods provided in the embodiments of the present application.
[0050] In an embodiment of the present application, since the associated model of the target scene includes at least one sub-base model that carries a style control node, the display of the scene style corresponding to the sub-base model can be controlled by obtaining the target style control parameters of the target scene and adjusting the control parameters of the sub-base model, thereby adjusting the scene style of the associated model corresponding to the target scene and obtaining the target style model of the target scene; therefore, the same modeled material can be reused at the same points between different scene styles, avoiding the problem of a large amount of repetitive work caused by building a scene model for a scene style and importing it into the game engine, avoiding the repetitive workload in scene model production to a certain extent and improving the production efficiency of scene models. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0052] Figure 1 This is a schematic diagram of an embodiment of a scene model generation method provided in an embodiment of the present application;
[0053] Figure 2 It is a schematic diagram for explaining the construction of the association model provided in the embodiments of the present application;
[0054] Figure 3 It is a schematic diagram of a scene style in which a target scene provided in an embodiment of the present application is constructed by lines;
[0055] Figure 4 This is a schematic diagram of a scenario in which a control node is merged in an embodiment of the present application;
[0056] Figure 5 It is a schematic diagram of a scene style in which a target scene provided in an embodiment of the present application is constructed by color matching areas;
[0057] Figure 6 is a schematic diagram of a scene style in which a target scene provided in an embodiment of the present application is constructed by a pattern;
[0058] Figure 7 is a structural schematic diagram of a scene model generating device provided in an embodiment of the present application;
[0059] Figure 8 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0061] Embodiments of the present invention provide a scene model generation method, device, electronic device, and computer-readable storage medium.
[0062] The scene model generation device can be integrated into an electronic device, which can be a terminal, a server, or other devices. The terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, or a personal computer (PC), etc. The server can be a single server or a server cluster composed of multiple servers.
[0063] In some embodiments, the scene model generation device may also be integrated into multiple electronic devices. For example, the scene model generation device may be integrated into multiple servers, and the scene model generation method of the present invention may be implemented by multiple servers.
[0064] In some embodiments, the server may also be implemented in the form of a terminal. For example, a personal computer may be set up as a server to integrate the scene model generating device.
[0065] For example, the electronic device may be a mobile terminal, which may obtain an associated model of a target scene through a network, wherein the associated model includes at least one sub-base model of the target scene, and the sub-base model carries a style control node; obtains a target style control parameter of the target scene; based on the style control node, adjusts the control parameter of the sub-base model according to the target style control parameter to obtain the target style model of the target scene, wherein the control parameter of the sub-base model is used to control the display of the scene style corresponding to the sub-base model.
[0066] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
[0067] Reference Figure 1 , Figure 1 1 is a flow chart of a scene model generation method provided in an embodiment of the present application. It should be noted that although a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order than that shown here. In this embodiment, the scene model generation method includes steps 101 to 103, wherein:
[0068] 101. Obtain a correlation model of the target scene.
[0069] The associated model includes at least one sub-base model of the target scene, and the sub-base model carries a style control node.
[0070] Among them, the target scene is the scene for which the model is to be generated, such as basketball court floors, clothing, walls, etc.
[0071] Among them, the model refers to the model built to reflect the scene, such as models of basketball court boards, clothing, walls, tables and chairs, etc.
[0072] Among them, the sub-base model is a model used to reflect the local style in the target scene, such as a model reflecting the court lines of a basketball court floor and a model reflecting the pattern of a basketball court floor can both be used as a sub-base model of the basketball court floor. A collection of multiple local style models can reflect the global style of the target scene.
[0073] Among them, the associated model refers to the model built to reflect the target scene, such as the model of basketball court boards, clothing, walls, tables and chairs, etc.
[0074] The associated model can be a collection of multiple sub-basic models used to construct the target scene. For example, taking the target scene as a basketball court floor, Figure 2 As shown, the basketball court floor is composed of a line model (such as Figure 2 Sub-model 1), color matching area model (such as Figure 2 Sub-model 2), pattern model (such as Figure 2 3) in the figure, then the line model (sub-model 1), color area model (sub-model 2), and pattern model (sub-model 3) used to build the basketball court floor are all sub-basic models, and the collection of the line model (sub-model 1), color area model (sub-model 2), and pattern model (sub-model 3) is the associated model associated with the basketball board floor.
[0075] In some embodiments, the associated model may exist in modeling software such as Houdini, etc. Houdini is a multifunctional software that can model, bind, make animations, and make special effects.
[0076] In other embodiments, the associated model may also exist in a game engine such as UE4. When the associated model exists in a game engine such as UE4, the associated model made in a modeling software such as Houdini can be exported in the form of an HDA file and then placed in the UE4 engine. Among them, after making the model file, the traditional modeling software (such as 3DsMax, Maya, etc.) must output the fbx format file and import it into UE4; if the model needs to be modified, it must be modified in 3DsMax or Maya, and the fbx format file must be repeatedly output. The HDA file can avoid this repeated modification and re-output situation. The content (such as: model) made in Houdini can set the corresponding change parameters, and then output the HDA file to UE4. In UE4, the model can be changed in real time and at will within the range of the change parameters.
[0077] In step 101, there are multiple ways to obtain the association model, illustratively including:
[0078] (1) Obtained by real-time construction. Exemplarily, the association model can be directly constructed in real time based on software such as Houdini that can be used for modeling. The inventors of the embodiments of the present application have found through actual application that the scene style mainly reflects the differences in lines, regional color matching, patterns, etc. Therefore, multiple sub-basic models can be constructed according to the differences in lines, regional color matching, patterns, etc. to build an association model for forming the target scene. The following takes the association models as examples of multiple line models, multiple color matching regional models, and multiple pattern models to illustrate the process of obtaining the association model in step 101.
[0079] ① The associated model is a plurality of line models. In this case, step 101 may specifically include the following steps 1011A to 1012A:
[0080] 1011A. Obtain multiple line models of the target scene.
[0081] The line model is a sub-basic model used to reflect the lines in the target scene, such as the court lines on the floor of a basketball court.
[0082] For example, suppose the target scene is a basketball court floor. Figure 3 As shown, in actual applications, it is necessary to construct basketball court floors of scene styles 1, 2, and 3; among which, the basketball court floor of style 1 includes: court lines of type A, court lines of type B, and court lines of type C, such as Figure 3 As shown in (a); the basketball court floor of style 2 includes: type A court lines, type B court lines, and type D court lines, such as Figure 3 As shown in (b), the same type of court lines have the same setting position and shape in the basketball court floor.
[0083] It can be seen that among the various scene styles of the basketball court floor, the court lines whose styles remain unchanged are: type A court lines and type B court lines. The court lines whose styles change with the basketball board scene style are: type C court lines and type D court lines.
[0084] In Houdini, on the one hand, a court line model that does not need to change its style is modeled (recorded as model 0), and the style of model 0 is: including type A court lines and type B court lines; on the other hand, court line models that need to change their styles are modeled (recorded as model 1 to model n1, n1 is the number of court line styles that need to be changed), where model 1 to model n1 include: model 1 with type C court lines and model 2 with type D court lines. Model 0, model 1, and model 2 are multiple line models of the basketball court floor (i.e., the target scene).
[0085] Furthermore, a Color node may be linked to each line model, and a color may be assigned to the line model through the Color node.
[0086] 1012A. Merge the multiple line models through a preset merging control node to obtain the associated model.
[0087] In step 1012A, the preset merging control node is a control node for merging multiple line models, such as the Merge node in Houdini.
[0088] Specifically, the multiple line models obtained in step 1011A are input into a preset merging control node, and the multiple line models are selected and merged by the preset merging control node, and finally the associated model is output.
[0089] For example, Figure 4 As shown, Figure 4 This is a scene diagram of a merge control node provided in an embodiment of the present application; the preset merge control node may specifically include the Merge node and the Switch node in Houdini, wherein the Merge node is used to merge two models, and the Switch node is used to select one or more outputs from multiple inputs; to control whether to use line models of various styles to construct an associated model, and then realize the scene style of the associated model corresponding to the target scene. Figure 4 As shown in the figure, assuming that the outputs of Merge nodes 1, 2, and 3 are merged models 1, 2, and 3 respectively, if the outputs of Switch nodes 1, 2, and 3 are selected as merged models 1, 2, and 3 respectively, then Figure 4The final output of Switch node 3 is merged model 3, namely: models 1, 2, 3, and 4; that is, the merged model output by Switch node 3 is the associated model output by the preset merge control node.
[0090] It can be seen that by adjusting the control parameters of the preset merge control node (such as the control parameters of the Merge node and the Switch node), the line model can be selected, thereby adjusting the scene style of the associated model, and then adjusting the scene style of the target scene on the basis of reducing the amount of repeated work. Therefore, through steps 1011A to 1012A, an associated model for selecting the line model can be built, thereby building an associated model with adjustable scene style, and then adjusting the scene style of the target scene on the line on the basis of reducing the amount of repeated work. Similar to the selection of the line model here, in the following text, the target hidden and visible parameters of the sub-basic model included in the target style control parameters are used for the selection of the sub-basic model, wherein the target hidden and visible parameters refer to the control parameters used to select whether the sub-basic model is displayed. For example, the target hidden and visible parameters of the sub-basic model in the following text can specifically be the control parameters of the Switch node in the merge control node.
[0091] ② The associated model is a plurality of color matching area models. In this case, step 101 may specifically include the following steps 1011B to 1012B:
[0092] 1011B. Obtain multiple color matching area models of the target scene.
[0093] The color matching area model is a sub-basic model used to reflect the color of each area in the target scene. For example, the basketball court floor is divided into two color matching areas: one area inside the three-point line and one area outside the three-point line.
[0094] For example, suppose the target scene is a basketball court floor. Figure 5 As shown, in actual applications, it is necessary to construct basketball court floors of scene styles 1 and 2; wherein, the basketball court floor of style 1 includes: color matching area of type A and color matching area of type B, such as Figure 5 As shown in (a); the basketball court floor of style 2 includes: type A color matching area, type B color matching area, type C color matching area, such as Figure 5 As shown in (b), the same type of color matching areas have the same setting position and shape in the basketball court floor.
[0095] It can be seen that among the various scene styles of the basketball court floor, the color matching area styles that remain unchanged are: type A color matching area and type B color matching area. The color matching area style that changes with the basketball board scene style is: type C color matching area.
[0096] In Houdini, on the one hand, a court color matching area model that does not need to change the style is modeled (recorded as model 0), and the style of model 0 is: including type A color matching area and type B color matching area; on the other hand, a court color matching area model that needs to change the style is modeled (recorded as model 1 to model n2, n2 is the number of color matching area styles that need to be changed), where model 1 to model n2 include: model 1 with a style of type C color matching area. Model 0 and model 1 are multiple color matching area models of the basketball court floor (i.e., the target scene).
[0097] Furthermore, a Color node may be linked to each color matching region model, and a color may be assigned to the color matching region model through the Color node.
[0098] 1012B. Merge the multiple color matching area models through a preset merging control node to obtain the associated model.
[0099] In step 1012A, the preset merging control node is a control node used to merge multiple color matching area models, such as the Merge node in Houdini.
[0100] The method of merging the multiple color matching area models in step 1012B is similar to that of the above step 1011A. For details, please refer to the description of the above step 1011A, which will not be repeated here.
[0101] It can be seen that by adjusting the control parameters of the preset merge control node (such as the control parameters of the Merge node and the Switch node), the color matching regional model can be selected, thereby adjusting the scene style of the associated model in the regional color matching, and then adjusting the scene style of the target scene on the basis of reducing the repetitive workload. Therefore, through steps 1011B to 1012B, an associated model for selecting the color matching regional model can be built, thereby building an associated model that can adjust the scene style, and then adjusting the scene style of the target scene on the basis of reducing the repetitive workload.
[0102] ③ The associated model is a plurality of pattern models. In this case, step 101 may specifically include the following steps 1011C to 1012C:
[0103] 1011C. Acquire multiple pattern models of the target scene.
[0104] The pattern model is a sub-basic model used to reflect the pattern in the target scene, such as the icons of team A and team B marked on the floor of a basketball court.
[0105] For example, suppose the target scene is a basketball court floor. Figure 6As shown, in actual applications, it is necessary to construct basketball court floors of scene styles 1 and 2; wherein, the basketball court floor of style 1 includes: pattern A and pattern C, such as Figure 6 As shown in (a); the basketball court floor of style 2 includes: A type pattern, D type pattern, such as Figure 6 As shown in (b), the same type of patterns have the same setting position and shape in the basketball court floor.
[0106] It can be seen that among the various scene styles of the basketball court floor, the pattern whose pattern style remains unchanged is: type A pattern. The patterns whose pattern style changes with the basketball board scene style are: type C pattern and type D pattern.
[0107] In Houdini, on the one hand, a court pattern model that does not need to change its style is modeled (recorded as model 0), and the style of model 0 is type A pattern; on the other hand, court pattern models that need to change their style are modeled (recorded as model 1 to model n3, n3 is the number of pattern styles that need to be changed), where model 1 to model n3 include: model 1 with a style of type C pattern, and model 2 with a style of type D pattern. Model 0, model 1, and model 2 are multiple pattern models of the basketball court floor (i.e., the target scene).
[0108] 1012C. Merge the multiple pattern models through a preset merging control node to obtain the association model.
[0109] It can be seen that by adjusting the control parameters of the preset merge control node (such as the control parameters of the Merge node and the Switch node), the pattern model can be selected, thereby adjusting the scene style of the associated model on the pattern, and then adjusting the scene style of the target scene on the basis of reducing the repetitive workload. Therefore, through steps 1011B to 1012B, an associated model for selecting the pattern model can be built, thereby building an associated model that can adjust the scene style, and then adjusting the scene style of the target scene on the basis of reducing the repetitive workload.
[0110] In the above, the process of obtaining the associated model in step 101 is described by taking the associated models as multiple line models, multiple color matching region models, and multiple pattern models as examples. It is understandable that the associated model may also be at least two of the above-mentioned line models, color matching region models, pattern models, and other sub-basic models for adjusting style changes, and the number of line models, color matching region models, pattern models, and other sub-basic models for adjusting style changes may be one or more than two. For example, Figure 2As shown, taking the association model including at least one line model, at least one color matching area model and at least one pattern model as an example, the process of obtaining the association model in step 101 is explained. At this time, step 101 can specifically include the following steps 1011D to 1014D.
[0111] ④ The associated model includes at least one line model, at least one color matching area model and at least one pattern model. At this time, step 101 may specifically include the following steps 1011D to 1014D:
[0112] 1011D. Obtain at least one line model of the target scene.
[0113] Step 1011D is implemented similarly to the above step 1011A. For details, please refer to the relevant instructions of the above step 1011A, which will not be repeated here.
[0114] 1012D. Obtain at least one color matching area model of the target scene.
[0115] Step 1012D is implemented similarly to the above step 1011B. For details, please refer to the relevant instructions of the above step 1011B, which will not be repeated here.
[0116] 1013D. Obtain at least one pattern model of the target scene.
[0117] Step 1013D is implemented similarly to the above step 1011C. For details, please refer to the relevant instructions of the above step 1011C, which will not be repeated here.
[0118] 1014D. Merge the at least one line model, the at least one color matching region model and the at least one pattern model through a preset merging control node to obtain the association model.
[0119] Step 1014D is implemented similarly to the above step 1012A. For details, please refer to the relevant instructions of the above step 1012A, which will not be repeated here.
[0120] like Figure 2 As shown, for example, taking the target scene as a basketball court floor, the basketball court floor is composed of a line model (such as Figure 2 Sub-model 1), color matching area model (such as Figure 2 The sub-model in the dashed box 2), pattern model (such as Figure 2The line model (sub-model 1), color matching area model (sub-model 2), and pattern model (sub-model 3) used to build the basketball court floor are all sub-basic models. Through the preset merging control node, the line model (sub-model 1), color matching area model (sub-model 2), and pattern model (sub-model 3) are merged to obtain the associated model of the basketball court floor.
[0121] It can be seen that through steps 1011D to 1014D, an association model can be built to select line models, color area models, and pattern models, thereby building an association model that can adjust the scene style, and then adjusting the scene style of the target scene on the basis of reducing repetitive work.
[0122] (2) Read directly from a preset database. Before step 101, the association model of each type of scene is pre-built by the method of building the association model in real time in the above (1) and stored in the preset database. In step 101, the association model associated with the target scene is directly queried and read from the preset database.
[0123] 102. Obtain target style control parameters of the target scene.
[0124] The target style control parameters are parameters used to control the scene style of the associated model, and can be control parameters of the sub-base model, such as the target visibility parameters, model color parameters, material parameters, resource parameters, position parameters, etc. of the sub-base model.
[0125] In step 102, there are multiple ways to obtain the target style control parameters, illustratively including:
[0126] 1. When adjusting the control parameters of the sub-base model in modeling software such as Houdini.
[0127] Among them, there are many nodes that can adjust the model performance in modeling software such as Houdini, such as Switch node and Color node. The following takes the adjustment of the control parameters of the sub-base model based on the Switch node and Color node in Houdini in step 103 as an example to illustrate the process of obtaining the target style control parameters of the target scene in step 102.
[0128] 1. In step 103, the control parameters of the sub-base model are adjusted based on the Switch node in Houdini.
[0129] At this time, the target style control parameters are specifically the target hidden and visible parameters of the sub-base model. For easy understanding, you can continue to refer to Figure 4, the target hidden and visible parameters refer to the control parameters of each Switch node in the merge control node preset by the associated model. The target hidden and visible parameters (i.e., target style control parameters) are used to select the sub-basic models of each style.
[0130] Exemplarily, obtaining the target style control parameters in step 102 is to obtain the target visibility parameters. The input and output control parameters of each Switch node in the merged control node preset by the manually input and associated model can be obtained based on Houdini to obtain the target visibility parameters of the sub-basic model for selecting each style.
[0131] 2. In step 103, adjust the control parameters of the sub-base model based on the Color node in Houdini.
[0132] At this time, the target style control parameter is specifically the model color parameter of the sub-base model. The model color parameter refers to the control parameter of the Color node of each sub-base model in the associated model. The model color parameter (ie, the target style control parameter) is used to assign color to the sub-base model.
[0133] Exemplarily, obtaining the target style control parameters in step 102 is to obtain the model color parameters. The control parameters of the Color nodes of each sub-base model in the associated model that are manually input can be obtained based on Houdini as the model color parameters for assigning color to the sub-base model.
[0134] 2. When adjusting the control parameters of the sub-base model in Unreal Engines such as UE4.
[0135] Among them, there are many exposed nodes in modeling software such as Houdini. The exposed nodes allow the model performance to be adjusted after the model is imported into Unreal Engines such as UE4; for example, the Objectmerge node and Transform node in Houdini.
[0136] There are also many nodes or parameters in Unreal Engines such as UE4 that can adjust the performance of the model, such as the Vertexcolor node and UseColor parameter in UE4.
[0137] The following uses the Objectmerge node and Transform node exposed in Houdini in step 103 and the Vertexcolor node and UseColor parameter in UE4 to adjust the control parameters of the sub-base model as examples to illustrate the process of obtaining the target style control parameters of the target scene in step 102.
[0138] 1. In step 103, the control parameters of the sub-base model are adjusted based on the Vertexcolor node and UseColor parameters in UE4.
[0139] At this time, the target style control parameter is specifically the material parameter of the color matching area corresponding to the sub-base model. The material parameter (i.e., the target style control parameter) is used to assign a material to the color matching area corresponding to the sub-base model. Obtaining the target style control parameter in step 102 is to obtain the material parameter, and step 102 specifically includes the following steps 1021 to 1022:
[0140] 1021. Extract color matching areas corresponding to each sub-basic model in the association model.
[0141] Exemplarily, in step 1021, the vertex color information of each sub-base model in the associated model can be extracted in UE4 through the Vertexcolor node in combination with the lerp function, thereby obtaining the color matching area corresponding to each sub-base model. Among them, the parameter value of the Vertexcolor node represents the vertex color, specifically the color information stored in the model vertex; in UE4, the sub-base model vertex color can be obtained through the Vertexcolor node. The lerp function is used to return a mixed value between the A and B inputs based on the alpha input; when the alpha value is 0, 100% of the value of A will be returned; when the alpha value is 1, 100% of the value of B will be returned.
[0142] For example, for each sub-basic model in the associated model, the parameter values of the Vertexcolor node in the three channels of R red, G green, and B yellow are extracted respectively; and the lerp function is used to obtain the ranges of the three areas of (255,0,0), (0,255,0), and (0,0,255). Then, the corresponding color areas of each sub-basic model in the associated model are (255,0,0), (0,255,0), and (0,0,255).
[0143] 1022. Obtain material parameters of the color matching area.
[0144] Exemplarily, in step 1022, the material parameters (such as color parameters and texture parameters of the material ball) of the color matching areas corresponding to each sub-base model in the associated model that are manually input can be obtained based on UE4 to obtain the material parameters used to assign materials to the color matching areas corresponding to the sub-base models.
[0145] Among them, the material parameters can specifically be the color parameters of the material ball or the mapping parameters. However, generally speaking, the color parameters and mapping parameters of the material ball cannot be assigned at the same time. Furthermore, in order to allow the sub-base model to be assigned the color parameters of the material ball while also assigning the mapping parameters, this can be achieved by controlling the UseColor parameter. UseColor is a float parameter of the violent material in UE4. When UseColor=1 is set, the color parameters of the material ball can be input; when UseColor=0 is set, the mapping parameters can be input. Exemplarily, at this time, in step 1022, the method of obtaining the material parameters can specifically include:
[0146] ① When UseColor=1, the color parameters of the color matching areas corresponding to each sub-base model in the associated model are obtained based on UE4, so as to obtain the material parameters used to assign materials to the color matching areas corresponding to the sub-base models. That is, step 1022 may specifically include: when the material exposure parameter is 1, obtaining the material color parameters of the color matching area. Here, the material exposure parameter specifically refers to the value of UseColor.
[0147] ②When UseColor=0, the texture parameters of the color matching area corresponding to each sub-base model in the associated model are obtained based on UE4, so as to obtain the material parameters used to assign the material to the color matching area corresponding to the sub-base model. That is, step 1022 may specifically include: when the material exposure parameter is 0, the material texture parameters of the color matching area are obtained. Here, the material exposure parameter specifically refers to the value of UseColor.
[0148] 2. In step 103, the control parameters of the sub-base model are adjusted based on the Objectmerge node and Transform node exposed in Houdini.
[0149] At this time, the target style control parameters are specifically the position parameters and resource parameters of the sub-base model. The position parameters are used to adjust the position of the sub-base model. The resource parameters are used to adjust the pattern and other resources of the sub-base model.
[0150] Specifically, the sub-base model is an Objectmerge node placed at a certain position in the associated model. In UE4, any UE4 resource can be assigned to this exposed Objectmerge node to adjust the pattern. At this time, the UE4 resource assigned by the Objectmerge node is the resource parameter of the sub-base model. Furthermore, in Houdini, a Transform node can be connected under the Objectmerge node and the Transform node can be exposed so that the translate parameter of the Transform node can be adjusted in UE4 to achieve rotation, scaling, translation and other operations, thereby achieving rotation, scaling, translation and other adjustments of the pattern. At this time, the translate parameter of the Transform node is the position parameter of the sub-base model.
[0151] Exemplarily, in step 102, obtaining the target style control parameters is to obtain the position parameters and resource parameters, and the UE4 resources manually input and assigned to the Objectmerge nodes of each sub-base model in the associated model can be obtained based on UE4 as the resource parameters of the sub-base model. The Transform parameters manually input and assigned to the Transform nodes of each sub-base model in the associated model are obtained based on UE4 as the position parameters of the sub-base model.
[0152] 103. Based on the style control node, adjust the control parameters of the sub-basic model according to the target style control parameters to obtain a target style model of the target scene.
[0153] The control parameters of the sub-base model are used to control the display of the scene style corresponding to the sub-base model.
[0154] Corresponding to the target style control parameters obtained in step 102, there are also multiple ways to adjust the control parameters of the sub-basic model in step 103, illustratively including:
[0155] (1) When adjusting the control parameters of the sub-base model in modeling software such as Houdini.
[0156] The following takes the adjustment of the control parameters of the sub-base model based on the Switch node and the Color node in Houdini in step 103 as an example to illustrate the process of adjusting the control parameters of the sub-base model in step 103.
[0157] 1) In step 103, the control parameters of the sub-base model are adjusted based on the Switch node in Houdini.
[0158] That is, the target style control parameter is specifically the target visibility parameter of the sub-base model. Adjusting the control parameter of the sub-base model is equivalent to adjusting the target visibility parameter of the sub-base model to the target visibility parameter of the sub-base model obtained in step 102. In step 103, the target visibility parameter of the sub-base model is adjusted based on the Switch node in Houdini.
[0159] For example, when the sub-base model is a line model, the sub-base model includes the target line model of the target scene, the style control node includes the first display control node of the target line model, and the target style control parameter includes the first hidden and visible parameter of the target line model. In this case, step 103 specifically includes the following step 1031A:
[0160] 1031A. Based on the first display control node, adjust the control parameters of the target line model according to the first visibility parameter to obtain the target style model.
[0161] In step 1031A, the first display control node specifically refers to a Switch node set for the target line model in Houdini.
[0162] The first implicit and explicit parameters specifically refer to the input and output control parameters of the Switch node set for the target line model obtained in step 102 .
[0163] Exemplarily, through the first display control node, the target hidden and visible parameters of the target line model are adjusted to the first hidden and visible parameters obtained in step 102, and the target style model is obtained, so that the line model of the required style can be selected from each line model of the associated model to form the target style model of the target scene. In this way, the scene style of the target scene on the line is adjusted on the basis of reducing the repeated workload.
[0164] For another example, when the sub-basic model is a color matching region model, the sub-basic model includes a target color matching region model of the target scene, the style control node includes a second display control node of the target color matching region model, and the target style control parameter includes a second hidden and visible parameter of the target color matching region model. In this case, step 103 specifically includes the following step 1031B:
[0165] 1031B. Based on the second display control node, adjust the control parameters of the target color matching area model according to the second visibility parameter to obtain the target style model.
[0166] In step 1031B, the second display control node specifically refers to a Switch node set for the target color matching area model in Houdini.
[0167] The second hidden and visible parameters specifically refer to the input and output control parameters of the Switch node set for the target color matching area model obtained in step 102 .
[0168] Exemplarily, through the second display control node, the target hidden and visible parameters of the target color matching region model are adjusted to the second hidden and visible parameters obtained in step 102, and the target style model is obtained, so that the color matching region model of the required style can be selected from each color matching region model of the associated model to form the target style model of the target scene. In this way, the scene style of the target scene in regional color matching is adjusted on the basis of reducing repeated work.
[0169] 2) In step 103, the control parameters of the sub-base model are adjusted based on the Color node in Houdini.
[0170] That is, the target style control parameter is specifically the model color parameter of the sub-base model. Adjusting the control parameter of the sub-base model is equivalent to adjusting the model color parameter of the sub-base model to the model color parameter of the sub-base model obtained in step 102. In step 103, the model color parameter of the sub-base model is adjusted based on the Switch node in Houdini.
[0171] For example, when the sub-base model is a line model, the sub-base model includes a target line model of the target scene, the style control node includes a first display control node of the target line model, and the target style control parameter includes a first model color parameter of the target line model. In this case, step 103 specifically includes the following step 1031C:
[0172] 1031C. Based on the first display control node, adjust the control parameters of the target line model according to the first model color parameters to obtain the target style model.
[0173] In step 1031C, the first display control node specifically refers to the Color node set for the target line model in Houdini.
[0174] The first model color parameter specifically refers to the color parameter of the Color node acquired in step 102 and set for the target line model.
[0175] Exemplarily, through the first display control node, the model color parameter of the target line model is adjusted to the first model color parameter obtained in step 102, and the target style model is obtained, so that the color of each line model of the associated model can be adjusted to a line model of a desired style, forming a target style model of the target scene. Thus, the scene style of the target scene in line color is adjusted on the basis of reducing repeated work.
[0176] For another example, when the sub-base model is a color matching region model, the sub-base model includes a target color matching region model of the target scene, the style control node includes a second display control node of the target color matching region model, and the target style control parameter includes a second model color parameter of the target color matching region model. In this case, step 103 specifically includes the following step 1031D:
[0177] 1031D. Based on the second display control node, adjust the control parameters of the target color matching area model according to the second model color parameters to obtain the target style model.
[0178] In step 1031D, the second display control node specifically refers to the Color node set for the target color matching area model in Houdini.
[0179] The second model color parameter specifically refers to the color parameter of the Color node obtained in step 102 and set for the target color matching area model.
[0180] Through the second display control node, the model color parameters of the target color matching region model are adjusted to the second model color parameters obtained in step 102, and the target style model is obtained, so that the colors of each color matching region model of the associated model can be adjusted to the color matching region model of the required style, forming the target style model of the target scene. In this way, the scene style of the target scene in terms of regional color is adjusted on the basis of reducing repeated work.
[0181] The above takes the adjustment of the target visibility parameters and model color parameters of the sub-basic model as an example to illustrate the process of adjusting the control parameters of the sub-basic model in step 103. It can be understood that it is also possible to adjust the first visibility parameter of the target line model, the second visibility parameter of the target color matching area model, the first model color parameter of the target line model, the second model color parameter of the target color matching area model, and at least two of the target visibility parameters and model color parameters of other sub-basic models used to adjust the style change at the same time. For example, the style control node includes the target display control node of the sub-basic model, and the target style control parameters include the target visibility parameters and model color parameters of the sub-basic model. Step 103 may specifically include: based on the target display control node, adjusting the control parameters of the sub-basic model according to the target visibility parameters and the model color parameters to obtain the target style model.
[0182] (ii) When adjusting the control parameters of the sub-base model in Unreal Engines such as UE4.
[0183] The following describes the process of adjusting the control parameters of the sub-base model in step 103 by taking the Objectmerge node and Transform node exposed in Houdini and the Vertexcolor node and UseColor parameter in UE4 as examples.
[0184] 1) In step 103, the control parameters of the sub-base model are adjusted based on the Vertexcolor node and UseColor parameters in UE4.
[0185] That is, the target style control parameters are specifically the material parameters of the color area corresponding to the sub-base model. Adjusting the control parameters of the sub-base model is equivalent to adjusting the material parameters of the color area corresponding to the sub-base model to the material parameters of the color area corresponding to the sub-base model obtained in step 102. In step 103, the material parameters of the sub-base model are adjusted based on the Vertexcolor node and UseColor parameters in UE4. At this time, the style control node includes the material control node of the sub-base model, and the target style control parameters include the material parameters of the color area corresponding to the sub-base model. Step 103 specifically includes the following step 1031E: 1031E, based on the material control node, adjust the control parameters of the color area according to the material parameters to obtain the target style model.
[0186] In step 1031E, the material control node specifically refers to the Vertexcolor node set for the sub-base model.
[0187] For example, when the material exposure parameter UseColor is 1, that is, the target style control parameter obtained in step 102 is specifically a material color parameter, step 1031E may specifically include: based on the material control node, adjusting the control parameter of the color matching area according to the material color parameter to obtain the target style model. The material color parameter specifically refers to the material parameter of the color matching area corresponding to the sub-base model obtained in step 102.
[0188] Exemplarily, through the material control node, the material parameters of the color matching area corresponding to the sub-base model are adjusted to the material color parameters obtained in step 102, and the target style model is obtained, so that the materials of each sub-base model of the associated model can be adjusted to the materials of the required style, forming the target style model of the target scene. In this way, the scene style of the target scene on the material is adjusted on the basis of reducing the amount of repeated work.
[0189] For another example, when the material exposure parameter UseColor parameter is 0, that is, when the target style control parameter obtained in step 102 is specifically a material mapping parameter, step 1031E may specifically include: based on the material control node, adjusting the control parameter of the color matching area according to the material mapping parameter to obtain the target style model. The material mapping parameter specifically refers to the material parameter of the color matching area corresponding to the sub-base model obtained in step 102. The material mapping parameter is specifically a map used to map to the color matching area corresponding to the sub-base model and to control the appearance of the color matching area corresponding to the sub-base model.
[0190] Exemplarily, through the material control node, the material parameters of the color matching area corresponding to the sub-base model are adjusted to the material mapping parameters obtained in step 102, and the target style model is obtained, so that the material of each sub-base model of the associated model can be adjusted to the material of the required style to form the target style model of the target scene. In this way, the scene style of the target scene on the material is adjusted on the basis of reducing the amount of repeated work.
[0191] Among them, when the material mapping parameters are used to adjust the material parameters of the color matching area corresponding to the sub-base model, the mapping method will be used. The following example introduces the process of adjusting the material parameters of the color matching area corresponding to the sub-base model by mapping: UV unfold the color matching area corresponding to the sub-base model to obtain the UV unfolding result; map the material mapping parameters to the corresponding position according to the UV unfolding result, and obtain the color matching area corresponding to the sub-base model after mapping, thereby completing the mapping.
[0192] Among them, UV is the abbreviation of U, V texture mapping coordinates, which can also be called texture mapping coordinates, which can define the position of each point in a two-dimensional image. In the model, UV can accurately correspond each point on the image (i.e., the map) to the surface of the model, so that the model can present the corresponding visual effect; UV unfolding refers to converting the model surface into a plane representation.
[0193] The specific settings of the material parameters can refer to the relevant instructions in the above step 102. To simplify the description, they will not be repeated here.
[0194] 2) In step 103, the control parameters of the sub-base model are adjusted based on the Objectmerge node and Transform node exposed in Houdini.
[0195] That is, the target style control parameters are specifically the position parameters and resource parameters of the sub-base model. Adjusting the control parameters of the sub-base model is equivalent to adjusting the position parameters and resource parameters of the sub-base model to the position parameters and resource parameters of the sub-base model obtained in step 102. In step 103, the resource parameters and position parameters of the sub-base model are adjusted based on the Objectmerge node and the Transform node exposed in Houdini.
[0196] At this time, the sub-basic model includes the target pattern model of the target scene, the style control node includes the pattern control node of the target pattern model, and the target style control parameter includes the parameter of the pattern control node of the target pattern model. Step 103 may specifically include the following step 1031F:
[0197] 1031F. Based on the pattern control node, adjust the control parameters of the pattern model according to the position parameters and the resource parameters to obtain the target style model.
[0198] In step 1031F, the pattern control node specifically refers to the Objectmerge node and the Transform node set for the pattern model in Houdini.
[0199] The position parameters specifically refer to the parameters of the Transform node set for the pattern model.
[0200] The resource parameters specifically refer to the parameters of the Objectmerge node set for the pattern model.
[0201] The specific settings of the location parameters and resource parameters can refer to the relevant instructions in the above step 102. To simplify the description, they will not be repeated here.
[0202] Through the pattern control node, the position parameters and resource parameters of the pattern model are adjusted to the position parameters and resource parameters obtained in step 102, and the target style model is obtained, so that the pattern model of the desired style can be selected and operated (such as rotation, scaling, translation, etc.) from each pattern model of the associated model to form the target style model of the target scene. In this way, the scene style of the target scene on the pattern is adjusted on the basis of reducing the amount of repeated work.
[0203] It can be seen that since the associated model of the target scene includes at least one sub-base model that carries a style control node, the display of the scene style corresponding to the sub-base model can be controlled by obtaining the target style control parameters of the target scene and adjusting the control parameters of the sub-base model, thereby adjusting the scene style of the associated model corresponding to the target scene and obtaining the target style model of the target scene; therefore, the same modeled material can be reused at the same points between different scene styles, avoiding the problem of a large amount of repetitive work caused by building a scene model for a scene style and importing it into the game engine, avoiding the repetitive workload in scene model production to a certain extent and improving the production efficiency of scene models.
[0204] In order to better implement the above method, an embodiment of the present invention further provides a scene model generation device, which can be specifically integrated into an electronic device, such as a computer device, which can be a terminal, server or other device.
[0205] Among them, the terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop computer, a personal computer and other devices; the server can be a single server or a server cluster composed of multiple servers.
[0206] For example, in this embodiment, the method of the embodiment of the present invention is described in detail by taking the scene model generation device being specifically integrated into a smart phone as an example.
[0207] For example, Figure 7 As shown, the scene model generating device may include:
[0208] A first acquisition unit 701 is used to acquire an associated model of a target scene, where the associated model includes at least one sub-basic model of the target scene, and the sub-basic model carries a style control node;
[0209] A second acquisition unit 702 is used to acquire a target style control parameter of the target scene;
[0210] The adjustment unit 703 is used to adjust the control parameters of the sub-basic model according to the target style control parameters based on the style control node to obtain the target style model of the target scene, and the control parameters of the sub-basic model are used to control the display of the scene style corresponding to the sub-basic model.
[0211] In some embodiments, the sub-basic model includes at least one of a line model, a color matching region model, and a pattern model, and the first acquisition unit 701 is specifically used to:
[0212] Acquire at least one line model of the target scene;
[0213] Acquire at least one color matching area model of the target scene;
[0214] Acquire at least one pattern model of the target scene;
[0215] The at least one line model, the at least one color matching area model and the at least one pattern model are merged through a preset merging control node to obtain the association model.
[0216] In some embodiments, the style control node includes a target display control node of the sub-base model, the target style control parameter includes at least one of a target hidden and visible parameter and a model color parameter of the sub-base model, and the adjustment unit 703 is specifically used to:
[0217] Based on the target display control node, the control parameters of the sub-basic model are adjusted according to at least one of the target visibility parameter and the model color parameter to obtain the target style model.
[0218] In some embodiments, the sub-basic model includes a target line model of the target scene, the target display control node includes a first display control node of the target line model, the target hidden and visible parameter includes a first hidden and visible parameter of the target line model, and the adjustment unit 703 is specifically used to:
[0219] Based on the first display control node, control parameters of the target line model are adjusted according to the first visibility parameter to obtain the target style model.
[0220] In some embodiments, the model color parameter further includes a first model color parameter of the target line model, and the adjustment unit 703 is specifically configured to:
[0221] Based on the first display control node, control parameters of the target line model are adjusted according to the first model color parameters to obtain the target style model.
[0222] In some embodiments, the sub-basic model includes a target color matching area model of the target scene, the target display control node includes a second display control node of the target color matching area model, the target hidden and visible parameters include a second hidden and visible parameter of the target color matching area model, and the adjustment unit 703 is specifically used to:
[0223] Based on the second display control node, the control parameters of the target color matching area model are adjusted according to the second visibility parameter to obtain the target style model.
[0224] In some embodiments, the target style control parameter further includes a second model color parameter of the target color matching region model, and the adjustment unit 703 is specifically used to:
[0225] Based on the second display control node, control parameters of the target color matching area model are adjusted according to the second model color parameters to obtain the target style model.
[0226] In some embodiments, the style control node includes a material control node of the sub-base model, the target style control parameter includes a material parameter of a color matching area corresponding to the sub-base model, and the second acquisition unit 702 is specifically used to:
[0227] Based on the lerp function, extract the color matching area corresponding to each sub-basic model in the association model;
[0228] Obtaining material parameters of the color matching area;
[0229] In some embodiments, the adjusting unit 703 is specifically used to:
[0230] Based on the material control node, the control parameters of the color matching area are adjusted according to the material parameters to obtain the target style model.
[0231] In some embodiments, the second acquiring unit 702 is specifically configured to:
[0232] Obtain a target material ball for adjusting the target style model;
[0233] Based on the target material ball, obtaining material color parameters of the color matching area;
[0234] In some embodiments, the adjusting unit 703 is specifically used to:
[0235] Based on the material control node, the control parameters of the color matching area are adjusted according to the material color parameters to obtain the target style model.
[0236] In some embodiments, the second acquiring unit 702 is specifically configured to:
[0237] Obtain material mapping parameters of the color matching area;
[0238] In some embodiments, the adjusting unit 703 is specifically used to:
[0239] Based on the material control node, the control parameters of the color matching area are adjusted according to the material mapping parameters to obtain the target style model.
[0240] In some embodiments, the second acquiring unit 702 is specifically configured to:
[0241] When the material exposure parameter is 0, obtaining the material mapping parameter of the color matching area;
[0242] When the material exposure parameter is 1, the material color parameter of the color matching area is obtained.
[0243] In some embodiments, the sub-base model includes a target pattern model of the target scene, the style control node includes a pattern control node of the target pattern model, the target style control parameter includes a position parameter and a resource parameter of the target pattern model, and the adjustment unit 703 is specifically used to:
[0244] Based on the pattern control node, control parameters of the pattern model are adjusted according to the position parameters and the resource parameters to obtain the target style model.
[0245] As can be seen from the above, the scene model generation device of this embodiment can obtain the associated model of the target scene by the first acquisition unit 701, the associated model includes at least one sub-base model of the target scene, and the sub-base model carries a style control node; the target style control parameter of the target scene is obtained by the second acquisition unit 702; the adjustment unit 703 adjusts the control parameter of the sub-base model according to the target style control parameter based on the style control node to obtain the target style model of the target scene, and the control parameter of the sub-base model is used to control the display of the scene style corresponding to the sub-base model. Therefore, since the associated model of the target scene in the embodiment of the present invention includes at least one sub-base model that can carry a style control node, the control parameter of the sub-base model can be adjusted by obtaining the target style control parameter of the target scene to control the display of the scene style corresponding to the sub-base model, thereby adjusting the scene style of the associated model corresponding to the target scene to obtain the target style model of the target scene; therefore, the same modeled material can be reused to the same point between different scene styles, avoiding the problem of a large amount of repeated work caused by building a scene model for a scene style and importing it into the game engine, and to a certain extent avoiding the repeated workload when making scene models, and improving the production efficiency of scene models.
[0246] Accordingly, the embodiment of the present application also provides an electronic device, which may be a terminal, and the terminal may be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA) and other terminal devices. Figure 8 As shown, Figure 8A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 800 includes a processor 801 having one or more processing cores, a memory 802 having one or more computer-readable storage media, and a computer program stored in the memory 802 and executable on the processor. The processor 801 is electrically connected to the memory 802. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.
[0247] The processor 801 is the control center of the electronic device 800. It uses various interfaces and lines to connect various parts of the entire electronic device 800, executes various functions of the electronic device 800 and processes data by running or loading software programs and / or modules stored in the memory 802, and calling data stored in the memory 802, thereby monitoring the electronic device 800 as a whole.
[0248] In the embodiment of the present application, the processor 801 in the electronic device 800 will load instructions corresponding to the processes of one or more application programs into the memory 802 according to the following steps, and the processor 801 will run the application programs stored in the memory 802 to implement various functions:
[0249] Acquire an associated model of a target scene, wherein the associated model includes at least one sub-base model of the target scene, and the sub-base model carries a style control node;
[0250] Obtaining target style control parameters of the target scene;
[0251] Based on the style control node, the control parameters of the sub-base model are adjusted according to the target style control parameters to obtain the target style model of the target scene, and the control parameters of the sub-base model are used to control the display of the scene style corresponding to the sub-base model.
[0252] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0253] Optional, such as Figure 8 As shown, the electronic device 800 further includes: a touch screen 803, a radio frequency circuit 804, an audio circuit 805, an input unit 806, and a power supply 807. The processor 801 is electrically connected to the touch screen 803, the radio frequency circuit 804, the audio circuit 805, the input unit 806, and the power supply 807, respectively. Those skilled in the art can understand that Figure 8The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0254] The touch display screen 803 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 803 may include a display panel and a touch panel. Among them, the display panel may be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces may be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel may be used to collect the user's touch operation on or near it (such as the user using any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 801, and can receive the command sent by the processor 801 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 801 to determine the type of touch event, and then the processor 801 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 803 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 803 can also be used as a part of the input unit 806 to realize the input function.
[0255] The radio frequency circuit 804 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to send and receive signals with the network device or other electronic devices.
[0256] The audio circuit 805 can be used to provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 805 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 805 and converted into audio data, and then the audio data is output to the processor 801 for processing, and then sent to another electronic device through the radio frequency circuit 804, or the audio data is output to the memory 802 for further processing. The audio circuit 805 may also include an earplug jack to provide communication between an external headset and an electronic device.
[0257] The input unit 806 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0258] The power supply 807 is used to supply power to various components of the electronic device 800. Optionally, the power supply 807 can be logically connected to the processor 801 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 807 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0259] although Figure 8 Not shown, the electronic device 800 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.
[0260] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0261] As can be seen from the above, since the associated model of the target scene includes at least one sub-base model that can carry a style control node, the electronic device provided in this embodiment can control the display of the scene style corresponding to the sub-base model by obtaining the target style control parameters of the target scene to adjust the control parameters of the sub-base model, thereby adjusting the scene style of the associated model corresponding to the target scene and obtaining the target style model of the target scene; therefore, the same modeled material can be reused to the same points between different scene styles, avoiding the problem of a large amount of repeated work caused by building a scene model for one scene style and importing it into the game engine. The electronic device provided in this embodiment avoids the repeated workload when making scene models to a certain extent, and improves the production efficiency of scene models.
[0262] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0263] To this end, an embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored, and the computer program can be loaded by a processor to execute the steps in any scene model generation method provided in the embodiment of the present application. For example, the computer program can execute the following steps:
[0264] Acquire an associated model of a target scene, wherein the associated model includes at least one sub-base model of the target scene, and the sub-base model carries a style control node;
[0265] Obtaining target style control parameters of the target scene;
[0266] Based on the style control node, the control parameters of the sub-base model are adjusted according to the target style control parameters to obtain the target style model of the target scene, and the control parameters of the sub-base model are used to control the display of the scene style corresponding to the sub-base model.
[0267] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0268] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0269] Since the computer program stored in the computer-readable storage medium can execute the steps in any scene model generation method provided in the embodiments of the present application, the beneficial effects that can be achieved by any scene model generation method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0270] The above is a detailed introduction to a scene model generation method, device, electronic device and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A scene model generation method, It is characterized in that include: Acquire at least one sub-base model of the target scene, the sub-base model comprising at least one of a line model, a color matching region model, and a pattern model, and the sub-base model carries a style control node; Merging the at least one sub-basic model through a preset merging control node to obtain a correlation model of the target scene; Obtaining target style control parameters of the target scene; Based on the style control node, the control parameters of the sub-base model are adjusted according to the target style control parameters to obtain the target style model of the target scene, and the control parameters of the sub-base model are used to control the display of the scene style corresponding to the sub-base model.
2. The scene model generation method according to claim 1, It is characterized in that The sub-basic models include a line model, a color matching region model and a pattern model, and the step of acquiring at least one sub-basic model of the target scene and merging the at least one sub-basic model through a preset merging control node to obtain an associated model of the target scene includes: Acquire at least one line model of the target scene; Acquire at least one color matching area model of the target scene; Acquire at least one pattern model of the target scene; The at least one line model, the at least one color matching area model and the at least one pattern model are merged through a preset merging control node to obtain a correlation model of the target scene.
3. The scene model generation method according to claim 1, It is characterized in that The style control node includes a target display control node of the sub-base model, and the target style control parameter includes at least one of a target hidden and visible parameter and a model color parameter of the sub-base model; The step of adjusting the control parameters of the sub-basic model according to the target style control parameters based on the style control node to obtain the target style model of the target scene includes: Based on the target display control node, the control parameters of the sub-basic model are adjusted according to at least one of the target visibility parameter and the model color parameter to obtain the target style model.
4. The scene model generation method according to claim 3, It is characterized in that The sub-basic model includes a target line model of the target scene, the target display control node includes a first display control node of the target line model, and the target hidden and visible parameters include a first hidden and visible parameter of the target line model; The step of adjusting the control parameters of the sub-basic model based on the target display control node according to at least one of the target visibility parameter and the model color parameter to obtain the target style model includes: Based on the first display control node, control parameters of the target line model are adjusted according to the first visibility parameter to obtain the target style model.
5. The scene model generation method according to claim 4, It is characterized in that The model color parameters also include first model color parameters of the target line model; The step of adjusting the control parameters of the sub-basic model based on the target display control node according to at least one of the target visibility parameter and the model color parameter to obtain the target style model includes: Based on the first display control node, control parameters of the target line model are adjusted according to the first model color parameters to obtain the target style model.
6. The scene model generation method according to claim 3, It is characterized in that The sub-basic model includes a target color matching region model of the target scene, the target display control node includes a second display control node of the target color matching region model, and the target hidden and visible parameters include a second hidden and visible parameter of the target color matching region model; The step of adjusting the control parameters of the sub-basic model based on the target display control node according to at least one of the target visibility parameter and the model color parameter to obtain the target style model includes: Based on the second display control node, the control parameters of the target color matching area model are adjusted according to the second visibility parameter to obtain the target style model.
7. The scene model generation method according to claim 6, It is characterized in that The target style control parameter also includes a second model color parameter of the target color matching area model; The step of adjusting the control parameters of the sub-basic model based on the target display control node according to at least one of the target visibility parameter and the model color parameter to obtain the target style model includes: Based on the second display control node, control parameters of the target color matching area model are adjusted according to the second model color parameters to obtain the target style model.
8. The scene model generation method according to claim 1, It is characterized in that The style control node includes a material control node of the sub-basic model, and the target style control parameter includes a material parameter of a color matching area corresponding to the sub-basic model; The step of obtaining the target style control parameter of the target scene includes: Extracting the color matching area corresponding to each sub-basic model in the association model; Obtaining material parameters of the color matching area; The step of adjusting the control parameters of the sub-basic model according to the target style control parameters based on the style control node to obtain the target style model of the target scene includes: Based on the material control node, the control parameters of the color matching area are adjusted according to the material parameters to obtain the target style model.
9. The scene model generation method according to claim 8, It is characterized in that The obtaining of material parameters of the color matching area includes: Obtain a target material ball for adjusting the target style model; Based on the target material ball, obtaining material color parameters of the color matching area; The step of adjusting the control parameters of the color matching area according to the material parameters based on the material control node to obtain the target style model includes: Based on the material control node, the control parameters of the color matching area are adjusted according to the material color parameters to obtain the target style model.
10. The scene model generation method according to claim 8, It is characterized in that The obtaining of material parameters of the color matching area includes: Obtain material mapping parameters of the color matching area; The step of adjusting the control parameters of the color matching area according to the material parameters based on the material control node to obtain the target style model includes: Based on the material control node, the control parameters of the color matching area are adjusted according to the material mapping parameters to obtain the target style model.
11. The scene model generation method according to claim 8, It is characterized in that The material control node includes material exposure parameters, and the step of obtaining the material parameters of the color matching area includes: When the material exposure parameter is 0, obtaining the material mapping parameter of the color matching area; When the material exposure parameter is 1, the material color parameter of the color matching area is obtained.
12. The scene model generation method according to any one of claims 1 to 11, It is characterized in that The sub-basic model includes a target pattern model of the target scene, the style control node includes a pattern control node of the target pattern model, and the target style control parameter includes a position parameter and a resource parameter of the target pattern model; The step of adjusting the control parameters of the sub-basic model according to the target style control parameters based on the style control node to obtain the target style model of the target scene includes: Based on the pattern control node, control parameters of the pattern model are adjusted according to the position parameters and the resource parameters to obtain the target style model.
13. A scene model generating device, It is characterized in that include: A first acquisition unit is used to acquire at least one sub-basic model of a target scene, wherein the sub-basic model includes at least one of a line model, a color matching region model, and a pattern model, and the sub-basic model carries a style control node; and merge the at least one sub-basic model through a preset merging control node to obtain an associated model of the target scene; A second acquisition unit, configured to acquire a target style control parameter of the target scene; An adjustment unit is used to adjust the control parameters of the sub-basic model according to the target style control parameters based on the style control node to obtain the target style model of the target scene, and the control parameters of the sub-basic model are used to control the display of the scene style corresponding to the sub-basic model.
14. An electronic device, It is characterized in that It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps in the scene model generation method according to any one of claims 1 to 12.
15. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the scene model generation method according to any one of claims 1 to 12.
