Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Vertex color rendering and baking method and system applied to unity engine

A baking method and vertex technology, applied in the field of 3D scene rendering, can solve problems such as difficulty in editing, lightmap consumes large storage space, and lightmap is difficult to meet actual needs.

Active Publication Date: 2021-06-08
福建省天奕网络科技有限公司
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Although Unity's built-in Lightmap system also bakes AO effects, using Lightmap requires a lot of storage space and the baking efficiency is low
In the case of making large-scale scenes and the storage capacity of scene resources is limited, it is difficult for lightmap to meet actual needs
Moreover, the texture file generated after lightmap baking is difficult to edit manually due to the intricate uv

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Vertex color rendering and baking method and system applied to unity engine
  • Vertex color rendering and baking method and system applied to unity engine
  • Vertex color rendering and baking method and system applied to unity engine

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0076] Please refer to figure 2 , this embodiment provides a vertex color rendering baking method applied to the Unity engine, which can reduce the storage capacity of AO information and improve baking efficiency at the same time. Specifically, the method may include:

[0077] S1: Create a copy (ColoredMesh) that copies the original mesh model (Mesh); the copy is used to store the vertex color information of the mesh model; if there is no vertex color information in the original mesh model, create a vertex color for the copy information; then save a copy to a resource file.

[0078] It is preferable to set the vertex color information to white; it is preferable to use the AssetDatabase.CreateAsset() method under the UnityEditor namespace in the Unity engine to save the asset file, which is the method provided by the Unity engine to save the model object in the editor mode.

[0079] S2: Read the vertex position and vertex normal of each vertex in the grid model; then convert...

Embodiment 2

[0093] This embodiment is further extended on the basis of the first embodiment, so that it can also adjust the vertex color of the baked model at the same time, so as to meet the custom fine-tuning requirements.

[0094] Specifically, the following steps may also be included:

[0095] S6: Add a mesh collider (MeshCollider) to the model that needs fine-tuning drawing.

[0096] S7: Listen to the scene view update event (SceneView.onSceneGUIDelegate) of the Unity editor.

[0097] S8: Disable object selection when the scene view is updated; preferably, it can be realized by calling HandleUtility.AddDefaultControl(GUIUtility.GetControlID(FocusType.Passive)).

[0098] S9: Monitor mouse events and perform drawing operations.

[0099] When the mouse is pressed, the drawing mode starts; when the mouse is released, the drawing ends;

[0100] When the mouse is held down and the mouse moves, call to emit a ray from the mouse position in the scene view, preferably by calling HandleUtil...

Embodiment 3

[0105] see Figure 4 , this embodiment is a vertex color rendering and baking system applied to the Unity engine provided on the basis of Embodiment 1, including:

[0106] The first creation module 5 is used to create a copy of the grid model;

[0107] The second creation module 6 is used to create a vertex color information for the copy if no vertex color information is stored in the mesh model;

[0108] Reading module 1, used to read the vertex position and vertex normal of each vertex in the grid model;

[0109] A conversion module 8, configured to convert the vertex position and vertex normal into the vertex position and vertex normal in the world coordinate system.

[0110] The first preset module 9 is used to preset the sampling range of the near plane and the far plane of the sampling camera, and preset the pixel rectangle of the sampling camera;

[0111] The second preset module 10 is used to preset the background of the sampling camera to be pure white;

[0112] S...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The present invention provides a vertex color drawing and baking method and system applied to the Unity engine. The method includes reading the vertex position and vertex normal of each vertex in the grid model; According to the direction of the vertex normal of a vertex, render the vertex; traverse each vertex, and perform the rendering operation one by one; obtain the corresponding sampling color according to the rendering texture of each vertex, and write it into the vertex color information . The invention can not only reduce the storage capacity of AO information, but also improve the baking efficiency; further, the model has high correlation, which is convenient for post-editing; finally, it can also support custom fine-tuning of the baked vertex color.

Description

technical field [0001] The invention relates to the field of 3D scene rendering, in particular to a vertex color rendering baking method and system applied to a Unity engine. Background technique [0002] With the development of computer graphics technology, players have higher and higher requirements for the fidelity of game screen graphics. In recent years, the most critical link to promote the realistic game graphics is lighting / light and shadow effects. If the simulation can be very similar to real life The same lighting effect, then the picture of the game will be extraordinary, but the calculation of lighting / light and shadow effects is very complicated and consumes huge resources, which has become the biggest obstacle hindering the advancement of related technologies. [0003] Ambient Occlusion, hereinafter referred to as AO, is used to describe the effect of blocking the diffuse light around the object when it intersects or approaches the object. It can solve or impr...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06T15/50
CPCG06T15/506
Inventor 刘德建林琛谢曦
Owner 福建省天奕网络科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products