Method and device for generating prefabricated light source capable of being copied and used in batches

By using prefabricated light source generation method in batches, the limitations of light source generation and optimization in the prior art are solved, the efficient generation and rendering performance of light sources are improved, and the scene production process is simplified.

CN119006692APending Publication Date: 2024-11-22ANCHUANG QIYUAN (HANGZHOU) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411046964.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

There are limitations in light source generation and optimization in scene editing, resulting in light source loss and complex secondary optimization processes, limiting the creation scope and rendering performance.

Method used

The generation method of prefabricated light source using batch copy is adopted, including defining light source parameters, using the scene editor for real-time rendering and static rendering, optimizing Mesh and material data, adjusting lighting properties, and realizing customized scene requirements through baking technology.

Benefits of technology

It realizes efficient generation and optimization of light sources, improves rendering performance and effect, reduces technical complexity and cost, and simplifies workflow.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119006692A_ABST
    Figure CN119006692A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a method and device for generating a prefabricated light source capable of being copied and used in batches. The method comprises the steps that after scene modeling and environment building are completed, the source of a light source is defined, and light source characteristic parameters are formulated; making a light source by using a scene editor, an engine scene editing window, real-time rendering, light source editing, scene editing, static rendering and a point light source; the necessary custom-like scene is baked using a batch of the light sources. By implementing the method provided by the embodiment of the invention, the light source can be generated, the scene making process can be optimized, the rendering performance and effect can be improved, and the related technical complexity and cost can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for generating a light source, and more particularly to a method and device for generating a light source that can be reproduced in batches using prefabricated lights. Background Art

[0002] Existing rendering engines provide different types of lights, such as directional lights, spotlights, point lights and area lights. Each light has its own specific properties and uses, and is generally displayed in a static form in scenes and night scenes. When editing the same light source in the scene editing window, the light source will be restricted and unable to display the effect of implementation, and even "light source loss" may occur. When the light source reaches a certain order of magnitude, the scene operation and subsequent addition of mesh and other components will also be restricted and the complex process of secondary optimization will be limited, thus limiting the scope of creation.

[0003] Therefore, it is necessary to design a new method to generate light sources, optimize the scene production process, improve rendering performance and effects, and reduce related technical complexity and costs. Summary of the invention

[0004] The purpose of the present invention is to overcome the defects of the prior art and provide a method and device for generating a prefabricated light source that can be replicated in batches.

[0005] To achieve the above purpose, the present invention adopts the following technical solution: a method for generating a prefabricated light source that can be replicated in batches, comprising:

[0006] After the scene modeling and environment construction are completed, the source of the light source is defined and the characteristic parameters of the light source are formulated;

[0007] Use scene editor, engine scene editing window, real-time rendering, light source editing, scene editing, static rendering, and point light source to create light sources;

[0008] Use batch baking to create custom scenes as necessary.

[0009] Its further technical solution is: the use of scene editor, engine scene editing window, real-time rendering, light source editing, scene editing, static rendering, point light source to produce light source, including:

[0010] Perform Mesh optimization and repositioning on the scene model of the built environment;

[0011] Create raw base material data;

[0012] Use the engine editor to adjust the properties of the light to get the prefab;

[0013] Check the Emissive channel to ensure interaction between the prefab and the created material;

[0014] Perform secondary processing and shader editing on the original base material data.

[0015] The further technical solution is: the mesh optimization and homing processing of the scene model of the built environment includes:

[0016] Create UV model pieces for the scene model after the environment is built;

[0017] Subdivide and topology optimize the UV model pieces;

[0018] Adjust the length and direction of the UV vector to obtain an optimized mesh structure;

[0019] The optimized mesh structure is repositioned and the repositioned structure is presented.

[0020] A further technical solution is as follows: the creation of original basic material data includes:

[0021] Select the original material based on the requirements of the engine version and rendering pipeline;

[0022] Create the corresponding original material in the engine's material folder according to the selected original material;

[0023] Modify the original material's properties and parameters to get the original base material data.

[0024] A further technical solution is: using the engine editor to adjust the properties of the light to obtain the prefabricated body includes:

[0025] Select the light you want to adjust;

[0026] Open the property editing window corresponding to the light, and use the property editing window to adjust the light properties to obtain a prefabricated body.

[0027] A further technical solution is: after opening the property editing window corresponding to the light and adjusting the light property by using the property editing window to obtain the prefabricated body, the method further comprises:

[0028] Adjust the lighting in your scene using lightmaps, baked lighting, and baking tools and plugins.

[0029] The further technical solution is: the secondary processing and shader editing of the original basic material data includes:

[0030] Perform secondary processing and shader editing on the original base material data to adjust the reflectivity, refractive index, and roughness of the prefab.

[0031] The present invention also provides a device for generating a light source that can be reproduced in batches and used as a prefabricated light source, comprising:

[0032] The definition unit is used to define the source of the light source and formulate the characteristic parameters of the light source after the scene modeling and environment construction are completed;

[0033] Production unit, used to produce light sources using scene editor, engine scene editing window, real-time rendering, light source editing, scene editing, static rendering, and point light sources;

[0034] Baking unit, used to bake necessary custom scenes using batches of light sources.

[0035] Its further technical solution is: the production unit comprises:

[0036] The optimization subunit is used to perform mesh optimization and repositioning on the scene model of the built environment;

[0037] The material creation subunit is used to create the original base material data;

[0038] The property adjustment subunit is used to adjust the properties of the light using the engine editor to obtain the prefab;

[0039] Interaction Determination subunit, used to check the Emissive channel to ensure the interaction between the prefab and the created material;

[0040] The secondary editing subunit is used for secondary processing and shader editing of the original basic material data.

[0041] Its further technical solution is: the optimization subunit includes:

[0042] The model piece creation module is used to create a UV model piece for the scene model of the built environment;

[0043] Subdivision module, used to subdivide and topology optimize UV ​​model pieces;

[0044] Mesh optimization module, used to adjust the length and direction of UV vectors to obtain an optimized mesh structure;

[0045] The homing module is used to perform homing processing on the optimized mesh structure and present the structure after homing processing.

[0046] The beneficial effects of the present invention compared with the prior art are: after completing scene modeling and environment construction, the present invention defines light source parameters and uses a scene editor and an engine window for real-time rendering and static rendering to produce and optimize point light sources, and finally realizes batch baking to meet the needs of customized scenes, generates light sources, optimizes the scene production process, improves rendering performance and effects, and reduces related technical complexity and costs.

[0047] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0049] Figure 1 A schematic diagram of an application scenario of a method for generating a prefabricated light source using lights that can be replicated in batches provided by an embodiment of the present invention;

[0050] Figure 2 A schematic diagram of a flow chart of a method for generating a prefabricated light source using lights that can be replicated in batches provided by an embodiment of the present invention;

[0051] Figure 3 A schematic block diagram of a device for generating a light source that can be reproduced in batches and used as a prefabricated light source provided by an embodiment of the present invention;

[0052] Figure 4 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0055] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0056] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0057] See also Figure 1 and Figure 2 , Figure 1 A schematic diagram of an application scenario of a method for generating prefabricated light sources using lights that can be replicated in batches provided by an embodiment of the present invention. Figure 2 A schematic flow chart of a method for generating prefabricated light sources using lights that can be replicated in batches provided in an embodiment of the present invention. The method for generating prefabricated light sources using lights that can be replicated in batches is applied to a rendering server 20. The rendering server interacts with display screens and the like to optimize the utilization efficiency of light sources, significantly improve rendering performance, and performs well compared to traditional light sources. The method of this embodiment allows the free use of light sources to improve rendering effects. This technology supports the reuse of light sources in batches, and provides mesh modules suitable for various versions and all platforms in a simple and easy-to-understand manner. It not only enables efficient batch processing under the same material, but also supports personalized customization. This concept greatly simplifies the workflow, reduces the need for hardware expansion, reduces the complexity of customized scene baking adjustments, and reduces inconveniences such as repeated work and increased time costs due to major changes after baking.

[0058] Figure 2 FIG. 1 is a flow chart of a method for generating a light source using prefabricated lights that can be replicated in batches provided by an embodiment of the present invention. Figure 2 As shown, the method includes the following steps S110 to S130.

[0059] S110. After the scene modeling and environment construction are completed, the source of the light source is defined and characteristic parameters of the light source are formulated.

[0060] In this embodiment, after the scene modeling and environment construction are completed, the source and specific parameter characteristics of the light source need to be defined first. This includes determining the type of light source (point light source, directional light, etc.), color, intensity, range, etc. By clearly defining the light source, it can be ensured that the scene can correctly reflect the design intent in the subsequent rendering process, improving visual consistency and expression.

[0061] For the source definition of the light source, you can choose any light source to achieve the purpose of free use of the light source.

[0062] S120. Use scene editor, engine scene editing window, real-time rendering, light source editing, scene editing, static rendering, and point light source to create light sources.

[0063] In this embodiment, the scene editor and the scene editing window of the engine can be used to intuitively manage and adjust the light source. These tools provide a user-friendly interface, making the setting and adjustment of the light source efficient and accurate. Through the real-time preview function, the impact of the light source on the scene can be instantly viewed to help optimize and adjust. The real-time rendering function allows instant viewing of the effect of the light source, which helps to quickly feedback and adjust. The light source editing tool provides detailed control of the light source properties, such as color, intensity, direction, etc., so that the user can accurately adjust each light source to achieve the desired visual effect. In the scene editing stage, correctly placing and adjusting the light source is an important step to ensure the final rendering effect. Static rendering technology can pre-calculate lighting information, improve rendering efficiency and quality, and is particularly suitable for complex lighting requirements and large scene environments. Making point light sources or other types of specific light sources is a key step to ensure that scene details and lighting effects meet design standards. By accurately making light sources, the realism and expressiveness of the scene can be visually enhanced, making the rendering results more vivid and attractive.

[0064] In one embodiment, the above-mentioned step S120 may include steps S121 - S125 .

[0065] S121. Perform Mesh optimization and repositioning processing on the scene model of the built environment.

[0066] In one embodiment, the above-mentioned step S121 may include steps S1211 - S1214 .

[0067] S1211. Create a UV model piece for the scene model of the built environment.

[0068] In this embodiment, a mesh model is created in the DCC software to ensure that the UV distribution of the model is reasonable, which is very important for subsequent texture mapping.

[0069] S1212. Subdivide and topology optimize the UV model piece.

[0070] In this embodiment, the subdivision level of the model is adjusted to 1, the number of vertices and facets is reduced, thereby reducing the rendering load. It is ensured that the initial shape of the model does not deform during the subdivision process and the geometric structure remains unchanged. After optimization, an optimized mesh with the number of vertices, edges, faces, triangles and UVs is obtained, which has a very small number of vertices and a simple and clear topological structure.

[0071] S1213. Adjust the length and direction of the UV vector to obtain an optimized mesh structure.

[0072] In this embodiment, the length and direction of the UV vectors are adjusted to ensure that they are reasonably distributed and have minimal overlap, thereby improving the quality of the texture map.

[0073] S1214: Perform a repositioning process on the optimized mesh structure and present the repositioned structure.

[0074] In this embodiment, the optimized mesh is homed, the historical events such as world coordinates and space coordinates are cleared, and the transformation is frozen; the translation, rotation and scaling of the model are all reset to zero so that it is located at the origin. The homed process avoids position offset or rotation errors of the model in the engine and ensures its correct presentation in the scene.

[0075] These steps are not only about optimizing and repositioning the mesh model, but also emphasize how to maintain the model quality throughout the process and improve rendering performance and visual effects. This method has broad application prospects and practical value in digital content creation.

[0076] In this embodiment, it is necessary to create a model fragment with a reasonable UV distribution in the DCC software. The mesh model optimization method of subdivision and topology optimization is used. By adjusting the subdivision level of the model to 1, the number of vertices and faces is effectively reduced, thereby reducing the rendering load. This process ensures that the model will not be distorted during the subdivision process and maintains the geometric structure stability of the initial state. After the final optimization, we obtained an optimal mesh model with vertices of 4, 4, 0; edges of 4, 4, 0; faces of 1, 1, 0; triangles of 2, 2, 0; and UVs of 4, 4, 0.

[0077] This optimized data structure has the following characteristics:

[0078] The number of vertices is extremely small, only 4, which greatly reduces the rendering overhead; the number of faces and triangles is very small, and the topological structure is simple and clear; the UV unfolding is reasonable and high-quality, which is conducive to the subsequent texture mapping application; the geometric structure is evenly distributed on the three coordinate axes, maintaining a balanced geometric shape.

[0079] In addition to the optimization of the geometric structure, we also optimized parameters such as UV vectors. The quality of UV vectors directly affects the texture mapping effect, so we adjusted their length and direction to ensure reasonable distribution and minimize overlap, thereby improving the quality of texture mapping.

[0080] By applying subdivision, topology optimization and UV optimization methods, a highly optimized mesh model is obtained. This not only greatly reduces rendering overhead, but also maintains the clarity of the geometric structure and the excellent quality of UV unfolding. This lays a solid foundation for subsequent texture mapping, material settings and rendering optimization. In practical applications, this optimization method can be applied to various types of mesh models, significantly improving the rendering performance and visual effects of the entire scene, while also improving the efficiency of creation and the convenience of post-editing.

[0081] The mesh model optimization method based on subdivision and topology optimization proposed in this embodiment can significantly reduce rendering overhead and improve overall rendering performance and visual effects while ensuring model quality by optimizing geometric structure and UV parameters. This method has broad application prospects and promotion value, and has brought important technological progress to the fields of digital art and engineering.

[0082] After obtaining the initial optimal mesh model prototype prefabrication data, the next step is to perform homing processing, which includes clearing historical transformations such as world coordinates and space coordinates, and freezing the model's translation (XYZ), rotation (XYZ), and scaling (XYZ).

[0083] Ensuring that the model is at the origin provides an accurate basis for subsequent lighting and material settings. By homing, you can avoid position offset or rotation errors in the model in the engine and ensure that the model presents the correct visual effect in the scene.

[0084] S122. Create original basic material data.

[0085] In one embodiment, the above-mentioned step S122 may include steps S1221 - S1223 .

[0086] S1221. Select the original material according to the requirements of the engine version and rendering pipeline;

[0087] S1222. Create a corresponding original material in the engine's material folder according to the selected original material;

[0088] S1223. Modify the properties and parameters of the original material to obtain the original basic material data.

[0089] In the engine, choosing to use the built-in initial material or the customized pipeline material as the original material is a key step. The built-in material is suitable for the basic rendering pipeline, while the customized pipeline material is more suitable for the lightweight rendering pipeline. Depending on the selected engine version and rendering pipeline, you can create the corresponding original material in the material folder.

[0090] After creating the original material, the next step is to fine-tune its properties and parameters to ensure accurate presentation of lighting effects and realistic reproduction of the scene atmosphere. These major adjustments include:

[0091] Base Color: Set the base color of the material, which directly affects the overall tone of the material.

[0092] Metalness: Controls the metallic feel of the material, thus affecting the performance of reflections and highlights.

[0093] Smoothness: Adjusts the roughness of the material, affecting the clarity of reflections and highlights.

[0094] Normal map: Add a normal map to enhance the detail and three-dimensionality of the material.

[0095] Occlusion map: Use an occlusion map to simulate the unevenness of the material surface.

[0096] Emission map: Add an emission map to achieve self-illumination effect.

[0097] By adjusting these properties and parameters, you can ensure that the material blends perfectly with the light effects in the scene, creating realistic and natural visual effects. For example, adjusting the metalness and smoothness can simulate the reflective properties of different materials and produce a more realistic interaction with the light source. At the same time, adding normal maps and occlusion maps further enhances the three-dimensionality and detail of the material and improves the overall visual effect.

[0098] In actual applications, materials need to be adjusted in a targeted manner according to specific scenes and light source effects. For example, in dark scenes, increasing the emission intensity of the material can enhance the self-luminous effect and increase the contrast with the light source; while in bright scenes, the metalness and smoothness can be appropriately reduced to avoid excessive reflection effects.

[0099] In short, this original material creation method based on a specific pipeline and engine version provides an effective solution for optimizing the material system in the game engine. By fine-tuning the properties and parameters of the original material, it can ensure the accurate reproduction of the lighting effect and the realistic performance of the scene atmosphere, thereby improving the overall visual presentation effect.

[0100] S123. Use the engine editor to adjust the properties of the light to obtain the prefab.

[0101] In this embodiment, the prefabricated object refers to an object or component that is made in advance and used multiple times when needed, and in this embodiment, it refers to a light source.

[0102] In one embodiment, the above-mentioned step S123 may include steps S1231 - S1232 .

[0103] S1231, select the light that needs to be adjusted;

[0104] S1232, opening the property editing window corresponding to the light, and using the property editing window to adjust the light properties to obtain a prefabricated body.

[0105] Additionally, adjust the lighting in your scene using lightmaps, baked lighting, and baking tools and plugins.

[0106] In this embodiment, in the mainstream engine editor, by selecting the light component in the scene and adjusting its properties in the property editing window, you can finely control various aspects of the light:

[0107] Color: Adjust the color properties of the light component to change the light's luminous color.

[0108] Intensity: Adjust the intensity property of the light component to change the brightness of the light.

[0109] Range: Adjust the range property of the light component to control the distance range of the light.

[0110] Angle: Adjust the angle properties of the light component to control the direction and angle of the light.

[0111] In the engine, you can also use the following techniques to optimize the scene's lighting effects and performance:

[0112] Light map: used to store lighting information in the scene to improve rendering efficiency and resource utilization.

[0113] Baking: Precalculating the lighting information in the scene, implemented through baking tools or plug-ins, can significantly improve rendering performance and reduce resource consumption.

[0114] Generate light maps: simulate global illumination effects to enhance the visual quality and lighting interaction of the scene.

[0115] In summary, through the adjustment of light properties and lighting optimization technology, the visual performance and rendering efficiency of the scene can be effectively managed and improved in the editing engine.

[0116] Specifically, in the engine, you can use baking lights to pre-calculate the lighting information in the scene; baking these lights can help you improve the rendering performance of the scene and reduce unnecessary waste of resources.

[0117] In the engine, you can use baking tools to pre-calculate the lighting information in the scene; baking tools can help you improve the rendering performance of the scene and reduce unnecessary waste of resources.

[0118] In the engine, you can use the Lighting Editor to edit the lighting information in the scene. It can help you adjust the lighting effects in the scene and improve the rendering performance of the scene.

[0119] In the engine, you can use the baking plug-in to pre-calculate the lighting information in the scene; the baking plug-in can help you improve the rendering performance of the scene and reduce unnecessary waste of resources.

[0120] In the engine, you can use the light point plug-in to pre-calculate the lighting information in the scene. The relevant lighting plug-in can help you improve the rendering performance of the scene and reduce unnecessary resource waste. It can help adjust the light properties in the engine and improve the lighting effect and rendering performance of the scene.

[0121] S124. Check the Emission Channel to ensure interaction between the prefab and the created material.

[0122] Specifically, after the prefab framework is established, the luminous channel must be checked to enable the interaction between the prefab and the created material. This step is crucial because it directly affects the shaping of the light source effect.

[0123] Manipulate the prefabs as needed and interact with the materials to create highly realistic sheet-like lighting. This approach effectively simulates the effects of natural light and adds realism to your scenes.

[0124] S125. Perform secondary processing and shader editing on the original basic material data.

[0125] In this embodiment, the original basic material data is subjected to secondary processing and shader editing to adjust the reflectivity, refractive index, and roughness of the preform.

[0126] On the basis of meeting personalized needs, creators can perform secondary processing on materials and edit shaders. This step is crucial and can significantly improve the visual performance and effect of light sources.

[0127] By adjusting the open properties of the material, such as reflectivity, refractive index, roughness, etc., creators can precisely control the behavior and appearance of light. This customized operation not only enhances the realism and visual appeal of the light source, but also effectively enables the creator to express his or her artistic expression and control details of the scene.

[0128] S130, using the light sources in batches to bake necessary customized scenes.

[0129] Batch baking technology can effectively pre-calculate the lighting information in complex scenes to optimize rendering performance and reduce the need for real-time calculations. Baking of custom scenes can improve the overall rendering effect, reduce the time cost and workload in the subsequent production process, and ensure visual consistency and quality.

[0130] Once the scene modeling and environment construction are completed, the use of light sources becomes the key to displaying visual effects and presenting the atmosphere of the scene. Reasonable use of light sources can improve realism, optimize performance, increase interactivity, and assist in level design. By deeply studying the generation mechanism of light sources and their interactive characteristics with the environment, the irradiation distance and landing point of light can be controlled to produce various forms of scattered light spots or lighting ranges, which directly affect the final visual effect. The innovative lighting range generation process is process-oriented and modularized, making it possible to prefabricate light source modules with adjustable physical properties such as brightness, size, and fading edges. This method improves the flexibility and efficiency of light source forms, can be reused in real time in different environments, ensures the consistency and controllability of light source effects, and thus optimizes the efficiency of light source application and the quality of finished products.

[0131] The above-mentioned method of generating light sources using prefabricated light sources can be replicated in batches. After completing scene modeling and environment construction, point light sources are produced and optimized by defining light source parameters and using scene editors and engine windows for real-time rendering and static rendering. Batch baking is finally achieved to meet the needs of customized scenes, generate light sources, optimize scene production processes, improve rendering performance and effects, and reduce related technical complexity and costs.

[0132] Figure 3 1 is a schematic block diagram of a device 300 for generating a light source that can be reproduced in batches using prefabricated lights, provided by an embodiment of the present invention. Figure 3 As shown, corresponding to the above method for generating prefabricated light sources that can be copied in batches, the present invention also provides a device 300 for generating prefabricated light sources that can be copied in batches. The device 300 includes a unit for executing the above method for generating prefabricated light sources that can be copied in batches, and the device can be configured in a rendering server. Figure 3 The device 300 for generating a light source that can be batch-copied and prefabricated using lights includes a definition unit 301 , a production unit 302 and a baking unit 303 .

[0133] The definition unit 301 is used to define the source of the light source and formulate the characteristic parameters of the light source after the scene modeling and environment construction are completed; the production unit 302 is used to use the scene editor, engine scene editing window, real-time rendering, light source editing, scene editing, static rendering, point light source to produce light sources; the baking unit 303 is used to use the light sources described in batches to bake necessary customized scenes.

[0134] In one embodiment, the production unit 302 includes:

[0135] The optimization subunit is used to perform mesh optimization and repositioning on the scene model of the built environment; the material creation subunit is used to create the original basic material data; the property adjustment subunit is used to use the engine editor to adjust the properties of the light to obtain the prefab; the interaction determination subunit is used to check the luminous channel to ensure the interaction between the prefab and the created material; the secondary editing subunit is used to perform secondary processing and shader editing on the original basic material data.

[0136] In one embodiment, the optimization subunit includes:

[0137] The model piece creation module is used to create UV model pieces for the scene model of the built environment; the subdivision module is used to subdivide and topologically optimize the UV model pieces; the mesh optimization module is used to adjust the length and direction of the UV vector to obtain the optimized mesh structure; the homing module is used to home the optimized mesh structure and present the homed structure.

[0138] In one embodiment, the material creation subunit includes:

[0139] The material selection subunit is used to select the original material according to the requirements of the engine version and rendering pipeline; the creation subunit is used to create the corresponding original material in the engine's material folder according to the selected original material; the material attribute modification subunit is used to modify the attributes and parameters of the original material to obtain the original basic material data.

[0140] In one embodiment, the attribute adjustment subunit includes:

[0141] The light selection module is used to select the light that needs to be adjusted; the attribute editing module is used to open the attribute editing window corresponding to the light and use the attribute editing window to adjust the light attributes to obtain the prefabricated body. The lighting adjustment module is used to adjust the lighting in the scene using the lighting map, baked lighting, baking tools and plug-ins. The editing module is used to perform secondary processing and shader editing on the original basic material data to adjust the reflectivity, refractive index and roughness of the prefabricated body.

[0142] It should be noted that technicians in the relevant field can clearly understand that the specific implementation process of the above-mentioned prefabricated light source generating device 300 and each unit that can be batch-replicated can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.

[0143] The above-mentioned batch-replicable prefabricated light source generation device 300 can be implemented in the form of a computer program. The computer program can be used in Figure 4 Runs on the computer device shown.

[0144] See also Figure 4 , Figure 4 5 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 may be a server, wherein the server may be an independent server or a server cluster composed of multiple servers.

[0145] See also Figure 4 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .

[0146] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 can execute a method for generating a light source that can be reproduced in batches and prefabricated using lights.

[0147] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .

[0148] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a method for generating a prefabricated light source that can be replicated in batches.

[0149] The network interface 505 is used to communicate with other devices over the network. Figure 4 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0150] The processor 502 is used to run the computer program 5032 stored in the memory to implement the following steps:

[0151] After the scene modeling and environment construction are completed, define the source of the light source and formulate the characteristic parameters of the light source; use the scene editor, engine scene editing window, real-time rendering, light source editing, scene editing, static rendering, and point light sources to create light sources; use the batch light sources to bake necessary customized scenes.

[0152] In one embodiment, the processor 502 specifically implements the following steps when implementing the steps of using a scene editor, an engine scene editing window, real-time rendering, light source editing, scene editing, static rendering, and point light source to create a light source:

[0153] Perform mesh optimization and repositioning on the scene model of the built environment; create original basic material data; use the engine editor to adjust the properties of the light to obtain the prefab; check the luminous channel to ensure the interaction between the prefab and the created material; perform secondary processing and shader editing on the original basic material data.

[0154] In one embodiment, when the processor 502 implements the steps of performing Mesh optimization and homing processing on the scene model of the built environment, the processor 502 specifically implements the following steps:

[0155] Create UV model pieces for the scene model of the built environment; subdivide and topologically optimize the UV model pieces; adjust the length and direction of the UV vector to obtain the optimized mesh structure; perform home processing on the optimized mesh structure and present the homed structure.

[0156] In one embodiment, when implementing the step of creating the original basic material data, the processor 502 specifically implements the following steps:

[0157] Select the original material according to the requirements of the engine version and rendering pipeline; create the corresponding original material in the engine's material folder according to the selected original material; modify the properties and parameters of the original material to obtain the original basic material data.

[0158] In one embodiment, when the processor 502 implements the step of using the engine editor to adjust the properties of the light to obtain the prefabricated body, the processor 502 specifically implements the following steps:

[0159] Select the light that needs to be adjusted; open the property editing window corresponding to the light, and use the property editing window to adjust the light properties to obtain a prefabricated body.

[0160] In one embodiment, after the processor 502 implements the step of opening the property editing window corresponding to the light and adjusting the light property by using the property editing window to obtain the preform, it further implements the following steps:

[0161] Adjust the lighting in your scene using lightmaps, baked lighting, and baking tools and plugins.

[0162] In one embodiment, the processor 502 implements the following steps when implementing the steps of performing secondary processing on the original basic material data and editing the shader:

[0163] Perform secondary processing and shader editing on the original base material data to adjust the reflectivity, refractive index, and roughness of the prefab.

[0164] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0165] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0166] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein when the computer program is executed by a processor, the processor executes the following steps:

[0167] After the scene modeling and environment construction are completed, define the source of the light source and formulate the characteristic parameters of the light source; use the scene editor, engine scene editing window, real-time rendering, light source editing, scene editing, static rendering, and point light sources to create light sources; use the batch light sources to bake necessary customized scenes.

[0168] In one embodiment, when the processor executes the computer program to implement the steps of using a scene editor, an engine scene editing window, real-time rendering, light source editing, scene editing, static rendering, and point light source to create a light source, the processor specifically implements the following steps:

[0169] Perform mesh optimization and repositioning on the scene model of the built environment; create original basic material data; use the engine editor to adjust the properties of the light to obtain the prefab; check the luminous channel to ensure the interaction between the prefab and the created material; perform secondary processing and shader editing on the original basic material data.

[0170] In one embodiment, when the processor executes the computer program to implement the step of performing Mesh optimization and homing processing on the scene model of the built environment, the processor specifically implements the following steps:

[0171] Create UV model pieces for the scene model of the built environment; subdivide and topologically optimize the UV model pieces; adjust the length and direction of the UV vector to obtain the optimized mesh structure; perform home processing on the optimized mesh structure and present the homed structure.

[0172] In one embodiment, when the processor executes the computer program to implement the step of creating the original basic material data, the processor specifically implements the following steps:

[0173] Select the original material according to the requirements of the engine version and rendering pipeline; create the corresponding original material in the engine's material folder according to the selected original material; modify the properties and parameters of the original material to obtain the original basic material data.

[0174] In one embodiment, when the processor executes the computer program to implement the step of using the engine editor to adjust the properties of the light to obtain the prefabricated body, the processor specifically implements the following steps:

[0175] Select the light that needs to be adjusted; open the property editing window corresponding to the light, and use the property editing window to adjust the light properties to obtain a prefabricated body.

[0176] In one embodiment, after the processor executes the computer program to implement the step of opening the property editing window corresponding to the light and adjusting the light property by using the property editing window to obtain the preform, the processor further implements the following steps:

[0177] Adjust the lighting in your scene using lightmaps, baked lighting, and baking tools and plugins.

[0178] In one embodiment, when the processor executes the computer program to implement the steps of secondary processing the original basic material data and shader editing, the processor specifically implements the following steps:

[0179] Perform secondary processing and shader editing on the original base material data to adjust the reflectivity, refractive index, and roughness of the prefab.

[0180] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.

[0181] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0182] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0183] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0184] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0185] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. The method of generating light sources using prefabricated lights can be copied in batches. It is characterized in that include: After the scene modeling and environment construction are completed, the source of the light source is defined and the characteristic parameters of the light source are formulated; Use scene editor, engine scene editing window, real-time rendering, light source editing, scene editing, static rendering, and point light source to create light sources; Use batch baking to create custom scenes as necessary.

2. The method for generating a light source that can be reproduced in batches using prefabricated lights according to claim 1, It is characterized in that The use of scene editor, engine scene editing window, real-time rendering, light source editing, scene editing, static rendering, and point light source to produce light sources includes: Perform Mesh optimization and repositioning on the scene model of the built environment; Create raw base material data; Use the engine editor to adjust the properties of the light to get the prefab; Check the Emissive channel to ensure interaction between the prefab and the created material; Perform secondary processing and shader editing on the original base material data.

3. The method for generating a light source that can be reproduced in batches using prefabricated lights according to claim 2, It is characterized in that The mesh optimization and positioning processing of the scene model of the built environment includes: Create UV model pieces for the scene model after the environment is built; Subdivide and topology optimize the UV model pieces; Adjust the length and direction of the UV vector to obtain an optimized mesh structure; The optimized mesh structure is repositioned and the repositioned structure is presented.

4. The method for generating a light source that can be reproduced in batches using prefabricated lights according to claim 2, It is characterized in that The creating of original basic material data includes: Select the original material based on the requirements of the engine version and rendering pipeline; Create the corresponding original material in the engine's material folder according to the selected original material; Modify the original material's properties and parameters to get the original base material data.

5. The method for generating a light source that can be reproduced in batches using prefabricated lights according to claim 2, It is characterized in that The engine editor is used to adjust the properties of the light to obtain a prefab, including: Select the light you want to adjust; Open the property editing window corresponding to the light, and use the property editing window to adjust the light properties to obtain a prefabricated body.

6. The method for generating a light source that can be reproduced in batches using prefabricated lights according to claim 5, It is characterized in that After the property editing window corresponding to the light is opened and the light properties are adjusted using the property editing window to obtain the prefabricated body, the method further includes: Adjust the lighting in your scene using lightmaps, baked lighting, and baking tools and plugins.

7. The method for generating a light source that can be reproduced in batches using prefabricated lights according to claim 2, It is characterized in that The secondary processing and shader editing of the original basic material data include: Perform secondary processing and shader editing on the original base material data to adjust the reflectivity, refractive index, and roughness of the prefab.

8. Prefabricated light source generation devices can be used for batch copying. It is characterized in that include: The definition unit is used to define the source of the light source and formulate the characteristic parameters of the light source after the scene modeling and environment construction are completed; Production unit, used to produce light sources using scene editor, engine scene editing window, real-time rendering, light source editing, scene editing, static rendering, and point light sources; Baking unit, used to bake necessary custom scenes using batches of light sources.

9. The device for generating a light source that can be reproduced in batches and used as prefabricated light sources according to claim 8, It is characterized in that The production unit comprises: The optimization subunit is used to perform mesh optimization and repositioning on the scene model of the built environment; The material creation subunit is used to create the original base material data; The property adjustment subunit is used to adjust the properties of the light using the engine editor to obtain the prefab; Interaction Determination subunit, used to check the Emissive channel to ensure the interaction between the prefab and the created material; The secondary editing subunit is used for secondary processing and shader editing of the original basic material data.

10. The device for generating a light source that can be reproduced in batches and used as prefabricated light sources according to claim 9, It is characterized in that The optimization subunit comprises: The model piece creation module is used to create a UV model piece for the scene model of the built environment; Subdivision module, used to subdivide and topology optimize UV ​​model pieces; Mesh optimization module, used to adjust the length and direction of UV vectors to obtain an optimized mesh structure; The homing module is used to perform homing processing on the optimized mesh structure and present the structure after homing processing.