Method for pre-baking illumination image to vertex color to strengthen 3D shadow

By prebaking high-definition AO shadow maps in 3D modeling software and baking them to the model vertex color, combining vertex color nodes and shader material balls, the problems of blurred shadow effects and lengthy files in the existing technology are solved, and clear Accurate shadow representation.

CN119180903APending Publication Date: 2024-12-24BEIJING BITE YIPAI INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411236796.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

In the existing 3D model rendering technology, pre-rendered AO pictures cause blurry effects when the shot is closer, the number of files is large and the content is lengthy, making it difficult to achieve clear shadow performance.

Method used

By prebaking high-definition AO shadow maps in 3D modeling software and baking them to the vertex color of the model, using the vertex color node combined with the rendering engine to create a shader material ball with vertex color information, adjusting the intensity to achieve AO intensity Control to ensure clear shadow levels.

Benefits of technology

It achieves clear shadowing effect at any camera distance, avoids noise and UV overlap issues, and ensures accuracy and detailed expression of shadow intensity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119180903A_ABST
    Figure CN119180903A_ABST
Patent Text Reader

Abstract

The invention discloses a method for intensifying a 3D shadow from a pre-baked illumination image to a vertex color, and the method comprises the following steps: creating or importing a model in 3D modeling software, setting an illumination environment of a scene, pre-baking a high-definition AO shadow map, enabling the wider a black and white color threshold value to be, the better, the better, the better, and the better. In this way, shadow layers can be pulled open, gray level distribution is uniform, the situation that the whole is too black or too white is avoided, and if a light source does not have special requirements, rendering is carried out in a top light mode; baking the AO shadow map to the vertex color of the model; under the support of a rendering engine (UE, unity), vertex color nodes are used for reading in the vertex color information of the model, and the information of the channel is output as ambient light when the vertex color channel is baked to; a shader with vertex color information is used for manufacturing a material ball, the material ball is applied to the model, and the material ball is adjusted to be proper in strength; according to the invention, the high-definition noise-free AO effect is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for pre-baking a lighting map to enhance 3D shadows from vertex colors, and belongs to the technical field of 3D scene rendering applications. Background Art

[0002] Vertex color AO (Ambient Occlusion) is a technology used in 3D model rendering. Vertex color AO achieves the ambient occlusion effect in real-time rendering by storing the effect in the form of color on vertices and calculating the color of the entire surface based on the interpolation between vertices during rendering.

[0003] Unity's rendering technology mainly uses pre-rendered AO images as the basis for indirect lighting effects (ambient occlusion). This texture-based expression method will present a relatively blurred texture effect when the camera is zoomed in. This is the current common model rendering processing method, and it has a large number of files and lengthy content. Summary of the invention

[0004] In this embodiment, a method for pre-baking a lighting map to enhance 3D shadows from vertex colors is provided to solve the problems of a common model rendering processing method in the prior art, and a large number of files and lengthy content.

[0005] The present invention achieves the above-mentioned object through the following technical scheme, a method for pre-baking a light map to enhance 3D shadows from vertex colors, the method for pre-baking a light map to enhance 3D shadows from vertex colors comprising the following steps:

[0006] S1. Create or import the model in the 3D modeling software, set the lighting environment of the scene, pre-bake the high-definition AO shadow map, and the wider the black and white color threshold, the better, so that the shadow layers can be opened up and the grayscale distribution is even, and there should not be too black or too white as a whole. If there is no special requirement for the light source, render it in top light mode;

[0007] S2. Bake the AO shadow map to the model vertex color. There must be at least 2 vertices between each stage of the gradient grayscale to ensure the baking quality.

[0008] S3. If the rendering engine supports it (UE, Unity), use the vertex color node to read the model vertex color information, and output the channel information as the ambient light according to the vertex color channel that is baked. In this process, you can also mix it with other attributes, or use float as the intensity and multiply it with the ambient light to control the AO intensity.

[0009] S4. Use a shader with vertex color information to make a material ball, apply it to the model, and adjust the appropriate strength on the material ball.

[0010] Preferably, the pre-baked high-definition AO shadow map is clear enough to avoid problems such as noise, UV overlap, etc.

[0011] Preferably, the lighting environment of the scene generally includes one or more light sources and necessary ambient light settings.

[0012] Preferably, the baking of the AO shadow map to the model vertex color requires attention to the hierarchical position of the model, and appropriate vertices must be reserved to facilitate baking of accurate shadow intensity. If the vertex position is inappropriate, or the vertices are too sparse, or there are more stringent requirements on the number of faces, then this solution cannot be implemented.

[0013] Preferably, the Unity engine is a real-time 3D interactive content creation and operation platform developed by Unity Technologies, which is widely used in game development, art, architecture, automotive design, film and television and other fields. It not only supports the creation of 2D and 3D content, but is also compatible with various interactive technologies such as augmented reality (AR) and virtual reality (VR). The Unity engine has become one of the preferred tools for creators around the world with its powerful functions and flexibility.

[0014] Preferably, the shader material ball is an object in Unity used to describe the surface properties of an object (such as color, texture, glossiness, etc.), which combines the Shader with specific parameters such as texture and color to define the final appearance of the object in the game or application.

[0015] Preferably, the effect is not affected by the camera distance and remains unchanged at all times.

[0016] Preferably, the baking process requires the model to be properly wiring and a vertex structure at the location where the shadow changes to express the shadow, otherwise the ao shadow will lose details.

[0017] Preferably, the vertex color refers to defining the color of the model surface by assigning color values ​​to the vertices of the model. These color values ​​are usually stored in the form of vertex data and correspond to the position information of each vertex.

[0018] Preferably, the Vertex Color node is a node in the Unity Shader Graph, which allows developers to directly access and manipulate the color information of the model vertices. The node can take the vertex color information in the model as input and pass it to other parts of the Shader Graph for further processing and rendering.

[0019] The beneficial effects of the present invention are as follows: the method of pre-baking the illumination map to the vertex color to enhance the 3D shadow in the present invention pre-bakes the high-definition AO shadow map to ensure that the baked map is clear enough, and bakes the AO shadow map to the model vertex color. Appropriate vertices must be reserved to facilitate baking accurate shadow intensity. If the vertex position is inappropriate, or the vertices are too sparse, or there are more stringent requirements on the number of faces, then this solution cannot be implemented. There must be at least 2 vertices between the gradient grayscale of each stage to ensure the baking quality. When the rendering engine supports it (UE, unity), the vertex color node is used to read the model vertex color information and mix it with other attributes. Float can also be used as the intensity and multiplied with the ambient light to achieve AO intensity control. A shader with vertex color information is used to make a material ball, which is applied to the model, and the appropriate intensity can be adjusted on the material ball. It has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 The flowchart of the method of pre-baking light map to vertex color to enhance 3D shadows of the present invention. DETAILED DESCRIPTION

[0021] 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 only 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.

[0022] Embodiment 1:

[0023] A method for pre-baking a light map to enhance 3D shadows from vertex colors, the method comprising the following steps:

[0024] S1. Create or import the model in the 3D modeling software, set the lighting environment of the scene, pre-bake the high-definition AO shadow map, and the wider the black and white color threshold, the better, so that the shadow layers can be opened up and the grayscale distribution is even, and there should not be too black or too white as a whole. If there is no special requirement for the light source, render it in top light mode;

[0025] S2. Bake the AO shadow map to the model vertex color. There must be at least 2 vertices between each stage of the gradient grayscale to ensure the baking quality.

[0026] S3. If the rendering engine supports it (UE, Unity), use the vertex color node to read the model vertex color information, and output the channel information as the ambient light according to the vertex color channel that is baked. In this process, you can also mix it with other attributes, or use float as the intensity and multiply it with the ambient light to control the AO intensity.

[0027] S4. Use a shader with vertex color information to make a material ball, apply it to the model, and adjust the appropriate strength on the material ball.

[0028] Preferably, the pre-baked high-definition AO shadow map is clear enough to avoid problems such as noise, UV overlap, etc.

[0029] Preferably, the lighting environment of the scene generally includes one or more light sources and necessary ambient light settings.

[0030] Preferably, the baking of the AO shadow map to the model vertex color requires attention to the hierarchical position of the model, and appropriate vertices must be reserved to facilitate baking of accurate shadow intensity. If the vertex position is inappropriate, or the vertices are too sparse, or there are more stringent requirements on the number of faces, then this solution cannot be implemented.

[0031] Preferably, the Unity engine is a real-time 3D interactive content creation and operation platform developed by Unity Technologies, which is widely used in game development, art, architecture, automotive design, film and television and other fields. It not only supports the creation of 2D and 3D content, but is also compatible with various interactive technologies such as augmented reality (AR) and virtual reality (VR). The Unity engine has become one of the preferred tools for creators around the world with its powerful functions and flexibility.

[0032] Preferably, the shader material ball is an object in Unity used to describe the surface properties of an object (such as color, texture, glossiness, etc.), which combines the Shader with specific parameters such as texture and color to define the final appearance of the object in the game or application.

[0033] Preferably, the effect is not affected by the camera distance and remains unchanged at all times.

[0034] Preferably, the baking process requires the model to be properly wiring and a vertex structure at the location where the shadow changes to express the shadow, otherwise the ao shadow will lose details.

[0035] Preferably, the vertex color refers to defining the color of the model surface by assigning color values ​​to the vertices of the model. These color values ​​are usually stored in the form of vertex data and correspond to the position information of each vertex.

[0036] Preferably, the Vertex Color node is a node in the Unity Shader Graph, which allows developers to directly access and manipulate the color information of the model vertices. The node can take the vertex color information in the model as input and pass it to other parts of the Shader Graph for further processing and rendering.

[0037] The above method of pre-baking light maps to vertex colors to enhance 3D shadows, if supported by the rendering engine (UE, unity), uses the vertex color node to read the model vertex color information and mix it with other attributes. You can also use float as the intensity and multiply it with the ambient light to achieve AO intensity control. Use a shader with vertex color information to make a material ball, apply it to the model, and adjust the appropriate intensity on the material ball.

[0038] Embodiment 2:

[0039] A method for pre-baking a light map to enhance 3D shadows from vertex colors, the method comprising the following steps:

[0040] S1. Create or import the model in the 3D modeling software, set the lighting environment of the scene, pre-bake the high-definition AO shadow map, and the wider the black and white color threshold, the better, so that the shadow layers can be opened up and the grayscale distribution is even, and there should not be too black or too white as a whole. If there is no special requirement for the light source, render it in top light mode;

[0041] S2. Bake the AO shadow map to the model vertex color. There must be at least 2 vertices between each stage of the gradient grayscale to ensure the baking quality.

[0042] S3. If the rendering engine supports it (UE, Unity), use the vertex color node to read the model vertex color information, and output the channel information as the ambient light according to the vertex color channel that is baked. In this process, you can also mix it with other attributes, or use float as the intensity and multiply it with the ambient light to control the AO intensity.

[0043] S4. Use a shader with vertex color information to create a material ball, apply it to the model, and adjust the appropriate intensity on the material ball.

[0044] Preferably, the pre-baked high-definition AO shadow map is clear enough to avoid problems such as noise and UV overlap.

[0045] Preferably, the lighting environment of the scene generally includes one or more light sources and necessary ambient light settings.

[0046] Preferably, the baking of the AO shadow map to the model vertex color requires attention to the hierarchical position of the model, and appropriate vertices must be reserved to facilitate baking of accurate shadow intensity. If the vertex position is inappropriate, or the vertices are too sparse, or there are more stringent requirements on the number of faces, then this solution cannot be implemented.

[0047] Preferably, the Unity engine is a real-time 3D interactive content creation and operation platform developed by Unity Technologies, which is widely used in game development, art, architecture, automotive design, film and television and other fields. It not only supports the creation of 2D and 3D content, but is also compatible with various interactive technologies such as augmented reality (AR) and virtual reality (VR). The Unity engine has become one of the preferred tools for creators around the world with its powerful functions and flexibility.

[0048] Preferably, the shader material ball is an object in Unity used to describe the surface properties of an object (such as color, texture, glossiness, etc.), which combines the Shader with specific parameters such as texture and color to define the final appearance of the object in the game or application.

[0049] Preferably, the effect will not be affected by the distance from the camera and will always remain unchanged.

[0050] Preferably, the baking process requires that the wiring of the model is reasonable and that there is a vertex structure at the position where the shadow changes to express the shadow, otherwise the ao shadow will lose details.

[0051] Preferably, the vertex color refers to defining the color of the model surface by assigning color values ​​to the vertices of the model. These color values ​​are usually stored in the form of vertex data and correspond to the position information of each vertex.

[0052] Preferably, the Vertex Color node is a node in the Unity Shader Graph, which allows developers to directly access and manipulate the color information of the model vertices. The node can take the vertex color information in the model as input and pass it to other parts of the Shader Graph for further processing and rendering.

[0053] The above method of pre-baking the lighting map to the vertex color to enhance the 3D shadow, pre-bakes the high-definition AO shadow map, ensures that the baked map is clear enough, and bakes the AO shadow map to the model vertex color. Appropriate vertices should be reserved to facilitate baking accurate shadow intensity. If the vertex position is inappropriate, or the vertices are too sparse, or there are more stringent requirements on the number of faces, then this solution cannot be implemented. There must be at least 2 vertices between the gradient grayscale of each stage to ensure the quality of baking. If the rendering engine supports it (UE, unity), use the vertex color node to read the model vertex color information and mix it with other attributes. You can also use float as the intensity and multiply it with the ambient light to achieve AO intensity control. Use a shader with vertex color information to make a material ball, apply it to the model, and adjust the appropriate intensity on the material ball. It has broad application prospects.

[0054] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

[0055] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

Claims

1. A method for pre-baking a light map to vertex colors to enhance 3D shadows, characterized in that: The method of pre-baking a light map to enhance 3D shadows with vertex colors comprises the following steps: S1. Create or import the model in the 3D modeling software, set the lighting environment of the scene, pre-bake the high-definition AO shadow map, and the wider the black and white color threshold, the better, so that the shadow layers can be opened up and the grayscale distribution is even, and there should not be too black or too white as a whole. If there is no special requirement for the light source, render it in top light mode; S2. Bake the AO shadow map to the model vertex color. There must be at least 2 vertices between each stage of the gradient grayscale to ensure the baking quality. S3. If the rendering engine supports it (UE, Unity), use the vertex color node to read the model vertex color information, and output the channel information as the ambient light according to the vertex color channel that is baked. In this process, you can also mix it with other attributes, or use float as the intensity and multiply it with the ambient light to control the AO intensity. S4. Use a shader with vertex color information to create a material ball, apply it to the model, and adjust the appropriate intensity on the material ball.

2. The method of pre-baking lightmaps to vertex colors to enhance 3D shadows according to claim 1, characterized in that: The pre-baked high-definition AO shadow map is clear enough to avoid problems such as noise and UV overlap.

3. The method of pre-baking lightmaps to vertex colors to enhance 3D shadows according to claim 1, characterized in that: The lighting environment of the scene generally includes one or more light sources and necessary ambient light settings.

4. The method of pre-baking lightmaps to vertex colors to enhance 3D shadows according to claim 1, characterized in that: The above-mentioned baking of AO shadow map to model vertex color needs to pay attention to the hierarchical position of the model, and reserve appropriate vertices to facilitate baking accurate shadow intensity. If the vertex position is inappropriate, or the vertices are too sparse, or there are more stringent requirements on the number of faces, then this solution cannot be implemented.

5. The method of pre-baking lightmaps to vertex colors to enhance 3D shadows according to claim 1, characterized in that: The Unity engine is a real-time 3D interactive content creation and operation platform developed by Unity Technologies. It is widely used in game development, art, architecture, automotive design, film and television and other fields. It not only supports the creation of 2D and 3D content, but is also compatible with various interactive technologies such as augmented reality (AR) and virtual reality (VR). The Unity engine has become one of the preferred tools for creators around the world with its powerful functions and flexibility.

6. The method of pre-baking lightmaps to vertex colors to enhance 3D shadows according to claim 1, characterized in that: The shader material ball is an object in Unity used to describe the surface properties of an object (such as color, texture, glossiness, etc.). It combines the shader with specific parameters such as texture and color to define the final appearance of the object in the game or application.

7. The method of pre-baking lightmaps to vertex colors to enhance 3D shadows according to claim 1, characterized in that: The effect is not affected by the distance from the camera and remains constant.

8. The method of pre-baking lightmaps to vertex colors to enhance 3D shadows according to claim 1, characterized in that: The baking process requires reasonable wiring of the model and a vertex structure to express the shadow at the location where the shadow changes, otherwise the AO shadow will lose details.

9. The method of pre-baking lightmaps to vertex colors to enhance 3D shadows according to claim 1, characterized in that: The vertex color refers to defining the color of the model surface by assigning color values ​​to the vertices of the model. These color values ​​are usually stored in the form of vertex data and correspond to the position information of each vertex.

10. The method of pre-baking lightmaps to vertex colors to enhance 3D shadows according to claim 1, characterized in that: The Vertex Color node is a node in the Unity Shader Graph that allows developers to directly access and manipulate the color information of the model's vertices. The node can take the vertex color information in the model as input and pass it to other parts of the Shader Graph for further processing and rendering.