Object model display method and system applied to 3D display platform

By optimizing the lighting and materials of the BabylonJS engine, enhancing user interaction, and integrating one-click ordering functions on the e-commerce platform, we have solved the problems of insufficient 3D model display details, poor user interaction experience, and imperfect e-commerce integration, and achieved a higher user experience and conversion rate.

CN118799533APending Publication Date: 2024-10-18QINGDAO DAOKE CLOUD NETWORK TECH CO LTD
View PDF 18 Cites 0 Cited by

Patent Information

Application Number
CN202411259118.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

The existing 3D models displayed on the web have insufficient details, limited user interaction experience, and imperfect e-commerce integration, making it impossible to achieve a see-and-buy shopping experience.

Method used

By optimizing the lighting and materials in the BabylonJS engine, the user interaction function is enhanced to realize rotation and drag, zoom in and out interactions, and a link to a third-party e-commerce platform is added to the backend management side to enable one-click ordering and jump to the e-commerce platform.

Benefits of technology

It improves the precision of model detail display and user experience, provides a convenient shopping process, and improves the conversion rate and user stickiness of the e-commerce platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799533A_ABST
    Figure CN118799533A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of 3D graphic display, and discloses an object model display method and system applied to a 3D display platform. According to the method, light and materials in a BabylonJS engine are optimized and preset; rotation dragging and zoom-in and zoom-out interaction are completed at the web end; and when the background management end carries out model editing, adding a third-party e-commerce platform link, carrying out one-key ordering, skipping to the third-party e-commerce platform, and implementing a shopping mode of purchasing while watching. According to the method, model details, especially the glaze degree and color of ceramic and cultural relic models, can be more truly restored. The interaction function is enhanced, so that the user can operate the model more naturally, and the immersion and satisfaction of the user are improved. The integration of the e-commerce platform provides more convenient shopping experience for the user, and is beneficial to improving the conversion rate and the user stickiness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of 3D graphics display, and in particular relates to an object model display method and system applied to a 3D display platform. Background Art

[0002] With the development of virtual reality (VR) and augmented reality (AR) technologies, the display of 3D models on web pages has become more and more common. WebGL technology makes it possible to render 3D graphics in browsers without plug-ins, and WebGL-based 3D engines such as BabylonJS provide richer functions and optimization tools. As a universal 3D model exchange format, the optimization technology of the glb format is crucial to improving the loading speed and rendering performance of the model. However, the existing technology still has shortcomings in the true restoration of model details, user interaction experience, and e-commerce integration.

[0003] Through the above analysis, the problems and defects of the existing technology are as follows: (1) In the display of 3D models on the web, the model details are insufficient, and objects with complex surface characteristics, such as the glaze and color of ceramic and cultural relic models, cannot be fully displayed. (2) Limited interactive experience: The user interaction method is not intuitive and smooth, and lacks effective rotation, drag and zoom functions. (3) Imperfect e-commerce integration: There is a lack of seamless integration with e-commerce platforms, and the shopping experience of "see now, buy now" cannot be achieved. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the disclosed embodiment of the present invention provides an object model display method and system applied to a 3D display platform. The purpose of the present invention is to provide a more sophisticated 3D model display method and optimize the user interaction experience and e-commerce integration function.

[0005] The technical solution is as follows: an object model display method applied to a 3D display platform, comprising: S1, optimizes the lighting and material presets in the BabylonJS engine; S2, enhances user interaction, and completes rotation, dragging, zooming in and out interactions on the web side; S3, e-commerce platform link integration. When editing the model on the backend management side, add a third-party e-commerce platform link, place an order with one click, and jump to the third-party e-commerce platform to realize the see-and-buy shopping method.

[0006] In step S1, the preset lighting is optimized, including: S1011, optimize the ambient light of the overall lighting, and use ambient light to simulate sky light; S1012, directional light that optimizes the light source direction and shadow effects, using directional light to simulate sunlight; S1013, optimize the light source used to simulate local light source points, use point light sources and spotlights to simulate local light sources; S1014, comprehensive application, combines the use of multiple light sources to optimize the overall scene lighting.

[0007] In step S1, the preset material is optimized, including: S1021, using PBR material to optimize the realism of the model surface, wherein the parameters of the PBR material include: metalness, roughness, reflectivity, and ambient occlusion; S1022, use reflection and refraction to optimize the realism of the material. Reflection uses the reflection map to simulate the reflection effect of the material surface; refraction uses the refraction map to simulate the refraction effect of the material; S1023, judging the realism of the picture through parameter changes, including: using light intensity to measure the impact of the light source on the scene, using shadow quality to measure the clarity and realism of the shadow, using reflection and refraction effects to measure whether the reflection and refraction of the material surface are natural, and using ambient occlusion effects to measure the realism of the shadow area.

[0008] In step S1, after optimizing and presetting the lighting and materials in the BabylonJS engine, it is also necessary to: map the HDR image to a low dynamic range LDR display device using tone mapping, so as to achieve tone mapping to improve the visual effect of the 3D display platform; mapping the HDR image to a low dynamic range LDR display device using tone mapping includes, S1031, using Babylon.js to perform tone mapping, specifically including: S10311, Enable HDR rendering; S10312, selecting a tone mapping algorithm by setting a tone mapping type of a rendering pipeline; S10313, adjust tone mapping parameters, adjust exposure and contrast parameters of tone mapping to obtain optimal visual effects; S1032, using a third-party library or custom Shader, including: S10321, load Shader file, load custom tone mapping Shader file; S10322, apply the custom Shader material to the model in the scene; The implementation of tone mapping to significantly improve the visual effect of the 3D display platform includes: (a) Dynamically adjust tone mapping parameters, according to the lighting conditions of the scene, to adapt to different environments and lighting changes; (b) Combining post-processing effects and ambient occlusion image processing techniques to further improve the overall performance.

[0009] In step S1, after optimizing the preset lighting and materials, it is also necessary to perform: depth of field, simulating the focal length effect of the camera, so that the foreground and background have layers; specifically, including: (A) Depth of field parameters, including focal length, aperture, and blur level; (B) Use Babylon.js to achieve depth of field effect, including: (B01) Enable the depth of field rendering pipeline provided by Babylon.js; (B02) Adjust the depth of field parameters. Dynamically adjust the depth of field effect parameters as needed to achieve different focal length effects. (B03) Customize Shader to achieve depth of field effect, write depth of field fragment Shader, and apply custom Shader material, and apply the custom depth of field Shader material to the scene; (C) Dynamically adjust the depth of field effect, including: dynamically adjust the focus and aperture based on the camera position and target.

[0010] In step S1, after optimizing the preset lighting and materials, you also need to: Optimize models and textures to keep the polygon count and texture resolution of the models moderate; specifically: S1041, optimize the number of polygons of the model by using simplification tools, level of detail LOD optimization, and distance judgment; S1042, optimize the resolution of textures, perform texture size adaptation, compression, MIP mapping, and manual creation for optimization; S1043, implement moderate control and regulation, perform dynamic adjustment, testing and optimization, and use performance monitoring tools to monitor the performance status of the scene in real time.

[0011] In step S2, enhancing user interaction includes: S201, create a basic scene and camera, create a scene in JavaScript, and add ArcRotateCamera as a camera to allow users to rotate and zoom the view; S202, adding an interactive 3D model, and setting the basic material and position of the 3D model; S203, monitoring mouse events to implement interaction and the model rotation function.

[0012] In step S2, completing the rotation, dragging, zooming in and out interaction on the web side includes: S201, use the ArcRotateCamera class in the BabylonJS engine to implement rotation and scaling; S202, monitoring the drag and scroll events of the mouse through JavaScript, and performing rotation and scaling operations on the model; S203 uses LOD technology to switch models with different levels of detail according to the camera distance, optimize rendering performance, and perform real-time shadow and reflection settings; S204, uses PBR materials to make the lighting effect of the model surface realistic; and preset lights, including ambient light, directional light and local light source, to simulate real lighting scenes; S205 adjusts the color performance of the entire scene through tone mapping to optimize the visual effect; and uses depth of field technology to simulate the focal length of the camera to make the foreground and background have layers.

[0013] Step S3 specifically includes: S301, backend management system design, including: S3011, user interface design, in the model editing interface of the backend management system, an input box is provided for users to add product links of third-party e-commerce platforms; S3012, database design, add a field to each model record in the database to store the product link of the third-party e-commerce platform.

[0014] S302, front-end page design, including: S3021, display product links. When displaying the model on the front-end page, display the product links of the third-party e-commerce platform added by the user in the background; according to the one-click order button provided, trigger the jump to the corresponding product page of the third-party e-commerce platform; S3022, using JavaScript to implement one-click jump. When the user selects the one-click order button, the `oneClickBuy` function is called and the product link is passed in, and the product page of the third-party e-commerce platform is opened in a new tab; S303, implementation of backend management functions, including: link input and saving, through the backend management terminal, inputting the product link of the third-party e-commerce platform when editing the model, and saving the link in the database; S304, backend service implementation, including: receiving and saving product links through the developed API interface; S305, Security and Optimization, includes: S3051, verify the input link to ensure that the format is correct and points to a legitimate e-commerce platform, and use the HTTPS protocol to ensure data transmission security; S3052, optimize database query and storage operations.

[0015] Another object of the present invention is to provide an object model display system applied to a 3D display platform, the system is implemented by the object model display method applied to a 3D display platform, and the system includes: Optimize preset lighting and material modules, used to optimize preset lighting and materials in the BabylonJS engine; Enhanced user interaction module, used to complete rotation, dragging, zooming in and out interactions on the web side; The e-commerce platform link integration module is used to add third-party e-commerce platform links when editing models on the backend management side, place orders with one click, jump to the third-party e-commerce platform, and implement the see-and-buy shopping method In combination with all the above technical solutions, the beneficial effects of the present invention are as follows: First, the display system provided by the present invention has more detailed display and can more realistically restore the model details, especially the glaze and color of ceramic and cultural relic models. The user experience is more optimized: the enhancement of interactive functions allows users to operate the model more naturally, improving the user's immersion and satisfaction. The e-commerce function is more complete: the integration of the e-commerce platform provides users with a more convenient shopping experience, which helps to improve conversion rate and user stickiness.

[0016] Second, expected benefits and commercial value, improve user stickiness: By optimizing the 3D display effect and user interaction experience, the user's stay time on the platform is increased, improving user stickiness. Improve conversion rate: The function of jumping to the e-commerce platform with one click simplifies the shopping process, facilitates users to purchase directly, and improves the platform's conversion rate and sales. Reduce operating costs: By optimizing rendering and loading speed, reduce server resource consumption and reduce operating costs. Enhance brand image: High-quality 3D display effects and convenient shopping experience help to enhance the platform's brand image and user satisfaction. Improve market competitiveness: In the fierce market competition, provide better 3D display and interactive experience to enhance market competitiveness. User growth: Through better user experience and convenient shopping process, attract more users to register and use the platform. Diversified income: Through integration with third-party e-commerce platforms, open up new income channels and achieve diversified income sources.

[0017] Third, most 3D display platforms on the market currently have obvious deficiencies in graphics rendering and user interaction, making it difficult to meet users' needs for high-quality visual effects and smooth operating experience. The present invention optimizes the lighting and materials in the BabylonJS engine and enhances user interaction functions. It integrates the function of jumping to the e-commerce platform with one click to realize the shopping method of "see and buy", which has not been widely applied at home and abroad.

[0018] Fourth, high-quality 3D display and interactive experience: Due to technical limitations, traditional 3D display platforms are difficult to balance both graphic quality and interactive experience. The present invention effectively solves this technical problem by optimizing lighting and material settings, and improving the response speed of interactive operations. Integrated shopping experience: When users browse products on a 3D display platform, they often need to jump to different websites to make purchases, and the shopping process is cumbersome. The present invention integrates links to third-party e-commerce platforms to achieve one-click jump shopping.

[0019] Fifth, the present invention overcomes the common prejudice that 3D display effect and user interaction experience are inferior to each other. Many developers believe that in order to ensure the quality of graphics, the smoothness of interaction must be sacrificed, or vice versa. The present invention optimizes the BabylonJS engine to prove that it is possible to maintain a smooth user interaction experience while improving the quality of graphics. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description, serve to explain the principles of the present disclosure; Figure 1 is a flow chart of an object model display method applied to a 3D display platform provided by an embodiment of the present invention; Figure 2 is a schematic diagram of an object model display system applied to a 3D display platform provided by an embodiment of the present invention; Figure 3 are model rendering images before and after optimization provided by an embodiment of the present invention; In the figure: 1. Optimize the preset lighting and material modules; 2. Enhance the user interaction module; 3. E-commerce platform link integration module. DETAILED DESCRIPTION

[0021] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific implementation disclosed below.

[0022] The innovation of the present invention lies in that the present invention improves the clarity and realism of graphics by optimizing the lighting and material settings in the BabylonJS engine; enhances the fluency of interactive operations such as rotation, dragging, zooming in and out on the web side; and integrates third-party e-commerce platform links to achieve a one-click shopping function, thereby improving user experience and platform conversion rate.

[0023] Embodiment 1, as Figure 1As shown, the object model display method applied to the 3D display platform provided by the embodiment of the present invention includes: S1, optimizing and presetting the lighting and materials in the BabylonJS engine; S2, enhances user interaction, and completes rotation, dragging, zooming in and out interactions on the web side; S3, e-commerce platform link integration. When editing the model on the backend management side, add a third-party e-commerce platform link, place an order with one click, and jump to the third-party e-commerce platform to realize the see-and-buy shopping method.

[0024] S101, Lighting Optimization. (1) Optimize preset lighting and materials: By optimizing the lighting and materials preset in the BabylonJS engine, the visual effect of the model can be improved, especially when displaying ceramic and cultural relic models.

[0025] Define the ambient light source, create the ambient light, and use the HemisphericLight class to create the ambient light source in BabylonJS.

[0026] ```javascript var hemiLight = new BABYLON.HemisphericLight("hemiLight", newBABYLON.Vector3(0, 1, 0), scene); ``` (2) Set the direction of the light source to simulate sky light, and set the direction of the ambient light to be from top to bottom to simulate light from the sky.

[0027] ```javascript hemiLight.direction = new BABYLON.Vector3(0, 1, 0); ``` (3) Adjust the intensity of the light source, global illumination, and set the intensity of the ambient light to ensure that the light is soft and uniform and improve the overall lighting effect.

[0028] ```javascript hemiLight.intensity = 0.8; ``` (4) Set the light source color, sky and ground color. Set the lighting color of the sky and ground separately to make the light more natural.

[0029] ```javascript hemiLight.groundColor = new BABYLON.Color3(0.5, 0.5, 0.5); / / Ground reflected light color hemiLight.diffuse = new BABYLON.Color3(1, 1, 1); / / sky light color hemiLight.specular = new BABYLON.Color3(0.7, 0.7, 0.7); / / Object highlight color ``` (5) Optimize lighting effects and smooth transitions: By setting appropriate lighting color and intensity, a smooth transition of light can be achieved, making ceramic and cultural relic models more natural when displayed. Reflection and highlights: Ensure that ambient light can highlight the reflection and highlight effects of the model, making it more realistic.

[0030] (6) Combined use of ambient light: Ambient light is usually used in combination with other light sources (such as directional light, point light, etc.) to provide comprehensive lighting effects.

[0031] ```javascript var directionalLight = new BABYLON.DirectionalLight("dirLight", newBABYLON.Vector3(0, -1, 0), scene); directionalLight.intensity = 0.5; ``` **Sample Code**: ```javascript / / Create a scene var scene = new BABYLON.Scene(engine); / / Create an ambient light source var hemiLight = new BABYLON.HemisphericLight("hemiLight", newBABYLON.Vector3(0, 1, 0), scene); hemiLight.direction = new BABYLON.Vector3(0, 1, 0); hemiLight.intensity = 0.8; hemiLight.groundColor = new BABYLON.Color3(0.5, 0.5, 0.5); hemiLight.diffuse = new BABYLON.Color3(1, 1, 1); hemiLight.specular = new BABYLON.Color3(0.7, 0.7, 0.7); / / Create other light sources to supplement the lighting effect var directionalLight = new BABYLON.DirectionalLight("dirLight", newBABYLON.Vector3(0, -1, 0), scene); directionalLight.intensity = 0.5; / / Load the model and apply the material BABYLON.SceneLoader.ImportMesh("", "path_to_model / ", "model_file.babylon", scene, function (newMeshes) { var model = newMeshes[0]; / / Set the material var material = new BABYLON.StandardMaterial("material", scene); model.material = material; / / Adjust material properties to match ambient light material.diffuseColor = new BABYLON.Color3(1, 1, 1); material.specularColor = new BABYLON.Color3(0.7, 0.7, 0.7); material.emissiveColor = new BABYLON.Color3(0.2, 0.2, 0.2); }); / / Rendering loop engine.runRenderLoop(function () { scene.render(); }); ``` Through the above optimizations, the use of ambient light can provide a soft overall lighting effect when displaying ceramic and cultural relic models, making the details of the model clearer, the reflection and highlight effects more realistic, and improving the overall visual effect.

[0032] As another example, in step S101, the lighting optimization can be performed by optimizing the preset lighting of the object model in the 3D display platform, including the optimization of ambient light, directional light and local light source, so that the lighting effect in the scene is more realistic and natural: S1011, optimize the ambient light that provides overall illumination, and use ambient light to simulate sky light; Ambient Light: Use ambient light in 3D rendering to simulate all-round illumination from the sky, so that all surfaces of the object can be affected by light, thereby eliminating completely dark shadow areas.

[0033] S1012, optimize the directional light that provides clear light source direction and shadow effect, and use directional light to simulate sunlight; among them, directional light: use directional light to simulate sunlight. This light source has a clear direction and can produce realistic shadow effects, enhancing the three-dimensional sense of the scene. Create a directional light object named "directionalLight", whose direction is determined by a vector with coordinates (-1, -2, -1), and add it to the scene. Set the position of the directional light and set the position coordinates to (20, 40, 20). Adjust the intensity of the directional light to 0.8. Enable the shadow effect, and for this purpose create a new Shadow Generator object, set the size of its shadow map to 1024 pixels, and associate it with the previously created directional light. In the shadow generator, enable the Blur Exponential Shadow Map to improve the visual effect of the shadow edge.

[0034] Set the blur kernel size of the shadow generator to 32. This determines the strength of the blur effect and the smoothness of the shadow edges.

[0035] ```javascript / / Babylon.js example code var directionalLight = new BABYLON.DirectionalLight("directionalLight", new BABYLON.Vector3(-1, -2, -1), scene); directionalLight.position = new BABYLON.Vector3(20, 40, 20); / / Set the light source position directionalLight.intensity = 0.8; / / Adjust light intensity / / Enable shadows var shadowGenerator = new BABYLON.ShadowGenerator(1024,directionalLight); shadowGenerator.useBlurExponentialShadowMap = true; / / Use blur exponential shadow map shadowGenerator.blurKernel = 32; / / Adjust blur kernel size ``` S1013, optimizes the light source used to simulate local light points, using point light sources and spotlights to simulate local light sources; Point light source (Point Light): Point light source emits light from a point in all directions, suitable for simulating local light sources, such as light bulbs. Spot light (Spot Light): Spotlight emits light from a point in one direction and has a light cone angle, suitable for simulating flashlights or spotlights.

[0036] S1014, comprehensive application, combined use of multiple light sources, optimize the overall scene lighting; combine the above different types of light sources, adjust the intensity and position of each light source to obtain the best lighting and shadow effects. Create a new scene object (Scene) and associate it with the rendering engine (engine). Add an ambient light (HemisphericLight) object named "ambientLight", whose direction is determined by a vector pointing up (positive y-axis direction), that is, (0,1, 0), and set its intensity to 0.6. Add a directional light (Directional Light) object named "directionalLight", whose direction is determined by the vector (-1, -2, -1), and set its position to (20, 40, 20) and intensity to 0.8. Create a shadow generator (Shadow Generator) for the directional light, set the shadow map size to 1024 pixels, enable the fuzzy exponential shadow map, and set the fuzzy kernel size to 32 to improve the shadow quality. Add a point light object named "pointLight", position it at (0, 10, 0), set its intensity to 0.5, and define its range as 20. Add a spot light object named "spotLight", position it at (0, 10, 0), point it to the negative y axis, i.e. (0, -1, 0), set its spotlight angle to π / 3 (approximately 60 degrees), set its attenuation exponent to 2, and set its intensity to 0.7.

[0037] ```javascript / / Comprehensive application sample code var scene = new BABYLON.Scene(engine); / / Ambient light var ambientLight = new BABYLON.HemisphericLight("ambientLight", newBABYLON.Vector3(0, 1, 0), scene); ambientLight.intensity = 0.6; / / Directional light var directionalLight = new BABYLON.DirectionalLight("directionalLight", new BABYLON.Vector3(-1, -2, -1), scene); directionalLight.position = new BABYLON.Vector3(20, 40, 20); directionalLight.intensity = 0.8; var shadowGenerator = new BABYLON.ShadowGenerator(1024,directionalLight); shadowGenerator.useBlurExponentialShadowMap = true; shadowGenerator.blurKernel = 32; / / Point light source var pointLight = new BABYLON.PointLight("pointLight", newBABYLON.Vector3(0, 10, 0), scene); pointLight.intensity = 0.5; pointLight.range = 20; / / Spotlight var spotLight = new BABYLON.SpotLight("spotLight", newBABYLON.Vector3(0, 10, 0), new BABYLON.Vector3(0, -1, 0), Math.PI / 3, 2,scene); spotLight.intensity = 0.7; ``` S102, material optimization: By optimizing the material settings, the visual effect of the model is improved, especially when displaying ceramic and cultural relic models, making their texture more realistic and delicate, including: (i) Use PBR materials (Physically Based Rendering). PBR materials can simulate the interaction between light and materials more realistically and are suitable for high-quality 3D rendering. BabylonJS provides a PBR material class. To create a PBR material, use the PBRMaterial class of BabylonJS to create a PBR material for the model.

[0038] ```javascript var pbr = new BABYLON.PBRMaterial("pbr", scene); ``` (ii) Set basic material properties, Reflectivity: Adjust the reflectivity of the material to make the surface reflection characteristics of ceramics and cultural relics more realistic.

[0039] ```javascript pbr.reflectivityColor = new BABYLON.Color3(0.5, 0.5, 0.5); / / Medium reflection ``` - **Roughness**: By setting the roughness, you can control the smoothness of the surface. Ceramics are usually smooth, while artifacts may have a certain degree of roughness.

[0040] ```javascript pbr.roughness = 0.2; / / smooth surface ``` (iii) Set texture map, diffuse map (Albedo Texture): Load and apply the diffuse map to make the material richer in color and detail.

[0041] ```javascript pbr.albedoTexture = new BABYLON.Texture("path_to_albedo_texture.jpg",scene); ``` - **Normal Texture**: Use a normal map to add surface detail and simulate tiny bumps and bumps.

[0042] ```javascript pbr.bumpTexture = new BABYLON.Texture("path_to_normal_texture.jpg",scene); ``` - **Environment Texture**: Set the environment map so that the material can reflect the light of the surrounding environment.

[0043] ```javascript pbr.environmentTexture = new BABYLON.CubeTexture("path_to_environment_texture.env", scene); ``` (iv) Adjust special properties, Specular Glossiness: Adjust the glossiness according to the material type to ensure a natural reflection effect.

[0044] ```javascript pbr.specularIntensity = 0.8; / / Specular reflection ``` - **Emissive Texture**: For parts that require self-illumination effects, you can use self-illumination maps.

[0045] ```javascript pbr.emissiveTexture = new BABYLON.Texture("path_to_emissive_texture.jpg", scene); pbr.emissiveColor = new BABYLON.Color3(0.1, 0.1, 0.1); / / Weak self-luminescence ``` (v) Detail adjustment: fine-tune the reflectivity and roughness according to the specific model to make the effect more realistic. Adjust the strength of the normal map according to the needs to ensure natural details.

[0046] **Sample Code**: ```javascript / / Create a scene var scene = new BABYLON.Scene(engine); / / Create a PBR material var pbr = new BABYLON.PBRMaterial("pbr", scene); / / Set basic material properties pbr.reflectivityColor = new BABYLON.Color3(0.5, 0.5, 0.5); / / Medium reflection pbr.roughness = 0.2; / / smooth surface / / Set up the texture map pbr.albedoTexture = new BABYLON.Texture("path_to_albedo_texture.jpg",scene); pbr.bumpTexture = new BABYLON.Texture("path_to_normal_texture.jpg",scene); pbr.environmentTexture = new BABYLON.CubeTexture("path_to_environment_texture.env", scene); / / Set special properties pbr.specularIntensity = 0.8; / / Specular reflection pbr.emissiveTexture = new BABYLON.Texture("path_to_emissive_texture.jpg", scene); pbr.emissiveColor = new BABYLON.Color3(0.1, 0.1, 0.1); / / Weak self-luminescence / / Apply the material to the model BABYLON.SceneLoader.ImportMesh("", "path_to_model / ", "model_file.babylon", scene, function (newMeshes) { var model = newMeshes[0]; model.material = pbr; }); / / Rendering loop engine.runRenderLoop(function () { scene.render(); }); ``` Through the above-mentioned material optimization, the visual effects of ceramic and cultural relics models will be greatly improved, and characteristics such as surface reflection, smoothness, details and glossiness can be truly reproduced, bringing a more realistic display effect.

[0047] In another exemplary embodiment, the material optimization in step S102 specifically includes: S1021, using PBR material to optimize the realism of the model surface, using PBR material (Physically Based Rendering); wherein the main parameters of the PBR material include: Metalness: determines the metal properties of the material. Roughness: determines the smoothness of the material surface. Reflectance: determines the reflection intensity of the material. Ambient Occlusion (AO): increases the shadow effect of the material.

[0048] ```javascript / / Babylon.js example code var pbr = new BABYLON.PBRMaterial("pbr", scene); / / Metallicity pbr.metallic = 0.8; / / Metal material / / Roughness pbr.roughness = 0.2; / / smooth surface / / Reflectivity pbr.reflectionTexture = new BABYLON.HDRCubeTexture(" / textures / environment.hdr", scene); / / Ambient Occlusion pbr.ambientTexture = new BABYLON.Texture(" / textures / ambientOcclusion.png", scene); / / Apply the material to the model var mesh = scene.getMeshByName("model"); mesh.material = pbr; ``` S1022, use reflection and refraction to optimize the realism of materials, use reflection (Reflection) and refraction (Refraction); Reflection: Use reflection texture (Reflection Texture) to simulate the reflection effect of the material surface, so that the surface can reflect the surrounding environment.

[0049] ```javascript / / Babylon.js example code var reflectiveMaterial = new BABYLON.PBRMaterial("reflectiveMaterial", scene); / / Reflection map reflectiveMaterial.reflectionTexture = new BABYLON.HDRCubeTexture(" / textures / environment.hdr", scene); reflectiveMaterial.reflectivityColor = new BABYLON.Color3(0.5, 0.5,0.5); / / Reflection color / / Apply the material to the model var reflectiveMesh = scene.getMeshByName("reflectiveModel"); reflectiveMesh.material = reflectiveMaterial; ``` Physically Based Rendering (PBR) Material Creation: Create a PBR material object named "pbr" and associate it with the scene. Set the metallic to 0.8 to simulate the metal properties of the material. Set the roughness to 0.2 to simulate the smoothness of the surface. Reflection effect: Use a high dynamic range cube map (HDRCubeTexture) as the reflection texture (reflectionTexture) to simulate the effect of the material surface reflecting the surrounding environment. In another PBR material object "reflectiveMaterial", the reflection texture is also used, and the reflectivity color (reflectivityColor) is set to adjust the intensity and color of the reflection. Refraction effect: In another PBR material object "refractiveMaterial", a refraction texture (refractionTexture) is used to simulate the refraction effect of the material, and a high dynamic range cube map is also used. Set the refractive index (indexOfRefraction), which determines how much light bends when passing through the material.

[0050] The specific technical features are described as follows: Reflection map: By specifying an environmental HDR image as a reflection map, the surface of the material can reflect the details of the surrounding environment. The reflection color controls the intensity and color of the reflection, allowing developers to adjust the reflection effect to meet the needs of the scene. Refraction map: The use of the refraction map makes the material look transparent, and the light bends when passing through the material, simulating the visual effect of glass or other transparent materials in the real world. The refractive index defines the degree to which the light bends when entering and leaving the material. Different refractive indices will produce different visual effects. Material application: Finally, these materials are applied to models named "reflectiveModel" and "refractiveModel" respectively to achieve reflection and refraction effects. The refraction: Use a refraction texture to simulate the refraction effect of the material, allowing light to penetrate the material and refract.

[0051] ```javascript / / Babylon.js example code var refractiveMaterial = new BABYLON.PBRMaterial("refractiveMaterial", scene); / / Refraction map refractiveMaterial.refractionTexture = new BABYLON.HDRCubeTexture(" / textures / environment.hdr", scene); refractiveMaterial.indexOfRefraction = 1.5; / / Refractive index / / Apply the material to the model var refractiveMesh = scene.getMeshByName("refractiveModel"); refractiveMesh.material = refractiveMaterial; ``` S1023, how to judge the realism of the picture, judge the picture changes by parameters; among them, parameter change judgment: monitor the impact of material parameter changes on scene lighting and shadows. Use the following indicators to judge the realism of the picture: Lighting Intensity: measure the impact of light sources on the scene. Shadow Quality: measure the clarity and realism of shadows. Reflection and Refraction Effects: measure whether the reflection and refraction of the material surface are natural. Ambient Occlusion Effect: measure the realism of the shadow area. Evaluate lighting intensity: analyze multiple parameters of the scene by defining an evaluateScene function. Use the reduce method to traverse all light objects in the scene, add their intensities (intensity) to obtain the total lighting intensity (lightingIntensity). Evaluate shadow quality: also use the reduce method to traverse all shadow objects in the scene, add their qualities (quality) to obtain the total shadow quality (shadowQuality). Evaluate the reflection effect: Use the reduce method to traverse all mesh objects in the scene and check whether the material of each mesh has a reflective color attribute (reflectivityColor). If so, increase the counter by 1 and finally get the total number of reflection effects (reflectionEffect). Evaluate the refraction effect: Similarly, traverse all mesh objects and check whether the material of each mesh has a refractive index attribute (indexOfRefraction). If so, increase the counter by 1 and get the total number of refraction effects (refractionEffect). Evaluate the ambient occlusion effect: Traverse all mesh objects again and check whether the material of each mesh has an ambient occlusion texture (ambientTexture). If so, increase the counter by 1 and get the total number of ambient occlusion effects (ambientOcclusionEffect). Return the evaluation result: The evaluateScene function returns an object containing all the above evaluation parameters. Call the evaluation function: Call the evaluateScene function and pass the scene object as a parameter to get the scene quality evaluation result (sceneQuality). Output the evaluation result: Use console.log to output the scene quality evaluation result to the console.

[0052] ```javascript / / Sample code: Determine the change of screen parameters function evaluateScene(scene) { var lightingIntensity = scene.lights.reduce((sum, light) => sum + light.intensity, 0); var shadowQuality = scene.shadows.reduce((sum, shadow) => sum + shadow.quality, 0); var reflectionEffect = scene.meshes.reduce((sum, mesh) => sum + (mesh.material.reflectivityColor? 1 : 0), 0); var refractionEffect = scene.meshes.reduce((sum, mesh) => sum + (mesh.material.indexOfRefraction? 1 : 0), 0); var ambientOcclusionEffect = scene.meshes.reduce((sum, mesh) => sum + (mesh.material.ambientTexture? 1 : 0), 0); return { lightingIntensity, shadowQuality, reflectionEffect, refractionEffect, ambientOcclusionEffect }; } / / Call the evaluation function var sceneQuality = evaluateScene(scene); console.log(sceneQuality); ``` S103, post-processing effects. Post-processing effects can be used to further enhance the visual effects of the 3D model, making it more eye-catching when displayed. Specifically, it includes: (I) creating a post-processing effect pipeline. Use the PostProcess class in BabylonJS to create a post-processing effect pipeline and apply it to the scene.

[0053] (II) Add common post-processing effects: Bloom Effect: simulates the scattering and blooming of light, so that areas with higher brightness produce halos to enhance the visual effect. Depth of Field Effect: simulates the depth of field effect of the camera, so that the foreground and background appear appropriately blurred, highlighting the main body of the model. Tone Mapping: adjusts the tone and brightness of the scene to make the colors more natural and realistic. Anti-aliasing: reduces the jagged phenomenon on the edges to make the image smoother.

[0054] **Sample Code**: ```javascript / / Create a scene var scene = new BABYLON.Scene(engine); / / Create a post-processing effects pipeline var pipeline = new BABYLON.DefaultRenderingPipeline( "defaultPipeline", / / Pipeline name true, / / Is it enabled? scene, / / Application scene [scene.activeCamera] / / Camera applied to ); / / Floodlight effect pipeline.bloomEnabled = true; pipeline.bloomThreshold = 0.8; / / threshold pipeline.bloomWeight = 0.3; / / weight pipeline.bloomKernel = 64; / / kernel size pipeline.bloomScale = 0.5; / / Scaling / / Depth of field effect pipeline.depthOfFieldEnabled = true; pipeline.depthOfField.focusDistance = 2000; / / focal length pipeline.depthOfField.fStop = 1.4; / / aperture pipeline.depthOfField.focalLength = 50; / / focal length / / Tone mapping pipeline.imageProcessing.toneMappingEnabled = true; pipeline.imageProcessing.toneMappingType = BABYLON.ImageProcessingConfiguration.TONEMAPPING_ACES; pipeline.imageProcessing.exposure = 1.0; / / Exposure pipeline.imageProcessing.contrast = 1.6; / / Contrast / / Anti-aliasing pipeline.samples = 4; / / 4x anti-aliasing / / Load the model and apply the material BABYLON.SceneLoader.ImportMesh("", "path_to_model / ", "model_file.babylon", scene, function (newMeshes) { var model = newMeshes[0]; / / Set the material var pbr = new BABYLON.PBRMaterial("pbr", scene); pbr.reflectivityColor = new BABYLON.Color3(0.5, 0.5, 0.5); pbr.roughness = 0.2; pbr.albedoTexture = new BABYLON.Texture("path_to_albedo_texture.jpg",scene); pbr.bumpTexture = new BABYLON.Texture("path_to_normal_texture.jpg",scene); pbr.environmentTexture = new BABYLON.CubeTexture("path_to_environment_texture.env", scene); pbr.specularIntensity = 0.8; pbr.emissiveTexture = new BABYLON.Texture("path_to_emissive_texture.jpg", scene); pbr.emissiveColor = new BABYLON.Color3(0.1, 0.1, 0.1); model.material = pbr; }); / / Rendering loop engine.runRenderLoop(function () { scene.render(); }); ``` (II-1) Create a post-processing effect pipeline: `BABYLON.DefaultRenderingPipeline` is a predefined post-processing effect pipeline that contains a variety of common post-processing effects.

[0055] (II-2) Floodlight effect: - `bloomEnabled`: Enables the bloom effect.

[0056] - `bloomThreshold`: Sets the threshold of the bloom effect, controlling which areas with higher brightness will produce bloom.

[0057] - `bloomWeight`: Sets the strength of the bloom effect.

[0058] - `bloomKernel`: Sets the blur kernel size of the bloom effect.

[0059] - `bloomScale`: Sets the scaling factor of the bloom effect.

[0060] (II-3) Depth of field effect: - `depthOfFieldEnabled`: Enable depth of field effect.

[0061] - `focusDistance`: Sets the focal length, which determines the range of the depth of field effect.

[0062] - `fStop`: Sets the aperture size, controlling the strength of the depth of field effect.

[0063] - `focalLength`: Sets the focal length, which affects the distance of the depth of field effect.

[0064] (II-4) Tone Mapping: - `toneMappingEnabled`: Enable tone mapping.

[0065] - `toneMappingType`: Set the tone mapping type, here ACES (Academy ColorEncoding System) is used.

[0066] - `exposure`: Set the exposure and adjust the overall brightness of the scene.

[0067] - `contrast`: Set the contrast and adjust the color contrast of the scene.

[0068] (II-5) Anti-aliasing: - `samples`: Set the number of anti-aliasing samples. 4x anti-aliasing can effectively reduce edge jaggedness.

[0069] By applying the above post-processing effects, the visual effect of the model during display will be greatly improved, making it more eye-catching, with more prominent details and a more realistic and natural overall picture.

[0070] In another exemplary embodiment, in step S103, tone mapping is a technology that improves the overall visual performance by adjusting the brightness, contrast and color of an image, and is often used to map an HDR (high dynamic range) image to an LDR (low dynamic range) display device. Tone mapping can significantly improve the visual effect of a 3D display platform, making the image more realistic and vivid. The following is a detailed implementation scheme of the present invention: S1031, use Babylon.js for tone mapping. Babylon.js provides a variety of tone mapping techniques that can be implemented through simple configuration.

[0071] S10311, Enable HDR rendering. First, you need to enable HDR rendering so that you can take full advantage of the tone mapping effect.

[0072] S10312, select the tone mapping algorithm. Babylon.js has built-in multiple tone mapping algorithms, which can be selected by setting the tone mapping type of the rendering pipeline.

[0073] S10313, Adjust tone mapping parameters, you can adjust the exposure and contrast parameters of tone mapping to obtain the best visual effect.

[0074] S1032, use a third-party library or a custom Shader. If you need a more complex tone mapping effect, you can use a third-party library or write a custom Shader. Including: S10321, load Shader file, load custom tone mapping Shader file.

[0075] Custom fragment shader: A custom fragment shader named toneMappingFragmentShader is defined and stored in BABYLON.Effect.ShadersStore. The shader code contains uniform variables (uniforms) for floating-point precision declaration, texture sampling, exposure, and contrast. A ToneMapping function is implemented to perform tone mapping on the input color, including exposure adjustment, contrast adjustment, and gamma correction. Shader variables: vUV: A changing two-dimensional vector used to store texture coordinates.

[0076] textureSampler: A uniform 2D sampler used to get color values ​​from a texture. exposure: A uniform floating-point number used to control the exposure. contrast: A uniform floating-point number used to control the contrast. Main function: The main function is the entry point of the fragment shader, which gets the color value from the texture sampler, applies tone mapping, and multiplies the result by the contrast, and finally outputs the fragment color (gl_FragColor). Custom shader material: Creates a ShaderMaterial object named "shader" and associates it with the scene. Specifies to use the default vertex shader ("default") and a custom fragment shader ("toneMapping"). Sets the attributes and uniform variables required by the shader, including position, normal, texture coordinates (uv), world matrix, view matrix, projection matrix, texture sampler (textureSampler), exposure (exposure), and contrast (contrast).

[0077] ```javascript BABYLON.Effect.ShadersStore["toneMappingFragmentShader"] = ` precision highp float; varying vec2 vUV; uniform sampler2D textureSampler; uniform float exposure; uniform float contrast; vec3 ToneMapping(vec3 color) { color = color * exposure; color = color / (color + vec3(1.0)); color = pow(color, vec3(1.0 / 2.2)); / / Gamma correction return color; } void main(void) { vec3 color = texture2D(textureSampler, vUV).rgb; color = ToneMapping(color); gl_FragColor = vec4(color * contrast, 1.0); } `; var customShader = new BABYLON.ShaderMaterial("shader", scene, { vertex: "default", fragment: "toneMapping", }, { attributes: ["position", "normal", "uv"], uniforms: ["world", "view", "projection", "textureSampler", "exposure", "contrast"] }); ``` S10322, Apply Shader material, apply the custom Shader material to the model in the scene.

[0078] The implementation of tone mapping can significantly improve the visual effects of the 3D display platform, including: (a) dynamically adjusting tone mapping parameters, according to the lighting conditions of the scene, to adapt to different environments and lighting changes. (b) combining with other image processing technologies, such as post-processing effects and ambient occlusion, to further improve the overall performance.

[0079] In step S103, depth of field is performed to simulate the focal effect of the camera so that the foreground and background have layers. Depth of field (DOF) is a technology commonly used in 3D rendering to simulate the focal effect of the camera so that the foreground and background have layers. This effect can make objects out of focus appear blurred, thereby enhancing visual depth and realism. The following are technical means and specific implementation schemes for achieving depth of field effects in the present invention: (A) Basic concepts of depth of field parameters, including: Focal Distance: The distance at which the camera focuses. Objects at this distance will be clearest. Aperture: Controls the range of depth of field. The larger the aperture, the shallower the depth of field. Blur Amount: The blur level of objects outside the focus. (B) Using Babylon.js to achieve depth of field effect, including: (B01) Enable the depth of field rendering pipeline. Babylon.js provides the depth of field rendering pipeline, which can easily achieve depth of field effect.

[0080] ```javascript / / Create a depth of field rendering pipeline var dofPipeline = new BABYLON.DepthOfFieldEffect(scene, { focalLength: 50, / / focal length fStop: 1.4, / / aperture focusDistance: 2000, / / focus distance lensSize: 50 / / Lens size }, scene.cameras); / / Add the depth of field rendering pipeline to the scene's post-processing pipeline manager scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline("defaultPipeline", scene.cameras); ``` (B02) Adjust the depth of field parameters. You can dynamically adjust the depth of field effect parameters as needed to achieve different focal length effects.

[0081] ```javascript / / Dynamically adjust the focal length dofPipeline.focalLength = 75; / / Increase the focal length to make the focus farther / / Dynamically adjust the aperture dofPipeline.fStop = 2.8; / / Increase aperture and reduce depth of field / / Dynamically adjust the focus distance dofPipeline.focusDistance = 1000; / / Bring the focus closer ``` (B03) Custom Shader to achieve depth of field effect. If more precise control is required, a custom Shader can be used to achieve depth of field effect.

[0082] (B031) Write a depth of field fragment shader, fragment shader precision declaration: declare the precision of floating point numbers as high precision (highp float) to ensure sufficient accuracy during the calculation process. Texture sampling: define two two-dimensional texture samplers: textureSampler for color texture and depthSampler for depth texture. Use the vUV variable to get the texture coordinates of the current fragment. Uniform variables: focusDistance: represents the focal distance, that is, the distance where the clear focus is in the scene. focalLength: represents the focal length of the camera, which affects the range of the depth of field. fStop: represents the aperture size, controls the amount of light entering the lens, and affects the degree of blur of the depth of field. lensSize: represents the size of the camera lens, which affects the degree of blur diffusion. Get the depth value: getDepth function gets the depth value of the current texture coordinate from the depth texture. Calculate the circle of confusion (CoC): The size of the circle of confusion is calculated, which is based on the difference between the depth of the current fragment and the focal distance, focal length, aperture size and lens size. Use the clamp function to limit the size of the circle of confusion to between 0 and 1. Blur processing: A blurColor variable is initialized to store the blurred color. Through nested loops, the texture around the current fragment is sampled to calculate the blur effect. The sampling offset is calculated based on the blur circle size and the loop index. Blur color average: Divide the blur color by the total number of sampling points to get the average blur color. Color mixing: Use the mix function to mix the original color and the blur color according to the size of the blur circle. The mixing ratio is determined by the size of the blur circle. The larger the blur circle, the more blur color is mixed. Output the final color: Assign the mixed color to the fragment's color output gl_FragColor.

[0083] ```glsl / / Depth of Field Fragment Shader precision highp float; varying vec2 vUV; uniform sampler2D textureSampler; uniform sampler2D depthSampler; uniform float focusDistance; uniform float focalLength; uniform float fStop; uniform float lensSize; float getDepth(vec2 uv) { return texture2D(depthSampler, uv).r; } void main(void) { vec3 color = texture2D(textureSampler, vUV).rgb; float depth = getDepth(vUV); float coc = abs((depth - focusDistance) / focalLength) * fStop *lensSize; coc = clamp(coc, 0.0, 1.0); vec3 blurColor = vec3(0.0); int samples = 10; for (int i = -samples; i<= samples; i++) { for (int j = -samples; j<= samples; j++) { vec2 offset = vec2(float(i), float(j)) * 0.002 * coc; blurColor += texture2D(textureSampler, vUV + offset).rgb; } } blurColor / = float((samples * 2 + 1) * (samples * 2 + 1)); gl_FragColor = vec4(mix(color, blurColor, coc), 1.0); } ``` (B032) Apply custom Shader material and apply the custom depth of field Shader material to the scene.

[0084] ```javascript / / Load Shader material BABYLON.Effect.ShadersStore["depthOfFieldFragmentShader"] =shaderCode; var dofMaterial = new BABYLON.ShaderMaterial("dofMaterial", scene, { vertex: "default", fragment: "depthOfField" }, { attributes: ["position", "normal", "uv"], uniforms: ["world", "view", "projection", "textureSampler", "depthSampler", "focusDistance", "focalLength", "fStop", "lensSize"] }); dofMaterial.setTexture("textureSampler", new BABYLON.Texture("texturePath", scene)); dofMaterial.setTexture("depthSampler", newBABYLON.RenderTargetTexture("depthTexture", { width: 1024, height: 1024},scene, true, true, BABYLON.Engine.TEXTURETYPE_UNSIGNED_INT)); / / Set the depth of field parameters dofMaterial.setFloat("focusDistance", 2000); dofMaterial.setFloat("focalLength", 50); dofMaterial.setFloat("fStop", 1.4); dofMaterial.setFloat("lensSize", 50); / / Apply the material to the model in the scene var mesh = scene.getMeshByName("model"); mesh.material = dofMaterial; ``` (C) Dynamically adjust the depth of field effect, including: dynamically adjust the focus and aperture based on the camera position and target, S104, optimize the model and texture to ensure that the number of polygons and texture resolution of the model are moderate, and avoid performance problems caused by excessive complexity. Ensure that the number of polygons and texture resolution of the model are moderate, and avoid performance problems caused by excessive complexity, while ensuring the quality of the display effect. The specific steps are: Step 1. Simplify the model: Reduce the number of polygons. Use 3D modeling software (such as Blender, Maya) to simplify the model, delete unnecessary polygons, and keep the basic shape and details of the model.

[0085] ```javascript / / Example code: Load the simplified model BABYLON.SceneLoader.ImportMesh("", "path_to_simplified_model / ", "model_file.babylon", scene, function (newMeshes) { var model = newMeshes[0]; / / Make necessary material and lighting settings }); ``` Step 2: Adjust the texture resolution and optimize the texture size. Adjust the texture resolution according to display requirements to ensure that you avoid using textures with too large a resolution while maintaining the visual effect.

[0086] ```javascript / / Example code: Apply optimized texture var texture = new BABYLON.Texture("path_to_optimized_texture.jpg",scene); model.material.albedoTexture = texture; ``` Step 3: Use texture compression. Texture compression technology uses texture compression formats (such as DDS, KTX) to reduce texture file size and improve loading speed and rendering performance.

[0087] ```javascript / / Example code: Loading a compressed texture var compressedTexture = new BABYLON.Texture("path_to_compressed_texture.ktx", scene); model.material.albedoTexture = compressedTexture; ``` Step 4. Apply LOD (Level of Detail) to create models with different levels of detail: Create multiple versions of each complex model, including high, medium and low levels of detail, for different camera distances.

[0088] ```javascript / / Example code: Apply LOD var highDetail = new BABYLON.Mesh("highDetail", scene); var midDetail = new BABYLON.Mesh("midDetail", scene); var lowDetail = new BABYLON.Mesh("lowDetail", scene); highDetail.addLODLevel(50, midDetail); highDetail.addLODLevel(200, lowDetail); ``` Step 5. Set up texture mapping reasonably and optimize UV ​​mapping to ensure that the UV mapping of the model is seamless and avoid texture distortion or stretching.

[0089] ```javascript / / Example code: UV mapping setup var uvTexture = new BABYLON.Texture("path_to_uv_mapped_texture.jpg",scene); model.material.diffuseTexture = uvTexture; ``` **Sample Code**: ```javascript / / Create a scene var scene = new BABYLON.Scene(engine); / / Load the simplified model BABYLON.SceneLoader.ImportMesh("", "path_to_simplified_model / ", "model_file.babylon", scene, function (newMeshes) { var model = newMeshes[0]; / / Apply the optimized texture var texture = new BABYLON.Texture("path_to_optimized_texture.jpg",scene); model.material = new BABYLON.StandardMaterial("material", scene); model.material.diffuseTexture = texture; / / Apply LOD var highDetail = model.clone("highDetail"); var midDetail = model.clone("midDetail"); var lowDetail = model.clone("lowDetail"); highDetail.addLODLevel(50, midDetail); highDetail.addLODLevel(200, lowDetail); / / Set the texture after UV mapping optimization var uvTexture = new BABYLON.Texture("path_to_uv_mapped_texture.jpg",scene); model.material.diffuseTexture = uvTexture; }); / / Rendering loop engine.runRenderLoop(function () { scene.render(); }); ``` In another exemplary embodiment, in step S104, after optimizing the preset lighting and materials, it is also necessary to: optimize the model and texture: make the number of polygons and texture resolution of the model moderate; wherein, optimizing the number of polygons and resolution of the model and texture is an important step to improve the performance and visual quality of the 3D scene. Moderate control and adjustment need to take into account the complexity of the model, the size of the texture, and the performance of the target device. The following is a specific method of the present invention to achieve moderate control and adjustment: S1041, optimize the number of polygons of the model, including: S10411, Use simplification tools, including simplification algorithms: Use tools such as DecimateModifier in Blender or other professional 3D modeling software to automatically reduce the number of polygons of the model while trying to maintain the shape and details of the model. Manual optimization: Manual remodeling or merging duplicate vertices and faces can effectively reduce the number of polygons, but caution is required to avoid losing important details of the model.

[0090] S10412, LOD (level of detail) optimization, including LOD algorithm: implement LOD technology, that is, dynamically load and switch model versions with different detail levels according to the distance between the observer and the model, which can significantly reduce the number of polygons of distant models and improve rendering efficiency. Distance judgment: by calculating the distance between the camera and the model, decide which level of detail model to load. Usually, models in the distance can use a lower polygon version.

[0091] S1042, Optimize texture resolution, including: S10421, Texture size adaptation, including resolution selection: Select the appropriate texture resolution according to the size of the model and the display size. Large models and close-up scenes require high-resolution textures, while small models and distant scenes can use lower-resolution textures. Compression technology: Use texture compression formats supported by modern graphics software (such as DDS, PNG, JPEG, etc.) to reduce the size of texture files while maintaining visual quality.

[0092] S10422, MIP mapping, where MIP mapping: Generates a MIP map of the texture, which can automatically switch the resolution of the texture according to the distance, using a lower resolution MIP map at a distance to further improve rendering efficiency and performance. Manual creation: Use image editing software to manually create a MIP map to ensure that each level of texture can be correctly mapped to the corresponding distance.

[0093] S1043, a method for achieving moderate control and regulation, comprising: Dynamic adjustment: Dynamically adjust the number of polygons of the model and the resolution of the texture according to the performance of the target device and the needs of the scene. LOD and texture resolution can be dynamically adjusted according to real-time performance indicators (such as frame rate). Testing and optimization: During the development process, through testing and optimization, multiple renderings and adjustments are performed according to actual conditions to find the best model and texture settings. Use performance monitoring tools: Use performance monitoring tools (such as the performance monitoring plug-in of Babylon.js or the developer tools of the Chrome browser) to monitor the performance of the scene in real time in order to adjust the optimization strategy. For complex models, use LOD technology to switch models with different levels of detail according to the camera distance; real-time shadows: make reasonable use of light shadows.

[0094] In another exemplary embodiment, step S104 further includes: simplifying the model, optimizing the model using 3D modeling software, deleting redundant polygons, maintaining the main details of the model, and reducing the amount of rendering calculations. Adjusting the texture resolution, selecting the appropriate texture resolution, and avoiding the use of textures with too high a resolution according to specific display requirements, both ensuring visual effects and improving performance. Using texture compression, reducing the size of texture files through texture compression formats (such as DDS, KTX), improving loading and rendering efficiency, especially for large scenes or multi-model displays. Applying LOD, creating versions of different levels of detail for complex models, and automatically switching according to the camera distance, both ensuring close-up details and improving long-range performance. Reasonably setting texture mapping, optimizing the UV mapping of the model, ensuring seamless texture application, avoiding distortion or stretching, and making the display effect more realistic and natural. Through the above optimization steps, it is ensured that the model and texture can provide high-quality visual effects on the 3D display platform, and effectively improve rendering performance, meeting the user's interaction and viewing needs. Using LOD (Level of Detail): For complex models, LOD technology can be used to switch models of different levels of detail according to the camera distance.

[0095] Step 1: Create models with different levels of detail, high, medium and low levels of detail: Create multiple versions of each complex model, including high, medium and low levels of detail, for different camera distances. Simplify details: In low-level detail models, remove small details and insignificant parts to reduce the number of polygons.

[0096] Step 2: Set LOD switching conditions, distance threshold: In the 3D engine, set different thresholds according to the distance between the camera and the model. When the camera is close to the model, it displays a high level of detail; when the distance is medium, it displays a medium level of detail; when the distance is far, it displays a low level of detail. Automatic switching: Use the LOD function of the BabylonJS 3D engine to automatically switch the model's level of detail according to preset conditions to improve performance. Real-time shadows ensure that the use of light shadows is reasonable, which can improve the effect without affecting performance.

[0097] Step A: Set the lighting and shadow parameters and choose the appropriate lighting type: select point light, spotlight or parallel light according to the scene requirements to ensure a balance between lighting effect and performance. Adjust shadow quality: In the 3D engine, set the resolution and quality of the shadow to avoid performance degradation caused by too high shadow resolution.

[0098] Step B: Optimize shadow rendering and use shadow maps: In the 3D engine, use shadow map technology to generate shadows for objects in the scene to reduce the amount of real-time calculations. Limit shadow casters: Set only important objects to cast shadows to reduce the amount of calculations; for unimportant or distant objects, you can disable shadow casting.

[0099] S2, enhances user interaction, and completes rotation, dragging, zooming in and out interactions on the web side; Provide a more intuitive and smooth user experience. Specifically include: (1) Use ArcRotateCamera to implement rotation and scaling functions; ArcRotateCamera is a camera type provided by BabylonJS, which can easily implement rotation and zoom functions.

[0100] javascript code: var camera = new BABYLON.ArcRotateCamera("camera",BABYLON.Tools.ToRadians(45), BABYLON.Tools.ToRadians(45), 10, newBABYLON.Vector3(0, 0, 0), scene); camera.attachControl(canvas, true); camera.wheelPrecision = 50; / / Adjust zoom speed camera.pinchPrecision = 50; / / Adjust touch zoom speed camera.lowerRadiusLimit = 2; / / Set the minimum zoom distance camera.upperRadiusLimit = 50; / / Set the maximum zoom distance Use PointerDragBehavior to implement drag functionality PointerDragBehavior allows the model to implement drag functionality.

[0101] javascript code: / / Assuming the model variable is named `yourModel` yourModel.actionManager = newBABYLON.ActionManager(scene); var pointerDragBehavior = newBABYLON.PointerDragBehavior(); pointerDragBehavior.useObjectOrientationForDragging = false; yourModel.addBehavior(pointerDragBehavior); / / Add to all meshes in the scene, you can iterate over the meshes in the scene and add drag behaviors scene.meshes.forEach(function(mesh) { if (mesh.name === "yourModelName") { mesh.addBehavior(pointerDragBehavior);}}); (2) Additional functions; Realize the independent rotation of the model by listening to mouse events.

[0102] Javascript code: var isDragging = false; var startingPoint; var currentMesh; vargetGroundPosition = function () { var pickinfo = scene.pick(scene.pointerX,scene.pointerY, function (mesh) { return mesh === currentMesh;}); if(pickinfo.hit) { return pickinfo.pickedPoint;} return null;};canvas.addEventListener("pointerdown", function (evt) { if (evt.button !== 0){ return;} var pickInfo = scene.pick(scene.pointerX, scene.pointerY,function (mesh) { return mesh === yourModel;}); if (pickInfo.hit) {currentMesh = pickInfo.pickedMesh; startingPoint = getGroundPosition(); if(startingPoint) { setTimeout(function () { isDragging = true;}, 0);}}});canvas.addEventListener("pointerup", function () { isDragging = false;startingPoint = null; return;}); canvas.addEventListener("pointermove",function (evt) { if (!isDragging) { return;} var current = getGroundPosition(); if (!current) { return;} var diff = current.subtract(startingPoint);currentMesh.position.addInPlace(diff); startingPoint = current;}); In another exemplary embodiment, in step S2, the user interaction includes: S201, create basic scenes and cameras. Create a scene in JavaScript and add an ArcRotateCamera as a camera to enable users to rotate and zoom the viewing angle. Get the rendering canvas: Get the renderCanvas element on the page through the document.getElementById method, which will be used to render the 3D scene. Create an engine instance: Use new BABYLON.Engine(canvas, true) to create a new BABYLON engine instance and pass the obtained canvas as a parameter, while setting anti-aliasing to true. Define the scene creation function: The createScene function is used to create and configure a 3D scene. Create a scene: Inside the createScene function, use newBABYLON.Scene(engine) to create a new scene instance and pass the engine as a parameter. Create an arc-rotating camera: Create a BABYLON.ArcRotateCamera object named "Camera" and set its initial angle and distance, as well as the target point (center of the scene). Camera control: Use camera.attachControl(canvas,true) to associate the camera with the canvas and enable default camera controls, allowing the user to interactively operate the camera with the mouse and keyboard. Create a hemispherical light source: Add a BABYLON.HemisphericLight light source, name it "light1", and set its direction and scene. Create a ground mesh: Use the BABYLON.MeshBuilder.CreateGround method to create a simple flat ground mesh, set its width and height, and add it to the scene. Rendering loop: Start a rendering loop through the engine.runRenderLoop method, which calls the scene.render() method to render the scene in each iteration.

[0103] ```javascript var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); var createScene = function () { / / Create a scene var scene = new BABYLON.Scene(engine); / / Create ArcRotateCamera var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 10, newBABYLON.Vector3(0, 0, 0), scene); / / Set the rotation and zoom parameters of the camera camera.attachControl(canvas, true); / / Create a light source var light = new BABYLON.HemisphericLight("light1", newBABYLON.Vector3(0, 1, 0), scene); / / Add a simple mesh as the ground var ground = BABYLON.MeshBuilder.CreateGround("ground", { width: 10,height: 10}, scene); return scene; }; var scene = createScene(); / / Rendering loop engine.runRenderLoop(function () { scene.render(); }); ``` S202, add an interactive 3D model. Add an interactive 3D model to the scene, such as a cube, and set the basic material and position of the 3D model: ```javascript / / Add a cube as an interactive object var box = BABYLON.MeshBuilder.CreateBox("box", { size: 2}, scene); / / Set the cube's material var material = new BABYLON.StandardMaterial("material", scene); material.diffuseColor = new BABYLON.Color3(1, 0.5, 0.5); box.material = material; / / Set the position of the cube box.position = new BABYLON.Vector3(0, 1, 0); ``` S203, monitoring mouse events to implement interactive functions. In order to allow the user to interactively operate the model through the mouse, the mouse events may be monitored to implement the rotation function of the model; ```javascript / / Listen for mouse events canvas.addEventListener("pointerdown", function (evt) { / / Check if the mouse click position is on the model var pickResult = scene.pick(scene.pointerX, scene.pointerY); if (pickResult.hit&&pickResult.pickedMesh === box) { var selectedMesh = pickResult.pickedMesh; / / Start listening for mouse movement events canvas.addEventListener("pointermove", function (evt) { / / Calculate the distance the mouse moves var currentPick = scene.pick(scene.pointerX, scene.pointerY); if (currentPick.hit&¤tPick.pickedMesh === selectedMesh) { / / Adjust the model's rotation angle according to the distance the mouse moves selectedMesh.rotation.y += (scene.pointerX - evt.clientX) / 100; selectedMesh.rotation.x += (scene.pointerY - evt.clientY) / 100; } }); } }); / / Remove event listener when mouse is released canvas.addEventListener("pointerup", function () { canvas.removeEventListener("pointermove"); }); ``` In another exemplary embodiment, in step S2, completing the rotation dragging and zooming interaction on the web side includes: S201, using the BabylonJS engine: ArcRotateCamera: Use the ArcRotateCamera class in BabylonJS to implement rotation and zoom functions. This camera type allows users to rotate, pan, and zoom interactions via the mouse or touch.

[0104] S202, monitor mouse events: rotate and scale the model by monitoring mouse events. JavaScript can be used to monitor mouse drag and wheel events, and perform corresponding operations on the model.

[0105] Event listener registration: Four event listeners are registered for the canvas element canvas, corresponding to the following user interaction actions: pointerdown: triggered when a pointer device (such as a mouse or a finger on a touch screen) is pressed. pointerup: triggered when a pointer device is released. pointermove: triggered when a pointer device moves on the canvas. wheel: triggered when a user uses a mouse wheel or a touchpad to scroll. Event handler definition: Four event handlers are defined, which will be called when the corresponding events occur: onPointerDown: used to handle pointer press events, usually recording the position or state when the event occurs for subsequent processing. onPointerMove: used to handle pointer move events, and adjust the model rotation in the 3D scene according to the movement of the pointer. onPointerUp: used to handle pointer release events, usually used to end an interactive operation, such as model rotation. onWheel: used to handle wheel events, and adjust the model scaling in the 3D scene according to the movement of the wheel. Interactive model control: These event handlers together implement the interaction between the user and the 3D scene, allowing the user to control the rotation and scaling of the model through a pointer device. Use of event object event: Each event handling function receives an event object as a parameter, which contains relevant information about the event, such as event type, occurrence location, etc. This information can be used to determine how to adjust the model.

[0106] ```javascript canvas.addEventListener("pointerdown", onPointerDown, false); canvas.addEventListener("pointerup", onPointerUp, false); canvas.addEventListener("pointermove", onPointerMove, false); canvas.addEventListener("wheel", onWheel, false); function onPointerDown(event) { / / Record the mouse click position } function onPointerMove(event) { / / Adjust model rotation according to mouse movement } function onPointerUp(event) { / / End the rotation operation } function onWheel(event) { / / Adjust model scaling based on scroll wheel events } ``` S203, optimize rendering performance: Use LOD (Level of Detail) technology to switch models with different levels of detail according to the camera distance to improve rendering performance. 1. LOD model preparation: Create models with different levels of detail: Create multiple versions of the model for each object, each with a different number of polygons and degree of detail. Usually, these models are divided into several levels, from high detail (near view) to low detail (far view). 2. LOD distance determination: Define the switching distance between LOD levels: Set a distance threshold for each LOD level, and when the distance between the camera and the object is within this range, the model of the corresponding level will be used. 3. Dynamic switching algorithm: Smooth transition: In order to avoid abrupt switching at the threshold, an interpolation algorithm can be used to achieve smooth transition. 4. Improved LOD switching algorithm: Frustum culling: Before switching LOD, check whether the object is within the camera's frustum. If not, the level of detail can be further reduced or completely eliminated. Adaptive LOD based on frame rate: Dynamically adjust the LOD level according to the current frame rate, and increase the LOD level when the frame rate drops to improve performance. 5.LOD switching formula: Distance-based LOD weight formula: float calculateLODWeight(float distance, float threshold) { return saturate((distance - threshold) / (LOD_maxDistance -threshold)); } The saturate function limits the output value between 0 and 1 and is used to calculate the weight between the current distance and the LOD level.

[0107] 6. Implementation details: Cache management: When switching LOD models, you need to manage the loading and unloading of models to avoid memory waste. Occlusion culling: If an object is occluded by other objects, its LOD level can be immediately reduced or culled. Multi-threaded loading: To improve performance, you can preload the LOD model that will be needed in the background thread. Real-time shadow and reflection settings to ensure the realism of lighting effects.

[0108] S204, Optimize materials and lighting: Use PBR (Physically Based Rendering) materials to make the lighting effect on the model surface more realistic. 1. Material preparation: Collect basic textures: Prepare base color textures (diffuse maps), metalness / roughness textures, normal maps, specular maps, etc. These textures will be used to define the appearance of the material. Create material parameters: Set parameters in the material system, such as metallic, roughness, reflectance, refractive index (IOR), etc. 2. Material definition: Use PBR shader: Select or write a shader that supports PBR. Most modern game engines (such as Unity, Unreal Engine) provide built-in PBR shaders. Set material properties: Set material properties in the shader, such as: baseColor: the base color of the material. metallic: the metalness of the material, which controls the intensity of the surface reflection. roughness: the roughness of the material, which affects the blurriness of the reflection. normalMap: normal map, used to increase surface details. aoMap: Ambient occlusion map, used to simulate the occlusion effect between objects. 3. Lighting model: Select a lighting model: PBR usually uses a physically based BRDF (bidirectional reflectance distribution function), such as GGX or Blinn-Phong. Implement lighting calculations: Implement a physically based lighting model in the shader, including: Direct lighting: Calculate the lighting directly from the light source. Indirect lighting: Calculate the effects of ambient light, scattered light, and reflected light. Shadow calculation: Calculate shadows based on the relative position of the light source and the object. 4. Environment and light maps: Use environment maps: Use HDR environment maps to simulate the effects of the surrounding environment on the surface of objects. Apply light probes: Use light probes or reflection probes to capture lighting information in the scene and provide dynamic indirect lighting for objects. 5. Post-processing: Apply post-processing effects: Use post-processing techniques such as Bloom, Tone Mapping, color correction, etc. to enhance visual effects. 6. Adjustment and optimization: Adjust material parameters: Adjust parameters such as metalness and roughness according to actual effects to achieve the desired visual effect. Optimize performance: Optimize performance by merging textures, simplifying shaders, using LOD technology, etc. 7. Test and iteration: Test under different lighting conditions: Make sure the material looks natural under different lighting and environments. Iterative improvement: Adjust material and lighting parameters according to test results until satisfactory results are achieved. Preset lighting, including ambient light, directional light, and local light sources, to simulate real lighting scenes.

[0109] S205, Tone Mapping and Depth of Field Effect: Adjust the color performance of the entire scene through tone mapping to improve the visual effect.

[0110] 1. HDR image preparation: Capture HDR images: Make sure the renderer outputs scene images in HDR format, which usually involves using floating point render buffers.

[0111] 2. Tone mapping algorithm selection: Select a tone mapping algorithm: Select an appropriate tone mapping algorithm according to the required effect, such as Reinhard, Filmic, ACES, etc.

[0112] 3. Tone mapping implementation steps: a. Basic tone mapping; Calculate Luminance: Calculate the brightness (Luminance) of each pixel, which is usually achieved by taking the weighted average of the RGB values. Apply tone mapping function: Convert the brightness value of the HDR image to the brightness value of the LDR image through the tone mapping function. b. Improved tone mapping algorithm: Reinhard tone mapping: Copy code LDR = HDR / (1 + HDR); where HDR is the original high dynamic range brightness value and LDR is the mapped low dynamic range brightness value. Filmic tone mapping: Copy code LDR = (HDR * (a * HDR+ b)) / (HDR * (c * HDR + d) + e); where a, b, c, d, and e are parameters used to simulate the response of movie films. ACES tone mapping: ACES (Academy Color Encoding System) is a complex tone mapping and color correction system that includes multiple steps and conversion functions.

[0113] 4. Tone Mapping Post-Processing: Apply Tone Curve: Fine-tune the mapped LDR image using the tone curve to enhance contrast or adjust brightness and saturation. Color Correction: Apply color correction to the LDR image to ensure color consistency and aesthetics.

[0114] 5. Optimization and improvement: Adaptive tone mapping: Dynamically adjust tone mapping parameters according to the brightness and contrast of the scene to achieve better visual effects. Local tone mapping: Apply different tone mapping intensities to different parts of the scene to maintain high brightness and dark details.

[0115] 6. Implementation details: Using shaders: Implement tone mapping algorithms using shaders on the GPU to improve performance. HDR rendering pipeline: Ensure that the entire rendering pipeline supports HDR, including texture sampling, blending, and output.

[0116] 7. Test and adjust: Test in different scenes: Test the tone mapping effect under different lighting and scene conditions to ensure the consistency of visual effects. User parameter adjustment: Provide a user interface to allow artists and designers to adjust the tone mapping parameters to achieve the desired visual effect. Use depth of field technology to simulate the focal length effect of the camera to make the foreground and background have a sense of hierarchy. Technical features: Focal plane: The planes in the scene that are equal to the camera focus are clear, while objects far from the focal plane are blurred. Aperture size: The larger the aperture, the shallower the depth of field, that is, the smaller the clear area; the smaller the aperture, the deeper the depth of field and the larger the clear area. Focal length: The longer the focal length, the narrower the angle of view and the shallower the depth of field; the shorter the focal length, the wider the angle of view and the deeper the depth of field. Sensor size: The sensor size affects the angle of view of the focal length. At the same focal length, the larger the sensor, the narrower the angle of view.

[0117] Simulation steps: 1. Focus Setting: Determine the focus: Based on the scene requirements, set the camera's focus position, which is usually user-specified or automatically determined based on points of interest in the scene.

[0118] 2. Depth of field calculation: Calculate aperture: Calculate the depth of field range based on the aperture size and focal length. Determine the focal plane: Determine the focal plane based on the focus position and focal length.

[0119] 3. Improved algorithm: Bokeh effect: simulates the spherical aberration of the camera lens to produce a gradient circular light spot in the blurred area.

[0120] Improved blur algorithm: Layered blur: Divide the scene into multiple layers and apply different blur intensities to objects in different layers to simulate the transition between near depth of field and far depth of field. Distance blur: Calculate the blur intensity based on the distance of the object to the focal plane. The farther the distance, the more obvious the blur.

[0121] 4. Implementation technology: Depth texture: Use depth texture to store the distance from each pixel in the scene to the camera. Blur shader: Write a shader to blur the scene based on the distance information in the depth texture. Aperture shape: Simulate apertures of different shapes, such as circles, polygons, etc., to affect the shape of the blur.

[0122] 5. Performance optimization: Out-of-focus blur optimization: Use low-resolution textures for blur calculations to reduce performance overhead. Pre-calculation: For static scenes, the depth of field effect can be pre-calculated to reduce the amount of real-time calculations.

[0123] 6. Adjustment and testing: Parameter adjustment: adjust the aperture size, focal length, focal plane position and other parameters until a satisfactory visual effect is achieved. Scene testing: test the depth of field effect in different scenes and lighting conditions to ensure that it is natural and realistic.

[0124] S3, e-commerce platform link integration. When editing the model on the backend management side, add a third-party e-commerce platform link, place an order with one click, and jump to the third-party e-commerce platform to realize the see-and-buy shopping method.

[0125] For example, to achieve e-commerce platform link integration, users can add third-party e-commerce platform links when editing models in the backend management terminal, and jump to the third-party e-commerce platform through one-click ordering, realizing the see-now-buy-now shopping method, through the following technical means: S301, backend management system design, including: S3011, user interface design, in the model editing interface of the backend management system, an input box is provided for users to add product links of third-party e-commerce platforms. The interface supports multiple formats of e-commerce platform links, such as Taobao, JD.com, Amazon, etc.

[0126] S3012, database design, add a field to each model record in the database to store the product link of the third-party e-commerce platform.

[0127] S302, front-end page design, including: S3021, display product links. When displaying the model on the front-end page, display the product links of the third-party e-commerce platform added by the user in the background. Provide a "one-click order" button. When the user clicks the button, it triggers the jump to the corresponding product page of the third-party e-commerce platform.

[0128] S3022, implement one-click jump, use JavaScript to implement the jump function; when the user clicks the "one-click order" button, call the `oneClickBuy` function and pass in the product link, and the product page of the third-party e-commerce platform can be opened in a new tab.

[0129] S303, implementation of backend management functions, including: link input and saving. On the backend management side, a module is developed to allow administrators to input product links of third-party e-commerce platforms when editing models, and save the links in the database.

[0130] S304, backend service implementation, including: interface development, developing an API interface for receiving and saving product links.

[0131] S305, Security and Optimization, includes: S3051, Security, verify the input link to ensure that it is in the correct format and points to a legitimate e-commerce platform to prevent malicious links. Use the HTTPS protocol to ensure the security of data transmission. 1. Stronger encryption algorithm: Use the latest encryption protocol: Regularly update to the latest TLS version (such as TLS 1.3), which provides stronger encryption algorithms and a more secure handshake process. Advanced encryption standards: Use advanced encryption standards (such as AES-GCM), which provide strong encryption and integrity protection. 2. Integrity verification: Certificate transparency: Implement the Certificate Transparency mechanism to ensure that the issuance of SSL certificates is recorded and monitored to prevent the use of malicious certificates. OCSP stapling: Online Certificate Status Protocol (OCSP) stapling can reduce inquiries about certificate revocation status, improve security and reduce latency. 3. Key management: Key rotation: Rotate keys regularly to reduce the risk of key leakage. Use hardware security modules (HSM): Use hardware security modules when storing and managing keys to provide physical security protection. 4. Security configuration: Enable Perfect ForwardSecrecy (PFS): PFS ensures that even if the server private key is cracked, past sessions cannot be decrypted. Disable insecure protocols and ciphers: Disable old TLS versions and insecure encryption algorithms to prevent downgrade attacks. 5. Network security: HTTP / 2: Use the HTTP / 2 protocol, which supports multiplexing, reduces the number of established connections, and improves efficiency. QUIC protocol: Experimentally use the QUIC protocol, which provides faster connection establishment and better congestion control. 6. Authentication and authorization: Two-way authentication: In addition to server authentication, the client can also be authenticated to ensure that the identities of both parties are credible. Access control: Combine protocols such as OAuth and OpenID Connect to perform fine-grained control of user access. 7. Monitoring and response: Intrusion detection system (IDS): Deploy IDS to monitor abnormal network traffic and potential attack behaviors. Security information and event management (SIEM): Use the SIEM system to collect, analyze, and report security-related data. 8. Security audit: Regular audit: Perform security audits regularly to check the validity of SSL / TLS configuration and certificates. Automated auditing tools: Use automated tools, such as SSL Server Test from SSL Labs, to assess the security of your HTTPS configuration.

[0132] Through the above technical improvements, the ability of HTTPS protocol in ensuring the security of data transmission can be significantly enhanced.

[0133] S3052, performance optimization, optimize database query and storage operations to ensure fast loading speed of backend management and front-end pages and smooth user experience.

[0134] As another example, when editing a model on the backend management side, a link to a third-party e-commerce platform (such as JD.com and Taobao) is added, and the user can click the shopping cart button on the frontend model to jump to the third-party e-commerce platform.

[0135] Specific technical improvements for model editing on the backend management side: 1) Optimized model editing interface, user-friendly interface: An intuitive user interface is designed so that managers can easily edit and manage 3D models and their related properties. Visual editing tools provide visual tools such as dragging, rotating, and scaling to facilitate managers to adjust the model position and viewing angle.

[0136] 2) Link integration function, link input box, add e-commerce platform link input box in the model attribute editing interface, allowing managers to add one or more e-commerce platform purchase links for each model. Link verification, add link verification function to ensure that the input link is valid and correct.

[0137] 3) Links are associated with models, and data model extension: the data model is extended to add fields for storing e-commerce platform link information. Each model object contains its corresponding e-commerce platform link list.

[0138] ```javascript / / Example data model const modelData = { id: "model1", name: "3D Model", description: "A sample 3D model", links: [ { platform: "JD", url: "https: / / www.jd.com / product / 12345.html" }, { platform: "Taobao", url: "https: / / www.taobao.com / product / 67890.html" } ] }; ``` 4) Front - end button interaction, shopping cart button: Add a shopping cart button next to each model on the front - end display page. After the user clicks the button, they can see a list of available e - commerce platform links.

[0139] Jump function: After clicking the link, the front - end page will open the corresponding e - commerce platform purchase page to achieve a shopping experience of "seeing and buying immediately".

[0140] ```javascript / / Example code: Front - end shopping cart button interaction document.getElementById("cartButton").addEventListener("click",function() { const links = modelData.links; links.forEach(link =>{ const anchor = document.createElement("a"); anchor.href = link.url; anchor.textContent = `Buy on ${link.platform}`; anchor.target = "_blank"; document.body.appendChild(anchor); }); }); ``` 5) Back - end management implementation, model editing page: Provide a model list. Click on a model to enter the editing page, which includes the basic information of the model and an input box for e - commerce platform links.

[0141] ```html <!-- Example HTML: Model editing page --> <form id="modelForm"> <label for="modelName"> Model Name:< / label> <input type="text" id="modelName" name="modelName" value="3D Model"> <label for="jdLink"> JD Link:< / label> <input type="text" id="jdLink" name="jdLink" value="https: / / www.jd.com / product / 12345.html"> <label for="taobaoLink"> Taobao Link:< / label> <input type="text" id="taobaoLink" name="taobaoLink" value="https: / / www.taobao.com / product / 67890.html"> <button type="button" id="saveButton"> Save< / button> < / form> ``` - **Save function**: After clicking the save button, the entered e - commerce platform link will be saved to the database to update the data of the corresponding model.

[0142] ```javascript / / Example code: Save function document.getElementById("saveButton").addEventListener("click",function() { const modelName = document.getElementById("modelName").value; const jdLink = document.getElementById("jdLink").value; const taobaoLink = document.getElementById("taobaoLink").value; / / Update model data modelData.name = modelName; modelData.links = { platform: "JD", url: jdLink}, { platform: "Taobao", url: taobaoLink} ; / / Save to database (example: assume using the fetch API) fetch(" / api / updateModel", { method: "POST", headers: { "Content-Type": "application / json"}, body: JSON.stringify(modelData) .then(response =>response.json()) .then(data =>console.log("Model updated successfully", data)) .catch(error =>console.error("Error updating model:", error)); }); ``` Through the above technical improvements, the backend management end can easily add links to third-party e-commerce platforms when editing models. Front-end users can jump to the e-commerce platform by clicking the shopping cart button, which greatly improves the user's shopping experience and enhances the commercial value of the platform.

[0143] Embodiment 2, as Figure 2 As shown, an embodiment of the present invention provides an object model display system applied to a 3D display platform, the system comprising: Optimize preset lighting and materials module 1, used to optimize preset lighting and materials in the BabylonJS engine; Enhanced user interaction module 2, used to complete rotation, dragging, zooming in and out interactions on the web side; The e-commerce platform link integration module 3 is used to add a third-party e-commerce platform link when editing the model on the backend management side, place an order with one click, jump to the third-party e-commerce platform, and implement a see-now-buy-now shopping method.

[0144] In order to better describe the effect of the present invention, the present invention uses comparative images, curves, bar graphs and experimental data for analysis and description. The following is a comparative analysis: Graphics clarity comparison, such as Figure 3 As shown in the figure, by comparing the model rendering images before and after optimization, it can be clearly seen that the optimized image is clearer and more realistic in detail expression and lighting effects.

[0145] Operational convenience comparison: The response time curve of user interaction operations can intuitively show the difference in operation fluency before and after optimization.

[0146] Table 1 Operational convenience comparison table Comparison of computing efficiency,Through the comparison of rendering time, we can show the improvement of model rendering efficiency,before and after optimization.

[0147] Table 2 Comparison of operation efficiency Fidelity comparison, by comparing the user ratings of the model before and after optimization, the effect of improving the fidelity after optimization can be demonstrated.

[0148] Table 3 Fidelity comparison table Experimental data analysis, through user experimental data, can further demonstrate the effect of optimization.

[0149] Table 4 Experimental data analysis table To sum up, the technical means of this application significantly improves the problems in the existing technology by optimizing graphic clarity, improving operational convenience, and improving computing efficiency and realism, bringing better user experience and higher e-commerce platform conversion rate.

[0150] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered within the protection scope of the present invention.

Claims

1. A method for displaying an object model on a 3D display platform, It is characterized in that The method includes: S1, optimizes the lighting and material presets in the BabylonJS engine; S2, enhances user interaction, and completes rotation, dragging, zooming in and out interactions on the web side; S3, e-commerce platform link integration. When editing the model on the backend management side, add a third-party e-commerce platform link, place an order with one click, and jump to the third-party e-commerce platform to realize the see-and-buy shopping method.

2. The object model display method applied to a 3D display platform according to claim 1, It is characterized in that In step S1, the preset lighting is optimized, including: S1011, optimize the ambient light of the overall lighting, and use ambient light to simulate sky light; S1012, directional light that optimizes the light source direction and shadow effects, using directional light to simulate sunlight; S1013, optimize the light source used to simulate local light source points, use point light sources and spotlights to simulate local light sources; S1014, comprehensive application, combines the use of multiple light sources to optimize the overall scene lighting.

3. The object model display method applied to a 3D display platform according to claim 1, It is characterized in that In step S1, the preset material is optimized, including: S1021, using PBR material to optimize the realism of the model surface, wherein the parameters of the PBR material include: metalness, roughness, reflectivity, and ambient occlusion; S1022, use reflection and refraction to optimize the realism of the material. Reflection uses the reflection map to simulate the reflection effect of the material surface; refraction uses the refraction map to simulate the refraction effect of the material; S1023, judging the realism of the picture through parameter changes, including: using light intensity to measure the impact of the light source on the scene, using shadow quality to measure the clarity and realism of the shadow, using reflection and refraction effects to measure whether the reflection and refraction of the material surface are natural, and using ambient occlusion effects to measure the realism of the shadow area.

4. The object model display method applied to a 3D display platform according to claim 1, It is characterized in that In step S1, after optimizing and presetting the lighting and materials in the BabylonJS engine, it is also necessary to: map the HDR image to a low dynamic range LDR display device using tone mapping to achieve tone mapping to enhance the visual effect of the 3D display platform; Using tone mapping to map HDR images to low dynamic range LDR display devices includes, S1031, using Babylon.js for tone mapping, specifically including: S10311, enable HDR rendering; S10312, selecting a tone mapping algorithm by setting a tone mapping type of a rendering pipeline; S10313, adjust tone mapping parameters, adjust exposure and contrast parameters of tone mapping to obtain optimal visual effects; S1032, using a third-party library or custom Shader, including: S10321, load Shader file, load custom tone mapping Shader file; S10322, apply the custom Shader material to the model in the scene; The implementation of tone mapping to significantly improve the visual effect of the 3D display platform includes: (a) Dynamically adjust tone mapping parameters, according to the lighting conditions of the scene, to adapt to different environments and lighting changes; (b) Combining post-processing effects and ambient occlusion image processing techniques to further improve the overall performance.

5. The object model display method applied to a 3D display platform according to claim 1, It is characterized in that In step S1, after optimizing the preset lighting and materials, it is also necessary to perform: depth of field, simulating the focal length effect of the camera, so that the foreground and background have layers; specifically, including: (A) Depth of field parameters, including focal length, aperture, and blur level; (B) Use Babylon.js to achieve depth of field effect, including: (B01) Enable the depth of field rendering pipeline provided by Babylon.js; (B02) Adjust the depth of field parameters. Dynamically adjust the depth of field effect parameters as needed to achieve different focal length effects. (B03) Customize Shader to achieve depth of field effect, write depth of field fragment Shader, and apply custom Shader material, and apply the custom depth of field Shader material to the scene; (C) Dynamically adjust the depth of field effect, including: dynamically adjust the focus and aperture based on the camera position and target.

6. The object model display method applied to a 3D display platform according to claim 1, It is characterized in that In step S1, after optimizing the preset lighting and materials, you also need to: Optimize models and textures to keep the polygon count and texture resolution of the models moderate; specifically: S1041, optimize the number of polygons of the model by using simplification tools, level of detail LOD optimization, and distance judgment; S1042, optimize the resolution of textures, perform texture size adaptation, compression, MIP mapping, and manual creation for optimization; S1043, implement moderate control and regulation, perform dynamic adjustment, testing and optimization, and use performance monitoring tools to monitor the performance status of the scene in real time.

7. The object model display method applied to a 3D display platform according to claim 1, It is characterized in that In step S2, enhancing user interaction includes: S201, create a basic scene and camera, create a scene in JavaScript, and add ArcRotateCamera as a camera to allow users to rotate and zoom the view; S202, adding an interactive 3D model, and setting the basic material and position of the 3D model; S203, monitoring mouse events to implement interaction and the model rotation function.

8. The object model display method applied to a 3D display platform according to claim 1, It is characterized in that In step S2, completing the rotation, dragging, zooming in and out interaction on the web side includes: S201, use the ArcRotateCamera class in the BabylonJS engine to implement rotation and scaling; S202, monitoring the drag and scroll events of the mouse through JavaScript, and performing rotation and scaling operations on the model; S203 uses LOD technology to switch models with different levels of detail according to the camera distance, optimize rendering performance, and perform real-time shadow and reflection settings; S204, uses PBR materials to make the lighting effect of the model surface realistic; and preset lights, including ambient light, directional light and local light source, to simulate real lighting scenes; S205 adjusts the color performance of the entire scene through tone mapping to optimize the visual effect; and uses depth of field technology to simulate the focal length of the camera to make the foreground and background have layers.

9. The object model display method applied to a 3D display platform according to claim 1, It is characterized in that Step S3 specifically includes: S301, backend management system design, including: S3011, user interface design, in the model editing interface of the backend management system, an input box is provided for users to add product links of third-party e-commerce platforms; S3012, database design, add a field to each model record in the database to store the product link of the third-party e-commerce platform; S302, front-end page design, including: S3021, display product links. When displaying the model on the front-end page, display the product links of the third-party e-commerce platform added by the user in the background; according to the one-click order button provided, trigger the jump to the corresponding product page of the third-party e-commerce platform; S3022, using JavaScript to implement one-click jump. When the user selects the one-click order button, the `oneClickBuy` function is called and the product link is passed in, and the product page of the third-party e-commerce platform is opened in a new tab; S303, implementation of backend management functions, including: link input and saving, through the backend management terminal, inputting the product link of the third-party e-commerce platform when editing the model, and saving the link in the database; S304, backend service implementation, including: receiving and saving product links through the developed API interface; S305, Security and Optimization, includes: S3051, verify the input link to ensure that the format is correct and points to a legitimate e-commerce platform, and use the HTTPS protocol to ensure data transmission security; S3052, optimize database query and storage operations.

10. An object model display system applied to a 3D display platform, It is characterized in that The system is implemented by the object model display method applied to a 3D display platform according to any one of claims 1 to 9, and the system includes: Optimize preset lighting and material module (1), used to optimize preset lighting and materials in the BabylonJS engine; Enhanced user interaction module (2), used to complete rotation, dragging, zooming in and out interactions on the web side; The e-commerce platform link integration module (3) is used to add a third-party e-commerce platform link when editing the model on the backend management side, place an order with one click, jump to the third-party e-commerce platform, and implement a see-now-buy-now shopping method.

Citation Information

Patent Citations

  • Network shopping system, method for selling commodities, and method for purchasing commodities

    CN106408359A

  • Information display method and device

    CN107204031A

  • Method of customizing and displaying 3D online design of products based on internet

    CN107480255A

  • A method for automatically rotate display based on WebGL virtual reality

    CN109242976A

  • WebGL-based hybrid rendering display method and system for replaceable model, and storage medium

    CN110717963A