glTF Model Format Export Tutorial
How to export glTF files that meet the requirements of the Kivicube editor?
Last updated
How to export glTF files that meet the requirements of the Kivicube editor?
Last updated
For detailed specifications, please refer to: https://www.yuque.com/kivicube/manual/workflow
Option 1: The artist needs to install the glTF export plug-in in various 3D modeling software, and then configure the model material and other settings before exporting; due to the wide variety of 3D modeling software used, the currently supported 3D software includes: 3Ds max, Maya, Blender, Substance Painter, Dimension. Option 2: The artist needs to install the glTF export plug-in in the game engine Unity, and then configure the model material and other settings before exporting; these are suitable for a wider range of modeling software, such as: Cinema 4D, Sketchup, Zbrush, Inventor, Revit, Lightwave, SolidWorks etc. Through Option 2, we can also extend more forms. It can be thought that as long as it is a model that can be imported into Unity, we can eventually convert it to glTF through Unity's glTF export plug-in. In this way, some niche 3D design software, some 3D scanning software and some oblique photography software can produce and export the intermediate 3D format, and then import it into Unity, and finally export glTF.
Here are two niche 3D design software:
Microsoft 3D drawing software: Paint 3D (Paint 3D) Buy drawing 3D-Microsoft Store zh-cn Pixelated style 3D design software http://ephtracy.github.io/
For more software to export glTF, please visit: https://www.yuque.com/kivicube/manual/3d-gltf-export
Unity supports rich shader types (achieved by setting different Shaders). Currently exporting glTF only supports two shaders (two Shaders), namely:
Standard (Specular Setup)
Standard
These two materials correspond to the two workflows of PBR materials, namely, the (Metallic/Roughness) workflow and the (Specular/Glossiness) workflow.
So the question is, what kind of workflow should we choose? How to deal with traditional next-generation textures?
For these two questions, you can refer to: The basic theory of PBR material: https://www.marmoset.co/posts/basic-theory-of-physically-based-rendering/ Characteristics of PBR material: https://www.marmoset.co/posts/physically-based-rendering-and-you-can-too/
How to choose your own suitable workflow and how to switch from the traditional next-generation to the PBR process: https://www.marmoset.co/posts/pbr-texture-conversion/
Regarding the conversion of textures, you can refer to the following simple process: We know that the traditional next generations are: Diffuse (diffuse), Specular (high light), Normal (normal), Emission (self-illumination); by comparing with the PBR process, we only Need to convert Diffuse and Specular;
Regarding Diffuse, in the traditional way, if the Diffuse and transparency textures are divided into two textures, they need to be merged into a texture containing Alpha. The specific method is as follows:
Then we split the Diffuse texture into Albedo and AO, the specific method is as follows:
Then we split Specular into Specular and Glossiness in the following way:
1.3.3 The model of the Specular/Glossiness workflow exported to glTF in Unity
We already know how to convert traditional next-generation textures into PBR textures, which are actually specular/glossiness (Specular/Glossiness) workflow textures, so let’s specify some settings in Unity;
First select the following material Shader: Standard (Specular Setup)
Exporting glTF only supports the red box in the figure above, explained separately:
1.Albebo: Support the export of the following color settings;
2. Specular: If we do not set the Specular map, we can set the color value of Specular, and it can also be exported;
3. Smoothness: In fact, it refers to Gossiness. It just changed a name in the Unity software, but we found that it can’t set textures, but achieved it in another form. We can see that there is a Source option under Smoothness, which refers to The source of the Smoothness texture. For example, the settings in the figure below refer to the source of the Smoothness texture and the Alpha channel of the Spectacular texture. Therefore, the artist needs to merge the Spectacular texture with the Smoothness (Glossiness) texture.
In addition, regarding Smoothness, we should also note that if the Spectacular texture is not set, the natural Smoothness texture will not be set. At this time, the smoothness intensity parameter (0.5 in the figure) can be exported. If the Spectacular texture has been set (That is, the Smoothness map is also set), then the set intensity value (0.5) will not be exported;
4. Normal: Support the export of the normal intensity value
5. Occlusion (AO map): Support the export of the following intensity values
6. Emission: Supports self-luminous color export and self-luminous intensity export
But we must pay attention: the intensity value needs to be 0-1, otherwise it cannot be supported after export;
First install the plug-in, the plug-in download address: Baidu network disk: https://pan.baidu.com/s/1MAPos97q0Sd4YI_T5P0hnw Extraction code: 9wea GitHub: https://github.com/yangfawen/glTF-Export-Tutorial/raw/master/glTF-Export-Plugins/Kivicube_glTF_Exporter.unitypackage
Installation method: After downloading Kivicube_glTF_Exporter.unitypackage, drag and drop this file into the Unity program to import. Unity version recommended v5.6.5p4 and above.
note: • No script can be mounted on all exported objects; • The names of all exported objects can only be in English (including all levels under the object and the attached Animator Controller); • English names must be used when exporting glTF files; • Support the export of animations made in Unity, you need to click on the model and set the model type to Legacy in the Inspector.
• Can't find the menu Tools? If the tools are not displayed in the higher version of Unity, please enter the settings, find the Configuration as shown in the figure below, and adjust the .net 4.0 to .net 3.5.
This is another workflow of PBR material, so let's explain some settings in Unity in detail;
First select the following material Shader: Standard
Exporting glTF only supports the red box part in the above figure. You need to know that the two workflows are only different from the second and third items (Metallic, Smoothness), and the other parts remain unchanged; Metallic: If we do not set the Metallic map, we can set the color value of Metallic, and it can also be exported;
Smoothness: In order to remain the same as the mirror/gloss workflow, Unity software still retains the term Smoothness, but the model material of the metal/roughness workflow uses roughness map (Roughness), which is required in this case Convert in advance, you can use software such as Photoshop to reverse the roughness map in black and white to get the Smoothness map;
Like the mirror/gloss workflow, we can’t directly set the source of the Smoothness texture, so we need to merge the texture from the black and white reverse with the Metallic texture;
Later, we will add support for Standard (Roughness setup). As shown in the figure below, we find that the roughness map can be set directly, which is a very convenient thing for art.
For details, please refer to: https://www.yuque.com/kivicube/manual/3d-gltf-export