Environment map making and material mapping method based on Cesium
Through Cesium-based environment map production and material mapping methods, and using custom Shader for dynamic mapping, the defects of Cesium platform in building environment maps are solved, and the real environment map and dynamic effect display of each building model is realized.
Patent Information
- Application Number
- CN202510519598.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-08-12
AI Technical Summary
The existing Cesium three-dimensional visualization platform has problems in the environmental map technology of building buildings that cannot add specific surrounding environmental maps to each building, lack of dynamic effects, and cannot reflect night view lighting effects or science fiction scene special effects.
Using building model production, QuixelSuite material production, HDR environment map, three-dimensional rendering technology and GPUShader development, dynamic mapping is carried out through custom Shader to achieve dynamic integration of each building model and the real environment.
The display effect of building building models is improved, and each building model has real specific three-dimensional environmental maps and light and shadow effects, and can display dynamic lighting effects and brilliant special effects in science fiction scenes in the night scene.
Smart Images

Figure CN120472071A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital image processing, and in particular to a Cesium-based environment map production and material mapping method. Background Art
[0002] With the rapid development of construction and the construction of various engineering projects in recent years, higher requirements have been placed on the design quality and accuracy of these projects. Simultaneously, the application requirements of GIS in engineering projects have evolved from the two-dimensional data processing of 2D GIS to the three-dimensional data processing of 3D GIS. Consequently, the Cesium 3D visualization platform, based on 3D GIS, has gained popularity in engineering fields such as building construction and is widely used in the design, construction, and maintenance of various buildings. The rapid development of the construction industry has led to a significant increase in the number of 3D building simulation scenes. However, Cesium's shortcomings in rendering quality, display capabilities, and existing environmental mapping technology implementations have become increasingly prominent. This makes it difficult to accurately display the design effects of buildings or the interaction between each building and its specific real-world surroundings. Compared to gaming platforms such as Unity, UE4 (Unreal Engine 4), and ThreeJS, the Cesium 3D visualization platform has shortcomings in depicting the dynamic interaction between buildings and their specific surroundings.
[0003] In actual building construction projects, Cesium's conventional environment mapping mechanism creates a KTX file and uses the Cesium.ImageBasedLighting class to apply the environment mapping effect to the building model. However, this method has the following shortcomings: 1) In digital simulation and realistic scenes, when adding environment mapping to buildings, existing environment mapping technology adds the same environment mapping to all buildings, without customizing the surrounding environment mapping for each building; 2) The environment mapping added to all buildings does not have dynamic effects, such as the inability to dynamically adjust the brightness and darkness of the environment mapping with time and weather changes; 3) In night scenes and sci-fi virtual scenes, Cesium's conventional environment mapping mechanism cannot reflect the gorgeous flowing lighting effects in night scenes, nor can it reflect the gorgeous and dynamic special effects of scientific buildings in sci-fi scenes. Therefore, new environment mapping technologies are urgently needed to address the shortcomings of existing technologies. Summary of the Invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, one purpose of the present invention is to propose a Cesium-based environment mapping and material mapping method. This method, through building model production + Quixel Suite material production + HDR environment mapping + 3D rendering technology + GPU Shader development, significantly improves the display effect and powerful environment mapping effect of building models on the Cesium 3D visualization platform, so that each building model has a real and specific 3D environment mapping and lighting effects, realizing the dynamic integration of building models with the real environment.
[0005] In order to solve the above problems, the present invention provides a method for producing an environment map and material mapping based on Cesium, which is characterized by comprising the following steps:
[0006] S1. Collect and process building CAD drawings and optimize the drawing content;
[0007] S2. Use 3D modeling software to create a building model based on the CAD drawing, perform UVW unwrap processing, and export the FBX model;
[0008] S3. Use Quixel Suite software to create physical lighting simulation texture maps for FBX models, and output AO maps, diffuse maps, specular maps, luminous maps, or normal maps;
[0009] S4. Use Blender to assign the above texture map to the FBX model mesh, adjust the parameters, and output a GLB model with physical lighting effects;
[0010] S5. Use an HDR camera to capture the distant view of the building, and output an HDR distant view map after optimization processing;
[0011] S6. Build a 3D scene in 3D modeling software and render specific near-field environment maps around each building;
[0012] S7. Load the GLB model, the building's surrounding near-field environment map, and the HDR distant-field environment map on the Cesium 3D visualization platform to build a 3D scene.
[0013] S8. Use Custom Shader to write a custom program algorithm to map the building's surrounding environment map onto the GLB model to achieve dynamic mapping and special effects production;
[0014] S9. Check and adjust the Cesium scene effects until the expected effect is achieved.
[0015] Preferably, when Quixel Suite software is used in S3 to produce physical light and shadow simulation texture maps, building details including scratches, highlights, light and shadow, and normals are drawn by combining Photoshop with Quixel Suite to improve the expression of building model details.
[0016] Preferably, when using Blender software to make a light and shadow model in S4, parameters including metalness, roughness, refractive index and transparency are adjusted according to the model material type, and finally a simulated building GLB model with physical light and shadow effects is output.
[0017] Preferably, when building a three-dimensional scene in the three-dimensional software in S6, including creating a large hemispherical dome model and giving it an HDR environment map material to simulate a real sky effect, it is necessary to set the rendering parameters and camera position to render the surrounding close-up environment of each building independently.
[0018] Preferably, when using Custom Shader for texture mapping and special effects production in S8, the environment map is mapped to the building model through GPU calculation to achieve dynamic effects composed of interaction and fusion effects including flow, flickering, and rotation between the model and the three-dimensional scene.
[0019] Preferably, the Cesium-based environment map production and material mapping method of the present invention is suitable for night scenes and science fiction virtual scenes. It can map various lighting environment maps for buildings in night scenes and map various different technological building special effects in science fiction scenes.
[0020] The advantages of the present invention compared with the prior art are:
[0021] The present invention provides a method for producing an environment map and material mapping based on Cesium, combined with a custom Shader (shader) dynamic mapping method, to first produce a building model and a light and shadow texture map to generate a GLB (a three-dimensional model file format) model. An HDR camera is used to shoot a distant environment map to obtain an HDR distant environment map. The building model, light and shadow texture map and HDR distant environment map are sorted out, and a three-dimensional scene is built in a three-dimensional modeling software (such as 3dsMax, Maya, etc.). In the built three-dimensional scene, a scene camera is used to render a near-field environment map around each building. Using the above output results GLB model, the near-field environment map around the building and the HDR distant environment map, a three-dimensional scene is built in the Cesium three-dimensional engine, and finally the building surrounding environment map is mapped to the GLB model by using CustomShader.
[0022] This invention innovatively redesigns and transforms the production process and technical methods for building modeling and environmental mapping acquisition based on the Cesium 3D visualization platform, as well as the mapping method for environmental mapping. Physical light and shadow simulation materials are used for texture materials, improving the model simulation level and light and shadow effects, and achieving a highly realistic display of building models. Regarding environmental mapping, a method is adopted for custom rendering of the near-field environmental mapping of each building in 3D software, thereby obtaining a truly unique specific environmental mapping for each building, giving each building a personalized and realistic representation.
[0023] This invention adopts the CustomShader development method to map the specific close-range environment map around each building onto the building model through GPU shader programming, and uses an algorithm to make the environment map dynamically present light and dark effects with time and weather, so that each building has a more unique environmental feature expression.
[0024] In night scenes and sci-fi scenes, this invention can map various lighting environment maps to buildings, creating dynamic lighting effects such as flow, flickering, and rotation. Furthermore, in sci-fi scenes, this invention can also map various sci-fi flow effects to each building, making the buildings appear even more vibrant and dynamic. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0026] Figure 1 It is a schematic diagram of the overall process method of the present invention.
[0027] Figure 2 This is a flowchart for rendering a specific close-up environment around a building according to the present invention. DETAILED DESCRIPTION
[0028] The following describes in detail embodiments of the present application. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application and are not to be construed as limiting the present application.
[0029] In the description of this application, it should be noted that, unless otherwise expressly specified or limited, the terms "installed," "connected," and "connected" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; they can refer to internal communication between two components or the interaction between two components. Those skilled in the art will understand the specific meanings of the above terms in this application based on the specific circumstances.
[0030] The present invention will be described in further detail below with reference to the accompanying drawings.
[0031] Combine Figures 1 and 2 In order to solve the above problems, the present invention provides a method for producing an environment map and material mapping based on Cesium, comprising the following steps:
[0032] In view of the shortcomings of the digital twin simulation visualization building display effect and environmental mapping effect based on the Cesium platform, the present invention proposes a building environment mapping production and custom Shader (shader) dynamic mapping method based on Cesium. This method first produces a building model and a light and shadow texture map to generate a GLB (a three-dimensional model file format) model. An HDR camera is used to shoot the distant environment map to obtain an HDR distant environment map. The building model, light and shadow texture map and HDR distant environment map are sorted out, and a three-dimensional scene is built in a three-dimensional modeling software (such as 3dsMax, Maya, etc.). In the built three-dimensional scene, the scene camera is used to render the near-field environment map around each building. Using the above output results GLB model, the near-field environment map around the building and the HDR distant environment map, a three-dimensional scene is built in the Cesium three-dimensional engine, and finally the building surrounding environment map is mapped to the GLB model by using CustomShader.
[0033] The production process of this method is as follows:
[0034] S1. During the building CAD drawing processing phase, CAD drawings are collected and organized, and the drawings are cleaned, corrected, and optimized.
[0035] S2. Use 3D modeling software to create building models based on CAD drawings using tools such as 3dsMax and Maya, ensuring model accuracy. Perform appropriate UnwrapUVW processing based on the model's material, area, and size, and output the model in FBX (a 3D model file format).
[0036] S3. Use QuixelSuite software to create physical light and shadow simulation texture maps. Launch QuixelSuite (a 3D texture creation software) and Photoshop by default, load the FBX model, and create light and shadow texture maps for the building.
[0037] Step 4: Use Blender to create the light and shadow model. Launch Blender, load the building's FBX model, and assign the texture map output in the previous step to the corresponding model mesh. Adjust the parameters based on the mesh's material type, and finally output the GLB model.
[0038] S5. Use an HDR camera to shoot distant environment maps. Start the HDR camera, set up the camera at a suitable location, shoot a picture of the sky distant view, use Photoshop software to optimize the environment map, and output an HDR high-definition distant environment picture.
[0039] S6. During the rendering phase for the specific near-field environment surrounding the buildings, import all building FBX models and light and shadow texture maps into 3D software such as 3dsMax and Maya. Add design elements such as greenery to create a simulated 3D scene. Draw a large hemispherical dome in the 3D software and place all the building models within it. Import the original single HDR distant environment map and assign this environment map material to the hemispherical dome to create a virtual sky environment. For night scenes or sci-fi scenes, set the light source type and parameters, such as point light or area light. Set rendering parameters and camera position to render the near-field environment surrounding each building independently. Output the near-field environment map surrounding each building.
[0040] S7.Cesium scene building stage: load the GLB building model, the building's surrounding near-field environment map, and the HDR distant-field environment map;
[0041] S8. Use CustomShader for texture mapping and special effects production. Custom program algorithms are written through CustomShader to give the model a close-up environmental texture effect around the building and achieve special effects production.
[0042] S9. Check the results. If there are any problems with the results, adjust the lighting information and scene materials, and reprocess them using QuixelSuite or HDR environment maps to achieve the best results.
[0043] S10. End, complete the production of Cesium scene building effects;
[0044] The above steps are the main process description of the process, and the process technologies involved are specifically:
[0045] (1) Building CAD design drawing stage: organize and optimize CAD drawings, retain the basic structure and corresponding attribute information of the building, and save the CAD drawings of each module of the building as separate blocks for output.
[0046] (2) Use 3D modeling software to create building models: Load the corresponding CAD drawings through modeling software such as 3dsMax and Maya, draw the 3D model, and ensure the precision and accuracy of the model. After the model is built, give the model basic texture mapping. Perform reasonable UnwrapUVW processing according to the material, area, and size, and finally output the FBX model;
[0047] (3) Use QuixelSuite software to perform physical light and shadow simulation texture mapping: This step is to add physical light and shadow and texture (such as metal, glass and plastic, etc.) to the building model. Start Photoshop and QuixelSuite software, load the FBX model, and combine Photoshop and Quixel to use various Photoshop function brushes to draw building details, such as scratches, highlights, light and shadow and normals, etc., to improve the expression of building model details.
[0048] (4) Use Blender software for light and shadow model production stage: load the building FBX model, and import AO (Ambient Occlusion) map, diffuse map, highlight map, luminous map, normal map and other texture maps, connect various maps to the corresponding channels, and adjust the detail parameters, and finally output a simulated building GLB model with physical light and shadow effects.
[0049] (5) Using an HDR camera to shoot a distant environment map: Select an open and well-lit area to set up the HDR camera, turn on the device to shoot the environment, avoid surrounding interference during the shooting process, and output the HDR environment image after the shooting is completed. Import the HDR environment image into Photoshop and optimize the details of the HDR environment image. Output the HDR distant environment map, and then proceed to the first core step of the present invention:
[0050] The above steps have completed the export of the UnwrapUVW processed building model FBX model, various light and shadow texture maps and HDR distant environment maps;
[0051] At the same time, based on the above output result files, a complete three-dimensional simulation scene is built in the three-dimensional software to render the specific close-up environment around the building. This step is the first innovation of the present invention.
[0052] (6) Rendering of the specific close-up environment around the building. The technical details involved are as follows:
[0053] Resource organization stage: organize all building FBX models, physical lighting simulation maps and HDR distant environment maps to ensure that the model size is accurate and the texture maps are clear.
[0054] The scene building phase of 3D software such as 3dsMax or Maya includes four steps:
[0055] S6.1. Loading FBX, assigning lighting and shadow simulation maps to the model, and adding elements such as greenery. Launch the 3D software to load the FBX models of all buildings. Create corresponding material balls based on the lighting and shadow texture maps and assign the materials to the corresponding models. Then, based on the designer's design drawings, add corresponding elements to the scene, such as trees, greenery, streetlights, and signage, to ensure that the virtual 3D scene is consistent with the designed environment.
[0056] S6.2. Create a large hemispherical dome and assign it an HDR environment map material to simulate a real sky effect.
[0057] S6.3. Renderer and scene camera parameter settings, as well as night scene lighting settings, include renderer type (such as V-Ray), pixel size, shadows, anti-aliasing, sampling, etc. The scene camera type should be consistent with the renderer type, and corresponding parameters such as focal length and exposure should be set to ensure optimal rendering results.
[0058] For night scenes, select lighting types compatible with the renderer (such as V-Ray lighting). Based on different types of streetlights, light strips, and searchlights, choose appropriate light sources (such as point lights, surface lights, and spotlights). Adjust various lighting parameters (such as brightness and color) according to design requirements to ensure the scene lighting effects meet the expectations. Furthermore, for sci-fi 3D scenes, adjust all parameter values according to design requirements to ensure that the camera renderings match the lighting effects, materials, and overall style of the design.
[0059] S6.4. Set the scene camera position and viewing angle. During the building environment preview phase, copy a camera at each building location and adjust the camera viewing angle to preview the optimal environment.
[0060] During the camera rendering stage, the close-up environment around each building is rendered in sequence according to the camera, and the specific environment picture corresponding to each building is output.
[0061] In the building surrounding close-up environment mapping stage, the surrounding close-up environment maps corresponding to all buildings are output.
[0062] S7, Cesium scene building phase: Build a 3D scene based on the Cesium 3D visualization platform, load the GLB model of the building, set the skybox and add scene lighting and shadow effects.
[0063] S8. Use CustomShader for texture mapping and special effects production: By developing Cesium's CustomShader, we read the surrounding environment textures of the building. Then, through GPU calculations, we map these environment textures onto the corresponding building models, achieving interaction and integration between the models and the 3D scene.
[0064] S9, Check the effect stage: Compare the results with the design renderings to see if the expected results are achieved. If not, adjust the lighting parameters and scene materials and re-create the physical lighting simulation model. If the expected results are met, the scene construction is completed.
[0065] S10, end, complete the production of Cesium scene building effects;
[0066] In order to more clearly illustrate the specific embodiment of the present invention, an embodiment is provided below:
[0067] like Figure 1 As shown in the figure, the present invention's Cesium-based environment map production and material mapping method includes CAD drawing optimization, building model rendering, light and shadow texture effect creation, HDR environment map production, specific close-up environment rendering around the building, Cesium-based 3D scene construction, and GPU-based CustomShader development. Each production component includes unique technical methods.
[0068] The specific process principles and steps involved are as follows:
[0069] (1) In the building CAD design stage, CAD drawings are collected and organized, and the drawings are optimized, redundant information is deleted, the drawing content is optimized, important information is highlighted, the CAD drawings of the four sides of the building are divided into independent modules, the details of the CAD drawings are classified, and the CAD drawings of all modules are exported separately.
[0070] (2) Using 3D modeling software to create a building model: This stage involves converting the CAD plane design into a 3D building, ensuring that the dimensions of the 3D building are consistent with the design drawings. The specific steps are as follows:
[0071] Launch modeling software such as 3dsMax or Maya, load the CAD drawings for each module, and set the units. Combine and organize all the CAD drawings for each module within the 3D software to ensure the integrity and accuracy of the building model. Draw the building model, ensuring that the model dimensions match the CAD drawings. Also, perform UnwrapUVW processing based on the model's size, structure, and type to facilitate subsequent texturing and export the FBX model.
[0072] (3) Use QuixelSuite software to perform physical light and shadow simulation texture mapping: This stage mainly processes the model texture mapping, gives it realistic light and shadow effects, and draws various texture details such as bumps, scratches, and highlights. The specific operations are as follows:
[0073] First, after obtaining the FBX model, perform UnwrapUVW fine-tuning on the model's mesh to make the model's texture structure more regular and organized, which is convenient for post-processing.
[0074] After starting the QuixelSuite software, Photoshop will automatically open and import the model's mesh into the QuixelSuite project file. Click the "D" button to enter the texture drawing module, check "Add custom Material" (add custom material) and select the Metalness-Workflow. You can choose a metal-based workflow or a mirror-based workflow. Click "N" to enter the normal production module and draw the normals and architectural details of the building surface in Photoshop. Click the "3" button to enter the real-time renderer module, and the model effect will be presented in real time in the 3DO display window. Press and hold the Shift key and right-click the mouse to adjust the angle of light exposure in order to observe the details of the model effect. Finally, output physical light and shadow simulation texture maps such as AO (Ambient Occl usion) map, diffuse reflection map, highlight map, luminous map, normal map, etc. This step is part of the production of building light and shadow materials, and is not the core content of the present invention, so it will not be described in detail here.
[0075] (4) Light and shadow model production using Blender software: This stage is to combine the obtained model light and shadow texture map with the model mesh, and adjust the parameters and performance of each light and shadow map to obtain a building GLB model with realistic light and shadow effects. The specific operations are as follows:
[0076] This step involves launching Blender and combining the building FBX model with texture maps such as AO (Ambient Occlusion), diffuse, specular, irradiance, and normal maps. In Blender, connect various textures to the model's material mapping channels. Adjust the "Metalness" based on the model's properties, with a value ranging from 0 to 1. Higher values indicate a stronger metallic texture. "Roughness" ranges from 0 to 1, with higher values decreasing the smoothness of the model's surface. "Index of Refraction (IOR)" adjusts the refraction effect of transparent materials (such as water or glass). "Alpha" is the transparency channel; connect a PNG texture with a transparency channel to this channel. Connect the specular texture map to the "Specular" channel. Connect the irradiance texture map to the "Self-Illumination" channel. Adjust the parameter settings and texture map selections based on your actual needs. Output a GLB model of the building with physical lighting effects.
[0077] (5) Use HDR camera to shoot distant environment mapping: This stage is to shoot the distant environment of buildings, such as the sky, mountains, rivers, etc. The specific operations are as follows:
[0078] Set up an HDR camera in a suitable location and open environment, and start shooting an HDR distant environment map. Avoid interference from surrounding objects during the shooting process. Then use Photoshop to optimize the HDR distant environment map. Use the image cutter to split the HDR distant environment map into six skybox images. Name each image: positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ. Through these operations, you can achieve the optimal environment map effect and save it as a high-quality JPG image.
[0079] (6) Rendering stage of specific close-up environment around buildings: In reality, the close-up environment around each building is unique, and the surface mapping of each building is also the close-up effect of the surroundings. Moreover, during the architectural design stage, the geographical location of the building does not have the real surrounding environment after the building is completed. This stage embodies the first core innovation of the present invention, which is to produce a specific close-up environment map around each building. The process is as follows: Figure 2 shown.
[0080] (7) Cesium scene building stage: In this stage, use Cesium.Model.fromGltf(), Cesium.SkyBox() and Cesium.DirectionalLight() and other classes to load building models, add skyboxes and add scene linear lights and set properties to realize three-dimensional scene construction. At the same time, use post-processing classes such as Cesium.PostProcessStage to further improve the scene performance.
[0081] (8) Use CustomShader for texture mapping and special effects production stage: After completing the initial Cesium scene construction, the building model cannot be mapped to the Cesium environment. Using the GPU, CustomShader is used to map the building surrounding environment map to the GLB model. The specific operations include: using the Cesium.CustomShader class to write a custom Shader, and reading the specific close-range environment map around each building obtained in step S6 through the Cesium.TextureUniform class, and finally mapping the specific close-range environment map of each building to the corresponding building. This stage is the second core innovation of the present invention. The article finally explains the application of the algorithm in this stage in detail.
[0082] (9) Effect Viewing Stage: View and display the Cesium scene effects from multiple angles. If there are any problems, adjust the lighting information and scene materials, and recreate the QuixelSuite physical lighting simulation model to achieve the best results.
[0083] (10) End: Complete the construction of the Cesium building scene.
[0084] The above steps, through building model production + QuixelSuite physical light and shadow simulation texture mapping production + Blender light and shadow model production + HDR distant environment mapping + building surrounding specific close environment rendering + CustomShader surrounding environment mapping development, realize a Cesium-based building environment mapping production and custom Shader dynamic mapping method.
[0085] The optimization innovation of the rendering of the specific close-up environment around the core building in step S6 of the invention is explained. Figure 2 As shown:
[0086] like Figure 2 As shown: First, organize the resources, organize all the building FBX models, and the physical light and shadow simulation maps and HDR distant environment maps corresponding to each building.
[0087] Create a new 3D Max file and set the units to align with the FBX model units. Load all the FBX models of the buildings in sequence and create a V-Ray shader with a physical lighting simulation map. Adjust the material parameters, such as base color, roughness, reflection, transparency, and bumps, based on the model. Draw the terrain based on the blueprint or generate 3D terrain using DEM data. Add corresponding 3D trees, plants, streetlights, and seats to ensure the 3D scene matches the design.
[0088] Create a large hemispherical dome model and assign it the original single HDR distant environment map. Set the UVW map type to "spherical" and adjust the size parameters to achieve a real sky effect in the virtual scene.
[0089] Set the renderer, select V-Ray as the current renderer, and configure rendering parameters, including pixel size, shadows, anti-aliasing, and sampling. Add a rendering camera and set corresponding parameters, including focal length, exposure, and other parameters, to achieve the best rendering effect. Ensure that the camera renders the image clearly.
[0090] Set the scene camera's position and perspective according to the location of each building, preview the customized environment around each building, and ensure the scene effect is consistent with the design. Here, you need to copy multiple cameras and place them in each building position in sequence, ensuring that each building is equipped with a camera, so that you can fine-tune the camera perspective later.
[0091] Each camera is rendered in turn, and each environment map is checked and processed.
[0092] Finally, a truly customized specific environment map of each building is obtained, that is, a close-up map of the building's surroundings.
[0093] The steps described above are the basis for this method's creation of customized, specific environment maps. Its innovation lies in the use of 3D rendering to generate realistic environment maps of each building's immediate surroundings during the architectural design phase. Compared to traditional methods that use the sky as an environment map, this method produces a more realistic, near-building environment map. Each building has its own customized environment map, fully recreating the authentic design.
[0094] The optimization innovation of the texture mapping and special effects production process using CustomShader at the core of the invention in step S8 is described.
[0095] First, determine the surrounding environment map for each building and use the Cesium.CustomShader class to create a custom GPU-based shader program. The CustomShader class contains "uniforms", "lightingModel" and "fragmentShaderText" object parameters.
[0096] Create a custom field in "uniforms" to store the building's surrounding environment texture. Use the Cesium.TextureUniform class to assign the building's surrounding environment texture, obtained by camera rendering in step S6, to the custom field variable "u_texture." This completes the loading and acquisition of the building's surrounding environment texture in the Cesium scene.
[0097] Set the lighting model of "lightingModel" to Cesium.LightingModel.PBR. Here, the CustomShader initialization settings and the loading of the near-field environment map around the building are completed.
[0098] In "fragmentShaderText," a GPU-based algorithm is written in GLSL (a development language that directly controls the GPU's rendering process) to achieve various complex visual effects. The custom "u_texture" in the "uniforms" object is read, enabling the GPUShader to obtain the building's surrounding near-field environment map. This map is then mapped to the building model through GPU calculations, giving the model dynamic environment map effects such as flow, flickering, color cast, and brightness changes. During Shader development, the present invention introduces the aforementioned environment map variable u_texture and writes the void fragmentMain(FragmentInputfsInput, inoutczm_modelMaterialmaterial){} function in "fragmentShaderText." The following is an example algorithm for implementing dynamic environment map effects: vec4textureColor = texture(u_texture, vec2(fract(texCoord.s), float(texCoord.t) - times)); material.dif fuse + = textureColor.rgb*1.5. In night scenes, you can directly map environment maps with various lighting effects to corresponding buildings to achieve dynamic lighting effects and improve the display effect of buildings; in science fiction scenes, you can use GPU program algorithms to add various scientific and technological maps to various science fiction buildings and achieve a variety of science fiction effects.
[0099] The steps described above constitute the environment mapping method of this invention. Its innovation lies in customizing specific environment mapping effects for each building. Through GPU rendering, each building's environment mapping is dynamically displayed. Furthermore, shaders can be used to add environment mappings of different styles and functions to buildings based on the scene's characteristics, further enhancing the building's visual presentation.
[0100] The present invention and its embodiments are described above. This description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if a person skilled in the art is inspired by this and, without departing from the purpose of the present invention, designs structures and embodiments similar to this technical solution without inventiveness, they shall fall within the scope of protection of the present invention.
Claims
1. A method for producing environment maps and material mapping based on Cesium, characterized in that: The following steps are involved: S1. Collect and process building CAD drawings and optimize the drawing content; S2. Use 3D modeling software to create a building model based on the CAD drawing, perform UVW unwrap processing, and export the FBX model; S3. Use Quixel Suite software to create physical lighting simulation texture maps for FBX models, and output AO maps, diffuse maps, specular maps, luminous maps, or normal maps; S4. Use Blender to assign the above texture map to the FBX model mesh, adjust the parameters, and output a GLB model with physical lighting effects; S5. Use an HDR camera to capture the distant view of the building, and output an HDR distant view map after optimization processing; S6. Build a 3D scene in 3D modeling software and render specific near-field environment maps around each building; S7. Load the GLB model, the building's surrounding near-field environment map, and the HDR distant-field environment map on the Cesium 3D visualization platform to build a 3D scene. S8. Use Custom Shader to write a custom program algorithm to map the building's surrounding environment map onto the GLB model to achieve dynamic mapping and special effects production; S9. Check and adjust the Cesium scene effects until the expected effect is achieved.
2. The method for producing an environment map and mapping a material based on Cesium according to claim 1, characterized in that: When Quixel Suite software is used in S3 to produce physical light and shadow simulation texture maps, building details including scratches, highlights, light and shadow, and normals are drawn by combining Photoshop with Quixel Suite to improve the expression of building model details.
3. The method for producing an environment map and mapping a material based on Cesium according to claim 1, characterized in that: When the Blender software is used in the S4 to produce the light and shadow model, parameters including metalness, roughness, refractive index and transparency are adjusted according to the model material type, and finally a simulated building GLB model with physical light and shadow effects is output.
4. The method for producing an environment map and mapping a material based on Cesium according to claim 1, characterized in that: When building a three-dimensional scene in the S6 in the three-dimensional software, including creating a large hemispherical dome model and assigning HDR environment map materials to simulate the real sky effect, it is necessary to set the rendering parameters and camera position and render the surrounding close-up environment of each building independently.
5. The method for producing an environment map and mapping a material based on Cesium according to claim 1, characterized in that: When Custom Shader is used in the S8 for texture mapping and special effects production, the environment map is mapped onto the building model through GPU calculation, realizing dynamic effects composed of interaction and fusion effects including flow, flickering, and rotation between the model and the three-dimensional scene.
6. The method for producing an environment map and mapping a material based on Cesium according to claim 1, characterized in that: The Cesium-based environment map production and material mapping method is suitable for night scenes and science fiction virtual scenes. It can map various lighting environment maps for buildings in night scenes and map various different technological building special effects in science fiction scenes.