3D scene model generation method and device, electronic equipment and storage medium
By obtaining the scene setting parameters and 3D virtual object collections for user interaction, using the scene layout model and scene analysis model for dynamic rendering to generate 3D scene models, solving the problem of low efficiency and accuracy of traditional 3D modeling methods and realizing automation Modeling and personalizing requirements.
Patent Information
- Application Number
- CN202411496918.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-07
AI Technical Summary
The traditional 3D modeling method has a steep learning curve and is difficult to adapt to user needs. The generated 3D scene models are efficient and accurate, and it is impossible to achieve vivid, vivid and immersive experience effects.
A 3D scene model generation method is proposed. By obtaining the scene setting parameters and 3D virtual object collections for user interaction, using the scene layout model and scene analysis model, determining the 3D scene layout and material properties, and dynamic rendering is performed to generate the 3D scene model.
3D automatic modeling is realized, which significantly reduces the difficulty of 3D modeling and development, simplifies the process, improves generation efficiency and accuracy, and meets users' personalized needs.
Smart Images

Figure CN119399373A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer graphics, and in particular to a 3D scene model generation method, device, electronic device and storage medium. Background Art
[0002] With the rise of the concept of the metaverse, the demand for complex 3D content is growing, but the learning curve of traditional 3D modeling methods is steep, which limits the participation of non-professionals and makes development difficult. At the same time, traditional 3D modeling methods cannot adapt to user needs and generate 3D scene models that meet the needs. It is difficult to achieve a vivid, figurative and immersive experience, resulting in low generation efficiency and accuracy of 3D scene models. Summary of the invention
[0003] The main purpose of the embodiments of the present application is to propose a 3D scene model generation method, device, electronic device and storage medium, which can realize 3D automatic modeling and improve the generation efficiency and accuracy of 3D scene models.
[0004] On the one hand, an embodiment of the present application proposes a method for generating a 3D scene model, the method comprising the following steps:
[0005] In response to user interaction operations, obtaining scene setting parameters and loading corresponding 3D virtual object sets;
[0006] Determining a 3D scene layout model using a scene layout model according to the 3D virtual object set and the scene setting parameters;
[0007] Using the scene analysis model to perform scene style matching on the 3D virtual object set according to the 3D scene layout model, and determine scene material properties;
[0008] The 3D scene layout model is dynamically rendered according to the scene material attributes, the 3D virtual object set and the scene setting parameters to generate a corresponding 3D scene model.
[0009] In some embodiments, in response to the user interaction operation, obtaining the scene setting parameters and loading the corresponding 3D virtual object set specifically includes:
[0010] In response to the user interaction operation, determining the scene setting parameters, the scene setting parameters at least including scene type, scene light source properties and scene layout parameters;
[0011] Obtaining a 3D virtual object database;
[0012] According to the scene setting parameters, a plurality of target 3D virtual object data are determined from the 3D virtual object database, and the plurality of target 3D virtual object data constitute the 3D virtual object set.
[0013] In some embodiments, the using the scene layout model to determine the 3D scene layout model according to the 3D virtual object set and the scene setting parameters specifically includes:
[0014] Acquire the scene layout model; the scene layout model is trained by using a plurality of 3D sample layout model data having scene type labels and scene layout labels;
[0015] Determine, according to the scene layout parameters, a plurality of associated 3D virtual object data combinations from the 3D virtual object set, and determine a layout spacing between the associated 3D virtual object data combinations, wherein the associated 3D virtual object data combinations include at least two of the target 3D virtual object data;
[0016] Determining a layout arrangement of each of the target 3D virtual object data according to the scene layout parameters;
[0017] The 3D scene layout model is generated by using the scene layout model according to the scene setting parameters, the layout spacing between the associated 3D virtual object data combinations and the layout arrangement of the target 3D virtual object data.
[0018] In some embodiments, the using the scene analysis model to perform scene style matching on the 3D virtual object set according to the 3D scene layout model to determine the scene material attributes specifically includes:
[0019] Acquire the scene analysis model; the scene analysis model is trained by a plurality of 3D scene data images with scene style labels;
[0020] Get the material property database and multiple preset scene styles;
[0021] Inputting the 3D scene layout model into the scene analysis model, and using the scene analysis model to determine a target scene style from the plurality of scene styles;
[0022] According to the target scene style, target material attributes corresponding to each target 3D virtual object data matching the target scene style are determined from the material attribute database.
[0023] In some embodiments, dynamically rendering the 3D scene layout model according to the scene material attributes, the 3D virtual object set and the scene setting parameters to generate a corresponding 3D scene model specifically includes:
[0024] Determining the scene light source properties according to the scene setting parameters, including light source position, light source intensity and light source type;
[0025] According to the scene light source properties and the target material properties corresponding to each target 3D virtual object data, the 3D scene layout model is dynamically rendered using a scene rendering system to generate the 3D scene model, wherein the scene rendering system includes a Three.js engine.
[0026] In some embodiments, the method further comprises:
[0027] In response to a user editing operation, the scene setting parameters or the 3D virtual object set are updated, and corresponding scene setting adjustment parameters and 3D virtual object set adjustment information are determined, wherein the updating of the 3D virtual object set at least includes adding and deleting target 3D virtual object data and modifying material attributes of the target 3D virtual object data;
[0028] Using the scene layout model, adjusting the layout of the 3D scene model according to the scene setting adjustment parameters and the 3D virtual object set adjustment information, and generating a corresponding scene layout adjustment 3D model;
[0029] The scene rendering system is used to dynamically render the scene layout adjustment 3D model according to the scene setting adjustment parameters and the 3D virtual object set adjustment information to generate a 3D scene adjustment model.
[0030] In some embodiments, the method further comprises:
[0031] In response to the user's virtual reality preview operation, a virtual reality screen corresponding to the 3D scene model is established, and the 3D scene dynamic preview is performed using the virtual reality screen.
[0032] On the other hand, an embodiment of the present application provides a 3D scene model generation device, the device comprising:
[0033] The first module is used to obtain scene setting parameters and load corresponding 3D virtual object sets in response to user interaction operations;
[0034] The second module is used to determine a 3D scene layout model according to the 3D virtual object set and the scene setting parameters using the scene layout model;
[0035] The third module is used to use the scene analysis model to perform scene style matching on the 3D virtual object set according to the 3D scene layout model to determine the scene material attributes;
[0036] The fourth module is used to dynamically render the 3D scene layout model according to the scene material properties, the 3D virtual object set and the scene setting parameters to generate a corresponding 3D scene model.
[0037] On the other hand, an embodiment of the present application provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the 3D scene model generation method described above when executing the computer program.
[0038] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the 3D scene model generation method described above is implemented.
[0039] The embodiments of the present application include at least the following beneficial effects: the present application provides a 3D scene model generation method, device, electronic device and storage medium, which obtains scene setting parameters and loads the corresponding 3D virtual object set, uses the scene layout model to determine the 3D scene layout model according to the 3D virtual object set and the scene setting parameters, uses the scene analysis model to match the scene style of the 3D virtual object set according to the 3D scene layout model, determines the scene material properties, and dynamically renders the 3D scene layout model according to the scene material properties, the 3D virtual object set and the scene setting parameters to generate the corresponding 3D scene model. The present application can realize automated 3D modeling, which is simple and efficient, significantly reduces the difficulty of 3D modeling development, simplifies the 3D modeling development process, improves the generation efficiency and accuracy of 3D scene models, and meets the personalized 3D modeling needs of users. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 is a flow chart of a 3D scene model generation method provided in an embodiment of the present application;
[0041] Figure 2 is a flowchart of step S101 in an embodiment of the present application;
[0042] Figure 3 is a schematic diagram of the structure of a 3D virtual object database in an embodiment of the present application;
[0043] Figure 4 is a flowchart of step S102 in an embodiment of the present application;
[0044] Figure 5 is a flowchart of step S103 in an embodiment of the present application;
[0045] Figure 6 It is a schematic diagram of the structure of the material attribute database in the embodiment of the present application;
[0046] Figure 7 is a flowchart of step S104 in an embodiment of the present application;
[0047] Figure 8 is another flow chart of a 3D scene model generation method provided in an embodiment of the present application;
[0048] Fig. 9 It is a structural schematic diagram of a 3D scene model generation device provided in an embodiment of the present application;
[0049] Fig.10 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0051] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0052] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0054] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0055] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0056] 1) Three.js: An open source JavaScript library for creating and displaying web-based 3D graphics. It uses the WebGL standard to implement hardware-accelerated 3D graphics rendering in web browsers without the need for additional plug-ins. It is widely used in web games, data visualization, virtual reality and other fields.
[0057] 2) 3D scene construction system: refers to a software platform used to create, edit and manage three-dimensional virtual environments. The system integrates a user interface, a graphics rendering engine, and a series of auxiliary design tools to help users build and arrange objects, adjust lighting, apply materials, etc. in virtual space, thereby generating interactive three-dimensional scenes.
[0058] 3) Real-time preview technology: A technology that can instantly render and display the effects of modifications while users are editing 3D scenes. It relies on the seamless integration of efficient rendering engines and user interfaces, allowing creators to instantly see the impact of any adjustments (such as object position changes, material updates, and lighting changes) on the scene, accelerating creative iterations.
[0059] 4) WebGL: is a JavaScript API for rendering interactive 2D and 3D graphics in any compatible web browser without the use of plug-ins. It is fully integrated into all web standards of the browser, allowing the use of GPU-accelerated physics and image processing and effects as part of the web page canvas.
[0060] 5) VR: Virtual Reality is a computer simulation system that can create and experience a virtual world. It uses computers to generate a simulated environment and immerse users in it. Virtual reality technology uses real-life data and electronic signals generated by computer technology, and combines them with various output devices to transform them into phenomena that people can feel. These phenomena can be real objects in reality or substances that are invisible to our naked eyes, which are expressed through three-dimensional models.
[0061] 6) TensorFlow: TensorFlow is an open source machine learning framework. TensorFlow is mainly used to build and train machine learning models and supports various machine learning tasks, including but not limited to image recognition, speech recognition, natural language processing, and recommendation systems.
[0062] 7) Metaverse: Generally refers to Metaverse, which is a collection of virtual time and space, consisting of a series of augmented reality (AR), virtual reality (VR) and the Internet. Metavers is composed of Meta and Verse, Meta means transcendence, and verse means universe. Together, it usually means the next stage of the Internet, a virtual reality network world supported by AR, VR, 3D and other technologies.
[0063] With the rise of the concept of the metaverse, the demand for complex 3D content is growing, but the learning curve of traditional 3D modeling methods is steep, which limits the participation of non-professionals and makes development difficult. At the same time, traditional 3D modeling methods cannot adapt to user needs and generate 3D scene models that meet the needs. It is difficult to achieve a vivid, figurative and immersive experience, resulting in low generation efficiency and accuracy of 3D scene models.
[0064] Based on this, the embodiment of the present application proposes a 3D scene model generation method, device, electronic device and storage medium. By developing a user-friendly 3D scene construction system under the Three.js framework, the system integrates an intelligent layout system, an automated material application system and a real-time preview technology, aiming to simplify the 3D content creation process, so that non-professional users can easily build complex scenes, significantly reduce the technical threshold of content creation, and aim to provide a highly integrated and user-friendly interface so that non-professional users can easily create and edit complex 3D scenes, thereby breaking the professional barriers of traditional 3D design technology, allowing more people to participate in the creation of metaverse content, reducing manual intervention, speeding up the design process, making the conversion from conception to finished product faster, and improving the efficiency of overall content production. Through intuitive interactive design, users can see the effect instantly when building a 3D scene, enjoy a smooth creation experience, enhance user participation and satisfaction, and improve the generation efficiency and accuracy of 3D scene models.
[0065] Reference Figure 1 , Figure 1 This is an optional flowchart of a 3D scene model generation method provided in an embodiment of the present application. The method may include but is not limited to steps S101 to S104:
[0066] Step S101, in response to a user interaction operation, obtaining scene setting parameters and loading a corresponding 3D virtual object set;
[0067] Step S102, using the scene layout model to determine the 3D scene layout model according to the 3D virtual object set and the scene setting parameters;
[0068] Step S103, using the scene analysis model to perform scene style matching on the 3D virtual object set according to the 3D scene layout model to determine the scene material attributes;
[0069] Step S104, dynamically rendering the 3D scene layout model according to the scene material attributes, the 3D virtual object set and the scene setting parameters, to generate a corresponding 3D scene model.
[0070] In some embodiments, in response to user interaction operations, specifically, the user browses multiple preset scene model generation templates and multiple preset scene styles in the human-computer interaction interface, the user selects a target scene model generation template from the multiple preset scene model generation templates and determines the target scene style from the multiple preset scene styles, and determines the corresponding scene setting parameters and 3D virtual object set according to the target scene model generation template and the target scene style, thereby helping the user to quickly complete the 3D scene model construction, wherein the scene setting parameters include at least scene type, scene light source properties and scene layout parameters.
[0071] In some embodiments, reference Figure 2 , Figure 2 This is an optional flowchart of step S101 in the embodiment of the present application. Step S101 may include but is not limited to steps S201 to S203:
[0072] Step S201, determining scene setting parameters in response to user interaction operations;
[0073] Step S202, obtaining a 3D virtual object database;
[0074] Step S203: determining a plurality of target 3D virtual object data from a 3D virtual object database according to the scene setting parameters, wherein the plurality of target 3D virtual object data constitute a 3D virtual object set.
[0075] In some embodiments, a plurality of 3D virtual object data are stored in the 3D virtual object database. Optionally, assuming that the 3D virtual object database is a furniture virtual object database, the furniture virtual object database may include a plurality of different types of furniture virtual object data, such as sofas, televisions, tables, chairs, potted plants, household decorations, washing machines, TV cabinets, air conditioners, fans and refrigerators.
[0076] For example, refer to Figure 3 , Figure 3 It is an optional structural diagram of a 3D virtual object database in an embodiment of the present application, wherein, assuming that there are 3D virtual object data 1 to X and scene types A to E, each 3D virtual object data corresponds to several scene types, such as 3D virtual object data 1 corresponds to scene types A and B, 3D virtual object data 2 corresponds to scene types A, C and D, 3D virtual object data 3 corresponds to scene types C and E, and 3D virtual object data X corresponds to scene types A and E, then the 3D virtual object data 1 to X and several scene types matching each 3D virtual object data are stored in the 3D virtual object database.
[0077] In some embodiments, the scene setting parameters include a scene type. For example, in a home design scene, assuming that the preset scene types include a living room scene, a bedroom scene, a kitchen scene, and a balcony scene, the living room scene is determined as the scene type from multiple preset scene types. Based on the scene type, multiple target 3D virtual object data matching the living room scene are determined from the 3D virtual object database, which may include but are not limited to sofas, coffee tables, tables, chairs, televisions, TV cabinets, display cabinets, air conditioners, and small potted plants, etc. Multiple target 3D virtual object data constitute a 3D virtual object set.
[0078] In some embodiments, reference Figure 4 , Figure 4This is an optional flowchart of step S102 in the embodiment of the present application. Step S102 may include but is not limited to steps S301 to S304:
[0079] Step S301, obtaining a scene layout model; the scene layout model is trained using a plurality of 3D sample layout model data having scene type labels and scene layout labels;
[0080] Step S302, determining a plurality of associated 3D virtual object data combinations from the 3D virtual object set according to the scene layout parameter, and determining a layout spacing between the associated 3D virtual object data combinations, wherein the associated 3D virtual object data combinations include at least two target 3D virtual object data;
[0081] Step S303, determining the layout arrangement of each target 3D virtual object data according to the scene layout parameters;
[0082] Step S304: Generate a 3D scene layout model using the scene layout model according to the scene setting parameters, the layout spacing between the associated 3D virtual object data combinations, and the layout arrangement of the target 3D virtual object data.
[0083] In some embodiments, the scene layout model is a layout engine based on machine learning. The layout engine is trained with multiple 3D sample layout model data and can automatically generate a reasonable 3D scene layout model based on the scene type (such as home layout, office layout, etc.), model size (such as the size of furniture) and relationship parameters (such as the relative positions between different 3D virtual objects, etc.) selected by the user.
[0084] Optionally, the scene layout model is constructed based on the TensorFlow framework and is trained with multiple 3D sample layout model data with scene type labels and scene layout labels, wherein the scene type label is used to describe the scene type corresponding to the 3D sample layout model data, and the scene layout label is used to describe the scene layout parameters in the 3D sample layout model data, and the scene layout parameters include the relative position between different 3D virtual object data, the size of each 3D virtual object data, and the arrangement of each 3D virtual object data and its position in the 3D sample layout model.
[0085] The scene layout model introduces an intelligent layout algorithm, which automatically adjusts the position and size of objects based on the spatial relationship between objects and the overall aesthetic principles of the scene, making the scene layout both reasonable and beautiful. The algorithm takes viewpoint optimization into account, so that users can present the best effect when observing the 3D scene from different perspectives.
[0086] Optionally, the above-mentioned intelligent layout algorithm is a constraint solving algorithm, which can avoid collisions between 3D virtual objects, maintain the spatial beauty and logic of the 3D scene layout model, and preset constraints. The constraint rules may include but are not limited to the minimum spacing between models (for example, at least 50 cm between 3D virtual objects), alignment (such as left alignment, center alignment, etc.), arrangement order (such as arrangement in order of size, division by functional area, etc.). Based on the constraints, a constraint solving algorithm is set. During the scene layout process, the scene layout model accurately arranges and adjusts the 3D virtual objects according to the constraints through the constraint solving algorithm to achieve accurate layout of the 3D scene.
[0087] In some embodiments, reference Figure 5 , Figure 5 This is an optional flowchart of step S103 in the embodiment of the present application. Step S103 may include but is not limited to steps S401 to S404:
[0088] Step S401, obtaining a scene analysis model; the scene analysis model is trained by using a plurality of 3D scene data images with scene style labels;
[0089] Step S402, obtaining a material attribute database and a plurality of preset scene styles;
[0090] Step S403, inputting the 3D scene layout model into the scene analysis model, and using the scene analysis model to determine a target scene style from a plurality of scene styles;
[0091] Step S404: according to the target scene style, determine the target material attribute corresponding to each target 3D virtual object data matching the target scene style from the material attribute database.
[0092] In some embodiments, by annotating multiple 3D scene data images, the scene styles corresponding to each 3D scene data image are clearly distinguished and marked, and according to the scene styles corresponding to each 3D scene data image, scene style labels corresponding to each 3D scene data image are generated. The above-mentioned scene analysis model is trained using multiple 3D scene data images with scene style labels to obtain a scene analysis model that can accurately distinguish and identify different scene styles. By way of example, scene style labels may include but are not limited to cartoon style, low polygon style (low-polygon style), pixel art style, simple style, pastoral style, and realistic style, etc., and different scene style labels can be set according to actual needs.
[0093] The scene analysis model can use image recognition technology to analyze the scene style corresponding to the 3D scene layout model, and automatically match the target material properties corresponding to each target 3D virtual object data from the material property database according to the identified scene grids.
[0094] In some embodiments, a material attribute database is constructed, which stores material attribute data corresponding to all 3D virtual object data in different scene styles. The material attribute data may include but is not limited to material type, material gloss, material light reflectivity, material transparency, and material roughness.
[0095] For example, refer to Figure 6 , Figure 6 It is an optional structural diagram of the material attribute database in an embodiment of the present application, wherein, assuming that there are 3D virtual object data 1 to N and scene styles 1 to 4, each 3D virtual object data has different material attribute data under different scene styles, and the material attribute data 11 of the 3D virtual object data 1 under scene style 1 and the material attribute data 12 under scene style 2 are stored in the material attribute database. At the same time, the material attribute data N4 of the 3D virtual object data N under scene style 4 is also stored in the material attribute database, and so on.
[0096] In some embodiments, reference Figure 7 , Figure 7 This is an optional flowchart of step S104 in the embodiment of the present application. Step S104 may include but is not limited to steps S501 to S502:
[0097] Step S501, determining scene light source properties according to scene setting parameters, including light source position, light source intensity and light source type;
[0098] Step S502, dynamically rendering the 3D scene layout model using a scene rendering system according to the scene light source properties and the target material properties corresponding to each target 3D virtual object data to generate a 3D scene model, wherein the scene rendering system includes a Three.js engine.
[0099] In some embodiments, light source simulation technology and real-time preview technology are integrated to dynamically reflect the impact of lighting changes on the 3D scene in the 3D scene model. The lighting changes are determined by the scene light source properties. The scene light source properties include at least light source position, light source intensity, light source color, light source distance and light source type, etc., wherein, optionally, the light source type may include but is not limited to ambient light, parallel light, point light source and spotlight, etc.
[0100] In some embodiments, the scene rendering system utilizes the efficient rendering capabilities of the Three.js engine to achieve real-time rendering preview. In the 3D scene model, assuming that the 3D scene model undergoes data changes, such as moving, deleting, or adding any target 3D virtual object data, the scene rendering system performs dynamic rendering based on the changed 3D scene model data, and dynamically updates the rendering effect of the 3D scene model.
[0101] Optionally, the scene rendering system can achieve real-time feedback through the optimized WebGL rendering pipeline and efficient resource management strategy in the Three.js engine, so that changes are made immediately and the system runs smoothly, thus improving the user's creative efficiency and satisfaction.
[0102] In some embodiments, reference Figure 8 , Figure 8 is another optional flow chart of a 3D scene model generation method provided in an embodiment of the present application. The above 3D scene model generation method may further include steps S601 to S603:
[0103] Step S601, in response to a user editing operation, updating a scene setting parameter or a 3D virtual object set, and determining corresponding scene setting adjustment parameters and 3D virtual object set adjustment information, wherein updating the 3D virtual object set at least includes adding and deleting target 3D virtual object data and modifying material attributes of the target 3D virtual object data;
[0104] Step S602, using the scene layout model to adjust the layout of the 3D scene model according to the scene setting adjustment parameters and the 3D virtual object set adjustment information, and generating a corresponding scene layout adjustment 3D model;
[0105] Step S603: Utilize the scene rendering system to dynamically render the scene layout adjustment 3D model according to the scene setting adjustment parameters and the 3D virtual object set adjustment information to generate a 3D scene adjustment model.
[0106] In some embodiments, in response to a user editing operation, the 3D virtual object set is updated. Optionally, the user can preview the 3D scene model in the human-computer interaction interface and perform editing operations, including adding and deleting target 3D virtual object data and modifying material properties of the target 3D virtual object data. The user can select several 3D virtual object data from the 3D virtual object database, and then move the 3D virtual object data to any free position in the 3D scene model by clicking or dragging, etc., to achieve the addition of target 3D virtual object data. The user can select any target 3D virtual object data in the 3D scene model, perform a deletion operation on it, remove it from the 3D scene model, and achieve the deletion of the target 3D virtual object data. The user can also select any target 3D virtual object data and modify its size or material property data to achieve material property modification and size modification of the target 3D virtual object data. According to the above-mentioned information update operation on several target 3D virtual object data in the 3D scene model, the information corresponding to each target 3D virtual object data is re-updated, and the information corresponding to all target 3D virtual object data is summarized to obtain 3D virtual object set adjustment information.
[0107] In some embodiments, in response to a user editing operation, the scene setting parameters are updated. Optionally, the user can modify the scene light source properties of the 3D scene model, or modify the scene layout parameters of the 3D scene model in the human-computer interaction interface. For example, any at least two or more target 3D virtual objects are selected as a target 3D virtual object adjustment combination, the layout spacing between any two target 3D virtual objects in the target 3D virtual object adjustment combination is modified, and finally the adjusted scene setting parameters are determined as the corresponding scene setting adjustment parameters.
[0108] In some embodiments, a scene rendering system is used to dynamically render the scene layout adjustment 3D model according to scene setting adjustment parameters and 3D virtual object set adjustment information to generate a 3D scene adjustment model, so that users can preview changes in the 3D scene model in real time.
[0109] In some embodiments, the above 3D scene model generation method may further include step S701:
[0110] Step S701, in response to the user's virtual reality preview operation, a virtual reality screen corresponding to the 3D scene model is established, and the 3D scene is dynamically previewed using the virtual reality screen.
[0111] In some embodiments, in response to the user's virtual reality preview operation, optionally, the user enters the preview mode through a VR helmet, and can move freely in the virtual reality screen corresponding to the 3D scene model, check the scene details of the 3D scene model from different perspectives, and realize dynamic preview of the 3D scene.
[0112] Reference Fig. 9 , Fig. 9 : is an optional structural diagram of a 3D scene model generation device provided in an embodiment of the present application. The device can be used to implement the above-mentioned 3D scene model generation method. The device may include:
[0113] The first module is used to obtain scene setting parameters and load corresponding 3D virtual object sets in response to user interaction operations;
[0114] The second module is used to determine the 3D scene layout model according to the 3D virtual object set and the scene setting parameters using the scene layout model;
[0115] The third module is used to use the scene analysis model to match the scene style of the 3D virtual object set according to the 3D scene layout model and determine the scene material properties;
[0116] The fourth module is used to dynamically render the 3D scene layout model according to the scene material properties, the 3D virtual object set and the scene setting parameters to generate the corresponding 3D scene model.
[0117] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0118] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned 3D scene model generation method when executing the computer program. The electronic device can be any smart terminal including a tablet computer.
[0119] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0120] See also Fig.10 , Fig.10 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0121] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0122] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the 3D scene model generation method of the embodiment of this application;
[0123] Input / output interface 903, used to implement information input and output;
[0124] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0125] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0126] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0127] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned 3D scene model generation method is implemented.
[0128] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0129] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0130] The embodiment of the present application provides a 3D scene model generation method, device, electronic device and storage medium, which obtains scene setting parameters and loads the corresponding 3D virtual object set, uses the scene layout model to determine the 3D scene layout model according to the 3D virtual object set and the scene setting parameters, uses the scene analysis model to match the scene style of the 3D virtual object set according to the 3D scene layout model, determines the scene material properties, and dynamically renders the 3D scene layout model according to the scene material properties, the 3D virtual object set and the scene setting parameters to generate the corresponding 3D scene model. The embodiment of the present application can realize automated 3D modeling, which is simple and efficient, significantly reduces the difficulty of 3D modeling development, simplifies the 3D modeling development process, improves the generation efficiency and accuracy of 3D scene models, and meets the personalized 3D modeling needs of users.
[0131] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0132] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0133] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0134] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0135] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0136] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0137] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0138] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0139] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0140] It should be appreciated that embodiments of the present invention may be implemented or enforced by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable memory. The method may be implemented in a computer program using standard programming techniques including a non-transitory computer-readable storage medium configured with a computer program, wherein the storage medium so configured causes the computer to operate in a specific and predefined manner - according to the methods and drawings described in the specific embodiments. Each program may be implemented in a high-level procedural or object-oriented programming language to communicate with a computer system. However, if desired, the program may be implemented in an assembly or machine language. In any case, the language may be a compiled or interpreted language. In addition, the program may be run on a programmed ASIC for this purpose.
[0141] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0142] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A 3D scene model generation method, characterized in that: The method comprises the following steps: In response to user interaction operations, obtaining scene setting parameters and loading corresponding 3D virtual object sets; Determining a 3D scene layout model using a scene layout model according to the 3D virtual object set and the scene setting parameters; Using the scene analysis model to perform scene style matching on the 3D virtual object set according to the 3D scene layout model, and determine scene material properties; The 3D scene layout model is dynamically rendered according to the scene material attributes, the 3D virtual object set and the scene setting parameters to generate a corresponding 3D scene model.
2. The 3D scene model generation method according to claim 1, characterized in that: In response to the user interaction operation, Get the scene setting parameters and load the corresponding 3D virtual object set, including: In response to the user interaction operation, determining the scene setting parameters, the scene setting parameters at least including scene type, scene light source properties and scene layout parameters; Obtaining a 3D virtual object database; According to the scene setting parameters, a plurality of target 3D virtual object data are determined from the 3D virtual object database, and the plurality of target 3D virtual object data constitute the 3D virtual object set.
3. The 3D scene model generation method according to claim 2, characterized in that: The utilizing the scene layout model to determine the 3D scene layout model according to the 3D virtual object set and the scene setting parameters specifically includes: Acquire the scene layout model; the scene layout model is trained by using a plurality of 3D sample layout model data having scene type labels and scene layout labels; Determining a plurality of associated 3D virtual object data combinations from the 3D virtual object set according to the scene layout parameters, and determining a layout spacing between each of the associated 3D virtual object data combinations, wherein the associated 3D virtual object data combinations include at least two of the target 3D virtual object data; Determining a layout arrangement of each of the target 3D virtual object data according to the scene layout parameters; The 3D scene layout model is generated by using the scene layout model according to the scene setting parameters, the layout spacing between the associated 3D virtual object data combinations and the layout arrangement of the target 3D virtual object data.
4. The 3D scene model generation method according to claim 3, characterized in that: The using the scene analysis model to perform scene style matching on the 3D virtual object set according to the 3D scene layout model to determine the scene material attributes specifically includes: Acquire the scene analysis model; the scene analysis model is trained by a plurality of 3D scene data images with scene style labels; Get the material property database and multiple preset scene styles; Inputting the 3D scene layout model into the scene analysis model, and using the scene analysis model to determine a target scene style from the plurality of scene styles; According to the target scene style, target material attributes corresponding to each target 3D virtual object data matching the target scene style are determined from the material attribute database.
5. The 3D scene model generation method according to claim 4, characterized in that: The dynamically rendering the 3D scene layout model according to the scene material attributes, the 3D virtual object set and the scene setting parameters to generate a corresponding 3D scene model specifically includes: Determining the scene light source properties according to the scene setting parameters, including light source position, light source intensity and light source type; According to the scene light source properties and the target material properties corresponding to each target 3D virtual object data, the 3D scene layout model is dynamically rendered using a scene rendering system to generate the 3D scene model, wherein the scene rendering system includes a Three.js engine.
6. The 3D scene model generation method according to claim 5, characterized in that: The method further comprises: In response to a user editing operation, the scene setting parameters or the 3D virtual object set are updated, and corresponding scene setting adjustment parameters and 3D virtual object set adjustment information are determined, wherein the updating of the 3D virtual object set at least includes adding and deleting target 3D virtual object data and modifying material attributes of the target 3D virtual object data; Using the scene layout model, adjusting the layout of the 3D scene model according to the scene setting adjustment parameters and the 3D virtual object set adjustment information, and generating a corresponding scene layout adjustment 3D model; The scene rendering system is used to dynamically render the scene layout adjustment 3D model according to the scene setting adjustment parameters and the 3D virtual object set adjustment information to generate a 3D scene adjustment model.
7. The 3D scene model generation method according to claim 5, characterized in that: The method further comprises: In response to the user's virtual reality preview operation, a virtual reality screen corresponding to the 3D scene model is established, and the 3D scene dynamic preview is performed using the virtual reality screen.
8. A 3D scene model generation device, characterized in that: The device comprises: The first module is used to obtain scene setting parameters and load corresponding 3D virtual object sets in response to user interaction operations; The second module is used to determine a 3D scene layout model according to the 3D virtual object set and the scene setting parameters using the scene layout model; The third module is used to use the scene analysis model to perform scene style matching on the 3D virtual object set according to the 3D scene layout model to determine the scene material attributes; The fourth module is used to dynamically render the 3D scene layout model according to the scene material properties, the 3D virtual object set and the scene setting parameters to generate a corresponding 3D scene model.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the 3D scene model generation method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the 3D scene model generation method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Virtual scene generation method and device, computer equipment and storage medium
CN119722963A
Stylized three-dimensional virtual scene generation method, electronic equipment and storage medium
CN120339528A