Real-time character modeling method based on light reflection and global illumination
By separating light sources and objects in real-time character modeling, and using pre-computing and fusion models to process lighting, the problem of large amount of lighting calculation is solved, and the rendering efficiency is improved and the rendering effect is improved.
Patent Information
- Application Number
- CN202410817388.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-06-24
AI Technical Summary
The existing real-time character modeling method has too much lighting calculation during rendering, resulting in low rendering efficiency, especially the large number of light sources and complex shadow calculations increase the rendering load.
Using a method based on light reflection and global lighting, the light source and object are separated by a classification model, the static and dynamic lighting is pre-calculated by a pre-calculation model, and the static and dynamic lighting is weighted and averaged by a fusion model to generate Overall lighting effect.
It significantly reduces the amount of lighting calculations during real-time rendering, improves rendering efficiency, and effectively avoids lighting faults or unnatural transitions, improving rendering effect.
Smart Images

Figure CN118587345B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of real-time rendering, and in particular to a real-time character modeling method based on light reflection and global illumination. Background Art
[0002] Real-time character modeling refers to the use of computer graphics technology to model and render characters in three dimensions in a real-time environment. This technology is often used in video games, virtual reality, and augmented reality, allowing characters to move, interact, and behave realistically in a virtual environment.
[0003] Conventional real-time character modeling methods usually need to calculate a large amount of lighting information in each frame of image display during rendering. Excessive calculation of lighting information will lead to low rendering efficiency; at the same time, a large number of light sources and complex shadow calculations will increase the rendering load.
[0004] Therefore, we need to provide a real-time character modeling method based on light reflection and global illumination that can improve rendering efficiency. Summary of the invention
[0005] The present invention aims to provide a real-time character modeling method based on light reflection and global illumination, so as to solve the problem of excessive amount of illumination calculation in real-time rendering.
[0006] Real-time character modeling method based on light reflection and global illumination, including:
[0007] S1: Obtain a person photo, pre-process the person photo, obtain a reference photo, input the reference photo into a conversion model for conversion, and obtain an original person model;
[0008] S2: inputting the original character model into the modeling adjustment model, the modeling adjustment model is used to adjust and optimize the original character model to obtain an initial character model; creating multiple object models, adding materials and adjusting texture mapping operations on the initial character model and the object model, and obtaining an object model set;
[0009] S3: Add a scene, drag and drop the object model set into the scene, and then adjust and place each object model in the object model set to obtain an initial scene; set a light source in the initial scene, and adjust the parameters of the light source to obtain a real-time scene;
[0010] Use the classification model to classify all object models in the object model set to obtain a static object set and a dynamic object set; classify each light source in the real-time scene to obtain a static light source and a dynamic light source; classify all static light sources and lighting that affects the static object set as static lighting, which includes static direct lighting, static indirect lighting, and static shadows; plan the lighting affected by dynamic light sources and dynamic objects as dynamic lighting, which includes dynamic direct lighting, dynamic indirect lighting, and dynamic shadows;
[0011] S4: input the static lighting into the pre-calculation model, calculate various types of lighting in the static lighting, and obtain static lighting data; create a pre-stored information library, store the static lighting data in the pre-stored information library; update the pre-stored information library;
[0012] S5: Perform real-time calculations on various types of lighting in dynamic lighting to obtain dynamic lighting data;
[0013] Input static lighting data and dynamic lighting data into the fusion model and output the overall lighting effect;
[0014] Apply the overall lighting effect to render the real-time scene and obtain the real-time character image.
[0015] As a preferred technical solution of the present invention, the specific steps of converting the reference photo into the original character model in step S1 include:
[0016] A1: Input the reference photo into the conversion model, perform alignment operation on the reference photo, and obtain an accurate reference photo;
[0017] A2: Create a point cloud operation on the precise reference photo to obtain a point cloud model;
[0018] A3: Mesh the point cloud model to obtain a mesh model;
[0019] A4: Map the texture of the point cloud model onto the mesh model to obtain the original character model.
[0020] As a preferred technical solution of the present invention, the specific operation of the classification model in step S3 includes:
[0021] B1: Set the light source change threshold and object change threshold; the light source change threshold includes the light source position change threshold, color change threshold and intensity change threshold;
[0022] B2: Collect the position coordinates, color value and intensity of each light source at each time instant n times with a time interval of t, calculate the average change value of the position coordinates, color value and intensity of each light source at each time interval t, and obtain the light source position change value, color change value and intensity change value of each light source; compare the light source position change value, color change value and intensity change value of each light source with the light source position change threshold, color change threshold and intensity change threshold respectively; if the light source position change value, color change value and intensity change value of the light source are less than the light source position change threshold, color change threshold and intensity change threshold respectively, mark the light source as a static light source; otherwise, mark the light source as a dynamic light source;
[0023] B3: Collect the position coordinates of each object model n times at a time interval of t, calculate the average change value of the position coordinates of each object model at each time interval t, and obtain the object position change value; compare the object position change value of each object model with the object change threshold, if the object position change value is less than the object change threshold, mark the object model as a static object; otherwise, mark the object model as a dynamic object;
[0024] B4: The lighting generated by static light sources and static objects is marked as static lighting. Static lighting includes static direct lighting, static indirect lighting and static shadows. The lighting affected by dynamic light sources and dynamic objects is marked as dynamic lighting. Dynamic lighting includes dynamic direct lighting, dynamic indirect lighting and dynamic shadows.
[0025] As a preferred technical solution of the present invention, the specific operation of precalculating the model in step S4 includes:
[0026] C1: Calculate static direct lighting and obtain static direct lighting data; calculate static indirect lighting and obtain static indirect lighting data; calculate static shadows and obtain static shadow data;
[0027] C2: Create a pre-stored information library, integrate static direct lighting data, static indirect lighting data and static shadow data into static lighting data, and store the static lighting data in the pre-stored information library;
[0028] C3: Update the pre-stored information database.
[0029] As a preferred technical solution of the present invention, the specific operation of updating the pre-stored information database is as follows:
[0030] Set the light source update threshold and the object update threshold, and obtain the static light source information change value by comparing the position coordinates, color value and intensity of the static light source in the current frame with that in the previous frame; at the same time, compare the position coordinates of the static object in the current frame with that in the previous frame to obtain the static object information change value; compare the light source update threshold with the static light source information change value, and at the same time compare the object update threshold with the static object information change value. If the static light source information change value is less than the light source update threshold, and the static object information change value is less than the object update threshold, no update operation is required; otherwise, execute step C1 again, and use the calculation result to replace the static lighting data in the pre-stored information library.
[0031] As a preferred technical solution of the present invention, the specific operation of step S5 includes:
[0032] D1: Extract static lighting data from the pre-stored information library, calculate dynamic direct lighting, dynamic indirect lighting and dynamic shadows in dynamic lighting, and obtain dynamic lighting data;
[0033] D2: Input static lighting data and dynamic lighting data into the fusion model and output the overall lighting effect;
[0034] D3: Apply the overall lighting effect to render the real-time scene and obtain the character image;
[0035] D4: Repeat steps D1 to D3 in each frame to obtain a real-time character image.
[0036] As a preferred technical solution of the present invention, the specific operation of the fusion model includes:
[0037] E1: Obtain the boundary area between static lighting and dynamic lighting by comparing the area affected by static lighting with the area affected by dynamic lighting;
[0038] E2: In each boundary area, calculate the distance weight between the boundary area and the static light source and the dynamic light source to obtain the static light weight and the dynamic light weight;
[0039] E3: Use static light weight and dynamic light weight to perform weighted averaging on static lighting data and dynamic lighting data to obtain a fusion factor;
[0040] E4: Smooth the fusion factor to obtain the final fusion factor;
[0041] E5: In each boundary area, the final fusion factor is applied to the static lighting data and the dynamic lighting data in the boundary area to obtain the regional lighting data;
[0042] E6: Combine static lighting data, dynamic lighting data, and area lighting data to obtain the overall lighting effect in the real-time scene.
[0043] As a preferred technical solution of the present invention, for the calculation of static illumination, the specific operations are as follows:
[0044] Calculate static direct lighting:
[0045] K1: Analyze the surface properties of static objects, including reflectivity and roughness;
[0046] K2: For each point in the scene, calculate the incident light from the static light source to the point; calculate the attenuation of the incident light according to the distance from the static light source and the propagation distance of the incident light;
[0047] K3: Calculate the light intensity based on the intensity of the static light source, the attenuation of the incident light, and the surface properties of the static object;
[0048] K4: Calculate based on light intensity and surface properties of static objects to obtain static direct lighting data;
[0049] Calculate static indirect lighting:
[0050] L1: Virtual light probes are evenly placed in the real-time scene to capture the surrounding ambient light.
[0051] L2: The light probe collects light data from all directions through spherical harmonics environment mapping technology to obtain ambient light data;
[0052] L3: Project the ambient light data onto the spherical harmonic function, calculate the weighted sum of the spherical harmonic function for each pixel of each ambient light data, and obtain the spherical harmonic coefficient. The static indirect lighting data contains the spherical harmonic coefficient of each pixel.
[0053] Calculate static shadows:
[0054] M1: From the perspective of a static light source, record the distance between the surface of each static object and the static light source in the real-time scene to obtain the depth information of each pixel;
[0055] M2: Store the depth information, obtain the shadow map, select the appropriate shadow map resolution, and obtain static shadow data.
[0056] The present invention has the following advantages:
[0057] 1. The present invention classifies light sources and objects in real-time scenes through a classification model, and divides illumination into static illumination and dynamic illumination, so that the pre-calculation process is more refined and targeted; for static illumination, the static illumination is calculated through a pre-calculation model, thereby reducing the amount of illumination calculation in the real-time rendering process, thereby improving rendering efficiency.
[0058] 2. The present invention fuses the boundary area of static lighting and dynamic lighting through a fusion model to obtain regional lighting data, and finally combines the static lighting data, dynamic lighting data and regional lighting data to obtain the overall lighting effect in the real-time scene, effectively avoiding lighting faults or unnatural transitions in real-time character images. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a structural schematic diagram of a real-time character modeling method based on light reflection and global illumination adopted in an embodiment of the present invention. DETAILED DESCRIPTION
[0060] In order to enable persons skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Example 1
[0061] Real-time character modeling methods based on light reflection and global illumination, such as Figure 1 As shown, including:
[0062] S1: Obtaining person photos and preprocessing the person photos: selecting high-quality and clear photos, removing distortion, performing color correction and exposure adjustment, removing duplicate photos, cropping and rotating photos, marking control points and naming files appropriately; these preprocessing steps help improve the accuracy and effect of the conversion operation performed by the conversion model; obtaining reference photos; inputting the reference photos into the conversion model for conversion to obtain the original person model;
[0063] S2: Input the original character model into the modeling adjustment model, ensure that the proportion and position of the original character model are correct, and perform detailed modeling on the basis of the original character model, adding details such as facial expressions and clothing folds; obtain the initial character model; create multiple object models, add materials to the initial character model and object model, and adjust the texture mapping: set appropriate materials for the initial character model and object model, including skin, clothing, etc., considering light reflection and global illumination, PBR materials can be used; obtain the object model set;
[0064] S3: Add a scene, drag and drop the object model set into the scene, and then adjust and place each object model in the object model set to obtain an initial scene; set the light source in the initial scene, and adjust the lighting parameters to achieve an ideal lighting effect to obtain a real-time scene;
[0065] Use the classification model to classify all object models in the object model set to obtain a static object set and a dynamic object set; classify each light source in the real-time scene to obtain a static light source and a dynamic light source; classify all static light sources and lighting that affects the static object set as static lighting, which includes static direct lighting, static indirect lighting, and static shadows; plan the lighting affected by dynamic light sources and dynamic objects as dynamic lighting, which includes dynamic direct lighting, dynamic indirect lighting, and dynamic shadows;
[0066] S4: input the static lighting into the pre-calculation model, calculate various types of lighting in the static lighting, and obtain static lighting data; create a pre-stored information library, store the static lighting data in the pre-stored information library; update the pre-stored information library;
[0067] S5: Perform real-time calculations on various types of lighting in dynamic lighting to obtain dynamic lighting data;
[0068] Input static lighting data and dynamic lighting data into the fusion model and output the overall lighting effect;
[0069] Apply the overall lighting effect to render the real-time scene and obtain the real-time character image.
[0070] As a preferred technical solution of the present invention, the specific steps of converting the reference photo into the original character model in step S1 include:
[0071] A1: Input the reference photo into the conversion model, perform alignment on the reference photo, obtain accurate reference photos, and select appropriate alignment accuracy so that an accurate original character model can be obtained in subsequent steps;
[0072] A2: Create a point cloud operation on the precise reference photo to obtain a point cloud model. These points will be used to create a geometric model in the subsequent steps.
[0073] A3: Mesh the point cloud model to obtain a mesh model;
[0074] A4: Map the texture of the point cloud model onto the mesh model to obtain the original character model.
[0075] The specific operations of the classification model include:
[0076] B1: Set the light source change threshold and object change threshold; the light source change threshold includes the light source position change threshold, color change threshold and intensity change threshold;
[0077] B2: Collect the position coordinates, color value and intensity of each light source at each moment for n times with a time interval of t, calculate the average change value of the position coordinates, color value and intensity of each light source at each moment in each time interval t, and obtain the light source position change value, color change value and intensity change value of each light source; compare the light source position change value, color change value and intensity change value of each light source with the light source position change threshold, color change threshold and intensity change threshold respectively; if the light source position change value, color change value and intensity change value of the light source are respectively less than the light source position change threshold, color change threshold and intensity change threshold, then mark the light source as a static light source; if any one of the light source position change value, color change value and intensity change value of the light source is greater than the corresponding change threshold, then mark the light source as a dynamic light source;
[0078] B3: Collect the position coordinates of each object model n times at a time interval of t, calculate the average change value of the position coordinates of each object model at each time interval t, and obtain the object position change value; compare the object position change value of each object model with the object change threshold, if the object position change value is less than the object change threshold, mark the object model as a static object; otherwise, mark the object model as a dynamic object;
[0079] B4: Mark the lighting generated by static light sources and static objects as static lighting. Static lighting is used for pre-calculation and storage, and is applied during real-time rendering, thereby reducing the amount of lighting calculation for real-time rendering. Static lighting includes static direct lighting, static indirect lighting, and static shadows. Mark the lighting affected by dynamic light sources and dynamic objects as dynamic lighting. Dynamic lighting needs to be calculated in real time during real-time rendering. Dynamic lighting includes dynamic direct lighting, dynamic indirect lighting, and dynamic shadows.
[0080] The specific operations of the pre-calculation model include:
[0081] C1: Calculate static direct lighting and obtain static direct lighting data; calculate static indirect lighting and obtain static indirect lighting data; calculate static shadows and obtain static shadow data;
[0082] C2: Create a pre-stored information library, integrate static direct lighting data, static indirect lighting data and static shadow data into static lighting data, and store the static lighting data in the pre-stored information library; the pre-stored information library is used to provide static lighting data for the real-time rendering operation process;
[0083] C3: Update the pre-stored information database.
[0084] Specific operations for updating the pre-stored information database:
[0085] Since static light sources and static objects will still change, the pre-stored information library needs to be updated;
[0086] Set the light source update threshold and the object update threshold, and obtain the static light source information change value by comparing the position coordinates, color value and intensity of the static light source in the current frame with that in the previous frame; at the same time, compare the position coordinates of the static object in the current frame with that in the previous frame to obtain the static object information change value; compare the light source update threshold with the static light source information change value, and at the same time compare the object update threshold with the static object information change value. If the static light source information change value is less than the light source update threshold, and the static object information change value is less than the object update threshold, no update operation is required; otherwise, execute step C1 again, and use the calculation result to replace the static lighting data in the pre-stored information library.
[0087] The specific operations of step S5 include:
[0088] D1: Extract static lighting data from the pre-stored information library; For dynamic direct lighting in dynamic lighting, use real-time rasterization technology for calculation, which includes using the position and intensity of the dynamic light source, combined with the properties of the object surface, to calculate the incident intensity of light on each pixel, so as to determine the color and brightness of the surface of the object model, and obtain dynamic direct lighting data; For dynamic indirect lighting in dynamic lighting, use real-time ray tracing technology for calculation, real-time ray tracing can simulate the multiple reflections and refractions of light in the scene, so as to capture the effect of indirect lighting and obtain dynamic indirect lighting data; For dynamic shadows in dynamic lighting, use real-time shadow mapping technology for calculation, which includes using depth maps or shadow maps to capture the shadow information of the light source, and apply it to objects in the scene to simulate dynamic shadow effects for calculation and obtain dynamic shadow data; Integrate dynamic direct lighting data, dynamic indirect lighting data and dynamic shadow data into dynamic lighting data;
[0089] D2: Input static lighting data and dynamic lighting data into the fusion model and output the overall lighting effect;
[0090] D3: Apply the overall lighting effect to render the real-time scene and obtain the character image;
[0091] D4: Repeat steps D1 to D3 in each frame to obtain a real-time character image.
[0092] The specific operations of the fusion model include:
[0093] E1: Obtain the boundary area between static lighting and dynamic lighting by comparing the area affected by static lighting with the area affected by dynamic lighting;
[0094] E2: In each boundary area, calculate the distance weight between the boundary area and the static light source and the dynamic light source to obtain the static light weight and the dynamic light weight;
[0095] E3: Use static light weight and dynamic light weight to perform weighted averaging on static lighting data and dynamic lighting data to obtain a fusion factor;
[0096] E4: Smooth the fusion factor to obtain the final fusion factor;
[0097] E5: In each boundary area, the final fusion factor is applied to the static lighting data and the dynamic lighting data in the boundary area to obtain the regional lighting data;
[0098] E6: Combine static lighting data, dynamic lighting data, and area lighting data to obtain the overall lighting effect in the real-time scene.
[0099] For the calculation of static lighting, the specific operations are:
[0100] Calculate static direct lighting:
[0101] K1: Analyze the surface properties of static objects, including reflectivity and roughness;
[0102] Reflectivity: The reflectivity of the surface material, that is, the degree to which the surface absorbs and reflects light;
[0103] Roughness: The roughness of the surface affects the degree of light scattering, thereby affecting the brightness and shadow effects of the surface;
[0104] K2: For each point in the scene, calculate the incident light from the static light source to the point; calculate the attenuation of the incident light according to the distance from the static light source and the propagation distance of the incident light;
[0105] K3: Calculate the light intensity based on the intensity of the static light source, the attenuation of the incident light, and the surface properties of the static object;
[0106] K4: Calculate based on light intensity and surface properties of static objects to obtain static direct lighting data;
[0107] Calculate static indirect lighting:
[0108] L1: Virtual light probes are evenly placed in the real-time scene to capture the surrounding ambient light.
[0109] L2: The light probe collects light data from all directions through spherical harmonics environment mapping technology to obtain ambient light data;
[0110] Spherical harmonics environment mapping is a technique that uses spherical harmonics to approximate ambient lighting. It transforms ambient lighting into a set of spherical harmonic coefficients, and then uses these coefficients to approximate ambient lighting during rendering. Spherical harmonics environment mapping is often used to capture and render indirect lighting, especially in real-time rendering, to improve rendering efficiency.
[0111] L3: Project the ambient light data onto the spherical harmonic function, calculate the weighted sum of the spherical harmonic function for each pixel of each ambient light data, and obtain the spherical harmonic coefficient. The static indirect lighting data contains the spherical harmonic coefficient of each pixel.
[0112] During real-time rendering, spherical harmonic coefficients and spherical harmonic functions are used to reconstruct indirect lighting for each point in the real-time scene.
[0113] Calculate static shadows:
[0114] M1: From the perspective of a static light source, record the distance between the surface of each static object and the static light source in the real-time scene to obtain the depth information of each pixel;
[0115] M2: Store the depth information, obtain the shadow map, select the appropriate shadow map resolution, and obtain static shadow data.
[0116] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all such improvements and changes should fall within the scope of protection of the appended claims of the present invention. Parts not described in detail in this specification belong to the prior art known to those skilled in the art.
Claims
1. A real-time character modeling method based on light reflection and global illumination, characterized in that: include: S1: Obtain a person photo, pre-process the person photo, obtain a reference photo, input the reference photo into a conversion model for conversion, and obtain an original person model; S2: inputting the original character model into the modeling adjustment model, the modeling adjustment model is used to adjust and optimize the original character model to obtain an initial character model; creating multiple object models, adding materials and adjusting texture mapping operations on the initial character model and the object model, and obtaining an object model set; S3: Add a scene, drag and drop the object model set into the scene, and then adjust and place each object model in the object model set to obtain the initial scene; Set the light source in the initial scene and adjust the parameters of the light source to obtain the real-time scene; Use the classification model to classify all object models in the object model set to obtain a static object set and a dynamic object set; classify each light source in the real-time scene to obtain a static light source and a dynamic light source; All static light sources and lighting that affects static object sets are classified as static lighting, which includes static direct lighting, static indirect lighting, and static shadows; lighting affected by dynamic light sources and dynamic objects is planned as dynamic lighting, which includes dynamic direct lighting, dynamic indirect lighting, and dynamic shadows; S4: input the static lighting into the pre-calculation model, calculate various types of lighting in the static lighting, and obtain static lighting data; Creating a pre-stored information database, storing static lighting data in the pre-stored information database; updating the pre-stored information database; S5: Perform real-time calculations on various types of lighting in dynamic lighting to obtain dynamic lighting data; Input static lighting data and dynamic lighting data into the fusion model and output the overall lighting effect; Apply the overall lighting effect to render the real-time scene and obtain the real-time character image; The specific operations of step S5 include: D1: Extract static lighting data from the pre-stored information library, calculate dynamic direct lighting, dynamic indirect lighting and dynamic shadows in dynamic lighting, and obtain dynamic lighting data; D2: Input static lighting data and dynamic lighting data into the fusion model and output the overall lighting effect; D3: Apply the overall lighting effect to render the real-time scene and obtain the character image; D4: Repeat steps D1 to D3 in each frame to obtain a real-time character image; The specific operations of the fusion model include: E1: Obtain the boundary area between static lighting and dynamic lighting by comparing the area affected by static lighting with the area affected by dynamic lighting; E2: In each boundary area, calculate the distance weight between the boundary area and the static light source and the dynamic light source to obtain the static light weight and the dynamic light weight; E3: Use static light weight and dynamic light weight to perform weighted averaging on static lighting data and dynamic lighting data to obtain a fusion factor; E4: Smooth the fusion factor to obtain the final fusion factor; E5: In each boundary area, the final fusion factor is applied to the static lighting data and the dynamic lighting data in the boundary area to obtain the regional lighting data; E6: Combine static lighting data, dynamic lighting data and regional lighting data to obtain the overall lighting effect in the real-time scene; For the calculation of static lighting, the specific operations are: Calculate static direct lighting: K1: Analyze the surface properties of static objects, including reflectivity and roughness; K2: For each point in the scene, calculate the incident light from the static light source to the point; calculate the attenuation of the incident light according to the distance from the static light source and the propagation distance of the incident light; K3: Calculate the light intensity based on the intensity of the static light source, the attenuation of the incident light, and the surface properties of the static object; K4: Calculate based on light intensity and surface properties of static objects to obtain static direct lighting data; Calculate static indirect lighting: L1: Virtual light probes are evenly placed in the real-time scene to capture the surrounding ambient light. L2: The light probe collects light data from all directions through spherical harmonics environment mapping technology to obtain ambient light data; L3: Project the ambient light data onto the spherical harmonic function, calculate the weighted sum of the spherical harmonic function for each pixel of each ambient light data, and obtain the spherical harmonic coefficient. The static indirect lighting data contains the spherical harmonic coefficient of each pixel. Calculate static shadows: M1: From the perspective of a static light source, record the distance between the surface of each static object and the static light source in the real-time scene to obtain the depth information of each pixel; M2: Store the depth information, obtain the shadow map, select the appropriate shadow map resolution, and obtain static shadow data.
2. The real-time character modeling method based on light reflection and global illumination according to claim 1, characterized in that: The specific steps of converting the reference photo into the original character model in step S1 include: A1: Input the reference photo into the conversion model, perform alignment operation on the reference photo, and obtain an accurate reference photo; A2: Create a point cloud operation on the precise reference photo to obtain a point cloud model; A3: Mesh the point cloud model to obtain a mesh model; A4: Map the texture of the point cloud model onto the mesh model to obtain the original character model.
3. The real-time character modeling method based on light reflection and global illumination according to claim 2 is characterized in that: The specific operations of the classification model in step S3 include: B1: Set the light source change threshold and object change threshold; the light source change threshold includes the light source position change threshold, color change threshold and intensity change threshold; B2: Collect the position coordinates, color value and intensity of each light source at each time instant n times with a time interval of t, calculate the average change value of the position coordinates, color value and intensity of each light source at each time interval t, and obtain the light source position change value, color change value and intensity change value of each light source; compare the light source position change value, color change value and intensity change value of each light source with the light source position change threshold, color change threshold and intensity change threshold respectively; if the light source position change value, color change value and intensity change value of the light source are less than the light source position change threshold, color change threshold and intensity change threshold respectively, mark the light source as a static light source; otherwise, mark the light source as a dynamic light source; B3: Collect the position coordinates of each object model n times at a time interval of t, calculate the average change value of the position coordinates of each object model at each time interval t, and obtain the object position change value; compare the object position change value of each object model with the object change threshold, if the object position change value is less than the object change threshold, mark the object model as a static object; otherwise, mark the object model as a dynamic object; B4: The lighting generated by static light sources and static objects is marked as static lighting. Static lighting includes static direct lighting, static indirect lighting and static shadows. The lighting affected by dynamic light sources and dynamic objects is marked as dynamic lighting. Dynamic lighting includes dynamic direct lighting, dynamic indirect lighting and dynamic shadows.
4. The real-time character modeling method based on light reflection and global illumination according to claim 3 is characterized in that: The specific operations of pre-calculating the model in step S4 include: C1: Calculate static direct lighting and obtain static direct lighting data; calculate static indirect lighting and obtain static indirect lighting data; calculate static shadows and obtain static shadow data; C2: Create a pre-stored information library, integrate static direct lighting data, static indirect lighting data and static shadow data into static lighting data, and store the static lighting data in the pre-stored information library; C3: Update the pre-stored information database.
5. The real-time character modeling method based on light reflection and global illumination according to claim 4 is characterized in that: Specific operations for updating the pre-stored information database: Set the light source update threshold and object update threshold, obtain the static light source information change value by comparing the position coordinates, color value and intensity of the static light source in the current frame with that in the previous frame; and compare the position coordinates of the static object in the current frame with that in the previous frame to obtain the static object information change value; compare the light source update threshold with the static light source information change value, and compare the object update threshold with the static object information change value. If the static light source information change value is less than the light source update threshold, and the static object information change value is less than the object update threshold, no update operation is required; Otherwise, execute step C1 again and use the calculation result to replace the static lighting data in the pre-stored information library.
