Interaction methods, devices, equipment, and storage media in virtual scenes
By dividing the virtual scene into subspaces and filling them with voxel data, the problem of imprecise generation of traditional virtual objects is solved, and higher quality virtual object creation is achieved.
Patent Information
- Application Number
- CN202411645530.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-11-15
AI Technical Summary
Traditional virtual object generation methods do not pay attention to details, resulting in obvious flaws in the generated virtual objects and affecting the visual presentation, especially in voxel-based virtual spaces where there is a lack of refined creation methods.
By receiving requests to create virtual objects, the virtual scene is divided into multiple subspaces based on spatial distribution and segmentation information, and data is filled into the subspaces using voxel configuration information to achieve refined creation of virtual objects.
It improves the precision of virtual object creation, ensuring that every detail is handled well, and enhances the visual presentation of virtual space.
Smart Images

Figure CN119565145B_ABST
Abstract
Description
Technical Field
[0001] The exemplary embodiments disclosed herein relate generally to the field of computers, and more particularly to interactive methods, apparatuses, devices, and computer-readable storage media in virtual scenes. Background Technology
[0002] With the rapid development of computer technology, more and more applications and platforms are designed to provide users with various services, such as virtual spaces. These virtual spaces can include various virtual objects, including but not limited to hills, grasslands, and forests. While traditional methods can generate these virtual objects, they often neglect the details, resulting in noticeable flaws that negatively impact the application's visual presentation. Therefore, there is an urgent need for a fast and efficient method for creating virtual objects, enabling the precise creation of virtual objects within virtual spaces. Summary of the Invention
[0003] In a first aspect of this disclosure, an interaction method in a virtual scene is provided. The method includes: receiving a request to create a virtual object in the virtual scene; dividing a target space in the virtual scene into multiple subspaces based on spatial distribution / segmentation information corresponding to the virtual object; and filling a set of subspaces with corresponding voxel data based on voxel configuration information corresponding to the multiple subspaces to create a virtual object in the virtual scene.
[0004] In a second aspect of this disclosure, an interaction device in a virtual scene is provided. The device includes: a request receiving module configured to receive a request to create a virtual object in the virtual scene; a segmentation module configured to divide a target space in the virtual scene into multiple subspaces based on spatial distribution / segmentation information corresponding to the virtual object; and a filling module configured to fill a set of subspaces with corresponding voxel data based on voxel configuration information corresponding to the multiple subspaces, thereby creating a virtual object in the virtual scene.
[0005] In a third aspect of this disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit. When executed by the at least one processing unit, the instructions cause the device to perform the method of the first aspect.
[0006] In a fourth aspect of this disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program that can be executed by a processor to implement the method of the first aspect.
[0007] It should be understood that the content described in this content section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0008] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0009] Figure 1 A schematic diagram is shown of an example environment in which embodiments of the present disclosure may be implemented;
[0010] Figure 2 Example interfaces according to some embodiments of this disclosure are shown;
[0011] Figures 3A to 3C Example interfaces according to some embodiments of this disclosure are shown.
[0012] Figure 4A A spatial distribution / segmentation block diagram according to some embodiments of the present disclosure is shown;
[0013] Figure 4B A three-dimensional anchor point system according to some embodiments of the present disclosure is shown;
[0014] Figure 5 A flowchart illustrating an example interaction process in a virtual scene according to some embodiments of the present disclosure is shown;
[0015] Figure 6 A schematic structural block diagram of an example interactive device for a virtual scene according to some embodiments of the present disclosure is shown; and
[0016] Figure 7 A block diagram of an electronic device capable of implementing several embodiments of the present disclosure is shown. Detailed Implementation
[0017] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0018] It should be noted that the headings of any section / subsection provided herein are not limiting. Various embodiments are described throughout this document, and embodiments of any type may be included under any section / subsection. Furthermore, embodiments described in any section / subsection may be combined in any way with any other embodiments described in the same section / subsection and / or different sections / subsections.
[0019] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below. The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0020] In this document, unless explicitly stated otherwise, performing a step in response to A does not mean that the step is performed immediately after A, but may include one or more intermediate steps.
[0021] The embodiments of this disclosure may involve user data, data acquisition, and / or use. All of these aspects comply with applicable laws, regulations, and relevant provisions. In the embodiments of this disclosure, all data collection, acquisition, processing, manipulation, forwarding, and use are conducted with the user's knowledge and confirmation. Accordingly, in implementing the embodiments of this disclosure, the type, scope of use, and usage scenarios of any data or information that may be involved should be communicated to the user and their authorization obtained in accordance with relevant laws and regulations through appropriate means. The specific methods of notification and / or authorization may vary depending on the actual situation and application scenario, and the scope of this disclosure is not limited in this respect.
[0022] In this specification and the embodiments, any processing of personal information will be carried out only under the premise of legality (e.g., obtaining the consent of the personal information subject, or being necessary for the performance of a contract), and will only be carried out within the scope stipulated or agreed upon. A user's refusal to process personal information beyond what is necessary for basic functions will not affect the user's use of basic functions. As an optional but non-restrictive implementation, in response to a user's active request, a prompt message may be sent to the user, for example, via a pop-up window, where the prompt message can be presented in text form. Furthermore, the pop-up window may also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device. It is understood that the above notification and user authorization process is merely illustrative and does not constitute a limitation on the implementation of this disclosure; other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0023] As used in this paper, the term "model" refers to a model that learns the relationship between inputs and outputs from training data, enabling it to generate corresponding outputs for a given input after training. Model generation can be based on machine learning techniques. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs using multiple layers of processing units. A neural network model is an example of a deep learning-based model. In this paper, "model" may also be referred to as a "machine learning model," "learning model," "machine learning network," or "learning network," and these terms are used interchangeably.
[0024] As mentioned above, with the rapid development of computer technology, more and more applications and platforms are designed to provide users with various services, such as virtual spaces. The virtual space provided by an application can include multiple virtual objects, including but not limited to hills, grasslands, and forests. In creating virtual objects, users can use algorithms and programs to automatically generate virtual objects in the virtual space, for example, generating hills, grasslands, and forests according to predetermined rules.
[0025] However, traditional virtual object generation methods often neglect the details of virtual objects, resulting in noticeable flaws and affecting the visual presentation of applications. This is especially true for voxel-based scenarios, where traditional methods are unsuitable for voxel-based virtual spaces. Therefore, there is an urgent need for a fast and efficient method for creating virtual objects, enabling more refined creation of virtual objects in voxel-based scenarios.
[0026] Embodiments of this disclosure propose an interaction scheme in a virtual scene. The scheme includes: receiving a request to create a virtual object in the virtual scene; dividing a target space in the virtual scene into multiple subspaces based on spatial distribution / segmentation information corresponding to the virtual object; and filling a set of subspaces with corresponding voxel data based on voxel configuration information corresponding to the multiple subspaces to create a virtual object in the virtual scene. In this way, virtual objects can be created in a more refined manner.
[0027] In some embodiments of this disclosure, buildings are used as examples of virtual objects for ease of understanding. However, it should be understood that the embodiments of this disclosure are not limited to the creation of buildings. In fact, the embodiments of this disclosure can be applied to any scenario of creating virtual objects. In other words, the embodiments of this disclosure are not limited in terms of the specific type of virtual object.
[0028] It should be understood that the various embodiments discussed in this disclosure are applicable to user-generated content (UGC), professionally generated content (PGC), and / or professionally generated user content (PUGC) models. In other words, this disclosure is not limited in terms of content generation models.
[0029] It should be understood that the various embodiments discussed in this disclosure can be applied to one-dimensional space, two-dimensional space, and three-dimensional space. Therefore, the term "space" as used in this disclosure can sometimes be replaced with "region" or "line segment."
[0030] The following section provides a detailed description of various example implementations of this scheme, with reference to the accompanying drawings.
[0031] Example Environment
[0032] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. For example... Figure 1 As shown, example environment 100 may include electronic device 110. In this example environment 100, application 115 is installed on electronic device 110. User 140 can interact with application 115 via electronic device 110 and / or attached devices of electronic device 110.
[0033] Application 115 can provide user 140 with integration of multiple applications or components. These applications can be application modules within application 115. In some embodiments, application 115 can be downloaded and installed on electronic device 110. In some embodiments, application 115 can also be accessed in other ways, such as via a web page.
[0034] Application 115 can be any suitable type of application capable of providing media content, examples of which may include, but are not limited to, social applications, audio / video applications, media item playback applications, broadcast applications, etc., and embodiments of this disclosure are not limited in this respect.
[0035] exist Figure 1 In environment 100, if application 115 is active, electronic device 110 can present an interactive page through application 115. The interactive page can be any suitable type of page, supporting user 140 input of any suitable type of data and presenting media items of any media type to user 140. The interactive interface can include various interfaces provided by application 115, such as parameter setting interfaces, loading interfaces, special effects display interfaces, etc.
[0036] In some embodiments, electronic device 110 can communicate with server 130 to provide services to application 115. Electronic device 110 can be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, handheld computers, portable gaming terminals, VR / AR devices, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio receivers, e-book devices, gaming devices, or any combination thereof, including accessories and peripherals of these devices or any combination thereof. In some embodiments, electronic device 110 can also support any type of user-facing interface (such as "wearable" circuitry).
[0037] Server 130 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms. Server 130 may include, for example, computing systems / servers such as mainframes, edge computing nodes, computing devices in a cloud environment, etc. Server 130 can provide backend services for applications 115 supporting virtual scenarios in electronic devices 110.
[0038] A communication connection can be established between server 130 and electronic device 110. This communication connection can be established via wired or wireless means. The communication connection may include, but is not limited to, Bluetooth, mobile network, Universal Serial Bus (USB), and Wireless Fidelity (WiFi) connections; the embodiments of this disclosure are not limited in this respect. In the embodiments of this disclosure, server 130 and electronic device 110 can achieve signaling interaction through the communication connection between them.
[0039] Machine learning model 120 is deployed in environment 100. Machine learning model 120 can be deployed on appropriate electronic devices. As an example, machine learning model 120 can also be deployed on electronic devices other than server 130, and server 130 can, for example, invoke machine learning model 120 to perform corresponding tasks via service calls. In yet another example, machine learning model 120 can also be deployed locally on server 130.
[0040] As will be detailed below, electronic device 110 can utilize machine learning model 120 to create virtual objects. As an example, electronic device 110 can invoke machine learning model 120 via server 130. As another example, electronic device 110 can also directly invoke machine learning model 120. In short, this disclosure is unrestricted in terms of the deployment location and invocation method of machine learning model 120.
[0041] It should be understood that the structure and function of the various elements in environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure.
[0042] The following description will continue with reference to the accompanying drawings, which will provide some exemplary embodiments of this disclosure.
[0043] Example Interaction
[0044] Figures 2 to 3CExample interfaces 200 to 300C according to some embodiments of the present disclosure are shown. Example interfaces 200 to 300C may, for example, be provided by... Figure 1 The electronic device 110 shown is provided. It should be understood that... Figures 2 to 3C The illustrated user interface is merely an example; various designs are possible in practice. For instance, the graphical elements and / or controls within the interface can have different arrangements and visual representations, one or more elements and / or controls can be omitted or replaced, and one or more other elements and / or controls may also be present. Furthermore, the user interface can contain any suitable content. The scope of this disclosure is not limited in this respect.
[0045] In operation, electronic device 110 receives a request to create a virtual object in a virtual scene. In response to this request, electronic device 110 can divide the target space in the virtual scene into multiple subspaces based on the spatial distribution / segmentation information corresponding to the virtual object. Next, based on the voxel configuration information corresponding to the multiple subspaces, electronic device 110 can fill a set of subspaces with corresponding voxel data to create the virtual object in the virtual scene. In this way, for a voxel-based virtual space scene, the creation process of the virtual object can be abstracted as a voxel data operation on the space. Thus, the space can be iteratively divided, allowing each detail of the virtual object to be handled well, thereby improving the precision of virtual object creation.
[0046] See Figure 2 An example interface 200 for creating virtual objects is shown. In the example interface 200, the user can control the placement of operation blocks 208. By arranging multiple operation blocks appropriately, various virtual objects can be created. According to some embodiments of this disclosure, application 115 supports the use of machine learning models to assist user 140 in creating virtual objects. In operation, electronic device 110 first presents an interactive interface of a virtual scene. Next, electronic device 110 receives a request to create a virtual object via the interactive interface, which instructs at least one generation parameter associated with the virtual object. In this way, the user can create complex virtual objects through simple parameter settings. See also Figure 2 The example interface 200 shown illustrates the example operation. Example interface 200 includes an auto-generated control 202. User 140 can activate the auto-generated control 202 to trigger the automatic creation of virtual objects.
[0047] Next, we will combine Figures 3A to 3C The example interfaces 300A to 300C shown illustrate the process of generating a request to create a virtual object according to various embodiments of this disclosure.
[0048] According to some example embodiments of this disclosure, user 140 can complete the parameter setting of virtual objects through a generation panel. Specifically, electronic device 110 can present a generation panel in the interactive interface, wherein the generation panel includes multiple configuration controls for configuring different types of generation parameters. User 140 can receive creation requests through the multiple configuration controls in the generation panel. As an example operation, when user 140 activates the automatic generation control 202 in interface 200, the interactive interface can switch to example interface 300A. In example interface 300A, a generation panel 301 is presented. Through the generation panel 301, user 140 can set various parameters of the virtual object to be created to obtain the desired creation effect. In this way, user 140 can clearly and flexibly configure various parameters of the virtual object to be created, making the created virtual object more in line with the user's expectations.
[0049] In some embodiments, a virtual object may include a virtual building object in a virtual scene. In this case, at least one generation parameter of the virtual object may indicate at least one of the following: the type of the virtual building object, the style of the virtual building object, the size of the virtual building object, the material of the virtual building object, the structure of the virtual building object, and the function of the virtual building object. Additionally, in some embodiments, the electronic device 110 may obtain a first parameter via a first configuration control among a plurality of configuration controls, wherein the first parameter indicates the number of floors of the virtual building object to be generated. Further, the electronic device 110 may obtain a second parameter via a second configuration control among a plurality of configuration controls, wherein the second parameter indicates the function of at least one floor in the virtual building object to be generated. Alternatively or additionally, in some embodiments, the generation request also indicates whether to generate internal components of the virtual building object. The above parameters clearly define the creation parameters for the specific virtual object of a building, concisely summarizing the characteristics of the building, making the generation process of the virtual object of a building more standardized. It should be understood that when the virtual object to be created is another object, other setting parameters of other virtual objects to be created may be presented, and this disclosure is not limited in this respect.
[0050] exist Figure 3AIn the example embodiment, the virtual object to be created is a virtual building. In the example interface 300A, user 140 can set the type and / or style of the virtual building. In some embodiments, the type and / or style of the virtual building can be associated. For example, a first type of virtual building corresponds to a first set of candidate styles, and a second type of virtual building corresponds to a second set of candidate styles. In this case, as user 140 selects different building types, the candidate building styles can change accordingly. In one example, the candidate styles corresponding to the villa type can be: modern, European, and Japanese, while the candidate styles corresponding to the office building type can be industrial, modern, and traditional. Depending on whether user 140 selects a villa or an office building, electronic device 110 presents different candidate styles. In this way, the type and style of the virtual building can be better matched, and the various attributes of the created virtual object can be more coordinated and consistent.
[0051] As an alternative or additional location, in example interface 300A, user 140 can set the size / scale of the virtual building. As an alternative or additional location, in example interface 300A, user 140 can set the environment of the virtual building. Examples of environments include, but are not limited to, beaches, lawns, forests, etc. In some embodiments, electronic device 110 also supports generating the environment or determining the size / scale of the virtual building in a random manner.
[0052] Alternatively or additionally, in example interface 300A, user 140 can set the color scheme of the virtual building. In some embodiments, user 140 can select the color scheme of the virtual building. Electronic device 110 can utilize a machine learning model to determine the color of the virtual building based on the primary color scheme selected by user 140 and existing color schemes.
[0053] According to various embodiments of this disclosure, more parameters regarding the virtual object can be configured. When the size of the generated panel is limited and not all setting parameters can be displayed, the user 140 can set other parameters of the virtual object through drop-down menus, expanded controls, etc.
[0054] exist Figure 3B The example interface 300B presents more example parameters. In example interface 300B, user 140 can set the material of the virtual building. Examples of materials include, but are not limited to, wood, stone, and glass. Electronic device 110 can use a machine learning model to use the selected material as the main material for the virtual object to be created.
[0055] In example interface 300B, user 140 can configure the structure and function of the virtual building. For example... Figure 3BAs shown, user 140 can set the number of layers and floor functions for the virtual object to be created. In some embodiments, user 140 can choose to generate the number of layers in a random manner. Alternatively, in some embodiments, user 140 can set the number of layers. Further, user 140 can set the floor function in a random or specified manner.
[0056] In one example, when both the number of floors and the floor function are set to random generation, the electronic device 110 may not display the structural details of the virtual building, such as... Figure 3B As shown. In another example, when both the number of floors and the floor function are customizable, the electronic device 110 supports the user 140 in setting the floor function for each corresponding floor. For example... Figure 3C As shown, electronic device 110 displays floor setting controls 351 and shows all available room function options for each floor in a tiled manner. In another example, when the number of floors is set to randomly generated and the floor function is set to custom, electronic device 110 displays all candidate room function options in a tiled manner. In yet another example, when the number of floors is set to a specified number and the floor function is set to randomly generated, electronic device 110 may not display the structural details of the virtual building.
[0057] In some embodiments, when the number of floors and / or the floor function are both set to custom and the user 140 does not select the corresponding parameters, the electronic device 110 can use a machine learning model to determine the parameters corresponding to the number of floors and / or the floor function based on other setting parameters of the virtual object to be created.
[0058] As discussed above, the generation request also indicates whether to generate the internal components of the virtual building object. In example interface 300B, user 140 can set whether to generate interior walls and furniture for the virtual building. In operation, if user 140 determines to generate interior walls but not furniture, electronic device 110 can use a machine learning model to generate only interior walls. In another embodiment, if user 140 determines to generate only furniture, electronic device 110 can use a machine learning model to generate both interior walls and furniture by default. By pre-setting generation rules, it can be ensured that the generation logic of the virtual building is consistent with the generation logic in the real world.
[0059] By presenting candidate parameters, the system assists user 140 in setting parameters for virtual objects, which can quickly help user 140 complete the parameter setting and makes the interaction simpler.
[0060] Alternatively or additionally, in some embodiments, user 140 is also supported in describing the virtual object to be generated using prompts. For example... Figure 3BAs shown, the generation panel 301 also includes a prompt input control 322. The user 140 describes the virtual object to be generated in natural language using the prompt input control 322. In some embodiments, the prompt input control 322 may display prompt information, such as example prompts or other auxiliary information, to help the user 140 input more accurate prompts. In some embodiments, the display of prompt information is canceled in response to the user activating the prompt input control 322. In some embodiments, the user 140 may input a portion of a prompt, and the electronic device 110 may automatically complete the prompt in response to the user 140's request. By introducing prompts, the virtual object generation process becomes more flexible.
[0061] It should be understood that, although Figures 3A to 3C The request to create a virtual object is described using buildings as virtual objects, but the virtual objects of this disclosure can include any virtual object in a virtual environment. Furthermore, although the interface elements related to parameter configuration and prompt input are presented in the same generation panel, in other embodiments, the interface elements related to parameter configuration and prompt input may be arranged in other ways. In other words, this disclosure aims to improve how virtual objects are created, not to improve the specific layout of the interface. Therefore, any changes to the interface layout are within the scope of protection of this disclosure while achieving the corresponding functions of the disclosure.
[0062] It should be understood that the request to create a virtual object in the context of this disclosure can refer to any of the following operations: generating a virtual object (or a part of a virtual object), updating a virtual object (or a part of a virtual object), supplementing a part of a virtual object, etc. To better illustrate the true meaning of the request to create a virtual object in this disclosure, a building with a two-story structure is used as an example scenario. In one example, the request to create a virtual object could be to generate a building with a two-story structure. In another embodiment, the request to create a virtual object could be to regenerate a building with a two-story structure. In yet another embodiment, the request to create a virtual object could be to regenerate the first / second floor of the building. In yet another embodiment, the request to create a virtual object could be to add wall decorations to the building with a two-story structure. Therefore, in this disclosure, the request to create a virtual object can refer to any operation that results in the creation of a new virtual object / element in the virtual space.
[0063] It should be understood that traditional solutions cannot support partial updates to virtual objects or additions to already created virtual objects. This is because, in traditional solutions, each virtual object is an indivisible whole, making it impossible to process its components individually. The application scenario of this disclosure is voxel-based. In this specific scenario, each virtual object and each part of a virtual object can be represented and manipulated using voxel data. In this case, each virtual object and each part of a virtual object can be manipulated independently. Compared to traditional solutions, the various embodiments of this disclosure can achieve refined processing of virtual objects.
[0064] In some embodiments, in order to create virtual objects, the space / region can be recursively divided into multiple subspaces within a given input space / region, and different voxel operations can be applied to each subspace, thereby achieving refined creation of virtual objects.
[0065] In some embodiments, the target space is determined based on the placement of the virtual object in the virtual scene and the request to create the virtual object.
[0066] In some embodiments, the electronic device 110 acquires an asset file corresponding to the virtual object, also known as a brush file or simply a brush, and determines spatial segmentation information and voxel configuration information based on the asset file. The asset file is sometimes also referred to as a brush file or a brush. To support the creation of asset files, according to some embodiments of this disclosure, a data structure for voxels and / or multiple voxel operations for voxel scenes are introduced. Next, a brief description of the data structures and / or voxel operations of this disclosure will be provided first.
[0067] In some embodiments, both basic data structures and voxel data structures are supported simultaneously. Examples of basic data structures include: boolean type (abbreviated as bool) / integer type (abbreviated as int), floating-point type (float), floating-point vector type (abbreviated as vector3f), integer vector type (abbreviated as vector3i), string type (abbreviated as string), and array type (abbreviated as array). Basic data representation requirements can be achieved using these conventional data structures.
[0068] In some embodiments, the voxel data structure includes a first data structure (abbreviated as Volume) describing whether each cell in a region or space contains a voxel block. Additionally, in some embodiments, the first data structure may consist of the following basic data structures: an integer vector type vector3i describing the starting point, an integer vector type vector3i describing the size of the region, and / or a boolean type bool indicating whether a voxel block exists.
[0069] Alternatively or additionally, in some embodiments, the voxel data structure includes a second data structure (abbreviated as Voxel) describing the voxel type in each cell of a region or space. Additionally, in some embodiments, the second data structure may consist of the following basic data structures: an integer vector type vector3i describing the starting point, an integer vector type vector3i describing the region size, and / or an enumeration type blockid indicating the voxel type. Alternatively or additionally, in some embodiments, the voxel data structure includes a third data structure (abbreviated as bounds) describing the boundary of a region or space. Additionally, in some embodiments, the third data structure may consist of a basic data structure of vector type. Alternatively or additionally, in some embodiments, the voxel data structure includes an enumeration type of voxel blocks (abbreviated as BlockType). By introducing the above voxel data structures, voxel data can be better represented. Furthermore, since the above voxel data is constructed from basic data structures, better system compatibility is achieved.
[0070] According to some example embodiments of this disclosure, within a given input space, spatial partitioning can be performed recursively to divide the given space into multiple subspaces, and different voxel operations can be applied to the subspaces respectively.
[0071] See Figure 4A This illustration shows a spatial distribution / segmentation diagram 400A according to some embodiments of the present disclosure. In this embodiment, the spatial distribution / segmentation function can determine the size, number, and location of a space. In some embodiments, the spatial distribution / segmentation function can output a third data structure (bounds), which can be one or more third data structures (bounds) corresponding to one or more subspaces. In some embodiments, the spatial distribution / segmentation function can determine the number and location of the segmented subspaces. In some embodiments, the segmented space can be a one-dimensional space, a two-dimensional space, or a three-dimensional space. In some embodiments, voxel data can be distributed in the segmented space based on various distribution types, including but not limited to random distribution, noise-based distribution, geometric distribution, wave function collapse distribution, Lindenmayer system distribution, Hit Surface Sampler distribution, etc.
[0072] In some embodiments, adaptive segmentation can be achieved by setting anchor point and alignment attributes. See also Figure 4BThe illustration shows a three-dimensional anchor point system 400B according to some embodiments of the present disclosure. In operation, because the anchor point positions are predefined, the relative relationships of the elements in space do not change regardless of any changes in the space (e.g., changes in size, rotation, etc.). For example, when drawing a wall including a door, the door can be pre-positioned at the bottom center of the wall, with a height half the height of the wall and a width one-quarter the width of the wall. In this case, regardless of how the size of the generated wall changes, a door and wall with a predetermined relative relationship can be generated.
[0073] Once a space is segmented, voxel operations can be applied to the segmented spaces. In some embodiments, voxel operations include at least one of the following: voxel fill operation for filling voxel data (i.e., filling a space with a voxel cube), voxel erase operation for erasing voxel data (i.e., erasing all voxel cubes in the entire space), voxel rotation operation for rotating voxel data (i.e., rotating all voxel cubes in a space), voxel operations include voxel merge operation for merging voxel data in multiple spaces (i.e., merging voxel cubes in two spaces), or applying an asset application operation to a specified space corresponding to another asset file corresponding to an attached virtual object (i.e., drawing with one space as the input space of another brush to support multi-level nested operations).
[0074] Based on the aforementioned voxel data structure, spatial distribution / segmentation algorithm, and voxel operations, application developers or developers can edit or create asset files (i.e., brush files). The asset file creation process according to some embodiments of this disclosure will be described in detail below. In some embodiments, an asset editing interface may be provided to a user (e.g., an application developer or developer). The user creates a node graph in the asset editing interface, wherein the node graph includes multiple connected processing nodes, and the node graph indicates the process of creating virtual objects. The electronic device 110 can create asset files corresponding to virtual objects based on the node graph.
[0075] In some embodiments, the plurality of processing nodes include voxel operation nodes, which are configured to apply corresponding voxel operations to a specified space. In some embodiments, the voxel operation includes at least one of the following: a voxel filling operation for filling voxel data; a voxel erasing operation for erasing voxel data; an asset application operation for applying another asset file corresponding to an attached virtual object to a specified space; a voxel merging operation for merging voxel data in multiple spaces; and a voxel rotation operation for rotating voxel data.
[0076] In other words, the voxel-based operations and distribution / segmentation functions discussed in this disclosure can be encapsulated as processing nodes. Application developers or developers can define the inputs and outputs of processing nodes and interconnect multiple processing nodes with virtual object creation logic to complete the creation of asset files.
[0077] In some embodiments, application developers or developers can arrange and invoke spatial distribution / segmentation nodes and voxel manipulation nodes in the editor through drag-and-drop or other methods. Furthermore, application developers or developers can connect these nodes with lines, thereby enabling data transfer between input and output functions. In other words, application developers or developers can create asset files based on the voxel-based manipulation technology supported by the platform. In response to a virtual object creation instruction from user 140, electronic device 110 can invoke the corresponding asset file to complete the creation of the virtual object.
[0078] In some embodiments, the plurality of processing nodes include spatial processing nodes configured to output at least one subspace within a specified space. In some embodiments, the at least one subspace is determined based on a specified spatial distribution pattern. In some embodiments, the distribution pattern includes, but is not limited to, one-dimensional, two-dimensional, and three-dimensional patterns. In other embodiments, the distribution pattern includes, but is not limited to, random distribution, noise-based distribution, geometrical distribution, wave function collapse distribution, Lindenmayer system distribution, Hit SurfaceSampler distribution, etc.
[0079] In this way, application developers or creators can quickly create asset files that can help users quickly create virtual objects.
[0080] In some embodiments, user 140 can further edit the created virtual object. Specifically, in some embodiments, electronic device 110 receives an editing request for the created virtual object via an interactive interface, and presents the virtual object generated based on the editing request in the interactive interface. Additionally, in some embodiments, the editing request includes at least one of the following: updating a portion of the virtual object; or adding a new portion to the virtual object. In other words, user 140 can perform secondary editing of the created virtual object using the virtual object creation scheme discussed herein. Since the secondary creation process is similar to the virtual object creation process discussed above, for the sake of brevity, the secondary editing process will not be described again. In this way, the creation method discussed in this disclosure can be applied to the entire lifecycle of the virtual object.
[0081] Example process
[0082] Figure 5 A flowchart illustrating an example interaction process 500 in a virtual scene according to some embodiments of the present disclosure is shown. Process 500 can be implemented at electronic device 110. Reference is made below. Figure 1 To describe process 500.
[0083] In box 510, electronic device 110 receives a request to create a virtual object in a virtual scene.
[0084] In box 520, electronic device 110 divides the target space in the virtual scene into multiple subspaces based on the spatial distribution / segmentation information corresponding to the virtual object.
[0085] In box 530, the electronic device fills a set of subspaces with corresponding voxel data based on voxel configuration information corresponding to multiple subspaces to create virtual objects in a virtual scene.
[0086] In some embodiments, the electronic device 110 can acquire asset files corresponding to virtual objects; and based on the asset files, determine spatial segmentation information and voxel configuration information.
[0087] In some embodiments, the asset file is created based on the following process: in the asset editing interface, a node graph is created, which includes multiple connected processing nodes and indicates the process of creating virtual objects; and based on the node graph, an asset file corresponding to the virtual object is created.
[0088] In some embodiments, the plurality of processing nodes include a spatial processing node, which is configured to output at least one subspace in a specified space.
[0089] In some embodiments, at least one subspace is determined based on a specified spatial distribution pattern.
[0090] In some embodiments, the plurality of processing nodes include voxel operation nodes, which are configured to apply corresponding voxel operations to a specified space.
[0091] In some embodiments, voxel operations include at least one of the following: a voxel filling operation for filling voxel data; a voxel erasing operation for erasing voxel data; an asset application operation for applying another asset file corresponding to an attached virtual object to a specified space; a voxel merging operation for merging voxel data in multiple spaces; and a voxel rotation operation for rotating voxel data.
[0092] In some embodiments, the target space is determined based on the placement of the virtual object in the virtual scene and the request to create the virtual object.
[0093] In some embodiments, the electronic device 110 may receive an editing request for a created virtual object via an interactive interface; and present the virtual object generated based on the editing request in the interactive interface.
[0094] In some embodiments, an edit request includes at least one of the following: updating a portion of a virtual object; or adding a new portion to a virtual object.
[0095] Example devices and equipment
[0096] Embodiments of this disclosure also provide corresponding apparatus for implementing the above methods or processes. Figure 6 A schematic structural block diagram of an example device 600 for use in a virtual scene according to certain embodiments of the present disclosure is shown. Device 600 may be implemented as or included in electronic device 110. Various modules / components in device 600 may be implemented by hardware, software, firmware, or any combination thereof.
[0097] like Figure 6 As shown, the device 600 includes a request receiving module 610 configured to receive a request to create a virtual object in a virtual scene; a segmentation module 620 configured to divide a target space in the virtual scene into multiple subspaces based on spatial distribution / segmentation information corresponding to the virtual object; and a filling module 630 configured to fill a set of subspaces with corresponding voxel data based on voxel configuration information corresponding to the multiple subspaces, so as to create a virtual object in the virtual scene.
[0098] In some embodiments, the apparatus 600 further includes an asset file acquisition module configured to acquire an asset file corresponding to the virtual object; and an information determination module configured to determine spatial segmentation information and voxel configuration information based on the asset file.
[0099] In some embodiments, the asset file is created based on the following process: in the asset editing interface, a node graph is created, which includes multiple connected processing nodes and indicates the process of creating virtual objects; and based on the node graph, an asset file corresponding to the virtual object is created.
[0100] In some embodiments, the plurality of processing nodes include a spatial processing node, which is configured to output at least one subspace in a specified space.
[0101] In some embodiments, at least one subspace is determined based on a specified spatial distribution pattern.
[0102] In some embodiments, the plurality of processing nodes include voxel operation nodes, which are configured to apply corresponding voxel operations to a specified space.
[0103] In some embodiments, voxel operations include at least one of the following: a voxel filling operation for filling voxel data; a voxel erasing operation for erasing voxel data; an asset application operation for applying another asset file corresponding to an attached virtual object to a specified space; a voxel merging operation for merging voxel data in multiple spaces; and a voxel rotation operation for rotating voxel data.
[0104] In some embodiments, the target space is determined based on the placement of the virtual object in the virtual scene and the request to create the virtual object.
[0105] In some embodiments, the apparatus 600 further includes an edit request receiving module configured to receive an edit request for a created virtual object via an interactive interface; and a virtual object generation module configured to present the virtual object generated based on the edit request in the interactive interface.
[0106] In some embodiments, an edit request includes at least one of the following: updating a portion of a virtual object; or adding a new portion to a virtual object.
[0107] like Figure 7 As shown, electronic device 700 is in the form of a general-purpose electronic device. Components of electronic device 700 may include, but are not limited to, one or more processors or processing units 710, memory 720, storage device 730, one or more communication units 740, one or more input devices 770, and one or more output devices 760. Processing unit 710 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 720. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of electronic device 700.
[0108] Electronic device 700 typically includes multiple computer storage media. Such media can be any accessible media that is accessible to electronic device 700, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 720 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 730 can be removable or non-removable media and can include machine-readable media, such as flash drives, disks, or any other media that can be used to store information and / or data and can be accessed within electronic device 700.
[0109] Electronic device 700 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not explicitly stated... Figure 7 As shown, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks can be provided. In these cases, each drive can be connected to a bus (not shown) via one or more data media interfaces. Memory 720 may include computer program product 725 having one or more program modules configured to perform various methods or actions of various embodiments of this disclosure.
[0110] The communication unit 740 enables communication with other electronic devices via a communication medium. Additionally, the functionality of the components of the electronic device 700 can be implemented using a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the electronic device 700 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.
[0111] Input device 770 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 760 can be one or more output devices, such as a monitor, speaker, printer, etc. Electronic device 700 can also communicate with one or more external devices (not shown) via communication unit 740 as needed. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with electronic device 700, or with any device that enables electronic device 700 to communicate with one or more other electronic devices (e.g., network card, modem, etc.). Such communication can be performed via input / output (I / O) interface (not shown).
[0112] According to an exemplary implementation of this disclosure, a computer-readable storage medium is provided that stores computer-executable instructions thereon, wherein the computer-executable instructions are executed by a processor to implement the methods described above. According to an exemplary implementation of this disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, which are executed by a processor to implement the methods described above.
[0113] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0114] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0115] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0116] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0117] Various implementations of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the various implementations disclosed herein.
Claims
1. An interaction method in a virtual scene, comprising: Receive requests to create virtual objects in a virtual scene; In the asset editing interface, a node graph is created, which includes multiple connected processing nodes and indicates the process of creating the virtual object. Based on the node graph, create an asset file corresponding to the virtual object; Based on the asset file, determine the spatial distribution / segmentation information corresponding to the virtual object; Based on the spatial distribution / segmentation information corresponding to the virtual object, the target space in the virtual scene is divided into multiple subspaces; Based on the asset file, determine the voxel configuration information corresponding to the multiple subspaces; as well as Based on the voxel configuration information corresponding to the plurality of subspaces, the corresponding voxel data is filled into a group of subspaces among the plurality of subspaces to create the virtual object in the virtual scene.
2. The method according to claim 1, wherein the plurality of processing nodes includes a spatial processing node, the spatial processing node being configured to output at least one subspace in a specified space.
3. The method according to claim 2, wherein the at least one subspace is determined based on a specified spatial distribution pattern.
4. The method according to claim 1, wherein the plurality of processing nodes includes voxel operation nodes, the voxel operation nodes being configured to apply corresponding voxel operations to a specified space.
5. The method of claim 4, wherein the voxel operation comprises at least one of the following: The voxel filling operation is used to fill voxel data; The voxel erasure operation is used to erase voxel data; Asset application operation, used to apply another asset file corresponding to the attached virtual object to a specified space; The voxel merging operation is used to merge voxel data from multiple spaces; Voxel rotation operation, used to rotate voxel data.
6. The method of claim 1, wherein the target space is determined based on the placement position of the virtual object in the virtual scene and the request to create the virtual object.
7. The method according to claim 1, further comprising: The system receives editing requests for the created virtual object via an interactive interface. as well as The interactive interface displays a virtual object generated based on the edit request.
8. The method of claim 7, wherein the editing request comprises at least one of the following: Update a portion of the virtual object; or Add new parts to the virtual object.
9. An interactive device for a virtual scene, comprising: The request receiving module is configured to receive requests to create virtual objects in the virtual scene; The asset file acquisition module is configured to acquire the asset file corresponding to the virtual object; The information determination module is configured to determine the spatial distribution / segmentation information corresponding to the virtual object based on the asset file; The segmentation module is configured to divide the target space in the virtual scene into multiple subspaces based on the spatial distribution / segmentation information corresponding to the virtual object; as well as The filling module is configured to fill a set of subspaces with corresponding voxel data based on voxel configuration information corresponding to the plurality of subspaces, so as to create the virtual object in the virtual scene.
10. An electronic device, comprising: At least one processing unit; as well as At least one memory, coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, which, when executed by the at least one processing unit, cause the electronic device to perform the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Object construction method and device based on virtual environment and readable storage medium
CN110047152A
Virtual scene making method and device, equipment and storage medium
CN116580149A