Method and system for vertex color drawing baking used for Unity engine

A baking method and vertex technology, applied in the field of 3D scene rendering, can solve problems such as difficult editing, low baking efficiency, and uv complexity, and achieve the effects of saving storage space, improving baking efficiency, and saving a lot of storage

Active Publication Date: 2018-07-06
福建省天奕网络科技有限公司
View PDF11 Cites 12 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 stora...

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
  • Method and system for vertex color drawing baking used for Unity engine
  • Method and system for vertex color drawing baking used for Unity engine
  • Method and system for vertex color drawing baking used for 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 method and a system for vertex color drawing baking used for a Unity engine. The method comprises the steps of: reading the vertex position and the vertex normal of each vertex in a mesh model; putting a sampling camera to the vertex position of one vertex, facing the direction of the vertex normal of the vertex, and performing rendering of the vertex; traversing each vertex, and performing rendering operation one by one; and according to rendering textures of each vertex, obtaining corresponding sampling colors, and writing the corresponding sampling colors into the vertex color information. The method and the system for vertex color drawing baking used for the Unity engine can reduce the storage capacity of AO information, can improve the baking efficiency, further, are high in model correlation to facilitate later-stage editing, and finally, can support customized fine tuning of the vertex colors after baking.

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
IPC IPC(8): G06T15/50
CPCG06T15/506
Inventor 刘德建林琛谢曦
Owner 福建省天奕网络科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products