Virtual model processing method and device, electronic equipment, computer readable storage medium and computer program product
By finely processing the components of the virtual model and generating the processed virtual model, the problems of single and fixed processing methods in the existing technology are solved, and more flexible and efficient virtual model processing is achieved, and display effect and resource utilization efficiency are improved.
Patent Information
- Application Number
- CN202510210047.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-06-13
AI Technical Summary
In the prior art, the fineness processing method of virtual models is relatively single, and the display effect of virtual models cannot be effectively improved. The size of the processed virtual model is inconsistent with the size of the original model, the fineness is fixed, and the selectivity is low.
A virtual model processing method is provided. By displaying the virtual model to be processed, processing the components of the virtual model in response to the selection instruction, outputting the processed virtual model. The specific steps include displaying the virtual model to be processed, selecting and placing the components in the selected state, and finely processing based on the components of the selected state, and generating the processed virtual model.
The diversity of methods of fine processing of virtual models has been improved, and the fineness of virtual models can be reduced or improved according to actual needs, the utilization of storage resources and the display effect is improved. There is no need to comprehensively fine processing of the entire virtual model, saving computing resources.
Smart Images

Figure CN120145658A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data processing, and in particular, to a method, apparatus, electronic device, computer-readable storage medium, and computer program product for processing a virtual model. Background Art
[0002] A virtual model is used to simulate an object or environment in the real world in a virtual space. To improve the display effect of the virtual model, the level of detail of the virtual model can be increased. However, in the related art, it is necessary to process the overall level of detail of the virtual model. It can be seen that the method for processing the level of detail of the virtual model in the related art is relatively single. Summary of the Invention
[0003] Embodiments of the present application provide a method, apparatus, electronic device, computer-readable storage medium, and computer program product for processing a virtual model, which can improve the diversity of the method for processing the level of detail of the virtual model.
[0004] The technical solution of the embodiments of the present application is implemented as follows:
[0005] Embodiments of the present application provide a method for processing a virtual model, the method comprising:
[0006] Displaying a first virtual model to be processed, the first virtual model including a plurality of components;
[0007] Responding to a selection instruction for a first component in the first virtual model, and controlling the first component to be in a selected state;
[0008] Based on the first component in the selected state, responding to a model processing instruction, and outputting a second virtual model obtained by processing the level of detail of the first virtual model;
[0009] Wherein, a first level of detail of the first component in the second virtual model is different from a second level of detail of the first component in the first virtual model.
[0010] Embodiments of the present application provide a device for processing a virtual model, the device comprising
[0011] A display module, configured to display a first virtual model to be processed, the first virtual model including a plurality of components;
[0012] A response module, configured to respond to a selection instruction for a first component in the first virtual model, and control the first component to be in a selected state;
[0013] The response module is further configured to, based on the first component in the selected state, in response to a model processing instruction, output a second virtual model obtained by processing the level of detail of the first virtual model;
[0014] Wherein, a first level of detail of the first component in the second virtual model is different from a second level of detail of the first component in the first virtual model.
[0015] In the above solution, before the response module is further configured to, based on the first component in the selected state, in response to a model processing instruction, output a second virtual model obtained by processing the level of detail of the first virtual model, a setting area for setting the level of detail is displayed; in response to a setting instruction triggered based on the setting area, the level of detail indicated by the setting instruction is displayed, and the set level of detail is determined as the first level of detail.
[0016] In the above solution, the setting area includes a voice input control; the response module is further configured to, in response to a triggering operation on the voice input control, enable a voice recording function and receive voice content recorded based on the voice recording function; in response to the end of the voice content recording and when the voice content includes content characterizing the level of detail, trigger the setting instruction, determine the level of detail characterized by the voice content as the level of detail indicated by the setting instruction, and display the level of detail characterized by the voice content.
[0017] In the above solution, the setting area includes a first setting area; the response module is further configured to display the input level of detail in the first setting area; in response to a first determination instruction for the input level of detail, use the first determination instruction as the setting instruction, and determine the input level of detail as the level of detail indicated by the setting instruction.
[0018] In the above solution, the setting area includes a second setting area, and setting controls for the level of detail are displayed in the second setting area; the response module is further configured to, in response to a triggering operation on the setting control, display a plurality of candidates corresponding to different levels of detail; in response to a selection operation on a first candidate among the plurality of candidates, highlight the first candidate; in response to a second determination instruction for the first candidate, use the second determination instruction as the setting instruction, and determine the level of detail corresponding to the first candidate as the level of detail indicated by the setting instruction.
[0019] In the above solution, the response module is further configured to, in response to a triggering operation on the setting control, display a plurality of candidates, and each candidate corresponds to a level of detail grade;
[0020] The response module is further configured to determine the fineness of the level corresponding to the first candidate item, and determine the fineness of the level as the fineness indicated to be set by the setting instruction.
[0021] In the above solution, the fineness corresponds to at least one parameter. The response module is further configured to, in response to a trigger operation on the setting control, display a plurality of candidate items corresponding to the parameters, and each candidate item corresponds to a parameter value of one of the parameters.
[0022] The response module is further configured to determine the parameter value of the parameter corresponding to the first candidate item, and determine the fineness characterized by the parameter value as the fineness indicated to be set by the setting instruction.
[0023] In the above solution, the response module is further configured to, based on the first component in the selected state, in response to a model processing instruction, display a save control after outputting a second virtual model obtained by processing the fineness of the first virtual model; in response to a trigger operation on the save control, save the processing method for processing the fineness of the first virtual model, and display an application control for the saved processing method; wherein, the application control is configured to, using the processing method, process the fineness of the virtual model to be processed with one key.
[0024] In the above solution, the response module is further configured to, in response to a selection instruction for the first component in the first virtual model, display recommendation information on the second fineness and the fineness of the first component, where the recommendation information is used to recommend the fineness corresponding to the first component; in response to a third determination instruction for the recommendation information, determine the recommended fineness as the first fineness.
[0025] In the above solution, the response module is further configured to, based on the first component in the selected state, in response to a model processing instruction, display a special effect for processing the fineness of the first component; in response to the completion of the processing of the fineness of the first component, cancel the display of the special effect, and display a replacement process of the first component in the first virtual model, where the replacement process is used to indicate replacing the first component in the first virtual model with the processed first component; in response to the completion of the display of the replacement process, output the second virtual model.
[0026] In the above solution, the response module is further configured to, after outputting the second virtual model, display a comparison control, where the comparison control is used to compare the first virtual model and the second virtual model; in response to a trigger operation on the comparison control, display the first virtual model and the second virtual model simultaneously, and display the comparison result between the level of detail of the first virtual model and the level of detail of the second virtual model.
[0027] In the above solution, the response module is further configured to, in response to selection instructions for a plurality of the first components that are continuously triggered, synchronously control each of the first components to be in a selected state, and display a quantity prompt message for the first components, where the quantity prompt message is used to prompt the maximum selectable quantity of the first components.
[0028] In the above solution, the response module is further configured to, based on the first components in a selected state, in response to a model processing instruction, if the model processing instruction indicates to increase the level of detail of the first components and the level of detail of the first components reaches a first level-of-detail threshold, display a first prompt message, where the first prompt message is used to prompt that the level of detail of the first components cannot be increased;
[0029] Or, if the model processing instruction indicates to decrease the level of detail of the first components and the level of detail of the first components reaches a second level-of-detail threshold, display a second prompt message, where the second prompt message is used to prompt that the level of detail of the first components cannot be decreased.
[0030] In the above solution, the response module is further configured to, in response to a gap existing between the first components and the second components in the second virtual model, display a fusion control; where the second components are adjacent to the first components; in response to a trigger operation on the fusion control, fuse the first components and the second components in the second virtual model, and display a third virtual model obtained by fusion, where the first components and the second components in the third virtual model are smoothly connected.
[0031] In the above solution, the response module is further configured to determine a first point in the point cloud of the first components, and determine a second point in the point cloud of the second components; for each of the first points, determine the interval distance between the first point and each of the second points; fuse the first point and the second point with the smallest interval distance; repeat the above operations until the first components and the second components are smoothly connected.
[0032] In the above solution, the response module is further configured to display a first virtual model to be processed and display a partitioning control for the first virtual model; in response to a trigger operation on the partitioning control, display the multiple components obtained by partitioning the first virtual model in different first display styles.
[0033] In the above solution, the response module is further configured to, in response to a trigger operation on the partitioning control, render images of the first virtual model from different perspectives for the first virtual model, where the images include multiple fourth points; obtain a point cloud of the first virtual model, where the point cloud of the first virtual model includes multiple third points; determine the categories of the fourth points and determine the mapping relationship between the third points and the fourth points in the images; determine the categories of the third points based on the categories of the fourth points and the mapping relationship; and partition the first virtual model based on the categories of the third points to obtain the multiple components.
[0034] In the above solution, the response module is further configured to, in response to a drawing operation of a geometric figure, display the drawn geometric figure; in response to the geometric figure including a component of the first virtual model, determine the component in the geometric figure as a first component, trigger a selection instruction for the first component in the first virtual model, and control the first component to be in a selected state.
[0035] In the above solution, the response module is further configured to, in response to a model processing instruction, obtain a first feature of the first component, where the first feature corresponds to a second level of detail of the first component; predict a second feature of the first level of detail based on the first feature, where the second level of detail is different from the first level of detail; generate the first component after processing the level of detail of the first component based on the second feature; and output a second virtual model after processing the level of detail of the first virtual model based on the processed first component.
[0036] An embodiment of the present application provides an electronic device, where the electronic device includes:
[0037] A memory for storing computer-executable instructions or a computer program;
[0038] A processor for implementing the virtual model processing method provided by the embodiment of the present application when executing the computer-executable instructions or the computer program stored in the memory.
[0039] An embodiment of the present application provides a computer-readable storage medium storing a computer program or computer-executable instructions. When the computer-executable instructions or the computer program are executed by a processor, a method for processing a virtual model provided by the embodiment of the present application is implemented.
[0040] An embodiment of the present application provides a computer program product including a computer program or computer-executable instructions. When the computer program or the computer-executable instructions are executed by a processor, a method for processing a virtual model provided by the embodiment of the present application is implemented.
[0041] The embodiment of the present application has the following beneficial effects:
[0042] In the method for processing a virtual model provided by the embodiment of the present application, a first virtual model to be processed can be displayed. The first virtual model includes multiple components. In response to a selection instruction for a first component in the first virtual model, the first component is controlled to be in a selected state. Based on the first component in the selected state, in response to a model processing instruction, a second virtual model obtained by processing the level of detail of the first virtual model is output, where the level of detail of the first component in the second virtual model is different from the level of detail of the first component in the first virtual model.
[0043] The first level of detail of the first component in the second virtual model can be lower than the second level of detail of the first component in the first virtual model, which is equivalent to reducing the level of detail of the first virtual model, thereby reducing the storage resources occupied by the first virtual model. The first level of detail of the first component in the second virtual model can be higher than the second level of detail of the first component in the first virtual model, which is equivalent to increasing the level of detail of the first virtual model. The embodiment of the present application can reduce the level of detail of the first component corresponding to the selection instruction and increase the level of detail of the first component corresponding to the selection instruction according to actual usage requirements, which can improve the flexibility of processing the virtual model. Compared with the related art, it provides a rich way to process the virtual model, that is, it can improve the diversity of the ways to process the level of detail of the virtual model. For the case of increasing the level of detail of the first component corresponding to the selection instruction, there is no need to process the level of detail of the entire first virtual model, which can reduce the computing resources occupied during the processing. Moreover, the level of detail of the first component in the processed second virtual model is higher than the level of detail of the first component in the first virtual model. Compared with the first virtual model, the display effect of the second virtual model is better, which is equivalent to improving the display effect of the second virtual model. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 is a schematic structural diagram of a virtual model processing system provided by an embodiment of the present application;
[0045] Figure 2 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;
[0046] Figure 3 is a schematic flowchart of a method for processing a virtual model provided by an embodiment of the present application Figure 1 ;
[0047] Figure 4 is a schematic diagram of an interface provided by an embodiment of the present application Figure 1 ;
[0048] Figure 5 is a schematic diagram of an interface provided by an embodiment of the present application Figure 2 ;
[0049] Figure 6 is a schematic structural diagram of a semantic segmentation model provided by an embodiment of the present application;
[0050] Figure 7 is a schematic diagram of an interface provided by an embodiment of the present application Figure 3 ;
[0051] Figure 8 is a schematic diagram of an interface provided by an embodiment of the present application Figure 4 ;
[0052] Figure 9 is a schematic diagram of an interface provided by an embodiment of the present application Figure 5 ;
[0053] Figure 10 is a schematic diagram of an interface provided by an embodiment of the present application Figure 6 ;
[0054] Figure 11 is a schematic flowchart of a method for processing a virtual model provided by an embodiment of the present application Figure 2 ;
[0055] Figure 12 is a schematic diagram of an interface provided by an embodiment of the present application Figure 7 ;
[0056] Figure 13 is a schematic diagram of an interface provided by an embodiment of the present application Figure 8 ;
[0057] Figure 14 is a schematic diagram of an interface provided by an embodiment of the present application Figure 9 ;
[0058] Figure 15 is a schematic diagram of an interface provided by an embodiment of the present application Figure 10 ;
[0059] Figure 16Schematic diagram of the interface provided by the embodiments of the present application Figure 10 One;
[0060] Figure 17 Schematic diagram of the interface provided by the embodiments of the present application Figure 10 Two;
[0061] Figure 18 Schematic diagram of the interface provided by the embodiments of the present application Figure 10 Three;
[0062] Figure 19 Schematic diagram of the interface provided by the embodiments of the present application Figure 10 Four;
[0063] Figure 20 Schematic diagram of the interface provided by the embodiments of the present application Figure 10 Five;
[0064] Figure 21 Schematic diagram of the interface provided by the embodiments of the present application Figure 10 Six;
[0065] Figure 22 Schematic diagram of the interface provided by the embodiments of the present application Figure 10 Seven;
[0066] Figure 23 Schematic diagram of the interface provided by the embodiments of the present application Figure 10 Eight;
[0067] Figure 24 Schematic diagram of the interface provided by the embodiments of the present application Figure 10 Nine;
[0068] Figure 25 Schematic diagram of the interface provided by the embodiments of the present application Figure 2 Ten;
[0069] Figure 26 Schematic diagram of the interface provided by the embodiments of the present application Figure 2 Eleven;
[0070] Figure 27 Schematic diagram of the interface provided by the embodiments of the present application Figure 2 Twelve;
[0071] Figure 28 Schematic diagram of the interface provided by the embodiments of the present application Figure 2 Thirteen;
[0072] Figure 29 Schematic structural diagram of the fineness processing model provided by the embodiments of the present application;
[0073] Figure 30 Schematic flow of the method for processing the virtual model provided by the embodiments of the present application Figure 3;
[0074] Figure 31 is a schematic flow chart of the method for processing a virtual model provided by an embodiment of the present application Figure 4 ;
[0075] Figure 32 is a schematic flow chart of the method for processing a virtual model provided by an embodiment of the present application Figure 5 。 Detailed implementation manners
[0076] In order to make the objectives, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be construed as limitations on the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present application.
[0077] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0078] In the following description, the terms "first / second / third" are only used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first / second / third" can be interchanged with a specific order or sequence when allowed, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0079] In the embodiments of the present application, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works together with other related parts to achieve a predetermined goal, and can be fully or partially implemented by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of the overall module or unit that includes the function of the module or unit.
[0080] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meaning as commonly understood by those skilled in the art to which the present application belongs. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0081] In the embodiments of the present application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations during actual application, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope authorized by laws, regulations, and the personal information subject.
[0082] Before further elaborating on the embodiments of the present application, the nouns and terms involved in the embodiments of the present application are described. The nouns and terms involved in the embodiments of the present application are applicable to the following explanations.
[0083] 1) Responsive to, used to indicate the conditions or states upon which the executed operations depend. When the dependent conditions or states are met, one or more executed operations can be real-time or can have a set delay; without special instructions, there is no restriction on the execution order of the multiple executed operations.
[0084] 2) Human-computer interaction interface, an interface for providing human-computer interaction functions / displaying virtual models, where the virtual model can be at least one of a first virtual model to be processed and a second virtual model obtained by processing the refinement level of the first virtual model.
[0085] For example, graphical user interface (GUI) display, such as augmented reality (AR) interface, virtual reality (VR) interface, voice user interface (VUI), interactive projection interface (using projection technology to display information on a flat surface), eye movement detection interface (an interface controlled by detecting the user's line of sight), holographic interface (a three-dimensional hologram formed by projecting an image through holographic projection technology, allowing a stereoscopic image to be seen without wearing special glasses), multimodal interface (an interactive interface that combines multiple interaction methods such as touch, vision, and hearing), brain-machine interface (BMI) interface, etc.
[0086] 3) Client, also known as the user side, refers to a program that provides local services corresponding to the server. Except for some applications that can only run locally, it is generally installed on ordinary client machines and needs to cooperate with the server to run, that is, there needs to be a corresponding server and service program in the network to provide corresponding services. In this way, a specific communication connection needs to be established between the client side and the server side to ensure the normal operation of the application program. The client can be a client that needs to perform content search. For example, the client can be any one of a client for processing virtual models, a game client, and a virtual reality client, and can be specifically set according to actual usage requirements.
[0087] 4) Virtual model, at least one of a virtual three-dimensional object and a virtual three-dimensional scene created by computer software, and the virtual model is used to simulate real-world objects or environments in a virtual space.
[0088] 5) A virtual scene (i.e., a virtual three-dimensional scene) is a virtual scene displayed (or provided) when an application runs on a terminal. The virtual scene can be a simulation environment of the real world, a semi-simulated and semi-fictional virtual environment, or a purely fictional virtual environment.
[0089] For example, the virtual scene can include the sky, land, ocean, etc. The land can include environmental elements such as deserts and cities. Users can control virtual objects to perform activities in the virtual scene. The activities include, but are not limited to, at least one of adjusting body postures, crawling, walking, running, cycling, jumping, driving, picking up, shooting, attacking, and throwing. The virtual scene can be displayed from the first-person perspective (e.g., playing the virtual object in the game from the user's own perspective); it can also be displayed from the third-person perspective (e.g., the user chasing the virtual object in the game to play); it can also be displayed from an aerial perspective. The above perspectives can be switched arbitrarily.
[0090] 6) A virtual object (i.e., a virtual three-dimensional object) is the image of various people and objects that can interact in a virtual scene, or an object that can move in a virtual scene. The movable object can be a virtual character, a virtual animal, an anime character, etc. For example: people, animals, plants, oil drums, walls, stones, etc. displayed in the virtual scene. The virtual object can be a virtual image in the virtual scene used to represent the user. The virtual scene can include multiple virtual objects. Each virtual object has its own shape and volume in the virtual scene and occupies a part of the space in the virtual scene.
[0091] For example, the virtual object can be a user role controlled through operations on the client, or an artificial intelligence (AI) set in the virtual scene battle through training, or a non-player character (NPC) set in the virtual scene interaction. Among them, the number of virtual objects participating in the interaction in the virtual scene can be preset or dynamically determined according to the number of clients joining the interaction.
[0092] The inventor found the following technical problems in the research process:
[0093] Technical Problem 1: In the related art, it is necessary to process the overall fineness of the virtual model, and the method of processing the fineness of the virtual model in the related art is relatively single.
[0094] Technical problem 2. In the related art, a virtual model can be input into a pre-trained model, which is used to process the overall fineness of the virtual model to obtain a processed virtual model. However, the size of the processed virtual model is inconsistent with that of the virtual model before processing.
[0095] Technical problem 3. Continuing from Technical problem 2, the fineness of the processed virtual model is related to the model. That is, when the model is fixed, the fineness of the processed virtual model is fixed, and the selectivity for the fineness of the virtual model is relatively low.
[0096] The embodiments of the present application provide a method for processing a virtual model, an apparatus for processing a virtual model, an electronic device, a computer-readable storage medium, and a computer program product, which can improve the diversity of the ways to process the fineness of the virtual model.
[0097] Refer to Figure 1 , Figure 1 which is a schematic structural diagram of a virtual model processing system provided by the embodiments of the present application. Figure 1 The shown virtual model processing system 100 is to support a virtual model processing application. The terminal 400 is connected to the server 200 through the network 300. The network 300 can be a wide area network, a local area network, or a combination of the two.
[0098] In some embodiments, the first virtual model to be processed can be displayed in the graphical interface 410-1 of the terminal 400. The first virtual model includes multiple components. In some embodiments, when the terminal 400 does not store the file of the first virtual model to be processed, a file acquisition instruction can be sent to the server 200. Then, the server 200 can send the file of the first virtual model to the terminal 400, so that the terminal 400 can display the first virtual model to be processed in the graphical interface 410-1.
[0099] The first virtual model includes multiple components. The terminal 400 responds to a selection instruction for the first component in the first virtual model, controls the first component to be in a selected state, and based on the first component in the selected state, responds to a model processing instruction to output a second virtual model obtained by processing the fineness of the first virtual model, where the first fineness of the first component in the second virtual model is different from the second fineness of the first component in the first virtual model.
[0100] In the method for processing a virtual model provided in the embodiments of the present application, the first level of detail of the first component in the second virtual model may be lower than the second level of detail of the first component in the first virtual model. This is equivalent to reducing the level of detail of the first virtual model, thereby reducing the storage resources occupied by the first virtual model. The first level of detail of the first component in the second virtual model may be higher than the second level of detail of the first component in the first virtual model. This is equivalent to increasing the level of detail of the first virtual model. In the embodiments of the present application, the level of detail of the first component corresponding to the selection instruction can be reduced or increased according to actual usage requirements, which can improve the flexibility of processing the virtual model. Compared with the related art, a rich variety of ways to process the virtual model are provided, that is, the diversity of the ways to process the level of detail of the virtual model can be improved. For the case of increasing the level of detail of the first component corresponding to the selection instruction, it is not necessary to process the level of detail of the entire first virtual model, which can reduce the computing resources occupied during the processing. Moreover, the level of detail of the first component in the processed second virtual model is higher than that of the first component in the first virtual model. Compared with the first virtual model, the display effect of the second virtual model is better, which is equivalent to being able to improve the display effect of the second virtual model.
[0101] The following describes an electronic device for implementing the method for processing a virtual model in the embodiments of the present application. The electronic device for implementing the method for processing a virtual model in the embodiments of the present application can be a terminal, a server, or a combination of both. In some embodiments, the terminal can be implemented as various types of terminals such as a laptop computer, a tablet computer, a desktop computer, a set-top box, a smart phone, a smart speaker, a smart watch, a smart TV, a vehicle-mounted terminal, etc.
[0102] In some embodiments, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms. The terminal and the server can be directly or indirectly connected through wired or wireless communication methods, which are not limited in the embodiments of the present application.
[0103] See Figure 2 , Figure 2 which is a schematic structural diagram of the electronic device provided in the embodiments of the present application. Figure 2The electronic device shown includes: at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. Each component in the electronic device is coupled together through a bus system 440. It can be understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clear illustration, in Figure 2 all kinds of buses are labeled as the bus system 440.
[0104] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0105] The user interface 430 includes one or more output devices 431 that enable the presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, a mouse, a microphone, a touch screen display, a camera, other input buttons, and controls.
[0106] The memory 450 can be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disc drives, etc. Optionally, the memory 450 includes one or more storage devices that are physically located far from the processor 410.
[0107] The memory 450 includes volatile memory or non-volatile memory, and can also include both volatile and non-volatile memory. The non-volatile memory can be a read-only memory (ROM), and the volatile memory can be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0108] In some embodiments, the memory 450 is capable of storing data to support various operations. Examples of these data include programs, modules, and data structures, or subsets or supersets thereof, which are illustrated below.
[0109] An operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0110] A network communication module 452 for reaching other electronic devices via one or more (wired or wireless) network interfaces 420. Exemplary network interfaces 420 include: Bluetooth, Wireless Fidelity (WiFi), and Universal Serial Bus (USB), etc.
[0111] A presentation module 453 for enabling the presentation of information (such as a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 associated with the user interface 430 (such as a display screen, a speaker, etc.).
[0112] An input processing module 454 for detecting and translating one or more user inputs or interactions from one of one or more input devices 432.
[0113] In some embodiments, the processing device of the virtual model provided in the embodiments of the present application can be implemented in software. Figure 2 Shown is a processing device 455 of the virtual model stored in the memory 450, which can be software in the form of programs and plugins, etc., including the following software modules: a display module 4551 and a response module 4552. These modules are logical, so they can be combined arbitrarily or further split according to the functions implemented. The functions of each module will be described below.
[0114] In other embodiments, the processing device of the virtual model provided in the embodiments of the present application can be implemented in hardware. As an example, the processing device of the virtual model provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the processing method of the virtual model provided in the embodiments of the present application. For example, a processor in the form of a hardware decoding processor can employ one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field-Programmable Gate Arrays (FPGAs), or other electronic components.
[0115] In some embodiments, a terminal or a server may implement the method for processing a virtual model provided in the embodiments of the present application by running various computer-executable instructions or computer programs. For example, the computer-executable instructions may be commands at the microprogram level, machine instructions, or software instructions. The computer program may be a native program or a software module in an operating system; it may be a native application (APPlication, APP), that is, a program that needs to be installed in the operating system to run, such as any one of an application for processing a virtual model, a game application, and a virtual reality application; or it may be a small program that can be embedded in any application, that is, a program that only needs to be downloaded to a browser environment to run. In short, the above computer-executable instructions may be instructions in any form, and the above computer programs may be applications, modules, or plugins in any form.
[0116] The following describes the method for processing a virtual model provided in the embodiments of the present application. As described above, the electronic device for implementing the method for processing a virtual model in the embodiments of the present application may be a terminal, a server, or a combination of the two. Refer to Figure 3 , Figure 3 is a flowchart showing the method for processing a virtual model provided in the embodiments of the present application. Figure 1 The following, in conjunction with Figure 3 the steps shown, taking the electronic device as a terminal as an example, the method for processing a virtual model provided in the embodiments of the present application will be described.
[0117] In step 101, display a first virtual model to be processed.
[0118] In the actual application process, the terminal may be installed with an application program, and the application program may be any one of an application program for processing a virtual model, a game application program, and a virtual reality application program. In response to a trigger operation for the application program, the display interface of the application program may be displayed.
[0119] In some embodiments, an upload control may be displayed in the display interface of the application program, and the upload control is used to upload a virtual model to be processed. In response to a trigger operation for the upload control, files of at least one virtual model pre-stored in the terminal may be displayed. In response to a selection operation for a target file, a first virtual model to be processed may be displayed in the display interface of the application program, where the target file is the file of the first virtual model, and the data of the first virtual model is stored in the target file.
[0120] The format of the file can be the Wavefront Object (Obj) format, or the Filmbox (fbx) format, or the glb format. Glb can be referred to as the Graphics Language Transmission Format Binary file. Of course, it can also be the format of other virtual models in this field, which is not specifically limited here.
[0121] The virtual model can be a virtual three-dimensional model. When the virtual three-dimensional model is displayed in a polygon mesh, the virtual three-dimensional model can be composed of vertices, patches, materials, and textures. When the virtual three-dimensional model is displayed in a point cloud, the virtual three-dimensional model can be composed of multiple three-dimensional points. When the virtual three-dimensional model is displayed in voxels, the virtual three-dimensional model can be composed of multiple cube units. Switching can be performed between different display forms, which can be specifically set according to actual usage requirements.
[0122] In some embodiments, in response to moving the target file to the associated area of the upload control, the first virtual model to be processed can be displayed. The associated area of the upload control can be the display area of the upload control, or the area formed by the distance between the target point in the display area and the first distance threshold being less than the first distance threshold. The target point in the display area can be any point in the display area, which can be specifically set according to actual usage requirements.
[0123] In some embodiments, the first virtual model can be the virtual model displayed in the previous use of the application. In response to a trigger operation on the application, the display interface of the application can be displayed, and the first virtual model to be processed can be displayed in the display interface of the application. In this way, when the display interface of the application is displayed, the virtual model displayed last time can be automatically displayed without the user manually selecting the first virtual model to be processed each time, which can improve the user experience.
[0124] In some embodiments, the first virtual model includes multiple components. The multiple components can form the first virtual model. For different first virtual models, the components can also be different. The division of the components can be set according to actual usage requirements.
[0125] In some embodiments, the first virtual model to be processed can be displayed, and a division control for the first virtual model can be displayed. For example, see Figure 4 , Figure 4 is a schematic diagram of the interface provided by the embodiments of the present application Figure 1, the interface can be the display interface of the electronic device, which can display the first virtual model 401 to be processed in the interface, and display the division control 402 for the first virtual model 401. Among them, the division control is used to divide the first virtual model into multiple components.
[0126] In response to the triggering operation on the division control, the first virtual model is divided to obtain multiple components included in the first virtual model. The multiple components can be combined to obtain the first virtual model. After obtaining the multiple components, different first display styles can be used to display the multiple components obtained by dividing the first virtual model.
[0127] To facilitate the understanding of the virtual model and components in this application, the virtual model and components are illustrated below. When the virtual model is a virtual character, the components can be the head, torso, and limbs, and the components can also be the face, brain, chest, abdomen, back, waist, arms, and legs. When the virtual model is a table, the components can be the tabletop, table legs, table feet, table frame, and drawer. The virtual model can be the above-mentioned first virtual model.
[0128] For example, in response to Figure 4 the triggering operation on the division control 402 shown, Figure 4 the first virtual model 401 shown is divided to obtain multiple components. Refer to Figure 5 , Figure 5 which is a schematic diagram of the interface provided by the embodiment of the present application Figure 2 , continuing Figure 4 , the components include the left ear 501, eyes 502, nose 503, arm 504, left foot 505, right ear 506, and right foot 507.
[0129] In some embodiments, different first display styles can be used to display the multiple components obtained by dividing the first virtual model. Among them, the different first display styles can be one or more representations of different filling colors, different filling patterns, different texts, different graphic identifiers, different boldness levels, and different display areas.
[0130] In some embodiments, the components have types, and the display styles of the same type of components can be the same, while the display styles of different types of components can be different. For example, in Figure 5Among them, the left ear 501 and the right ear 506 both belong to the ears, that is, the left ear 501 and the right ear 506 are of the same type, the patterns filled in the left ear 501 and the right ear 506 are the same, that is, the display styles of the left ear 501 and the right ear 506 are the same. The left ear 501 and the eye 502 are of different types, and the display styles of the left ear 501 and the eye 502 are different. In this way, different types of components can be marked with different display styles, which can improve the diversity of the displayed components and facilitate users to more intuitively distinguish different types of components.
[0131] In some embodiments, the display styles of components of the same type can be different. That is to say, one component corresponds to one display style, and the display styles of different components are different. For example, in Figure 5 Among them, the left foot 505 and the right foot 507 both belong to the feet, that is, the left foot 505 and the right foot 507 are of the same type, the pattern filled in the left foot 505 is different from the pattern filled in the right foot 507, that is, the display style of the left foot 505 is different from the display style of the right foot 507. In this way, different components can be marked with different display styles, which can improve the diversity of the displayed components and facilitate users to more intuitively distinguish different components.
[0132] The following describes the method of dividing the first virtual model. In response to a trigger operation on the dividing control, for the first virtual model, render images of the first virtual model from different perspectives. The images include a plurality of fourth points, and the fourth points are pixel points in the images. One perspective can correspond to one image, and the number of images is multiple. According to actual usage requirements, one perspective can also correspond to multiple images, which can be specifically set according to actual usage requirements.
[0133] For the first virtual model, a virtual camera position and a rotation matrix can be set, which is equivalent to setting the pose of the virtual camera. According to actual usage requirements, set at intervals of a preset angle, and render the image of the first virtual model from the corresponding perspective by means of beam projection. The angle interval between adjacent perspectives is the preset angle. The rendering method can be determined according to the first virtual model. In the case where the first virtual model is a polygon model, beam projection can be used for rendering. If the first virtual model is represented by point clouds and voxels, the first virtual model can also be rendered from the corresponding perspective by volume rendering.
[0134] For each fourth point in the image, the category of the fourth point can be determined. The method for determining the category of the fourth point will be described below. In some embodiments, for each image, the image can be input into a pre-trained semantic segmentation model, so as to output the semantic category of each fourth point, thereby completing the determination of the category of the fourth point. The semantic category refers to the category label of each pixel point in the image. Of course, the semantic category can also be the category label of the region to which each pixel point in the image belongs.
[0135] Semantic segmentation is a task in computer vision, whose goal is to assign a category label (corresponding to the semantic category) to each pixel in the image, so as to identify the components of different objects and scenes in the image. The semantic category is the semantic label of different objects or regions in the image. The semantic category is used to describe each part of the image. For example, the semantic type can be "sky", "ground", "building", "vehicle", "pedestrian", etc., which can be determined specifically in combination with the image.
[0136] In some embodiments, the semantic segmentation model can include an input layer, a feature extraction layer, a classification layer, and an output layer. Refer to Figure 6 , Figure 6 which is a schematic structural diagram of the semantic segmentation model provided by the embodiments of the present application. The semantic segmentation model 601 includes an input layer 602, a feature extraction layer 603, a classification layer 604, and an output layer 605.
[0137] The input layer is used to receive the image. The feature extraction layer is used to extract the first features of the image through convolution and pooling operations and reduce the spatial resolution. Furthermore, the spatial resolution of the feature map composed of the first features can be restored through upsampling operations, so as to generate a high-resolution segmentation feature map. The classification layer is used to assign each pixel point in the segmentation feature map output by the feature extraction layer to a predefined semantic category, and the output layer is used to convert the content output by the classification layer into a semantic category.
[0138] The training process of the semantic segmentation model will be described below. The sample image can be input into the semantic segmentation model. The features of the sample image are extracted through the semantic segmentation model to obtain the feature map of the sample image. Furthermore, each pixel point in the feature map of the sample image can be assigned to a predefined semantic category, and the predicted semantic category is output. Based on the difference between the predicted semantic category and the label semantic category of each pixel point in the sample image, the parameters of the semantic segmentation model are updated.
[0139] In some embodiments, the point cloud of the first virtual model can be obtained. The point cloud of the first virtual model includes a plurality of third points. After obtaining the fourth point and the third points, the mapping relationship between the third points and the fourth point in the image can be determined. In some embodiments, during the process of rendering images of the first virtual model from different perspectives for the first virtual model, the mapping relationship between the fourth point in the image and the third points can be synchronously recorded. There is a corresponding mapping relationship for one image, and the number of copies of the mapping relationship is consistent with the number of images.
[0140] Based on the category of the fourth point and the mapping relationship, the category of the third point is determined. After determining the category of the fourth point, the third points having a mapping relationship with the fourth point can be determined, and the category of the third points having a mapping relationship with the fourth point is determined as the category of the fourth point. This is equivalent to, for each image, using the back-projection method to transfer the semantic category of each pixel point in the image to the third points in the point cloud of the first virtual model through the mapping relationship.
[0141] In some embodiments, the category of the fourth point can be transferred to the third point using formula (1). Here, u is the abscissa of the pixel point in the image, v is the ordinate of the pixel point in the image. That is to say, u and v are used to represent the coordinates of the fourth point (i.e., the pixel point) in the image. Xw, Yw, Zw are the coordinates of the third point in the point cloud of the first virtual model in three-dimensional space. R is the rotation matrix, t is the translation vector. R and t are the external parameters of the virtual camera. f x is the focal length of the image in the x-axis direction, f y is the focal length of the image in the y-axis direction, f x and f y are the focal lengths in the virtual camera internal parameters. c x is the coordinate of the optical center on the image plane in the x-axis direction, c y is the coordinate of the optical center on the image plane in the y-axis direction, c x and c y are the optical center coordinates in the camera internal parameters.
[0142]
[0143] For each third point, in the case where it is determined by the back-projection method that the third point has one or more identical categories, the category of the third point can be determined. In the case where it is determined by the back-projection method that the third point has multiple different categories, that is, the categories of the fourth points having a mapping relationship with the third point are different, the weights of the categories of the fourth points can be determined, and thus the category of any fourth point with a weight greater than the first weight threshold is determined as the category of the third point.
[0144] In some embodiments, the weights of the categories of the fourth points can be determined, the categories of the fourth points with weights greater than the second weight threshold can be filtered, the number of each category of the fourth points can be counted, and the category of the fourth points with a number greater than the first number threshold can be determined as the category of the third points. Equivalently, the category of the fourth points with weights greater than the second weight threshold and a number greater than the first number threshold can be determined as the category of the third points. In this way, a more accurate category of the third points can be determined.
[0145] In some embodiments, for different images, if a plurality of images all include a fourth point 1 having a mapping relationship with a third point 1 and a fourth point 2 having a mapping relationship with a third point 2, the first number of the images including the fourth point 1 and the fourth point 2 can be obtained, and a rounding operation can be performed on the first number, that is, the integer obtained by dividing the first number by 2 is determined as the target value. If there are images greater than the target value among the plurality of images that meet the preset condition, it is determined that the categories of the third point 1 and the third point 2 are the same. Among them, the preset condition is that the category of the fourth point 1 in the image is the same as the category of the fourth point 2.
[0146] If there are images less than or equal to the target value among the plurality of images that meet the preset condition, it is determined that the categories of the third point 1 and the third point 2 are different. In this way, clustering of the third points in the point cloud of the first virtual model can be achieved, thereby further improving the accuracy of determining the category of the third points. Among them, the third point 1 and the third point 2 are only used to distinguish different third points, and the fourth point 1 and the fourth point 2 are only used to distinguish different fourth points.
[0147] After obtaining the category of the third points, based on the category of the third points, the first virtual model is divided to obtain a plurality of components. In some embodiments, for the category of the third points, the points in the point cloud of the first virtual model belonging to the same category are divided into a set, and one set corresponds to one component. The first virtual model can be divided according to the position in the first virtual model mapped by the set to obtain a plurality of components. In this way, accurate components can be obtained, and the components are used to increase or decrease the fineness subsequently, so as to improve the accuracy of processing the fineness of the virtual model.
[0148] Continue to refer to Figure 3 , in step 102, in response to a selection instruction for the first component in the first virtual model, the first component is controlled to be in a selected state.
[0149] In some embodiments, for the case of displaying a plurality of components of the first virtual model, the first component can be selected from the plurality of components by means of clicking, voice control, body control, etc. In response to a selection instruction for the first component in the first virtual model, the first component is controlled to be in a selected state.
[0150] In some embodiments, in response to a geometric drawing operation on the display interface of an application, the drawn geometric figure is displayed, where the geometric figure can be a regular figure or an irregular figure, and can be specifically set according to actual usage requirements.
[0151] In response to a component of the first virtual model being included in the geometric figure, the component in the geometric figure is determined as the first component, a selection instruction for the first component in the first virtual model is triggered, and the first component is controlled to be in a selected state.
[0152] In some embodiments, the overlapping area between the geometric figure and the first virtual model can be determined, the first virtual model included in the overlapping area is used as a component, and the component in the geometric figure is determined as the first component. For example, refer to Figure 7 , Figure 7 which is a schematic diagram of the interface provided by the embodiments of the present application. Figure 3 , in Figure 7 it shows the first virtual model 701.
[0153] Refer to Figure 8 , Figure 8 which is a schematic diagram of the interface provided by the embodiments of the present application. Figure 4 , in response to the drawing operation of the geometric figure, the drawn geometric figure is displayed. The drawn geometric figure is a quadrilateral 801. The overlapping area between the quadrilateral 801 and the first virtual model 701 is determined, and the first virtual model included in the overlapping area is used as a component, that is, the first virtual model included in the quadrilateral 801 is used as a component.
[0154] In some embodiments, the selected state can be characterized by highlighting the first component, where the component (i.e., the first component) in the geometric figure can be displayed in a second display style, thereby characterizing that the first component is in a selected state.
[0155] Displaying the component in the geometric figure in a second display style can be one or more of filling the component in the geometric figure with a color, filling the component in the geometric figure with a pattern, marking the component in the geometric figure with text, marking the component in the geometric figure with a graphic identifier, and bolding the component in the geometric figure. In this way, the diversity of displaying the component in the geometric figure can be improved, that is, the diversity of the first virtual model can be improved, and it is convenient for the user to intuitively know the component in the geometric figure.
[0156] Refer to Figure 9 , Figure 9 which is a schematic diagram of the interface provided by the embodiments of the present application. Figure 5, in the overlapping area of the quadrilateral 801 and the first virtual model 701, there is a component 901, and dot filling can be used for the component 901 as shown in Figure 9 . The component 901 is the first component. Trigger a selection instruction for the component 901 in the first virtual model 701 to control the component 901 to be in a selected state. In Figure 9 , dot filling is used to represent that the component 901 is in a selected state. In this way, the diversity of components in the displayed geometric figure can be improved, that is, the diversity of the first virtual model can be improved, and it is convenient for users to intuitively know the components in the geometric figure.
[0157] In some embodiments, the first virtual model includes multiple components. It can be determined whether the components are completely displayed in the geometric figure. If the components are completely displayed in the geometric figure, the completely displayed components can be used as the first components. If the components are not completely displayed in the geometric figure, the incompletely displayed components may not be used as the first components.
[0158] Among them, complete display means that the area of the overlapping region between the geometric figure and the component is greater than the first area threshold. The first area threshold is determined according to the display area of the component in the interface of the application program. The first area threshold can be equal to the display area of the component in the interface of the application program, and the first area threshold can also be equal to the display area of the component in the interface of the application program multiplied by a preset adjustment parameter. For example, the adjustment parameter can be 0.9, 0.95, 0.98, etc., and can be specifically set according to actual usage requirements.
[0159] For example, referring to Figure 10 , Figure 10 is a schematic diagram of the interface provided by the embodiment of the present application. Figure 6 , the first virtual model 701 includes a head 1001 (component) and a body ( Figure 10 not labeled in it). The area of the overlapping region between the quadrilateral 801 and the head 1001 is greater than the first area threshold, while the area of the overlapping region between the quadrilateral 801 and the body is less than the first area threshold. Therefore, the head 1001 can be used as the first component. Trigger a selection instruction for the head 1001 in the first virtual model 701 to control the head 1001 to be in a selected state. In Figure 10 , a dotted line is used to represent that the head 1001 is in a selected state. In this way, the diversity of components in the displayed geometric figure can be improved, that is, the diversity of the first virtual model can be improved, and it is convenient for users to intuitively know the components in the geometric figure.
[0160] Comparing Figure 9 and Figure 10 it can be seen that forFigure 9 , the boundary of the component can be freely determined through the drawn geometric figure and the first virtual model, which can improve the degree of freedom in determining the first component. For Figure 10 , a component can be selected from multiple components of the first virtual model through the drawn geometric figure, which can improve the accuracy in determining the first component.
[0161] In some embodiments, in response to selection instructions for multiple first components triggered continuously, synchronously control each first component to be in a selected state, and display a quantity prompt message for the first component. The quantity prompt message is used to prompt the maximum selectable quantity of the first component. In this way, the richness of the content displayed in the interface can be improved, and it is convenient for the user to intuitively know the maximum selectable quantity, thereby improving the user experience.
[0162] Among them, the maximum selectable quantity of the first component can be the quantity of components included in the first virtual model. The maximum selectable quantity of the first component can also be determined by the computing resources currently available to the electronic device. The maximum selectable quantity of the first component can also be a quantity preset by the user, and can be specifically set according to actual usage requirements, and no specific limitation is made here.
[0163] In some embodiments, selection controls can be displayed in the display area for displaying components. Continuously responding to trigger operations on multiple selection controls is equivalent to responding to selection instructions for multiple first components triggered continuously, synchronously controlling each first component to be in a selected state, and displaying a quantity prompt message for the first component.
[0164] The quantity prompt message can include the maximum selectable quantity and the quantity of the first components that have been selected. In response to the quantity of the first components that have been selected not reaching the maximum selectable quantity, the selection controls of the unselected components are all in an optional state. In response to the quantity of the first components that have been selected reaching the maximum selectable quantity, the selection controls of the unselected components are all in a non-selectable state. In this way, whether the selection controls of the components are in an optional state can be dynamically controlled, and the diversity of the content displayed in the interface can be improved.
[0165] In some embodiments, the components have names. The names of the respective components can be displayed in the name display area in the interface, and selection controls are associated and displayed for the names. Continuously responding to trigger operations on multiple selection controls is equivalent to responding to selection instructions for multiple first components triggered continuously, synchronously controlling each first component to be in a selected state, and displaying a quantity prompt message for the first component.
[0166] That is to say, the number of the first component parts can be one or more. For different first component parts, different display styles can be adopted to represent that the corresponding first component part is in a selected state, so as to improve the diversity of the content displayed in the interface.
[0167] Continue to refer to Figure 3 , in step 103, based on the first component part in the selected state, in response to the model processing instruction, a second virtual model obtained by processing the refinement level of the first virtual model is output.
[0168] Among them, the first refinement level of the first component part in the second virtual model is different from the second refinement level of the first component part in the first virtual model. In some embodiments, the first refinement level of the first component part in the second virtual model can be higher than the second refinement level of the first component part in the first virtual model. In some embodiments, the first refinement level of the first component part in the second virtual model can be higher than the second refinement level of the first component part in the first virtual model. In some embodiments, the first component part can include multiple ones. In the second virtual model, there is a first refinement level of the first component part that is higher than the second refinement level of the first component part in the first virtual model. In the second virtual model, there is also a first refinement level of the first component part that is lower than the second refinement level of the first component part in the first virtual model. Specifically, it can be set according to actual usage requirements.
[0169] For the convenience of understanding, the refinement level (including the first refinement level and the second refinement level) is described below. The refinement level is used to describe the detail richness and realism of the virtual model in terms of geometric structure and visual performance. That is to say, the refinement level of the virtual model can be characterized by the complexity of the geometric structure and the visual performance. The complexity of the geometric structure can characterize the shape and structure of the virtual model, and the visual performance can characterize the similarity between the virtual model under the illumination of the virtual light source and the real model.
[0170] The refinement level corresponds to at least one parameter. The parameters are described below. The parameters can include a first parameter and a second parameter. Among them, the first parameter is used to characterize the parameter at the geometric level, and the second parameter is used to characterize the parameter at the rendering level. The first parameter corresponds to the complexity of the geometric structure, and the second parameter corresponds to the visual performance.
[0171] The first parameter can include one or more of a vertex parameter, a patch parameter, and a curvature parameter. The vertex parameter includes the number of vertices, the coordinates of the vertices, the normal of the vertices, etc. The number of vertices can be the number of points in the point cloud corresponding to the virtual model, or can also be the number of key points in the virtual model. The key points can be preset. The normal of the vertex is used to characterize the orientation of the surface of the virtual model where the vertex is located.
[0172] The greater the number of vertices, the higher the level of detail. The smaller the distance between the coordinates of the vertices and the corresponding true coordinates, the higher the level of detail. The true coordinates are the coordinates corresponding to the true model indicated by the virtual model. The higher the similarity between the normal of the vertex and the true normal, the higher the level of detail. The true normal is the normal corresponding to the true model at the same position.
[0173] A face is a planar figure formed by connecting vertices. The planar figure can be a triangle, a quadrilateral, etc., which can be determined according to the actual situation. The face parameters can include the number of faces, the subdivision level of the faces, etc. The number of faces is the number of faces on the surface of the virtual model. The subdivision level of the faces refers to the degree to which the faces of the virtual model are subdivided into sub-faces. The greater the number of faces, the higher the level of detail. The higher the subdivision level of the faces, the higher the level of detail.
[0174] The curvature parameter is used to characterize the degree of curvature of the surface of the virtual model. The curvature parameter can include the curvature value of the vertex, the curvature value of the face, the curvature transition between adjacent faces, etc. In some embodiments, the higher the curvature value of the vertex, the richer the local details of the virtual model, that is, the higher the level of detail. The curvature value of the face can be the average of the curvature values of multiple points in the face, and can also be the rate of change of the normal of the face. For a single face, there can be multiple curvature values of the face. The greater the difference between the curvature values of the face, the more obvious the geometric contrast of the face, and the higher the level of detail. The smoother the curvature transition between adjacent faces, the smoother the surface of the virtual model, and the higher the level of detail. Of course, the relationship between the curvature parameter and the level of detail can be set according to the actual usage requirements to ensure a higher similarity between the virtual model and the true model.
[0175] The second parameter can include one or more of the material parameter and the texture parameter. The material parameter is used to characterize the visual realism of the virtual model. The material parameter can include the albedo, metallicity, roughness, and transparency of the virtual model.
[0176] The albedo is the reflectivity of the surface of the virtual model to the incident light of the virtual light source. The metallicity is the degree to which the virtual material corresponding to the virtual model exhibits as a metal. The roughness is the degree of irregularity of the surface of the virtual model. The transparency is the degree of opacity that allows the virtual light emitted by the virtual light source to penetrate the virtual model. The smaller the difference between the material parameter and the true material parameter of the true model, that is, the closer the material parameter is to the true material parameter of the true model, the higher the level of detail.
[0177] The texture mapping parameters may include one or more of the normal map resolution and the displacement map intensity. The normal map is used to simulate the bump details on the surface of a virtual model. The normal map resolution refers to the pixel size of the normal map. The higher the normal map resolution, the richer the details that the normal map can store, and the finer the bump effect on the surface of the virtual model, that is, the higher the level of detail of the virtual model. For example, for a virtual character in a game scene, the normal map can be used to simulate the scratches on the surface of the armor worn by the virtual character.
[0178] The displacement map is used to change the geometry of the virtual model, thereby simulating the bump effect of the virtual model. The displacement map intensity refers to the degree of influence of the displacement map on the height change of the surface of the virtual model. The greater the displacement map intensity, the more obvious the geometric deformation on the surface of the virtual model, that is, the higher the level of detail of the virtual model. For example, for a virtual rock in a game scene, a displacement map can be used to simulate the surface of the virtual rock. The texture mapping parameters may also include the resolution of the specular map, the resolution of the albedo map, the resolution of the roughness map, the resolution of the metallicity map, etc., which are not specifically limited herein.
[0179] In some embodiments, before Figure 3 the step 103 shown, refer to Figure 11 , Figure 11 which is a flowchart of the method for processing a virtual model provided by an embodiment of the present application Figure 2 , and the manner of determining the first level of detail will be described below in combination with Figure 11 the steps shown.
[0180] In step 104, a setting area for setting the level of detail is displayed.
[0181] In step 105, in response to a setting instruction triggered based on the setting area, the level of detail indicated by the setting instruction is displayed, and the set level of detail is determined as the first level of detail.
[0182] In some embodiments, there are multiple implementation manners for steps 104 - 105. The multiple implementation manners for implementing steps 104 - 105 will be described below.
[0183] The first implementation manner is that the setting area includes a voice input control. The voice input control can be displayed in the setting area, and the voice input control can also be displayed in an associated area of the setting area, where the associated area of the setting area is an area whose distance from the setting area is less than a second distance threshold.
[0184] For step 104, in the interface of the application, a setting area for setting the level of detail can be displayed, and the voice input control can be displayed. For example, refer to Figure 12 , Figure 12It is a schematic diagram of the interface provided by the embodiments of the present application Figure 7 In the interface 1201, the first component 1202, the setting area 1203 for setting the fineness, and the voice input control 1204 can be displayed.
[0185] In some embodiments, in response to a trigger operation on the voice input control, the voice recording function is enabled, and the voice content recorded based on the voice recording function is received. After receiving the voice content, the voice content can be recognized to determine whether the voice content includes content representing the fineness.
[0186] In some embodiments, in response to a trigger operation on the voice input control, the text corresponding to the voice content can be displayed in real time in the form of a pop-up window or a floating layer. In this way, the diversity of the content displayed on the interface can be improved, and the user can intuitively know the text corresponding to the voice content, thereby improving the user experience.
[0187] In response to the end of the voice content recording and the voice content not including the content representing the fineness, a third prompt message can be displayed. The third prompt message is used to indicate that the voice content does not include the content representing the fineness. For example, the third prompt message can be "The content representing the fineness is not detected. Please try again."
[0188] In response to the end of the voice content recording and the voice content including the content representing the fineness, a setting instruction is triggered, and the fineness represented by the voice content is determined as the fineness to be set indicated by the setting instruction, and the fineness represented by the voice content is displayed. The fineness represented by the voice content is the first fineness.
[0189] In some embodiments, the content representing the fineness may include one or more of the first content, the second content, and the third content. Among them, the first content is to increase the fineness and decrease the fineness, etc. The second content is used to specify the parameter to a preset parameter value. For example, increasing the number of polygons included in the virtual model is equivalent to increasing the number of patches. The third content is used to represent the adjustment of the fineness through visual effects. For example, the third content can be to make the surface of the virtual model smoother.
[0190] The fineness represented by the first content can be the preset fineness or the fineness of the target level corresponding to the virtual model. Correspondingly, the preset fineness can be determined as the fineness to be set indicated by the setting instruction, or the fineness of the target level corresponding to the virtual model can be determined as the fineness to be set indicated by the setting instruction.
[0191] The fineness of the second content representation can be the fineness represented by the parameter value, and thus the fineness represented by the parameter value can be determined as the fineness to be set indicated by the setting instruction. The fineness of the third content representation can be the fineness represented by the parameter value of the parameter that affects the effect description, and thus the fineness represented by the parameter value of the parameter that affects the effect description can be determined as the fineness to be set indicated by the setting instruction.
[0192] Among them, the effect description is "smooth", "natural", "realistic", etc., which can be specifically set according to actual usage requirements. For example, the effect description is "smooth", and the parameter that affects "smooth" is the curvature transition of adjacent patches. The fineness represented by the parameter value of the curvature transition of adjacent patches can be determined as the fineness to be set indicated by the setting instruction.
[0193] In some embodiments, the fineness of the voice content representation can be displayed in the display interface of the application. The fineness represented by the voice content can be displayed in the setting area, and can also be displayed in the associated area of the setting area, and can also be displayed in the display area of the first component, and can also be displayed in the associated area of the first component. The associated area of the first component can be an area where the distance from the display area of the first component is less than the third distance threshold.
[0194] For example, see Figure 13 , Figure 13 is a schematic diagram of the interface provided by the embodiment of the present application Figure 8 , continuing Figure 10 , the fineness 1301 of the voice content representation can be displayed in the interface 1201. The fineness 1301 is the first fineness. In this way, the diversity of the interface display content can be improved, and the user can conveniently and intuitively know the first fineness.
[0195] Through the first implementation method, the determination of the trigger setting instruction can be realized in combination with the voice input function, and thus the fineness of the voice content representation can be determined as the fineness to be set indicated by the setting instruction. Therefore, the setting of the fineness can be realized by voice control, and the accuracy of setting the fineness can be improved.
[0196] In the second implementation method, the setting area may include a first setting area for inputting the fineness. For step 104, the first setting area for setting the fineness can be displayed. For step 105, in response to the input operation in the first setting area, the input fineness can be displayed in the first setting area. In response to the first determination instruction for the input fineness, the first determination instruction is used as the setting instruction, and the input fineness is used as the fineness to be set indicated by the setting instruction.
[0197] In some embodiments, in response to an input operation on a first setting area, the text corresponding to the input operation may be displayed. In response to the text corresponding to the input operation including content representing the fineness, the fineness represented by the text may be displayed in the first setting area. The content representing the fineness may refer to the foregoing description and will not be elaborated herein.
[0198] The following is an example of the second implementation manner. For example, refer to Figure 14 , Figure 14 which is a schematic diagram of the interface provided by the embodiments of the present application Figure 9 , the first component 1202 may be displayed in the interface 1201, and the first setting area 1401 may be displayed in the interface 1201. A fourth prompt message "Please enter the fineness" is displayed in the first setting area 1401, and the fourth prompt message is used to guide the input of the fineness.
[0199] Refer to Figure 15 , Figure 15 which is a schematic diagram of the interface provided by the embodiments of the present application Figure 10 , in response to an input operation on the first setting area 1401, the text corresponding to the input operation is displayed, and the text is "Increase the fineness to fineness level 1501". The fineness level 1501 may be the input fineness or the fineness represented by the text.
[0200] In some embodiments, a first confirmation control and a first cancellation control may be displayed for the first setting area. In response to a triggering operation on the first cancellation control, which is equivalent to responding to a first cancellation instruction for the input fineness, the input fineness displayed in the first setting area may be cleared.
[0201] In response to a triggering operation on the first confirmation control, which is equivalent to responding to a first confirmation instruction for the input fineness, the first confirmation instruction is used as a setting instruction, and the input fineness is used as the fineness set by the setting instruction. Among them, the input fineness is the first fineness, that is to say, Figure 15 the fineness level 1501 in
[0202] In some embodiments, the first setting area and the voice input control can be displayed simultaneously. After the input fineness is displayed in the first setting area, the input fineness can be adjusted through the voice input control to obtain the adjusted fineness. In response to the completion of the adjustment, a setting instruction can be triggered, and the adjusted fineness can be determined as the fineness indicated by the setting instruction. That is to say, the adjusted fineness can be determined as the first fineness.
[0203] In some embodiments, the first setting area and the voice input control can be displayed simultaneously. The text corresponding to the voice content can be displayed in the first setting area, and then in response to the adjustment operation on the text corresponding to the voice content, the fineness represented by the voice content can be adjusted to obtain the adjusted fineness. In response to the completion of the adjustment, a setting instruction can be triggered, and the adjusted fineness can be determined as the fineness indicated by the setting instruction. That is to say, the adjusted fineness can be determined as the first fineness. In this application, the above first implementation method and the second implementation method can be combined to further improve the accuracy of setting the first fineness.
[0204] The third implementation method: The setting area includes a second setting area, and setting controls for fineness are displayed in the second setting area. For example, refer to Figure 16 , Figure 16 which is a schematic diagram of the interface provided by the embodiment of the present application. Figure 10 One, the first component 1202 can be displayed in the interface 1201, and the second setting area 1602 can be displayed in the interface. Setting controls 1601 are displayed in the second setting area 1602.
[0205] In some embodiments, in response to a trigger operation on the setting control, a plurality of candidates corresponding to different fineness levels are displayed. There are the following two situations for the candidates, which are specifically described below. The first situation is that in response to a trigger operation on the setting control, a plurality of candidates are displayed, and each candidate corresponds to a level of fineness.
[0206] In some embodiments, the levels of fineness can be preset according to actual usage requirements. The levels of fineness can include level 1 - level 10, and the levels of fineness can also include low level, medium level, and high level, which are all reasonable.
[0207] In some embodiments, in response to a trigger operation on the setting control, a plurality of candidates can be displayed in the form of a pop-up window or a floating layer. In some embodiments, a plurality of candidates can also be displayed in the second setting area.
[0208] In some embodiments, in response to a trigger operation on a setting control, it is possible to determine whether to expand the display of a second setting area according to the number of candidate items. When the number of candidate items is greater than a second quantity threshold, the second setting area can be expanded and the candidate items can be displayed in the expanded second setting area. When the number of candidate items is not greater than the second quantity threshold, the area of the second setting area can remain unchanged and the candidate items can be displayed in the second setting area.
[0209] For example, referring to Figure 17 , Figure 17 is a schematic diagram of the interface provided by an embodiment of the present application. Figure 10 Second, in response to a trigger operation on the setting control 1601, when the number of candidate items is not greater than the second quantity threshold, the area of the second setting area 1602 can remain unchanged, and 2 candidate items can be displayed in the second setting area 1602. The candidate items include level 1701 and level 1702.
[0210] Another example, referring to Figure 18 , Figure 18 is a schematic diagram of the interface provided by an embodiment of the present application. Figure 10 Third, in response to a trigger operation on the setting control 1601, when the number of candidate items is greater than the second quantity threshold, the area of the second setting area 1602 can be expanded, which is equivalent to expanding the display of the second setting area 1602, and 4 candidate items can be displayed in the expanded second setting area 1602. The candidate items include level 1801, level 1802, level 1803, and level 1804.
[0211] Combined with Figure 17 - Figure 18 it can be seen that in the method for processing a virtual model provided by an embodiment of the present application, the area of the second setting area can be automatically adjusted according to the number of candidate items, which can improve the diversity of the display of the second setting area. Candidate items are displayed in the second setting area, which can improve the diversity of the display of candidate items.
[0212] In the second case, the fineness corresponds to at least one parameter, that is to say, the fineness corresponds to one or more parameters. The parameters can refer to the foregoing description and will not be elaborated here. In response to a trigger operation on the setting control, multiple candidate items corresponding to each parameter are displayed, and each candidate item corresponds to a parameter value of a parameter. There are one or more candidate items for one parameter, and the number of parameters is greater than or equal to 1.
[0213] In some embodiments, the manner of displaying multiple candidate items can be the same as the manner of displaying multiple candidate items in the first case. Specifically, reference can be made to the description of the manner of displaying multiple candidate items in the first case and will not be elaborated here.
[0214] For example, referring to Figure 19 , Figure 19It is a schematic diagram of the interface provided by the embodiments of the present application Figure 10 Fourth, in response to a triggering operation on the setting control, a pop-up window 1901 can be displayed. Two parameters can be displayed in the pop-up window 1901. The parameters are the number of vertices 1902 and the coordinates of the vertices 1903. For the number of vertices 1902, three candidates can be displayed. The candidates for the number of vertices 1902 include the quantity 19021, the quantity 19022, and the quantity 19023. For the coordinates of the vertices 1903, two candidates can be displayed. The candidates for the coordinates of the vertices 1903 can include the coordinate 19031 and the coordinate 19032. For the second case, multiple candidates corresponding to the parameters can be displayed, which can improve the diversity of the content displayed in the interface.
[0215] In some embodiments, after displaying multiple candidates corresponding to different levels of detail, in response to a selection operation on the first candidate among the multiple candidates, the first candidate is highlighted, where the number of the first candidates can be one or more.
[0216] In some embodiments, for the first case, when the number of the first components displayed is 1, the number of the first candidates is one. For example, refer to Figure 20 , Figure 20 It is a schematic diagram of the interface provided by the embodiments of the present application Figure 10 Fifth, continuing Figure 18 , in response to the levels 1801, 1802, 1803, and 1804 displayed in the second setting area 1602, in response to a selection operation on the level 1802, the level 1802 (the first candidate) can be highlighted, and in Figure 18 the level 1802 can be displayed in bold.
[0217] Among them, the highlighting can be one or more of bold display, display with a color different from other candidates, display with a font different from other candidates, and display with an identification mark, and can be specifically set according to actual usage requirements.
[0218] When the number of the displayed first components is multiple, multiple setting controls can be displayed. The first components and the setting controls are in one-to-one correspondence. For each first component, in response to a selection operation on the first candidate among the multiple candidates, the first candidate corresponding to the first component can be highlighted, so that the first candidates corresponding to different first components can be highlighted, which is equivalent to highlighting multiple first candidates.
[0219] For the second case, when the number of displayed parameters is 1, the number of first candidates can be 1. When the number of displayed parameters is multiple, for each parameter, a corresponding first candidate can be selected, which means the number of first candidates can be the same as the number of parameters. When the number of displayed first components is multiple, the number of first candidates is multiple, and the number of first candidates is greater than or equal to the number of first components.
[0220] For example, referring to Figure 21 , Figure 21 is a schematic diagram of the interface provided by the embodiments of the present application Figure 10 Six, continuing Figure 19 , when the number of displayed parameters is multiple, the parameters are the number of vertices 1902 and the coordinates of the vertices 1903. For the candidates for the number of vertices 1902 (quantity 19021, quantity 19022, and quantity 19023), in response to the selection operation for quantity 19022, quantity 19022 can be highlighted in bold. For the candidates for the coordinates of the vertices 1903 (coordinate 19031 and coordinate 19032), in response to the selection operation for coordinate 19032, coordinate 19032 can be highlighted in bold.
[0221] After highlighting the first candidate, in response to the second confirmation instruction for the first candidate, the second confirmation instruction is used as the setting instruction, and the level of detail corresponding to the first candidate is determined as the level of detail indicated by the setting instruction. The level of detail corresponding to the first candidate is the first level of detail.
[0222] In some embodiments, for the highlighted first candidate, a second confirmation control and a second cancellation control can be correspondingly displayed. In response to the triggering operation for the second cancellation control, the highlighting of the first candidate can be cancelled, or the highlighting of the first candidate and the display of multiple candidates can be cancelled.
[0223] In response to the triggering operation for the second confirmation control, which is equivalent to responding to the second confirmation instruction for the first candidate, the second confirmation instruction can be used as the setting instruction. For the first case, in response to the setting instruction, the level of detail corresponding to the first candidate can be determined, and the level of detail of the level is determined as the level of detail indicated by the setting instruction.
[0224] Combined with the above first case, it can be seen that for the level of detail corresponding to the candidate, the level of detail can be set to the level of detail corresponding to the first candidate by selecting the candidate, which can improve the convenience of setting the level of detail and the accuracy of setting the level of detail. Compared with the second case, the efficiency of setting the level of detail can be improved.
[0225] For the second case, the first candidate is in one-to-one correspondence with the parameter, that is, a parameter value of a parameter corresponding to a first candidate. In response to the setting instruction, the parameter value of the parameter corresponding to the first candidate is determined, and the fineness characterized by the parameter value is determined as the fineness to be set indicated by the setting instruction.
[0226] Combined with the above second case, it can be seen that the parameter value of the parameter corresponding to the candidate can set the fineness to the fineness characterized by the parameter value by selecting the candidate. Through the second case, more detailed fineness settings can be performed for different parameters. Compared with the first case, the accuracy of setting the fineness can be further improved.
[0227] Through the third implementation method, candidates with different meanings can be displayed in the interface, which can improve the richness of the content displayed in the interface, and the fineness can be set based on the candidates, which can improve the convenience of setting the fineness and the accuracy of setting the fineness.
[0228] In some embodiments, the third implementation method can be combined with any one of the first implementation method and the second implementation method. After the fineness characterized by the voice content is input through the first implementation method, the level of the fineness synchronously displayed in the first candidate can be displayed, or the parameter value of the parameter corresponding to the fineness characterized by the voice content can be synchronously displayed in the first candidate.
[0229] After the fineness is input through the second implementation method, the level of the input fineness can be synchronously displayed in the first candidate, or the parameter value of the parameter corresponding to the input fineness can be synchronously displayed in the first candidate.
[0230] In some embodiments, in response to an edit operation on the first candidate, the level or parameter value displayed by the first candidate can be adjusted, so as to realize the adjustment of the fineness, and then the adjusted fineness can be used as the first fineness.
[0231] For the fourth implementation method, in response to a selection instruction for the first component in the first virtual model, the first fineness and the recommended information on the fineness of the first component can be displayed, and the recommended information is used to recommend the fineness corresponding to the first component.
[0232] The fourth method corresponds to Figure 3 Shown in step 102, in response to a selection instruction for the first component in the first virtual model, the second fineness of the first component can be determined, and the second fineness is the current fineness of the first component.
[0233] After determining the second level of detail, the second level of detail can be displayed in the interface. In some embodiments, there may be a display area for the level of detail in the interface, and the second level of detail can be displayed in the display area for the level of detail. The second level of detail can also be displayed in the area where the first component is displayed. Specifically, it can be set according to actual usage requirements.
[0234] In some embodiments, after selecting the first component, the recommended information for the level of detail of the first component can be determined. The recommended information for the level of detail of the first component can be determined according to the way of processing the level of detail of historical components of the same type as the first component in history. For example, by increasing the level of detail of the historical component to the historical level of detail, multiple historical levels of detail among the multiple historical components can be obtained as the recommended information, or the average value of the historical levels of detail of the multiple historical components can be used as the recommended information. Specifically, it can be set according to actual usage requirements and will not be specifically limited here.
[0235] In some embodiments, the recommended information for the level of detail of the first component can be determined according to the preset level of detail and the weight of the type of the first component. For example, the product of the preset level of detail and the weight can be used as the recommended information.
[0236] In some embodiments, in response to a third determination instruction for the recommended information, the recommended level of detail is determined as the first level of detail. The number of recommended levels of detail can be one or more. In some embodiments, multiple recommended levels of detail can be displayed. In response to a selection operation for any one or more of the multiple recommended levels of detail, the selected level of detail can be determined as the first level of detail.
[0237] In some embodiments, there may be a third determination control and a third cancellation control for the recommended information. In response to a triggering operation for the third cancellation control, which is equivalent to responding to a cancellation instruction for the recommended information, the steps 104 - 105 can be executed Figure 11 That is, a setting area for setting the level of detail can be displayed. In response to a setting instruction triggered based on the setting area, the level of detail indicated by the setting instruction is displayed, and the set level of detail is determined as the first level of detail. It is equivalent to that at least one of the above first implementation method - the third implementation method can be used to set the first level of detail. In this way, it can be determined whether to determine the recommended level of detail as the first level of detail according to the actual usage requirements of the user, which can improve the selectivity of setting the first level of detail, and further improve the accuracy of setting the first level of detail.
[0238] In response to a triggering operation on the third determination control, which is equivalent to responding to a third determination instruction for the recommended information, the recommended level of detail is determined to be the first level of detail. In this way, the recommended information can be displayed, and thus the recommended level of detail is set to the first level of detail, which can improve the richness of the content displayed in the interface, actively recommend the level of detail to the user, and improve the user experience.
[0239] For example, refer to Figure 22 , Figure 22 is a schematic diagram of the interface provided by an embodiment of the present application Figure 10 VII. The first virtual model 701 can be displayed in the interface, and the first component 901 of the first virtual model 701 can be highlighted. For the first component 901, the second level of detail 2201 of the first component 901 can be displayed, and the recommended information 2203 for the level of detail of the first component 901 can be displayed. The recommended information 2203 is "recommended to be set to the level of detail 2202".
[0240] In response to the third determination instruction for the recommended information 2203, the recommended level of detail (i.e., the level of detail 2202) can be determined to be the first level of detail. In this way, the recommended information can be displayed, and thus the recommended level of detail is set to the first level of detail, which can improve the richness of the content displayed in the interface, and can actively recommend the level of detail to the user, and improve the user experience.
[0241] In the fifth implementation manner, the setting area may include a third setting area. In response to a triggering operation on the third setting area, a plurality of candidate images can be displayed, and the candidate images correspond to the textures corresponding to the texture parameters. In response to a selection operation on the first candidate image among the plurality of candidate images, a setting instruction can be triggered. In response to the setting instruction, the level of detail of the texture parameters corresponding to the first candidate image can be determined, and the level of detail of the texture parameters corresponding to the first candidate image can be determined to be the level of detail set by the setting instruction. Through the fifth implementation manner, the level of detail can be set through images.
[0242] In the sixth implementation manner, the setting area may include a fourth setting area. In response to a triggering operation on the fourth setting area, a plurality of candidate point cloud files can be displayed, and the candidate point cloud files correspond to the parameters of the vertices.
[0243] In response to a selection operation on the first file among the plurality of candidate point cloud files, a setting instruction can be triggered. In response to the setting instruction, the level of detail of the parameters of the vertices corresponding to the first file can be determined, and the level of detail of the parameters of the vertices corresponding to the first file can be determined to be the level of detail set by the setting instruction. Through the sixth implementation manner, the level of detail can be set through point clouds.
[0244] In some embodiments, one or more of the first setting area - the fourth setting area may be displayed in the interface. In the case of displaying any one of the first setting area - the fourth setting area, the corresponding implementation manner may be adopted to set the first fineness. In the case of displaying any multiple of the first setting area - the fourth setting area, the user may select any one or more according to the actual usage requirements to set the first fineness, which can improve the diversity of setting the first fineness.
[0245] In some embodiments, for Figure 3 step 103 shown, based on the first component in the selected state, in response to the model processing instruction, special effects for processing the fineness of the first component are displayed. The special effects may be one or more of pre - set text, images, animations, etc., and can be specifically set according to the actual usage requirements.
[0246] In response to the completion of the fineness processing for the first component, the special effects display is cancelled, and the replacement process of the first component in the first virtual model is displayed. The replacement process is used to indicate replacing the first component in the first virtual model with the processed first component.
[0247] In some embodiments, in response to the completion of the fineness processing for the first component, the special effects display can be cancelled, and the processed first component can be displayed. For example, referring to Figure 23 , Figure 23 which is a schematic diagram of the interface provided by the embodiments of the present application Figure 10 VIII, continuing Figure 20 or Figure 21 , the processed first component 2301 can be displayed. The first fineness of the processed first component 2301 is higher than Figure 12 the second fineness of the first component 1202 shown.
[0248] Referring to Figure 24 , Figure 24 which is a schematic diagram of the interface provided by the embodiments of the present application Figure 10 IX, the first virtual model can be displayed in the interface 2401. The first virtual model includes the first component 1202 and the component 2402. Referring to Figure 25 , Figure 25 which is a schematic diagram of the interface provided by the embodiments of the present application Figure 2 X, the first component 1202 displayed in the interface 2401 can be replaced with the first component 2301. Figure 24 and Figure 25 only show two image frames during the replacement process, and no specific limitation is made here.
[0249] In some embodiments, in response to the completion of the replacement process display, a second virtual model is output. For example, in Figure 25 , the second virtual model includes a first component 2301 and a component 2402. In this way, the process of processing the first virtual model to obtain the second virtual model with a higher level of detail can be improved, thereby improving the richness of the content displayed in the interface.
[0250] In some embodiments, after the second virtual model is output, a comparison control can be displayed in the interface. The comparison control is used to compare the first virtual model and the second virtual model, where there is at least one (one or more) first component with different levels of detail in the first virtual model and the second virtual model.
[0251] In response to a trigger operation on the comparison control, the first virtual model and the second virtual model are simultaneously displayed, and the comparison result between the level of detail of the first virtual model and the level of detail of the second virtual model is displayed, where the comparison result includes the difference between the first component in the first virtual model and the first component in the second virtual model.
[0252] In some embodiments, the comparison result can be displayed in the form of a pop-up window. The comparison result displayed in the pop-up window can include one or more of the first level of detail, the second level of detail, and the relationship between the first level of detail and the second level of detail, which can be specifically set according to actual usage requirements.
[0253] For example, referring to Figure 26 , Figure 26 is a schematic diagram of the interface provided by an embodiment of the present application Figure 2 XI, a first virtual model including a first component 1202 and a component 2402 can be displayed in the interface, and a second virtual model including a first component 2301 and a component 2402 can be displayed, that is, the first virtual model and the second virtual model can be simultaneously displayed. In this way, the diversity of the content displayed in the interface can be improved, and by simultaneously displaying the first virtual model and the second virtual model, it is convenient for the user to intuitively know the difference between the first virtual model and the second virtual model.
[0254] Continuing to refer to Figure 26 , a comparison result 2601 can be displayed in the interface. The comparison result 2601 is "the first level of detail is greater than the second level of detail". The first level of detail is the level of detail of the first component 2301 in the second virtual model, and the second level of detail is the level of detail of the first component 1202 in the first virtual model, which can improve the richness of the content displayed in the interface and facilitate the user to clearly know the difference between the first virtual model and the second virtual model.
[0255] In some embodiments, based on a first component being in a selected state, in response to a model processing instruction, if the model processing instruction indicates to increase the refinement level of the first component and the refinement level of the first component reaches a first refinement level threshold, a first prompt message is displayed, and the first prompt message is used to prompt that the refinement level of the first component cannot be increased.
[0256] That is to say, if the model processing instruction indicates to increase the refinement level of the first component, but the second refinement level of the first component reaches the first refinement level threshold, it means that the refinement level of the first component cannot be further increased. Therefore, the first prompt message can be displayed. For example, the first prompt message can be "The second refinement level has reached the first refinement level threshold, and this model processing instruction cannot be executed".
[0257] In some embodiments, the first prompt message can also be used to prompt the user to decrease the refinement level of the first component. For example, the first prompt message can be "The second refinement level has reached the first refinement level threshold, and the refinement level can be decreased".
[0258] In some embodiments, if the model processing instruction indicates to decrease the refinement level of the first component and the refinement level of the first component reaches a second refinement level threshold, a second prompt message is displayed, and the second prompt message is used to prompt that the refinement level of the first component cannot be decreased. The second refinement level threshold is less than the first refinement level threshold.
[0259] That is to say, if the model processing instruction indicates to decrease the refinement level of the first component, but the second refinement level of the first component reaches the second refinement level threshold, it means that the refinement level of the first component cannot be further decreased. Therefore, the second prompt message can be displayed. For example, the second prompt message can be "The second refinement level has reached the second refinement level threshold, and this model processing instruction cannot be executed".
[0260] In some embodiments, the second prompt message can also be used to prompt the user to increase the refinement level of the first component. For example, the second prompt message can be "The second refinement level has reached the second refinement level threshold, and the refinement level can be increased". By displaying the first prompt message and the second prompt message, the richness of the content displayed in the interface can be improved, and the user can intuitively know the reason why the model processing cannot be executed, thereby improving the user experience.
[0261] In some embodiments, in response to a gap existing between a first component and a second component in a second virtual model, a fusion control is displayed, where the second component is adjacent to the first component. For example, refer to Figure 27 , Figure 27 which is a schematic diagram of the interface provided by the embodiments of the present application Figure 2Twelve, the first component 2702 and the second component 2703 can be displayed in the interface, and there is a gap 2701 between the first component 2702 and the second component 2703. The gap 2701 is the area pointed by the arrow.
[0262] See Figure 28 , Figure 28 which is a schematic diagram of the interface provided by the embodiment of the present application Figure 2 Thirteen, the first component 2702 and the second component 2703 can be displayed in the interface, and there is a gap 2701 between the first component 2702 and the second component 2703. The gap 2701 is the area pointed by the arrow. Figure 27 and Figure 28 the corresponding perspectives are different. Combining Figure 27 and Figure 28 it can be seen that the gap is caused by the non - connection of the first component and the second component.
[0263] In response to a trigger operation on the fusion control, the first component and the second component in the second virtual model are fused, and the fused third virtual model is displayed. In the third virtual model, the first component and the second component are smoothly connected.
[0264] Among them, the smooth connection between the first component and the second component can be seen in Figure 25 , and the smooth connection between the first component and the second component means that there is no gap between the first component and the second component, or the area of the gap is less than the first area threshold. The first area threshold can be determined according to the area of the display area of the first component, and the first area threshold is less than the area of the display area of the first component.
[0265] For the case where there is a gap between the first component and the second component in the second virtual model, through the fusion control, the first component and the second component can be fused with one key, so that the fused third virtual model can be displayed. The display effect of the third virtual model is better than that of the first virtual model, which is equivalent to improving the display effect of the second virtual model and making the third virtual model after improving the display effect closer to the real model.
[0266] In some embodiments, the point cloud of the first component can be obtained, and the point cloud of the second component can be obtained. A plurality of first boundary points are uniformly selected from the point cloud of the first component. The first boundary points are the points on the boundary of the point cloud of the first component close to the second component. A plurality of second boundary points are selected from the point cloud of the second component. The second boundary points are the points on the boundary of the second component close to the first component.
[0267] For the point cloud of the first component, points with a distance less than the fourth distance threshold from the second boundary point with the closest distance are determined as the first points. For the point cloud of the second component, points with a distance less than the fifth distance threshold from the first boundary point with the closest distance are determined as the second points.
[0268] After determining the first points and the second points, for each first point, determine the interval distance between the first point and each second point, and fuse the first point and the second point with the smallest interval distance. Repeat the above operations until the first component and the second component are smoothly connected. In this way, by fusing the points on the boundary in the point cloud of the first component and the points on the boundary in the point cloud of the second component, the first component and the second component can be smoothly connected, so that a third virtual model with a better display effect can be obtained, thereby improving the display effect of the virtual model.
[0269] In some embodiments, in response to a model processing instruction, obtain the first feature of the first component, where the first feature corresponds to the second refinement level of the first component. Based on the first feature, predict the second feature of the first refinement level, where the second refinement level is different from the first refinement level. Based on the second feature, generate the first component after processing the refinement level of the first component. Based on the processed first component, output the second virtual model after processing the refinement level of the first virtual model.
[0270] In some embodiments, in response to a model processing instruction, the first component can be input into a pre-trained refinement level processing model. Thus, the refinement level processing model can output the first component after processing the refinement level of the first component. Furthermore, the first component in the first virtual model can be replaced with the processed first component, so that the second virtual model can be obtained.
[0271] See Figure 29 , Figure 29 is a schematic structural diagram of the refinement level processing model provided by the embodiments of the present application. The refinement level processing model 2901 may include an input layer 2902, a feature extraction layer 2903, a feature prediction layer 2904, an accuracy judgment layer 2906, and an output layer 2905.
[0272] In response to a model processing instruction, the first component can be input into the input layer. The input layer is used to receive the first component. The input layer can determine the point cloud of the first component and render the point cloud of the first component into at least one of a depth map, a normal map, and a coordinate map.
[0273] The depth map is used for the distance information from each point in the point cloud of the first component to the virtual camera. In some embodiments, the internal parameters of the virtual camera can be determined, and then, using the distance from each point in the point cloud of the first component to the virtual camera and combining with the camera internal parameters, the projection position of each point on the image plane can be calculated, thereby generating the depth map.
[0274] The normal map is used to characterize the surface normal information of each point in the point cloud of the first component. In some embodiments, the normal of each point is determined by calculating the cross product of vectors of adjacent points in the point cloud of the first component. Then, the information of these normals is mapped onto the image plane to generate the normal map.
[0275] The coordinate map is used to characterize the coordinates of each point in the point cloud of the first component in the world coordinate system. In some embodiments, the coordinates of each point in the point cloud of the first component can be mapped onto the image plane, thereby generating the coordinate map.
[0276] In some embodiments, at least one of the depth map, the normal map, and the coordinate map can be input into the precision judgment layer (i.e., the geometric fineness discriminator), so that the precision judgment layer can output the second fineness degree of the first component. In some embodiments, for the depth map, the fineness degree 1 can be determined by analyzing the resolution of the depth map; for the normal map, the fineness degree 2 can be determined by analyzing the smoothness of the normal map; for the coordinate map, the first size can be determined through the coordinate map, the difference between the first size and the actual size of the first combined part can be determined, and the fineness degree 3 can be determined.
[0277] In some embodiments, any one of the fineness degrees 1 - fineness degree 3 can be determined as the second fineness degree, or at least two of the fineness degrees 1 - fineness degree 3 can be multiplied by corresponding weights respectively to obtain at least two products, and the sum value of the at least two products can be determined as the second fineness degree.
[0278] In some embodiments, the second fineness degree and the first component can be input into the feature extraction layer. The feature extraction layer can be a multi-precision variational autoencoder, and the feature extraction layer can extract the first latent space features of the first component at the second fineness degree.
[0279] There are levels for the fineness degree. If the level of the second fineness degree is not the lowest level, the feature extraction layer can extract the first latent space features of the first component at the second fineness degree, and the first latent space features of the fineness degree with a level lower than the level of the second fineness degree.
[0280] For example, there are levels 1 - 10 in terms of fineness. The level of the second fineness is level 2, and level 1 is lower than level 2. The feature extraction layer can extract the first latent space features of the first component at the second fineness level, that is, extract the first latent space features at the fineness level of level 2.
[0281] The feature extraction layer can also extract the first latent space features of the first component at the second fineness level, as well as extract the first latent space features at the fineness levels of levels lower than the second fineness level, that is, extract the first latent space features at the fineness level of level 2 and the first latent space features at the fineness level of level 1.
[0282] In some embodiments, when the first fineness level is not included in the model processing instruction, the first latent space features output by the feature extraction layer can be input to the feature prediction layer, and the feature prediction layer (i.e., the multi - precision autoregressive model) is a Transformer structure.
[0283] The feature prediction layer can, through the first latent space features output by the feature extraction layer, predict the latent space features corresponding to the next level of the highest level of the fineness level corresponding to the first latent space features. The highest level of the fineness level corresponding to the first latent space features is the level of the second fineness level. That is to say, the feature prediction layer can predict the latent space features corresponding to the next level of the second fineness level based on the first latent space features.
[0284] The feature prediction layer can make one or more predictions. For the case of one prediction, based on the first latent space features, it can predict the second latent space features corresponding to the next level of the second fineness level. That is, the level of the fineness level corresponding to the second latent space features is the next level of the second fineness level, and the fineness level corresponding to the second latent space features is the first fineness level.
[0285] For example, based on the first latent space features at the fineness level of level 2, the second latent space features at the fineness level of level 3 can be predicted. Another example is that based on the first latent space features at the fineness level of level 2 and the first latent space features at the fineness level of level 1, the second latent space features at the fineness level of level 3 can be predicted. In this way, accurate second latent space features can be predicted.
[0286] For multiple cases, after obtaining the latent space features corresponding to the next level of the second level of refinement, the feature extraction layer can predict the latent space features of the next two levels of the second level of refinement based on the first latent space features and the latent space features corresponding to the next level of the second level of refinement, and so on. The feature extraction layer can predict the second latent space features based on the first latent space features and the latent space features whose predicted levels are greater than the second level of refinement. Among them, the level of the second level of refinement can be greater than the next level of the second level of refinement, and the level of the second level of refinement can also be less than the next level of the second level of refinement, which can be specifically set according to actual usage requirements.
[0287] In some embodiments, when the first level of refinement is included in the model processing instruction, the difference between the level of the first level of refinement and the level of the second level of refinement can be determined, and the difference is the number of times the feature extraction layer needs to predict. Of course, the first level of refinement can also be preset, which is all reasonable.
[0288] For example, the level of the first level of refinement can be 4. Based on the first latent space features of the level of refinement 2, the latent space features of the level of refinement 3 are predicted, and then the second latent space features of the level of refinement 4 can be predicted based on the first latent space features of the level of refinement 2 and the predicted latent space features of the level of refinement 3. In this way, more accurate second latent space features can be obtained.
[0289] The output layer is the decoder, which can decode the second latent space features output by the feature extraction layer to generate the first processed component of the first level of refinement. That is to say, in this application, the feature extraction layer is used to extract the first features corresponding to the second level of refinement, the feature prediction layer is used to predict the second features of the first level of refinement, and the output layer is used to generate the first processed component after processing the level of refinement of the first component based on the second features.
[0290] The training method of the refinement processing model will be described below. The sample component can be input into the refinement processing model to render at least one of the sample depth map, sample normal map, and sample coordinate map of the sample component, and then the second sample refinement level of the sample component can be determined based on at least one of the sample depth map, sample normal map, and sample coordinate map.
[0291] The first sample features of the sample component are extracted by the feature extraction layer, and the second sample features of the first sample refinement level are predicted by the feature prediction layer. Then, based on the second sample features, a predicted component can be generated, and the predicted component is the component after processing the refinement level of the sample component.
[0292] In some embodiments, the first features output by the feature extraction layer include first features of different levels of fineness. The parameters of the fineness processing model can be adjusted based on the differences between the predicted component and the label component of the sample component, as well as the differences between the distribution of the first features belonging to different levels and the label distribution, where the label distribution is a normal distribution.
[0293] Referring to Equation (2), Equation (2) is the loss function, where is the reconstruction loss, is the output of the output layer, that is, the predicted component, which is used to represent reconstructing the input data x from the latent variable z. The input data x is the data of the sample component. S is the label component, and ||*||1 is the L1 norm, that is, the sum of absolute values. β is the weight parameter, and D kl is used to measure the KL divergence (Kullback-Leibler divergence) between and p(z).
[0294]
[0295] For the fineness processing model, the fineness processing model can also be used to reduce the fineness. Specifically, reference can be made to the descriptions of each layer in the fineness processing model, and equivalent replacements are made for the descriptions of each layer in the fineness processing model, which will not be elaborated here.
[0296] The fineness processing model provided by the embodiments of the present application can determine the first features of different levels of fineness for a sample component. The first features are used to predict the second features, so as to generate the predicted component. The first features of different levels of fineness can correspond to different predicted components. It is equivalent to adjusting the fineness processing model multiple times for a sample. The fineness processing model can learn the way to improve the fineness of the sample component for a sample component. Since the sample component is fixed, the size of the predicted component output by the fineness processing model is close to the size of the sample component. Correspondingly, the size of the processed first component predicted by the fineness processing model is the same as the size of the first component. Therefore, the first component in the first virtual model can be directly replaced with the processed first component. It is equivalent to that the present application can maintain the similarity between the size of the first component after fineness processing and the size of the first component to be greater than the similarity threshold, and can solve the above technical problem 2.
[0297] In this application, the first fineness level can be set by one or more of the above first implementation manner - sixth implementation manner. Correspondingly, the fineness level processing model can output the processed first component with the first fineness level, which can improve the selectivity of the fineness level of the processed first component and solve the above technical problem 3.
[0298] In the method for processing a virtual model provided in an embodiment of this application, the first fineness level of the first component in the second virtual model can be lower than the second fineness level of the first component in the first virtual model, which is equivalent to reducing the fineness level of the first virtual model, thereby reducing the storage resources occupied by the first virtual model. The first fineness level of the first component in the second virtual model can be higher than the second fineness level of the first component in the first virtual model, which is equivalent to increasing the fineness level of the first virtual model. In the embodiment of this application, according to actual usage requirements, the fineness level of the first component corresponding to the selection instruction can be reduced and the fineness level of the first component corresponding to the selection instruction can be increased, which can improve the flexibility of processing the virtual model. Compared with the related art, it provides a rich way to process the virtual model, that is, it can improve the diversity of the ways to process the fineness level of the virtual model and solve the above technical problem 1.
[0299] For the case of increasing the fineness level of the first component corresponding to the selection instruction, it is not necessary to process the fineness level of the entire first virtual model, which can reduce the computing resources occupied during the processing. Moreover, the fineness level of the first component in the processed second virtual model is higher than the fineness level of the first component in the first virtual model. Compared with the first virtual model, the display effect of the second virtual model is better, which is equivalent to being able to improve the display effect of the second virtual model.
[0300] In some embodiments, after Figure 3 step 102 shown, a save control can be displayed. The save control is used to save the processing method for processing the fineness level of the first virtual model. In response to the trigger operation on the save control, the processing method for processing the fineness level of the first virtual model is saved, and an application control for the saved processing method is displayed, where the application control is used to process the fineness level of the virtual model to be processed with one key using the processing method.
[0301] In some embodiments, for the virtual model to be processed, in response to the trigger operation on the application control, the components of the virtual model to be processed that are of the same type as the first component can be adjusted from the current fineness level to the first fineness level with one key.
[0302] In some embodiments, for a virtual model to be processed, after determining a first component in the virtual model to be processed, the first component in the virtual model to be processed can be adjusted from the current level of detail to a first level of detail. In this way, the processing method for the first component can be saved. Instead of setting the first level of detail for each first component by the user or processing the level of detail of the first component through model processing instructions, the level of detail of the virtual model to be processed can be processed with one key through an application control, which can improve the efficiency of processing the level of detail of the virtual model to be processed and, moreover, can improve the user experience.
[0303] To facilitate understanding of the virtual model processing method provided in the embodiments of the present application, refer to Figure 30 , Figure 30 which is a flowchart of the virtual model processing method provided in the embodiments of the present application. Figure 3 Next, the virtual model processing method provided in the embodiments of the present application will be described in conjunction with the steps shown in the figure.
[0304] In step 3001, display a first virtual model to be processed.
[0305] Regarding step 3001, the terminal may be installed with an application. In response to a trigger operation for the application, the display interface of the application can be displayed, and then the first virtual model can be displayed in the display interface of the application. The first virtual model is the virtual model that the user wants to process and includes multiple components.
[0306] In step 3002, automatically split the first virtual model to obtain multiple components. Regarding step 3002, refer to Figure 31 , Figure 31 which is a flowchart of the virtual model processing method provided in the embodiments of the present application. Figure 4 Next, Figure 31 will be used to Figure 30 describe step 3002 in
[0307] Render the first virtual model 3101 into images 3102 of multiple perspectives. The number of images 3102 can be multiple. Each image 3102 has a corresponding perspective. For each image 3102, perform semantic segmentation on the image 3102 through a pre-trained semantic segmentation model to obtain the first semantic category 3103 of the image 3102. The first semantic category 3103 refers to the semantic category of each pixel point in the image 3102.
[0308] There is a mapping relationship between the points in the point cloud of the first virtual model 3101 and the pixel points in each image 3102. In some embodiments, the point cloud of the first virtual model 3101 can be obtained, and for each image 3102, a mapping relationship can be established between the points in the point cloud of the first virtual model 3101 and the pixel points of the image 3102.
[0309] Through the mapping relationship between the first virtual model 3101 and the image 3102, the first semantic category 3103 of the picture 3102 is back-projected into the point cloud of the first virtual model 3101 to obtain the initial semantic category of the first virtual model 3101, where the initial semantic category is a rough semantic category.
[0310] After obtaining the initial semantic category, clustering can be performed on the points in the point cloud. In some embodiments, a point in the point cloud may appear in different images. Suppose there are a total of N perspective images that can simultaneously observe points x and y. It is equivalent to that there are pixel points corresponding to point x and pixel points corresponding to point y in N perspective images. Both point x and point y are points in the point cloud. If it can be determined that the categories of point x and point y are the same through more than (i.e., greater than) N / / 2 perspective images, then point x and point y can be classified into the same category. If the categories of point x and point y are determined to be the same through less than or equal to N / / 2 perspective images, then it can be determined that point x and point y belong to different categories respectively. In this way, the second semantic category 3104 of the points in the point cloud of the first virtual model can be obtained accurately. The second semantic category 3104 is equivalent to obtaining an accurate semantic category, where / / represents the integer operation.
[0311] In step 3003, in response to a selection instruction for the first component in the first virtual model, the first component is controlled to be in a selected state. In response to a model processing instruction, the selected first component is input into a refinement processing model to obtain a processed first component. Based on the processed first component, a second virtual model obtained by processing the refinement degree of the first virtual model is output.
[0312] For step 3003, the refinement processing model has three parts. The first part is a multi-precision variational autoencoder, the second part is a multi-precision autoregressive model, and the third part is a geometric refinement discriminator. The multi-precision variational autoencoder maps the first component into multiple first latent space features with different refinement degrees. The multi-precision autoregressive model can predict the second latent space feature of the first refinement degree based on the latent space feature of the second refinement degree. The geometric refinement discriminator can automatically discriminate the geometry input by the user to the corresponding refinement level.
[0313] In some embodiments, the latent space features of the model are gradually optimized and improved from a second level of refinement to a higher level of refinement (i.e., the first level of refinement) through a multi-precision autoregressive model. Finally, the decoder of the variational autoencoder decodes the corresponding latent space features of the first level of refinement into the processed first component.
[0314] In some embodiments, the latent space features of the model are gradually optimized and reduced from a second level of refinement to a lower level of refinement (i.e., the first level of refinement) through a multi-precision autoregressive model. Finally, the decoder of the variational autoencoder decodes the corresponding latent space features of the first level of refinement into the processed first component.
[0315] For example, refer to Figure 32 , Figure 32 is a flowchart of the processing method of the virtual model provided by the embodiments of the present application Figure 5 , render the point cloud of the first component 3201 into at least one of a depth map, a normal map, and a coordinate map, and the geometric fineness discriminator 3202 determines the second level of refinement 3203 based on at least one of the depth map, the normal map, and the coordinate map.
[0316] The multi-precision variational autoencoder 3204 extracts the first latent space feature 3205 of the first component 3201 at the second level of refinement 3203. The multi-precision autoregressive model 3208 predicts the second latent space feature 3206 through the first latent space feature 3205 in response to the first level of refinement in the model processing instruction. The second latent space feature 3206 is the first level of refinement, and the decoder 3209 generates the processed first component 3207 through the second latent space feature 3206.
[0317] After obtaining the processed first component, the first component in the first virtual model can be replaced with the processed first component, and then a second virtual model with the processed level of refinement of the first virtual model can be output.
[0318] For the processed first component and the second component adjacent to the processed first component, if there is a gap between the processed first component and the second component, the point cloud of the processed first component and the point cloud of the second component can be determined. For any point in the point cloud of the processed first component, the distance between the point and each point in the point cloud of the second component can be calculated, and the point in the point cloud of the second component with the smallest distance from the point is fused. Repeat the above process until the processed first component and the second component are smoothly connected, and the stitching of the processed first component and the second component can be achieved.
[0319] In the embodiments of the present application, for a first virtual model to be processed, a first component for which the user wants to process the level of detail can be selected, and control signals such as text, pictures, and point clouds can be used to directly control the generation of the corresponding processed first component. Moreover, the processed first component can be fused with the components other than the first component in the first virtual model, which can improve the level of detail, greatly reduce the threshold and cost of game production, and shorten the game production time.
[0320] The embodiments of the present application provide a complete human-in-the-loop solution, providing different interaction interfaces, enabling users to select the components to be refined (i.e., the components with improved level of detail) by means of graphic drawing, semantic segmentation, etc. After the first component is selected, the level-of-detail processing model will automatically process the level of detail of the selected first component, and the level of detail can be quantified numerically. In addition, the processed first component can be guaranteed to be of the same scale as the first component, so the processed first component can be directly used to replace the first component to obtain a second virtual model. The embodiments of the present application can also set the first level of detail, which has strong generalization.
[0321] Next, the exemplary structure of the processing device 455 of the virtual model provided by the embodiments of the present application implemented as software modules will be further described. In some embodiments, as Figure 2 shown, the software modules stored in the processing device 455 of the virtual model in the memory 450 may include:
[0322] A display module 4551, configured to display a first virtual model to be processed, where the first virtual model includes a plurality of components;
[0323] A response module 4552, configured to control the first component to be in a selected state in response to a selection instruction for the first component in the first virtual model;
[0324] The response module 4552 is further configured to output a second virtual model obtained by processing the level of detail of the first virtual model in response to a model processing instruction based on the first component in the selected state;
[0325] Wherein, a first level of detail of the first component in the second virtual model is different from a second level of detail of the first component in the first virtual model.
[0326] In some embodiments, before the response module 4552 outputs a second virtual model obtained by processing the level of detail of the first virtual model in response to a model processing instruction based on the first component in a selected state, it further displays a setting area for setting the level of detail; in response to a setting instruction triggered based on the setting area, it displays the level of detail indicated by the setting instruction and determines the set level of detail as the first level of detail.
[0327] In some embodiments, the setting area includes a voice input control; the response module 4552 is further configured to, in response to a trigger operation on the voice input control, enable a voice recording function and receive voice content recorded based on the voice recording function; in response to the end of the voice content recording and when the voice content includes content characterizing the level of detail, trigger the setting instruction, determine the level of detail characterized by the voice content as the level of detail indicated by the setting instruction, and display the level of detail characterized by the voice content.
[0328] In some embodiments, the setting area includes a first setting area; the response module 4552 is further configured to display the input level of detail in the first setting area; in response to a first determination instruction for the input level of detail, use the first determination instruction as the setting instruction and determine the input level of detail as the level of detail indicated by the setting instruction.
[0329] In some embodiments, the setting area includes a second setting area, and setting controls for the level of detail are displayed in the second setting area; the response module 4552 is further configured to, in response to a trigger operation on the setting control, display a plurality of candidates corresponding to different levels of detail; in response to a selection operation on a first candidate among the plurality of candidates, highlight the first candidate; in response to a second determination instruction for the first candidate, use the second determination instruction as the setting instruction and determine the level of detail corresponding to the first candidate as the level of detail indicated by the setting instruction.
[0330] In some embodiments, the response module 4552 is further configured to, in response to a trigger operation on the setting control, display a plurality of candidates, and each candidate corresponds to a level of detail grade.
[0331] The response module 4552 is further configured to determine the level of detail corresponding to the grade of the first candidate and determine the level of detail of the grade as the level of detail indicated by the setting instruction.
[0332] In some embodiments, the fineness level corresponds to at least one parameter. The response module 4552 is further configured to, in response to a trigger operation on the setting control, display a plurality of candidate items corresponding to each of the parameters, and each candidate item corresponds to a parameter value of one of the parameters.
[0333] The response module 4552 is further configured to determine the parameter value of the parameter corresponding to the first candidate item, and determine the fineness level characterized by the parameter value as the fineness level to be set indicated by the setting instruction.
[0334] In some embodiments, the response module 4552 is further configured to, based on the first component in a selected state, after outputting a second virtual model obtained by processing the fineness level of the first virtual model in response to a model processing instruction, display a save control; in response to a trigger operation on the save control, save the processing method for processing the fineness level of the first virtual model, and display an application control for the saved processing method; wherein the application control is configured to process the fineness level of the virtual model to be processed with one key using the processing method.
[0335] In some embodiments, the response module 4552 is further configured to, in response to a selection instruction for a first component in the first virtual model, display recommendation information about the second fineness level and the fineness level of the first component, where the recommendation information is used to recommend the fineness level corresponding to the first component; in response to a third determination instruction for the recommendation information, determine the recommended fineness level as the first fineness level.
[0336] In some embodiments, the response module 4552 is further configured to, based on the first component in a selected state, display a special effect for processing the fineness level of the first component in response to a model processing instruction; after the processing of the fineness level of the first component is completed, cancel the display of the special effect, and display a replacement process of the first component in the first virtual model, where the replacement process is used to indicate replacing the first component in the first virtual model with the processed first component; after the display of the replacement process is completed, output the second virtual model.
[0337] In some embodiments, after outputting the second virtual model, the response module 4552 is further configured to display a comparison control, where the comparison control is used to compare the first virtual model and the second virtual model; in response to a trigger operation on the comparison control, simultaneously display the first virtual model and the second virtual model, and display a comparison result between the fineness level of the first virtual model and the fineness level of the second virtual model.
[0338] In some embodiments, the response module 4552 is further configured to, in response to selection instructions for a plurality of the first components that are continuously triggered, synchronously control each of the first components to be in a selected state, and display quantity prompt information for the first components, where the quantity prompt information is used to prompt the maximum selectable quantity of the first components.
[0339] In some embodiments, the response module 4552 is further configured to, based on the first components in a selected state, in response to a model processing instruction, if the model processing instruction indicates to increase the refinement level of the first components and the refinement level of the first components reaches a first refinement level threshold, display a first prompt information, where the first prompt information is used to prompt that the refinement level of the first components cannot be increased;
[0340] Or, if the model processing instruction indicates to decrease the refinement level of the first components and the refinement level of the first components reaches a second refinement level threshold, display a second prompt information, where the second prompt information is used to prompt that the refinement level of the first components cannot be decreased.
[0341] In some embodiments, the response module 4552 is further configured to, in response to a gap existing between the first component and a second component in the second virtual model, display a fusion control; where the second component is adjacent to the first component; in response to a trigger operation on the fusion control, fuse the first component and the second component in the second virtual model, and display a third virtual model obtained by fusion, where the first component and the second component in the third virtual model are smoothly connected.
[0342] In some embodiments, the response module 4552 is further configured to determine a first point in the point cloud of the first component, and determine a second point in the point cloud of the second component; for each of the first points, determine the interval distance between the first point and each of the second points; fuse the first point and the second point with the minimum interval distance; repeat the above operations until the first component and the second component are smoothly connected.
[0343] In some embodiments, the response module 4552 is further configured to display a first virtual model to be processed, and display a division control for the first virtual model; in response to a trigger operation on the division control, display the plurality of components obtained by dividing the first virtual model in different first display styles.
[0344] In some embodiments, the response module 4552 is further configured to, in response to a triggering operation on the division control, render images of the first virtual model from different perspectives for the first virtual model, where the images include a plurality of fourth points; obtain the point cloud of the first virtual model, where the point cloud of the first virtual model includes a plurality of third points; determine the categories of the fourth points, and determine the mapping relationship between the third points and the fourth points in the images; determine the categories of the third points based on the categories of the fourth points and the mapping relationship; and divide the first virtual model based on the categories of the third points to obtain the plurality of components.
[0345] In some embodiments, the response module 4552 is further configured to, in response to a drawing operation of a geometric figure, display the drawn geometric figure; in response to the geometric figure including a component of the first virtual model, determine the component in the geometric figure as the first component, trigger a selection instruction for the first component in the first virtual model, and control the first component to be in a selected state.
[0346] In some embodiments, the response module 4552 is further configured to, in response to a model processing instruction, obtain a first feature of the first component, where the first feature corresponds to a second level of detail of the first component; predict a second feature of the first level of detail based on the first feature, where the second level of detail is different from the first level of detail; generate the first component after processing the level of detail of the first component based on the second feature; and output a second virtual model after processing the level of detail of the first virtual model based on the processed first component.
[0347] An embodiment of the present application provides a computer program product, which includes a computer program or computer-executable instructions, and the computer program or computer-executable instructions are stored in a computer-readable storage medium. The processor of the electronic device reads the computer-executable instructions from the computer-readable storage medium, and the processor executes the computer-executable instructions, so that the electronic device executes the method for processing a virtual model in the embodiments of the present application described above.
[0348] An embodiment of the present application provides a computer-readable storage medium, which stores computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the processor will be caused to execute the method for processing a virtual model provided in the embodiments of the present application. For example, as Figure 3 shown in the method for processing a virtual model.
[0349] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disc, or CD-ROM; or may be various devices including one or any combination of the above memories.
[0350] In some embodiments, the computer-executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including being deployed as a stand-alone program or being deployed as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0351] As an example, the computer-executable instructions may or may not correspond to files in the file system, may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, stored in a single file dedicated to the program being discussed, or, stored in multiple cooperating files (such as files that store one or more modules, subroutines, or portions of code).
[0352] As an example, the computer-executable instructions may be deployed to execute on one electronic device, or on multiple electronic devices located at one location, or, on multiple electronic devices distributed at multiple locations and interconnected by a communication network.
[0353] The size of the processed first component predicted by the fineness processing model is consistent with the size of the first component. Therefore, the first component in the first virtual model can be directly replaced with the processed first component. Equivalently, the present application can maintain the similarity between the size of the first component after fineness processing and the size of the first component to be greater than the similarity threshold, and can solve the above technical problem 2.
[0354] In the present application, the first fineness can be set through the above first implementation manner - sixth implementation manner. Correspondingly, the fineness processing model can output the processed first component with the first fineness, which can improve the selectivity of the fineness of the processed first component and can solve the above technical problem 3.
[0355] In the method for processing a virtual model provided in the embodiments of the present application, the first level of detail of the first component in the second virtual model may be lower than the second level of detail of the first component in the first virtual model. This is equivalent to reducing the level of detail of the first virtual model, thereby reducing the storage resources occupied by the first virtual model. The first level of detail of the first component in the second virtual model may be higher than the second level of detail of the first component in the first virtual model. This is equivalent to increasing the level of detail of the first virtual model. In the embodiments of the present application, the level of detail of the first component corresponding to the selection instruction can be reduced or increased according to actual usage requirements, which can improve the flexibility of processing the virtual model. Compared with the related art, it provides a rich variety of ways to process the virtual model, that is, it can improve the diversity of the ways to process the level of detail of the virtual model, and can solve the above technical problem 1.
[0356] In the case of increasing the level of detail of the first component corresponding to the selection instruction, there is no need to process the level of detail of the entire first virtual model, which can reduce the computing resources occupied during the processing. Moreover, the level of detail of the first component in the processed second virtual model is higher than the level of detail of the first component in the first virtual model. Compared with the first virtual model, the display effect of the second virtual model is better, which is equivalent to being able to improve the display effect of the second virtual model.
[0357] The above description is only for the embodiments of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A method for processing a virtual model, characterized in that: The method comprises: displaying a first virtual model to be processed, wherein the first virtual model includes a plurality of components; In response to a selection instruction for a first component in the first virtual model, controlling the first component to be in a selected state; Based on the first component in the selected state, in response to a model processing instruction, outputting a second virtual model after processing the refinement level of the first virtual model; A first level of refinement of the first component in the second virtual model is different from a second level of refinement of the first component in the first virtual model.
2. The method according to claim 1, characterized in that Before outputting the second virtual model after processing the refinement level of the first virtual model based on the first component in the selected state in response to the model processing instruction, the method further includes: Displays the settings area for setting the level of detail; In response to a setting instruction triggered based on the setting area, the fineness of the setting indicated by the setting instruction is displayed, and the fineness of the setting is determined as the first fineness.
3. The method according to claim 2, characterized in that The setting area includes a voice input control; The step of displaying the level of detail of the setting indicated by the setting instruction in response to the setting instruction triggered based on the setting area includes: In response to a trigger operation on the voice input control, a voice recording function is started, and voice content recorded based on the voice recording function is received; In response to the completion of the voice content entry and the voice content including content representing the degree of refinement, the setting instruction is triggered, the degree of refinement represented by the voice content is determined to be the degree of refinement set as indicated by the setting instruction, and the degree of refinement represented by the voice content is displayed.
4. The method according to claim 2, characterized in that: The setting area includes a first setting area; and in response to a setting instruction triggered based on the setting area, displaying the level of detail of the setting indicated by the setting instruction includes: Displaying the level of input refinement in the first setting area; In response to a first determination instruction for the inputted fineness, the first determination instruction is taken as the setting instruction, and the inputted fineness is determined as the fineness set as instructed by the setting instruction.
5. The method according to claim 2, characterized in that: The setting area includes a second setting area, in which a setting control of a fineness level is displayed; The step of displaying the level of detail of the setting indicated by the setting instruction in response to the setting instruction triggered based on the setting area includes: In response to a trigger operation on the setting control, a plurality of candidate items corresponding to different degrees of refinement are displayed; In response to a selection operation on a first candidate item among the plurality of candidate items, highlighting the first candidate item; In response to a second determination instruction for the first candidate item, the second determination instruction is used as the setting instruction, and the fineness corresponding to the first candidate item is determined as the fineness set by the setting instruction.
6. The method according to claim 5, characterized in that The displaying of a plurality of candidate items corresponding to different degrees of refinement in response to the triggering operation on the setting control comprises: In response to a trigger operation on the setting control, a plurality of candidate items are displayed, each of the candidate items corresponding to a level of refinement; The step of determining the level of refinement corresponding to the first candidate item as the level of refinement set as indicated by the setting instruction includes: The fineness of the level corresponding to the first candidate item is determined, and the fineness of the level is determined as the fineness of the setting indicated by the setting instruction.
7. The method according to claim 5, characterized in that The level of refinement corresponds to at least one parameter, and in response to the triggering operation on the setting control, displaying a plurality of candidate items corresponding to different levels of refinement includes: In response to a trigger operation on the setting control, a plurality of candidate items corresponding to each of the parameters are displayed, each of the candidate items corresponding to a parameter value of the parameter; The first candidate items correspond to the parameters one by one, and determining the degree of refinement corresponding to the first candidate items as the degree of refinement set as indicated by the setting instruction includes: A parameter value of a parameter corresponding to the first candidate item is determined, and the degree of refinement represented by the parameter value is determined as the degree of refinement of the setting indicated by the setting instruction.
8. The method according to claim 1, characterized in that After outputting the second virtual model after processing the refinement level of the first virtual model based on the first component in the selected state in response to the model processing instruction, the method further includes: Display the save control; In response to a trigger operation on the save control, a processing method for processing the refinement level of the first virtual model is saved, and an application control of the saved processing method is displayed; The application control is used to process the degree of refinement of the virtual model to be processed with one click by adopting the processing method.
9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: In response to a selection instruction for a first component in the first virtual model, displaying recommendation information of the second level of refinement and the level of refinement of the first component, wherein the recommendation information is used to recommend the level of refinement corresponding to the first component; In response to a third determination instruction for the recommendation information, the recommended level of detail is determined to be the first level of detail.
10. The method according to any one of claims 1 to 8, characterized in that: The step of outputting a second virtual model after processing the refinement level of the first virtual model based on the first component in the selected state and in response to a model processing instruction comprises: Based on the first component in the selected state, in response to the model processing instruction, displaying a special effect of processing the refinement level of the first component; In response to the completion of the processing of the refinement level of the first component, canceling the display of the special effect, and displaying a replacement process of the first component in the first virtual model, wherein the replacement process is used to indicate that the first component in the first virtual model is replaced with the processed first component; In response to the replacement process being displayed to be completed, the second virtual model is outputted.
11. The method according to claim 10, characterized in that After outputting the second virtual model, the method further includes: displaying a comparison control, wherein the comparison control is used to compare the first virtual model with the second virtual model; In response to a trigger operation on the comparison control, the first virtual model and the second virtual model are displayed simultaneously, and a comparison result between the refinement level of the first virtual model and the refinement level of the second virtual model is displayed.
12. The method according to any one of claims 1 to 8, characterized in that: In response to a selection instruction for a first component in the first virtual model, controlling the first component to be in a selected state comprises: In response to continuously triggered selection instructions for multiple first components, each of the first components is synchronously controlled to be in a selected state, and quantity prompt information for the first components is displayed, wherein the quantity prompt information is used to prompt the maximum selectable quantity of the first components.
13. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: Based on the first component being in a selected state, in response to the model processing instruction, if the model processing instruction instructs to increase the refinement level of the first component and the refinement level of the first component reaches a first refinement level threshold, displaying first prompt information, wherein the first prompt information is used to prompt that the refinement level of the first component cannot be increased; Alternatively, if the model processing instruction instructs to reduce the refinement level of the first component and the refinement level of the first component reaches a second refinement level threshold, a second prompt message is displayed, wherein the second prompt message is used to prompt that the refinement level of the first component cannot be reduced.
14. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: In response to a gap between the first component and a second component in the second virtual model, displaying a fusion control; wherein the second component is adjacent to the first component; In response to a trigger operation on the fusion control, the first component and the second component in the second virtual model are fused, and a fused third virtual model is displayed, in which the first component and the second component are smoothly connected.
15. The method according to claim 14, characterized in that The fusing the first component and the second component in the second virtual model includes: determining a first point in the point cloud of the first component and determining a second point in the point cloud of the second component; For each of the first points, determining a spacing distance between the first point and each of the second points; Merging the first point with the second point with the smallest interval distance; The above operations are repeated until the first component is smoothly connected to the second component.
16. The method according to any one of claims 1 to 8, characterized in that: The displaying of the first virtual model to be processed comprises: displaying a first virtual model to be processed, and displaying a partitioning control for the first virtual model; In response to a triggering operation on the division control, a different first display style is used to display the multiple components obtained by dividing the first virtual model.
17. The method according to claim 16, characterized in that The method further comprises: In response to a triggering operation on the division control, rendering images of the first virtual model at different viewing angles for the first virtual model, wherein the images include a plurality of fourth points; Acquire a point cloud of the first virtual model, wherein the point cloud of the first virtual model includes a plurality of third points; determining a category of the fourth point, and determining a mapping relationship between the third point and the fourth point in the image; Determining the category of the third point based on the category of the fourth point and the mapping relationship; Based on the category of the third point, the first virtual model is divided to obtain the multiple components.
18. The method according to any one of claims 1 to 8, characterized in that: In response to a selection instruction for a first component in the first virtual model, controlling the first component to be in a selected state comprises: In response to the drawing operation of the geometric figure, the drawn geometric figure is displayed; In response to the geometric figure including a component in the first virtual model, the component in the geometric figure is determined as a first component, a selection instruction for the first component in the first virtual model is triggered, and the first component is controlled to be in a selected state.
19. The method according to any one of claims 1 to 8, characterized in that: The step of outputting, in response to the model processing instruction, a second virtual model after processing the refinement level of the first virtual model comprises: In response to the model processing instruction, obtaining a first feature of the first component, the first feature corresponding to a second level of refinement of the first component; predicting a second feature at the first level of granularity based on the first feature, the second level of granularity being different from the first level of granularity; Based on the second feature, generating the first component after processing the refinement level of the first component; Based on the processed first component, a second virtual model is outputted after processing the refinement level of the first virtual model.
20. A virtual model processing device, characterized in that: The device comprises: A display module, used for displaying a first virtual model to be processed, wherein the first virtual model includes a plurality of components; a response module, configured to control the first component to be in a selected state in response to a selection instruction for the first component in the first virtual model; The response module is further configured to output a second virtual model after processing the refinement level of the first virtual model in response to a model processing instruction based on the first component in the selected state; A first level of refinement of the first component in the second virtual model is different from a second level of refinement of the first component in the first virtual model.
21. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions or computer programs; A processor, used to implement the virtual model processing method described in any one of claims 1 to 19 when executing the computer executable instructions or computer programs stored in the memory.
22. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the virtual model processing method described in any one of claims 1 to 19 is implemented.
23. A computer program product comprising computer executable instructions or a computer program, characterized in that When the computer executable instructions or computer program are executed by a processor, the virtual model processing method described in any one of claims 1 to 19 is implemented.