Model processing method and device, storage medium and electronic equipment
By acquiring and controlling the basic model, creating a bounding box to fill point cloud data and converting it into volumetric data, the problem of low complexity and accuracy of model fusion in the existing technology is solved, and efficient dynamic model fusion is achieved.
Patent Information
- Application Number
- CN202411396899.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-01-03
AI Technical Summary
The existing methods of model fusion through skeletal animation are complex, resulting in low model processing efficiency, especially inadequate precision in details and complex deformation processing.
By acquiring multiple basic models, controlling their motion, creating a bounding box to fill point cloud data, determining the internal and external attribute information of point cloud data, and converting it into volumetric data, generating a target model for dynamic fusion.
The model fusion process is simplified, the accuracy and processing efficiency of dynamic fusion are improved, and it is suitable for model fusion of complex topological changes.
Smart Images

Figure CN119251406A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a model processing method, device, storage medium and electronic device. Background Art
[0002] With the rapid development of life and technology, people often use game applications for entertainment. In game development, dynamic fusion between 3D models is a complex and important technology that can significantly improve the visual effects and interactive experience of the game. In existing model processing methods, most of them use skeletal animation to achieve dynamic fusion of models through bone binding and weight influence.
[0003] In the process of research and practice of existing technologies, it is found that the existing model processing method for realizing model fusion through skeletal animation is relatively complicated, and the fusion processing accuracy of details and complex deformations is low, resulting in poor model processing efficiency. Summary of the invention
[0004] The embodiments of the present application provide a model processing method, device, storage medium and electronic device, which can simplify the complexity of the model fusion process and improve the accuracy of model dynamic fusion, thereby improving the model processing efficiency.
[0005] The present application embodiment provides a model processing method, including:
[0006] Acquire multiple basic models, and control the multiple basic models to move respectively;
[0007] Determining the current position of each of the base models, creating a bounding box surrounding the plurality of base models according to the current position, and filling the bounding box with point cloud data;
[0008] Based on the point cloud data and the current position, determining internal and external attribute information of each point in the point cloud data, the internal and external attribute information indicating whether the point cloud data is within the space surrounded by the basic model or outside the space surrounded by the basic model;
[0009] Converting point cloud data in the space surrounded by the basic model into volume data;
[0010] A corresponding target model is generated based on the volume data corresponding to each of the base models.
[0011] Accordingly, an embodiment of the present application provides a model processing device, including:
[0012] An acquisition unit, used for acquiring a plurality of basic models, and controlling the plurality of basic models to move respectively;
[0013] A creating unit, configured to determine a current position of each of the base models, create a bounding box surrounding the plurality of base models according to the current position, and fill the bounding box with point cloud data;
[0014] a determining unit, configured to determine, based on the point cloud data and the current position, internal and external attribute information of each point in the point cloud data, wherein the internal and external attribute information indicates whether the point cloud data is within a space enclosed by the basic model or outside the space enclosed by the basic model;
[0015] A conversion unit, used for converting point cloud data in the space surrounded by the basic model into volume data;
[0016] A generating unit is used to generate a corresponding target model based on the volume data corresponding to each of the basic models.
[0017] In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and the computer program is suitable for loading by a processor to execute the steps in any model processing method provided in the embodiment of the present application.
[0018] In addition, an embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the memory stores an application, and the processor is used to run the application in the memory to implement the model processing method provided in the embodiment of the present application.
[0019] An embodiment of the present application also provides a computer program product, which includes a computer program, and the computer program is stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device performs the steps in the model processing method provided in the embodiment of the present application.
[0020] The embodiment of the present application obtains multiple basic models, controls the multiple basic models to move respectively; determines the current position of each basic model, creates a bounding box surrounding the multiple basic models according to the current position, and fills the point cloud data in the bounding box; determines the internal and external attribute information of each point in the point cloud data based on the point cloud data and the current position, and the internal and external attribute information indicates that the point cloud data is in the space surrounded by the basic model, or outside the space surrounded by the basic model; converts the point cloud data in the space surrounded by the basic model into volume data; generates the corresponding target model based on the volume data corresponding to each basic model. In this way, by controlling the multiple basic models to move respectively, creating a bounding box surrounding the multiple basic models according to the current position of each basic model, filling the point cloud data in the bounding box, and determining whether each point in the point cloud data is in the space surrounded by the basic model, the point cloud data in the space surrounded by the basic model can be converted into volume data, and the target model indicating the dynamic fusion effect of multiple basic models can be generated based on the volume data corresponding to the basic model, which simplifies the complexity of the model fusion process, improves the accuracy of the dynamic fusion of the model, and thus improves the model processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 It is a schematic diagram of an implementation scenario of a model processing method provided in an embodiment of the present application;
[0023] Figure 2 It is a flow chart of a model processing method provided in an embodiment of the present application;
[0024] Figure 3a It is a basic model schematic diagram of a model processing method provided in an embodiment of the present application;
[0025] Figure 3b is a schematic diagram of a bounding box of a model processing method provided in an embodiment of the present application;
[0026] Figure 3c is a model processing schematic diagram of a model processing method provided in an embodiment of the present application;
[0027] Figure 3d is another model processing schematic diagram of a model processing method provided in an embodiment of the present application;
[0028] Figure 4ais a target model schematic diagram of a model processing method provided in an embodiment of the present application;
[0029] Figure 4b is another target model schematic diagram of a model processing method provided in an embodiment of the present application;
[0030] Figure 5 is a structural schematic diagram of a model processing device provided in an embodiment of the present application;
[0031] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0033] The embodiment of the present application provides a model processing method, device, storage medium and electronic device. The model processing device can be integrated in an electronic device, which can be a server, a terminal or other device.
[0034] Among them, 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 cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms. Terminals may include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. Terminals and servers can be directly or indirectly connected via wired or wireless communications, and this application does not limit this.
[0035] See also Figure 1 , taking the integration of the model processing device into an electronic device as an example, Figure 1A schematic diagram of an implementation scenario of the model processing method provided in an embodiment of the present application, wherein the electronic device can be a terminal or a server, and the electronic device can obtain multiple basic models and control the movement of the multiple basic models respectively; determine the current position of each basic model, create a bounding box surrounding the multiple basic models according to the current position, and fill the point cloud data in the bounding box; based on the point cloud data and the current position, determine the internal and external attribute information of each point in the point cloud data, the internal and external attribute information indicates that the point cloud data is within the space surrounded by the basic model, or is outside the space surrounded by the basic model; convert the point cloud data in the space surrounded by the basic model into volume data; and generate a corresponding target model based on the volume data corresponding to each basic model.
[0036] It should be noted that Figure 1 The implementation environment scenario diagram of the model processing method shown is only an example. The implementation environment scenario of the model processing method described in the embodiment of the present application is to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided by the embodiment of the present application. It is known to those skilled in the art that with the evolution of data processing and the emergence of new business scenarios, the technical solution provided by the present application is also applicable to similar technical problems.
[0037] The solutions provided by the embodiments of the present application are specifically described by the following embodiments. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.
[0038] This embodiment will be described from the perspective of a model processing device. The model processing device may be integrated into an electronic device. The electronic device may be a terminal and / or a server, and this application does not limit this.
[0039] See also Figure 2 , Figure 2 : is a flow chart of the model processing method provided in the embodiment of the present application. The model processing method includes:
[0040] In step 101, a plurality of basic models are obtained, and the plurality of basic models are controlled to move respectively.
[0041] Among them, the basic model can be a model for dynamic fusion, for example, it can be a character model, bubble, stone and other models that can be fused. The position of the basic model in the three-dimensional space can be adjusted according to the required dynamic fusion effect to control the movement of multiple basic models.
[0042] Optionally, the basic model can also be a simple model that assists in generating the dynamic fusion effect of the model, for example, it can be a plane, curved surface or other models, and the position and direction of these simple models in three-dimensional space can be determined according to the specific fusion effect. For example, when the hands of two character models need to be fused, a simple model such as a geometric plane can be set at the hand position of the two character models, so that according to the required dynamic fusion effect, multiple basic models can be controlled to move with the character models to assist in generating the dynamic fusion effect of the fusion of the hands of the two character models.
[0043] In a specific embodiment, for the sake of convenience, the basic model is taken as a simple basic geometric plane as an example, please refer to Figure 3a , Figure 3a It is a basic model schematic diagram of a model processing method provided in an embodiment of the present application. Three basic models for fusion can be created according to the required dynamic fusion effect, or three models to be fused can be input to obtain multiple basic models.
[0044] In step 102, the current position of each basic model is determined, a bounding box surrounding the multiple basic models is created according to the current position, and the point cloud data is filled in the bounding box.
[0045] Among them, the current position can be the current position of each basic model, the bounding box can be a bounding box (BoundingBox) that encloses multiple basic models, the point cloud data can be a point cloud filled in the bounding box, and the point cloud can be a set of multiple points in a three-dimensional coordinate system. It can also be described as a data structure representing an object in a three-dimensional space. It can be composed of many discrete points, and each point can have its own position coordinates and possible other attributes, such as color, normal vector, intensity and other attributes.
[0046] There are many ways to create a bounding box surrounding multiple basic models based on the current position. For example, the three-dimensional coordinates of the current positions of the multiple basic models in the three-dimensional space can be obtained, so that the maximum and minimum values of the X coordinate, the maximum and minimum values of the Y coordinate, and the maximum and minimum values of the Z coordinate can be determined in the three-dimensional coordinates of the basic models, so that the bounding box surrounding the multiple basic models can be constructed according to the maximum and minimum values corresponding to the X coordinate, the Y coordinate, and the Z coordinate.
[0047] In a specific embodiment, please refer to Figure 3b , Figure 3b is a schematic diagram of a bounding box of a model processing method provided in an embodiment of the present application. A bounding box that encloses multiple base models can be created based on the current position of the base model. Then, the point cloud can be filled in the constructed bounding box to obtain the point cloud data corresponding to the base model. For example, please refer to Figure 3c , Figure 3c It is a model processing schematic diagram of a model processing method provided in an embodiment of the present application, which can fill point cloud data inside the bounding boxes of multiple basic models.
[0048] In step 103, based on the point cloud data and the current position, the internal and external attribute information of each point in the point cloud data is determined.
[0049] Among them, the internal and external attribute information can be information indicating the positional relationship between each point in the point cloud data and the space surrounded by multiple basic models. For example, the internal and external attribute information can indicate whether the point cloud data is within the space surrounded by the basic model, or outside the space surrounded by the basic model.
[0050] Among them, there are many ways to determine the internal and external attribute information of each point in the point cloud data based on the point cloud data and the current position. For example, the surface normal vector of each facet in the basic model can be obtained, and the target solid angle of each facet in the basic model relative to each point in the point cloud data can be calculated. The target solid angle is fused based on the surface normal vector to obtain the target surround value of each point in the point cloud data, and the internal and external attribute information of each point in the point cloud data is determined based on the target surround value.
[0051] Among them, the face normal vector can be the normal vector of each face in the basic model, and the face can be a triangular face, a polygonal face, or the like in the basic model. The target solid angle can be the solid angle of each face in the basic model relative to a point in the point cloud data. The solid angle can be the angle of an object in three-dimensional space to a specific point. It is the analogy of a plane angle in three-dimensional space and can be described as the scale of the size of an object measured by an observer standing at a certain point. For example, for a specific observation point, a small object near the observation point may have the same solid angle as a large object in the distance. In an embodiment of the present application, the solid angle can be the angle of a face in the basic model to a point in three-dimensional space in the point cloud data. The target winding value can be the winding value of each point in the point cloud data relative to the basic model, which can measure whether a point in the point cloud data is in the space surrounded by multiple basic models, and can be used to indicate the surrounding relationship between a point in the point cloud data and the basic model. Among them, the winding value (winding number) can represent the number of circles that a curve wraps around a point on a plane.
[0052] There are many ways to calculate the target solid angle of each facet in the basic model relative to each point in the point cloud data. For example, the solid angle of each vertex in each facet of the basic model relative to each point in the point cloud data can be calculated, and the solid angles corresponding to each vertex in each facet in the basic model can be accumulated to obtain the target solid angle of each facet in the basic model relative to each point in the point cloud data.
[0053] There are many ways to calculate the solid angle of each vertex in each patch of the basic model relative to each point in the point cloud data. For example, for each vertex in each patch of the basic model, the vector between the vertex and each point in the point cloud data can be calculated to obtain a first vector, and the second vector between the target vertex on the patch and each point in the point cloud data is calculated. Based on the first vector and the second vector, the solid angle of each vertex in each patch of the basic model relative to each point in the point cloud data is calculated.
[0054] Among them, the first vector can be a vector composed of vertices on the patch and points in the point cloud data, the second vector can be a vector composed of a target vertex on the patch and points in the point cloud data, and the target vertex can be the next vertex of the vertex on the patch.
[0055] There are many ways to calculate the vector between the vertex and each point in the point cloud data and obtain the first vector. For example, for the point in the point cloud data whose internal and external attribute information is to be determined, the three-dimensional coordinates of the point and the three-dimensional coordinates of a vertex in a face patch of the currently traversed basic model can be obtained, so that the three-dimensional coordinates of the currently processed point can be subtracted from the three-dimensional coordinates of the currently processed vertex to obtain the first vector. For example, the calculation process of the first vector v1 can be expressed as v1=faceVertices[i]-point, wherein faceVertices[i] can represent the three-dimensional coordinates of the i-th vertex on the currently traversed face patch in the basic model, that is, the three-dimensional coordinates of the current vertex, and point can be represented as the three-dimensional coordinates of the point in the point cloud data.
[0056] There are many ways to calculate the second vector between the target vertex on the face and each point in the point cloud data. For example, the three-dimensional coordinates of the target vertex can be obtained, the three-dimensional coordinates of the target vertex can be taken as a remainder, and then the result of the remainder can be subtracted from the three-dimensional coordinates of the point in the current point cloud data to obtain the second vector. For example, the second vector v2=faceVertices[(i+1)%numVertices]-point, wherein faceVertices[(i+1)%numVertices] can represent the result after taking the remainder of the three-dimensional coordinates of the target vertex.
[0057] After calculating the first vector and the second vector, the solid angle of each vertex in each patch of the basic model relative to each point in the point cloud data can be calculated based on the first vector and the second vector. There are multiple ways to calculate the solid angle of each vertex in each patch of the basic model relative to each point in the point cloud data based on the first vector and the second vector. For example, the first vector and the second vector can be cross-producted to obtain a cross product result, the first vector and the second vector can be dot-producted to obtain a dot product result, and the inverse tangent can be calculated based on the cross product result and the dot product result to obtain the solid angle of each vertex in each patch of the basic model relative to each point in the point cloud data. For example, the solid angle angle of each vertex in each patch of the basic model relative to each point in the point cloud data can be expressed as angle = atan2(length(cross(v1,v2)), dot(v1,v2)), where cross() represents the cross product function, dot() represents the dot product function, length() represents the modulo function, which can be used to calculate the length of the vector, and atan2(x,y) represents the inverse tangent function, which is used to calculate the inverse tangent of y / x expressed in radians.
[0058] After calculating the target solid angle of each facet in the basic model relative to each point in the point cloud data, the target solid angle can be fused based on the face normal vector to obtain the target surround value of each point in the point cloud data. There are many ways to fuse the target solid angle based on the face normal vector to obtain the target surround value of each point in the point cloud data. For example, the vector between each point in the point cloud data and the center point of each facet can be calculated to obtain a third vector, and the dot product of the third vector and the face normal vector of each facet can be calculated to obtain the dot product calculation result. The target solid angle is fused based on the dot product calculation result to obtain the target surround value of each point in the point cloud data.
[0059] Among them, since the basic model is composed of many polygonal patches, in order to determine whether the points in the point cloud data are in the space surrounded by multiple basic models, the degree to which each patch in the basic model surrounds each point in the point cloud data can be used to determine whether each point is in the space surrounded by the basic model. In order to determine whether the target solid angle of each patch is "wrapped point" or "far away from the point", it is necessary to determine the direction of the currently observed patch (i.e., the surface normal vector). If the patch is facing the point, it means that the point may be wrapped by the patch, and the point may be in the space surrounded by the basic model. If the patch is facing away from the point, it means that the point is not wrapped by the patch, and the point may be outside the space surrounded by the basic model. In this way, the dot product of the third vector and the surface normal vector of each facet can be calculated to obtain the dot product calculation result that characterizes the orientation of the facet relative to the point, so that the target solid angles of all faces of the basic model can be fused according to the dot product calculation result to statistically calculate the degree to which the basic model surrounds each point in the point cloud data, that is, the target surround value. If the target surround value corresponding to a certain point in the point cloud data is large, it can be shown that the basic model surrounds the point to a large extent, so that it can be determined that the point is in the space surrounded by the basic model. If the target surround value corresponding to a certain point in the point cloud data is small, it can be shown that the basic model surrounds the point to a small extent, so that it can be determined that the point is not in the space surrounded by the basic model, and then it can be accurately judged whether each point is in the space surrounded by the basic model.
[0060] There are many ways to calculate the vector between each point in the point cloud data and the center point of each facet to obtain the third vector. For example, the three-dimensional coordinate center of the center point of the facet can be obtained, and the three-dimensional coordinate point of the point whose internal and external attribute information is to be determined in the point cloud data is subtracted from the three-dimensional coordinate center of the center point of the facet to obtain the third vector. For example, the third vector v3 can be expressed as v3=point-center.
[0061] After calculating the vectors between each point in the point cloud data and the center point of each facet, the dot product of the third vector and the face normal vector of each facet can be calculated to obtain the dot product calculation result. For example, the dot product calculation result can be expressed as dot(normal, point-center), where normal can be expressed as the face normal vector of the facet.
[0062] After the dot product calculation result is calculated, the target solid angle can be fused based on the dot product calculation result to obtain the target surround value of each point in the point cloud data. There are many ways to fuse the target solid angle based on the dot product calculation result to obtain the target surround value of each point in the point cloud data. For example, when the dot product calculation result is greater than 0, it can indicate that the facet corresponding to the dot product calculation result is facing the point relative to the dot product calculation result, that is, wrapping the point. Therefore, for each point in the point cloud data, the target solid angles corresponding to the dot product calculation result greater than 0 can be accumulated to obtain a first accumulated result, and the target solid angles corresponding to the dot product calculation result not greater than 0 can be accumulated to obtain a second accumulated result. The first accumulated result is subtracted from the second accumulated result to obtain the target surround value of the point, so that the target surround value of each point in the point cloud data can be obtained.
[0063] After the target solid angle is fused based on the surface normal vector to obtain the target surround value of each point in the point cloud data, the internal and external attribute information of each point in the point cloud data can be determined based on the target surround value. There are many ways to determine the internal and external attribute information of each point in the point cloud data based on the target surround value. For example, the internal and external attribute information of each point in the point cloud data can be determined based on the target surround value and the preset surround value threshold. When the absolute value of the target surround value is greater than the preset surround value threshold, the internal and external attribute information indicates that the point cloud data is in the space surrounded by the basic model. When the absolute value of the target surround value is not greater than the preset surround value threshold, the internal and external attribute information indicates that the point cloud data is outside the space surrounded by the basic model.
[0064] Among them, the preset surround value threshold can be a preset critical value of a surround value. When the target surround value of a point in the point cloud data is greater than the critical value, it can be indicated that the point is in the space surrounded by the basic model. Since in three-dimensional space, the solid angle of a point completely surrounded is equal to 4π, therefore, when the solid angles of all faces in the object add up to close to 4π, it means that these faces surround the point from all directions in three-dimensional space, and it can be considered that the point is located in the object. Optionally, in an embodiment of the present application, the preset surround value threshold can be 4π. When the absolute value of the target surround value of a point is greater than the preset surround value threshold of 4π, it can be indicated that the point is in the space surrounded by the basic model. When the absolute value of the target surround value of a point is not greater than the preset surround value threshold of 4π, it can be indicated that the point is outside the space surrounded by the basic model.
[0065] In a specific embodiment, the following method may be used to determine the internal and external attribute information of each point in the point cloud data, that is, to determine whether each point in the point cloud data is within the space surrounded by the basic model:
[0066]
[0067]
[0068] In step 104 , the point cloud data in the space surrounded by the base model is converted into volume data.
[0069] Among them, the volume data can be a volume obtained by converting point cloud data. The volume can be a three-dimensional grid structure. The volume is composed of multiple cells (i.e., voxels). Voxel is the abbreviation of volume element (Volume Pixel), which is the smallest unit in three-dimensional space segmentation. Each voxel can contain one or more attribute values, such as density, temperature or color.
[0070] There are many ways to convert point cloud data in the space surrounded by the basic model into volume data. For example, the points in the point cloud data that are in the space surrounded by the basic model can be converted into voxels to obtain the volume data of the point cloud data. Specifically, a voxel can be placed at the position of the point in the point cloud data that is in the space surrounded by the basic model to obtain the volume data.
[0071] There are many ways to convert the point cloud data in the space surrounded by the basic model into volume data. For example, the point cloud data can be converted into voxels, and the volume density of the voxels can be set based on the internal and external attribute information to obtain the volume data of the point cloud data, wherein the volume density of the voxels in the space surrounded by the basic model is the first threshold, and the volume density of the voxels outside the space surrounded by the basic model is the second threshold.
[0072] The first threshold value may be the volume density value of the voxels in the space surrounded by the basic model, and the first threshold value may be 1. The second threshold value may be the volume density value of the voxels outside the space surrounded by the basic model, and the second threshold value may be 0. If the volume density of the voxel is 1, it may indicate that the voxel has an absorption or scattering effect on the light, and if the volume density of the voxel is 0, it may indicate that the absorption or scattering effect of the voxel on the light is almost non-existent, so the light can easily pass through without being absorbed or changing direction, achieving a transparent or unobstructed effect, which is equivalent to removing the point cloud data that is not in the space surrounded by the basic model, that is, the volume data corresponding to the point cloud data that is not in the space surrounded by the basic model will not affect the display, which is equivalent to non-existence. In this way, the volume density of the voxels in the space surrounded by the basic model is set to 1, and the volume density of the voxels outside the space surrounded by the basic model is set to 0, so that only the area in the space surrounded by the basic module can be displayed, so that the state of model fusion between the basic models can be simulated, and the model fusion efficiency can be improved.
[0073] There are many ways to convert point cloud data into voxels and set the volume density of voxels based on internal and external attribute information to obtain volume data of point cloud data. For example, based on the internal and external attribute information, a first position point in the point cloud data that is within the space surrounded by the basic model and a second position point that is outside the space surrounded by the basic model can be determined, and a voxel with a volume density of a first threshold is placed at the first position point, and a voxel with a volume density of a second threshold is placed at the second position point to obtain the volume data of the point cloud data.
[0074] The first position point may be a point in the point cloud data that is within the space surrounded by the basic model, and the second position point may be a point in the point cloud data that is outside the space surrounded by the basic model.
[0075] For example, see Figure 3b , Figure 3d This is another model processing schematic diagram of a model processing method provided in an embodiment of the present application. Voxels with a volume density of 1 can be placed at points in the point cloud data that are within the space surrounded by the basic model, and voxels with a volume density of 0 can be placed at points outside the space surrounded by the basic model to obtain volume data of the point cloud data.
[0076] In step 105 , a corresponding target model is generated based on the volume data corresponding to each base model.
[0077] Among them, the target model can be a model for fusion between simulated basic models. Since each basic model is moving, the target model generated based on the current position of each basic model is also changing in real time based on the movement of the basic model, thereby achieving a dynamic fusion effect between the basic models.
[0078] For example, see Figure 4a and Figure 4b ,in, Figure 4a is a target model schematic diagram of a model processing method provided in an embodiment of the present application, Figure 4b is another target model schematic diagram of a model processing method provided in an embodiment of the present application. When the distance between multiple basic models is far, the area for fusion between the multiple basic models is small, such as Figure 4a As shown, the positions between the basic models can be further adjusted to enhance the degree of fusion between multiple basic models, such as Figure 4b As shown, a target model can be generated that simulates the effects of dynamic fusion and dynamic splitting between basic models.
[0079] There are many ways to generate a corresponding target model based on the volume data corresponding to each basic model. For example, the volume data can be converted into a three-dimensional mesh model to obtain a target model that simulates dynamic fusion of multiple basic models.
[0080] There are many ways to convert volume data into a three-dimensional mesh model. For example, a surface drawing algorithm (Marching Cubes) can be used to convert volume data into a three-dimensional mesh model. The Marching Cubes algorithm is an algorithm for generating a three-dimensional mesh model from volume data. It can represent volume data as a three-dimensional mesh, and then determine the topology and geometry of the surface by processing each mesh unit, so that a three-dimensional mesh model can be generated based on the volume data.
[0081] Dynamic fusion between 3D models is a complex and important technology that can significantly improve the visual effects and interactive experience of games. However, due to the limitations of the established rendering pipeline and hardware, achieving subtle fusion between models has always been a technical challenge. In the traditional rendering pipeline, the vertex data of the 3D model is usually determined during the loading stage. These vertex data are processed by the vertex shader and passed to the fragment shader for rendering. Although this pipeline design is efficient, when dynamically fusion models, due to the fixed nature of vertex data, once the vertex data is read, the subsequent processing stage can only perform simple offsets or transformations on it, and subtle topological modifications or fusion operations cannot be performed. In addition, since the dynamic scenes in the game require vertex processing and rendering to be completed quickly within each frame, complex geometric operations may cause performance bottlenecks, affecting frame rate and user experience. In addition, since the existing graphics processing unit (GPU) is designed to focus more on parallel computing and pipeline processing, it has limited support for operations that require frequent modifications to the topological structure. Therefore, the traditional rendering pipeline cannot efficiently process model fusion.
[0082] Among them, in the existing model processing methods, most of them realize the fusion of models through the deformation of skeletal animation, the deformation of shape interpolation and the simulation of fluid mechanics. For the model processing method based on the deformation of shape interpolation, it is necessary to predefine multiple shapes, and the quality of the interpolation operation depends on the number and accuracy of these predefined shapes, which makes the preprocessing requirements high, cannot handle complex topological changes, and has high computational complexity. For the model processing method based on the deformation of skeletal animation, since skeletal animation is suitable for a wide range of deformations, but the accuracy is not enough when processing details and complex deformations, the control accuracy of model fusion is limited. In addition, it is necessary to build a skeletal structure for each model, and perform binding and weight distribution, which increases the complexity of model fusion processing, and this method is mainly suitable for character animation, and is not suitable for processing other types of dynamic model fusion. For the model processing method based on the simulation of fluid mechanics, since fluid mechanics simulation involves a large number of particles and grid calculations, real-time performance is difficult to guarantee, the computational overhead is large, and the realization of high-quality fluid simulation requires complex algorithms and a large amount of computing resources, which increases the complexity of model fusion processing. In addition, this method is mainly suitable for special effects simulations such as fluids and smoke, and is not suitable for processing general geometric model fusion. It can be seen that the existing model processing methods are relatively complex, and the fusion processing accuracy of details and complex deformations is low, which makes the model processing efficiency poor.
[0083] To this end, the embodiment of the present application provides a model processing method, and proposes a dynamic fusion model generation scheme based on a solid angle surround value algorithm, by controlling the movement of multiple basic models respectively, and creating a bounding box surrounding multiple basic models according to the current position of each basic model, filling the point cloud data in the bounding box, and determining whether each point in the point cloud data is in the space surrounded by the basic model, so that the point cloud data in the space surrounded by the basic model can be converted into volume data, and the target model indicating the dynamic fusion effect of multiple basic models is generated based on the volume data corresponding to the moving basic model, so as to achieve efficient and fast model fusion. Specifically, by judging the surround value of the solid angle, the internal and external relationship between the point cloud data and the basic model is quickly determined, so that the data calculation amount is low, and combined with the high parallel characteristics of the volume data calculation, the dynamic fusion between objects can be quickly realized, and the calculation efficiency of the model fusion processing can be effectively improved. In addition, the embodiment of the present application combines the solid angle surround value algorithm, and dynamically generates model vertices based on volume data, which can achieve subtle fusion of the model, and achieve natural transition and detail adjustment of the model without destroying the overall topological structure of the model. Therefore, the model processing method provided in the embodiment of the present application is not only applicable to convex polyhedrons, but also to non-convex polyhedrons and polyhedrons with holes, and has wide applicability, thereby greatly improving the efficiency of model fusion processing.
[0084] As can be seen from the above, the embodiment of the present application obtains multiple basic models, controls the multiple basic models to move respectively; determines the current position of each basic model, creates a bounding box surrounding the multiple basic models according to the current position, and fills the point cloud data in the bounding box; determines the internal and external attribute information of each point in the point cloud data based on the point cloud data and the current position, and the internal and external attribute information indicates that the point cloud data is in the space surrounded by the basic model, or outside the space surrounded by the basic model; converts the point cloud data in the space surrounded by the basic model into volume data; generates the corresponding target model based on the volume data corresponding to each basic model. In this way, by controlling the movement of multiple basic models respectively, creating a bounding box surrounding the multiple basic models according to the current position of each basic model, filling the point cloud data in the bounding box, and determining whether each point in the point cloud data is in the space surrounded by the basic model, the point cloud data in the space surrounded by the basic model can be converted into volume data, so as to generate a target model indicating the dynamic fusion effect of multiple basic models based on the volume data corresponding to the basic model, simplifying the complexity of the model fusion process, improving the accuracy of the dynamic fusion of the model, and thus improving the model processing efficiency.
[0085] In order to better implement the above method, an embodiment of the present invention further provides a model processing device, which can be integrated in an electronic device, and the electronic device can be a server or a terminal.
[0086] For example, Figure 5 As shown, it is a schematic diagram of the structure of the model processing device provided in an embodiment of the present application. The model processing device may include an acquisition unit 201, a creation unit 202, a determination unit 203, a conversion unit 204 and a generation unit 205, as follows:
[0087] An acquisition unit 201 is used to acquire a plurality of basic models and control the plurality of basic models to move respectively;
[0088] A creation unit 202 is used to determine the current position of each basic model, create a bounding box surrounding the multiple basic models according to the current position, and fill the point cloud data in the bounding box;
[0089] A determination unit 203 is used to determine the internal and external attribute information of each point in the point cloud data based on the point cloud data and the current position, wherein the internal and external attribute information indicates whether the point cloud data is within the space surrounded by the basic model or outside the space surrounded by the basic model;
[0090] A conversion unit 204, used to convert the point cloud data in the space surrounded by the basic model into volume data;
[0091] The generating unit 205 is used to generate a corresponding target model based on the volume data corresponding to each basic model.
[0092] In some embodiments, the conversion unit 204 includes:
[0093] The volume data conversion unit is used for the virtual object identification list display subunit, for converting the point cloud data into voxels, and setting the volume density of the voxels based on the internal and external attribute information to obtain the volume data of the point cloud data, wherein the volume density of the voxels in the space surrounded by the basic model is the first threshold, and the volume density of the voxels outside the space surrounded by the basic model is the second threshold.
[0094] In some embodiments, the volume data conversion unit is used to:
[0095] Based on the internal and external attribute information, determining a first position point in the point cloud data that is within the space surrounded by the basic model and a second position point that is outside the space surrounded by the basic model;
[0096] A voxel with a volume density of a first threshold is placed at a first position point, and a voxel with a volume density of a second threshold is placed at a second position point to obtain volume data of the point cloud data.
[0097] In some embodiments, the determining unit 203 includes:
[0098] The surface normal vector acquisition subunit is used to obtain the surface normal vector of each surface in the basic model;
[0099] A target solid angle calculation subunit is used to calculate the target solid angle of each facet in the basic model relative to each point in the point cloud data;
[0100] A target surround value determination subunit is used to fuse the target solid angle based on the surface normal vector to obtain the target surround value of each point in the point cloud data;
[0101] The internal and external attribute determination subunit is used to determine the internal and external attribute information of each point in the point cloud data based on the target surrounding value.
[0102] In some embodiments, the target solid angle calculation subunit includes:
[0103] The solid angle calculation module is used to calculate the solid angle of each vertex in each patch of the basic model relative to each point in the point cloud data;
[0104] The solid angle fusion module is used to accumulate the solid angles corresponding to the vertices in each patch in the basic model to obtain the target solid angle of each patch in the basic model relative to each point in the point cloud data.
[0105] In some embodiments, the solid angle calculation module is used to:
[0106] For each vertex in each face of the basic model, the vector between the vertex and each point in the point cloud data is calculated to obtain a first vector;
[0107] Calculate the second vector between the target vertex on the patch and each point in the point cloud data, where the target vertex is the next vertex on the patch;
[0108] Based on the first vector and the second vector, the solid angle of each vertex in each patch of the base model relative to each point in the point cloud data is calculated.
[0109] In one embodiment, the target surrounding value determination subunit is used to:
[0110] Calculate the vector between each point in the point cloud data and the center point of each patch to obtain a third vector;
[0111] Calculate the dot product of the third vector and the surface normal vector of each face patch to obtain a dot product calculation result;
[0112] The target solid angle is fused based on the dot product calculation results to obtain the target surround value of each point in the point cloud data.
[0113] In one embodiment, the internal and external attribute determination subunit is used to:
[0114] Based on the target surrounding value and the preset surrounding value threshold, the internal and external attribute information of each point in the point cloud data is determined, wherein when the absolute value of the target surrounding value is greater than the preset surrounding value threshold, the internal and external attribute information indicates that the point cloud data is in the space surrounded by the basic model; when the absolute value of the target surrounding value is not greater than the preset surrounding value threshold, the internal and external attribute information indicates that the point cloud data is outside the space surrounded by the basic model.
[0115] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.
[0116] As can be seen from the above, the embodiment of the present application obtains multiple basic models through the acquisition unit 201, and controls the multiple basic models to move respectively; the creation unit 202 determines the current position of each basic model, creates a bounding box surrounding the multiple basic models according to the current position, and fills the point cloud data in the bounding box; the determination unit 203 determines the internal and external attribute information of each point in the point cloud data based on the point cloud data and the current position, and the internal and external attribute information indicates that the point cloud data is in the space surrounded by the basic model, or is outside the space surrounded by the basic model; the conversion unit 204 converts the point cloud data in the space surrounded by the basic model into volume data; the generation unit 205 generates a corresponding target model based on the volume data corresponding to each basic model. In this way, by controlling the movement of multiple basic models separately, creating bounding boxes surrounding multiple basic models according to the current position of each basic model, filling point cloud data in the bounding box, and determining whether each point in the point cloud data is in the space surrounded by the basic model, the point cloud data in the space surrounded by the basic model can be converted into volume data, so as to generate a target model indicating the dynamic fusion effect of multiple basic models based on the volume data corresponding to the basic model, thereby simplifying the complexity of the model fusion process, improving the accuracy of model dynamic fusion, and thus improving the model processing efficiency.
[0117] The present application also provides an electronic device, such as Figure 6 As shown, it shows a schematic diagram of the structure of an electronic device involved in an embodiment of the present application, and the electronic device may be a server or a terminal. Specifically:
[0118] The electronic device 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0119] The processor 301 is the control center of the electronic device 300. It uses various interfaces and lines to connect various parts of the entire electronic device 300, executes various functions of the electronic device 300 and processes data by running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, thereby monitoring the electronic device 300 as a whole.
[0120] In the embodiment of the present application, the processor 301 in the electronic device 300 will load instructions corresponding to the processes of one or more application programs into the memory 302 according to the following steps, and the processor 301 will run the application programs stored in the memory 302 to implement various functions:
[0121] Acquire multiple basic models, and control the multiple basic models to move respectively;
[0122] Determine the current position of each base model, create a bounding box surrounding the multiple base models according to the current position, and fill the point cloud data in the bounding box;
[0123] Based on the point cloud data and the current position, determining the internal and external attribute information of each point in the point cloud data, the internal and external attribute information indicating whether the point cloud data is within the space surrounded by the basic model or outside the space surrounded by the basic model;
[0124] Convert the point cloud data in the space surrounded by the basic model into volume data;
[0125] The corresponding target model is generated based on the volume data corresponding to each base model.
[0126] This solution can obtain multiple basic models, control the movement of multiple basic models respectively; determine the current position of each basic model, create a bounding box surrounding multiple basic models according to the current position, and fill the point cloud data in the bounding box; determine the internal and external attribute information of each point in the point cloud data based on the point cloud data and the current position, and the internal and external attribute information indicates that the point cloud data is in the space surrounded by the basic model, or outside the space surrounded by the basic model; convert the point cloud data in the space surrounded by the basic model into volume data; generate the corresponding target model based on the volume data corresponding to each basic model. In this way, by controlling the movement of multiple basic models respectively, creating a bounding box surrounding multiple basic models according to the current position of each basic model, filling the point cloud data in the bounding box, and determining whether each point in the point cloud data is in the space surrounded by the basic model, the point cloud data in the space surrounded by the basic model can be converted into volume data, and the target model indicating the dynamic fusion effect of multiple basic models can be generated based on the volume data corresponding to the basic model, which simplifies the complexity of the model fusion process, improves the accuracy of the dynamic fusion of the model, and thus improves the model processing efficiency.
[0127] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0128] Optional, such as Figure 6As shown, the electronic device 300 further includes: a touch screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the touch screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307, respectively. Those skilled in the art can understand that Figure 6 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0129] The touch display screen 303 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 303 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel can be used to collect the user's touch operation on or near it (such as the user uses any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 301, and can receive the command sent by the processor 301 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 301 to determine the type of touch event, and then the processor 301 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 303 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 303 can also be used as a part of the input unit 306 to realize the input function.
[0130] The radio frequency circuit 304 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to send and receive signals with the network device or other electronic devices.
[0131] The audio circuit 305 can be used to provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 305 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 305 and converted into audio data, and then the audio data is output to the processor 301 for processing, and then sent to another electronic device through the radio frequency circuit 304, or the audio data is output to the memory 302 for further processing. The audio circuit 305 may also include an earplug jack to provide communication between an external headset and the electronic device.
[0132] The input unit 306 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0133] The power supply 307 is used to supply power to various components of the electronic device 300. Optionally, the power supply 307 can be logically connected to the processor 301 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 307 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0134] although Figure 6 Not shown, the electronic device 300 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.
[0135] In the above embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. It should be noted that the electronic device provided in the embodiment of the present application and the model processing method in the above embodiment belong to the same concept. The specific implementation process is detailed in the above method embodiment, which will not be repeated here.
[0136] As can be seen from the above, the electronic device provided by the embodiment of the present application can obtain multiple basic models, respectively control the multiple basic models to move; determine the current position of each basic model, create a bounding box surrounding the multiple basic models according to the current position, and fill the point cloud data in the bounding box; based on the point cloud data and the current position, determine the internal and external attribute information of each point in the point cloud data, the internal and external attribute information indicates that the point cloud data is in the space surrounded by the basic model, or outside the space surrounded by the basic model; convert the point cloud data in the space surrounded by the basic model into volume data; generate the corresponding target model based on the volume data corresponding to each basic model. In this way, by controlling the movement of multiple basic models respectively, creating a bounding box surrounding the multiple basic models according to the current position of each basic model, filling the point cloud data in the bounding box, and determining whether each point in the point cloud data is in the space surrounded by the basic model, the point cloud data in the space surrounded by the basic model can be converted into volume data, so as to generate a target model indicating the dynamic fusion effect of multiple basic models based on the volume data corresponding to the basic model, simplifying the complexity of the model fusion process, improving the accuracy of the dynamic fusion of the model, and thus improving the model processing efficiency.
[0137] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0138] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any model processing method provided in the embodiment of the present application. For example, the computer program can execute the following steps:
[0139] Acquire multiple basic models, and control the multiple basic models to move respectively;
[0140] Determine the current position of each base model, create a bounding box surrounding the multiple base models according to the current position, and fill the point cloud data in the bounding box;
[0141] Based on the point cloud data and the current position, determining the internal and external attribute information of each point in the point cloud data, the internal and external attribute information indicating whether the point cloud data is within the space surrounded by the basic model or outside the space surrounded by the basic model;
[0142] Convert the point cloud data in the space surrounded by the basic model into volume data;
[0143] The corresponding target model is generated based on the volume data corresponding to each base model.
[0144] This solution can obtain multiple basic models, control the movement of multiple basic models respectively; determine the current position of each basic model, create a bounding box surrounding multiple basic models according to the current position, and fill the point cloud data in the bounding box; determine the internal and external attribute information of each point in the point cloud data based on the point cloud data and the current position, and the internal and external attribute information indicates that the point cloud data is in the space surrounded by the basic model, or outside the space surrounded by the basic model; convert the point cloud data in the space surrounded by the basic model into volume data; generate the corresponding target model based on the volume data corresponding to each basic model. In this way, by controlling the movement of multiple basic models respectively, creating a bounding box surrounding multiple basic models according to the current position of each basic model, filling the point cloud data in the bounding box, and determining whether each point in the point cloud data is in the space surrounded by the basic model, the point cloud data in the space surrounded by the basic model can be converted into volume data, and the target model indicating the dynamic fusion effect of multiple basic models can be generated based on the volume data corresponding to the basic model, which simplifies the complexity of the model fusion process, improves the accuracy of the dynamic fusion of the model, and thus improves the model processing efficiency.
[0145] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0146] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0147] Since the computer program stored in the computer-readable storage medium can execute the steps in any one of the model processing methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the model processing methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0148] Among them, according to one aspect of the present application, a computer program product is provided, which includes a computer program, and the computer program is stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device executes the methods provided in the various optional implementations provided in the above embodiments.
[0149] The above is a detailed introduction to a model processing method, device, storage medium and electronic device provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A model processing method, characterized in that: include: Acquire multiple basic models, and control the multiple basic models to move respectively; Determining the current position of each of the base models, creating a bounding box surrounding the plurality of base models according to the current position, and filling the bounding box with point cloud data; Based on the point cloud data and the current position, determining internal and external attribute information of each point in the point cloud data, the internal and external attribute information indicating whether the point cloud data is within the space surrounded by the basic model or outside the space surrounded by the basic model; Converting point cloud data in the space surrounded by the basic model into volume data; A corresponding target model is generated based on the volume data corresponding to each of the base models.
2. The model processing method according to claim 1, characterized in that: The step of converting the point cloud data in the space surrounded by the basic model into volume data comprises: The point cloud data is converted into voxels, and the volume density of the voxels is set based on the internal and external attribute information to obtain volume data of the point cloud data, wherein the volume density of the voxels in the space surrounded by the basic model is a first threshold, and the volume density of the voxels outside the space surrounded by the basic model is a second threshold.
3. The model processing method according to claim 2, characterized in that: The step of converting the point cloud data into voxels and setting the volume density of the voxels based on the internal and external attribute information to obtain volume data of the point cloud data includes: Based on the internal and external attribute information, determining a first position point in the point cloud data that is within the space surrounded by the basic model and a second position point that is outside the space surrounded by the basic model; A voxel with a volume density of a first threshold is placed at the first position point, and a voxel with a volume density of a second threshold is placed at the second position point to obtain volume data of the point cloud data.
4. The model processing method according to any one of claims 1 to 3, characterized in that: The determining, based on the point cloud data and the current position, the internal and external attribute information of each point in the point cloud data includes: Obtaining a face normal vector of each face patch in the base model; Calculating a target solid angle of each facet in the base model relative to each point in the point cloud data; The target solid angle is fused based on the surface normal vector to obtain a target surround value of each point in the point cloud data; The internal and external attribute information of each point in the point cloud data is determined based on the target surrounding value.
5. The model processing method according to claim 4, characterized in that: The calculating the target solid angle of each facet in the basic model relative to each point in the point cloud data comprises: Calculating the solid angle of each vertex in each patch of the basic model relative to each point in the point cloud data; The solid angles corresponding to the vertices in each facet in the basic model are accumulated to obtain the target solid angle of each facet in the basic model relative to each point in the point cloud data.
6. The model processing method according to claim 5, characterized in that: The calculating the solid angle of each vertex in each patch of the basic model relative to each point in the point cloud data comprises: For each vertex in each face of the basic model, calculate a vector between the vertex and each point in the point cloud data to obtain a first vector; Calculate a second vector between a target vertex on the patch and each point in the point cloud data, the target vertex being the next vertex of the vertex on the patch; Based on the first vector and the second vector, a solid angle of each vertex in each patch of the basic model relative to each point in the point cloud data is calculated.
7. The model processing method according to claim 4, characterized in that: The step of fusing the target solid angle based on the surface normal vector to obtain the target surround value of each point in the point cloud data includes: Calculate the vector between each point in the point cloud data and the center point of each patch to obtain a third vector; Calculate the dot product of the third vector and the surface normal vector of each face patch to obtain a dot product calculation result; The target solid angle is fused based on the dot product calculation result to obtain the target surround value of each point in the point cloud data.
8. The model processing method according to claim 4, characterized in that: The determining of the internal and external attribute information of each point in the point cloud data based on the target surrounding value includes: Based on the target surrounding value and the preset surrounding value threshold, the internal and external attribute information of each point in the point cloud data is determined, wherein when the absolute value of the target surrounding value is greater than the preset surrounding value threshold, the internal and external attribute information indicates that the point cloud data is within the space surrounded by the basic model, and when the absolute value of the target surrounding value is not greater than the preset surrounding value threshold, the internal and external attribute information indicates that the point cloud data is outside the space surrounded by the basic model.
9. A model processing device, characterized in that: include: An acquisition unit, used for acquiring a plurality of basic models, and controlling the plurality of basic models to move respectively; A creating unit, configured to determine a current position of each of the base models, create a bounding box surrounding the plurality of base models according to the current position, and fill the bounding box with point cloud data; a determining unit, configured to determine, based on the point cloud data and the current position, internal and external attribute information of each point in the point cloud data, wherein the internal and external attribute information indicates whether the point cloud data is within a space enclosed by the basic model or outside the space enclosed by the basic model; A conversion unit, used for converting point cloud data in the space surrounded by the basic model into volume data; A generating unit is used to generate a corresponding target model based on the volume data corresponding to each of the basic models.
10. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any one of the methods of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: It includes a computer program. When the computer program is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of any method described in claims 1 to 8.
