Skip to content

Commit 0d4d86b

Browse files
committed
version 2.5.13
1 parent 52f7b55 commit 0d4d86b

33 files changed

+1109
-878
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Change Log
22

3+
## [2.5.13] - 2023-08-01
4+
5+
- Improvements
6+
- Improved import and export handling of some materials.
7+
- Changes
8+
- The conversion processes of Occulusion map and Metallic Roughness map were integrated as the conversion process of ORM map.
9+
310
## [2.5.12] - 2023-07-28
411

512
- Features

Documentation~/UniVGO/Installation.ja.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ___
1919
|Unity 2022.3||||未確認|未確認|未確認|
2020
|Unity 2023.1||||未確認|未確認|未確認|
2121

22-
2023年7月の時点では `Unity 2023.1``Windows``.NET Standard 2.1` 環境にて開発&確認を行っています。
22+
2023年8月の時点では `Unity 2023.1``Windows``.NET Standard 2.1` 環境にて開発&確認を行っています。
2323

2424
### 必要パッケージ
2525

@@ -44,7 +44,7 @@ Unity 2021.1 以下のバージョンを使用する場合
4444
|com.izayoi.liltoon.shader.utility|IzayoiJiichan|GitHub||1.4.0|2023年5月30日|
4545
|com.izayoi.unishaders|IzayoiJiichan|GitHub||1.6.0|2023年7月28日|
4646
|com.izayoi.vgospringbone|IzayoiJiichan|GitHub||1.1.2|2022年8月24日|
47-
|com.izayoi.univgo|IzayoiJiichan|GitHub|VGO 2.5|2.5.12|2023年7月28日|
47+
|com.izayoi.univgo|IzayoiJiichan|GitHub|VGO 2.5|2.5.13|2023年8月1日|
4848

4949
#### 追加パッケージ
5050

@@ -142,7 +142,7 @@ UniVGOを使用するために、以下の設定を追加してください。
142142
"dependencies": {
143143
"com.izayoi.liltoon.shader.utility": "https://github.com/izayoijiichan/lilToonShaderUtility.git#v1.4.0",
144144
"com.izayoi.unishaders": "https://github.com/izayoijiichan/UniShaders.git#v1.6.0",
145-
"com.izayoi.univgo": "https://github.com/izayoijiican/VGO.git#v2.5.12",
145+
"com.izayoi.univgo": "https://github.com/izayoijiican/VGO.git#v2.5.13",
146146
"com.izayoi.vgospringbone": "https://github.com/izayoijiichan/VgoSpringBone.git#v1.1.2",
147147
"com.unity.nuget.newtonsoft-json": "3.2.1",
148148
"com.unity.ugui": "1.0.0",
@@ -245,19 +245,19 @@ ___
245245

246246
|UniVRM|UniVGO|min Unity|
247247
|:---:|:---:|:---:|
248-
|0.100.0|2.5.12|2020.3|
249-
|0.101.0|2.5.12|2020.3|
250-
|0.102.0|2.5.12|2020.3|
251-
|0.103.2|2.5.12|2020.3|
252-
|0.104.2|2.5.12|2020.3|
253-
|0.105.0|2.5.12|2020.3|
254-
|0.106.0|2.5.12|2020.3|
255-
|0.107.2|2.5.12|2020.3|
256-
|0.108.0|2.5.12|2020.3|
257-
|0.109.0|2.5.12|2020.3|
258-
|0.110.0|2.5.12|2020.3|
259-
|0.111.0|2.5.12|2020.3|
260-
|0.112.0|2.5.12|2020.3|
248+
|0.100.0|2.5.13|2020.3|
249+
|0.101.0|2.5.13|2020.3|
250+
|0.102.0|2.5.13|2020.3|
251+
|0.103.2|2.5.13|2020.3|
252+
|0.104.2|2.5.13|2020.3|
253+
|0.105.0|2.5.13|2020.3|
254+
|0.106.0|2.5.13|2020.3|
255+
|0.107.2|2.5.13|2020.3|
256+
|0.108.0|2.5.13|2020.3|
257+
|0.109.0|2.5.13|2020.3|
258+
|0.110.0|2.5.13|2020.3|
259+
|0.111.0|2.5.13|2020.3|
260+
|0.112.0|2.5.13|2020.3|
261261

262262
`<Project>/Packages/package.json` に以下の記述を行います。
263263

@@ -288,7 +288,7 @@ https://github.com/izayoijiichan/VGO/wiki/How-to-use-UniVRM-and-UniVGO-together
288288
|2022.3.0f1|BRP|UniVGO + UniVRM|[Link](https://github.com/izayoijiichan/univgo2.sample.unity.project/tree/unity2022.3.brp.univrm)|
289289

290290
___
291-
最終更新日:2023年7月28日
291+
最終更新日:2023年8月1日
292292
編集者:十六夜おじいちゃん
293293

294294
*Copyright (C) 2020 Izayoi Jiichan. All Rights Reserved.*

Documentation~/UniVGO/Installation.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ___
1919
|Unity 2022.3|OK|OK|unconfirmed|unconfirmed|unconfirmed|unconfirmed|
2020
|Unity 2023.1|OK|OK|unconfirmed|unconfirmed|unconfirmed|unconfirmed|
2121

22-
As of July of 2023, we are developing and confirming in `Unity 2023.1`, `Windows`, `.NET Standard 2.1` environment.
22+
As of August of 2023, we are developing and confirming in `Unity 2023.1`, `Windows`, `.NET Standard 2.1` environment.
2323

2424
### Required package
2525

@@ -44,7 +44,7 @@ This package is required for any Unity version.
4444
|com.izayoi.liltoon.shader.utility|IzayoiJiichan|GitHub||1.4.0|30 May, 2023|
4545
|com.izayoi.unishaders|IzayoiJiichan|GitHub||1.6.0|28 Jul, 2023|
4646
|com.izayoi.vgospringbone|IzayoiJiichan|GitHub||1.1.2|24 Aug, 2022|
47-
|com.izayoi.univgo|IzayoiJiichan|GitHub|VGO 2.5|2.5.12|28 Jul, 2023|
47+
|com.izayoi.univgo|IzayoiJiichan|GitHub|VGO 2.5|2.5.13|1 Aug, 2023|
4848

4949
#### Additional Packages
5050

@@ -141,7 +141,7 @@ To use UniVGO, add the following settings.
141141
"dependencies": {
142142
"com.izayoi.liltoon.shader.utility": "https://github.com/izayoijiichan/lilToonShaderUtility.git#v1.4.0",
143143
"com.izayoi.unishaders": "https://github.com/izayoijiichan/UniShaders.git#v1.6.0",
144-
"com.izayoi.univgo": "https://github.com/izayoijiican/VGO.git#v2.5.12",
144+
"com.izayoi.univgo": "https://github.com/izayoijiican/VGO.git#v2.5.13",
145145
"com.izayoi.vgospringbone": "https://github.com/izayoijiichan/VgoSpringBone.git#v1.1.2",
146146
"com.unity.nuget.newtonsoft-json": "3.2.1",
147147
"com.unity.ugui": "1.0.0",
@@ -243,19 +243,19 @@ The version combinations are as follows.
243243

244244
|UniVRM|UniVGO|min Unity|
245245
|:---:|:---:|:---:|
246-
|0.100.0|2.5.12|2020.3|
247-
|0.101.0|2.5.12|2020.3|
248-
|0.102.0|2.5.12|2020.3|
249-
|0.103.2|2.5.12|2020.3|
250-
|0.104.2|2.5.12|2020.3|
251-
|0.105.0|2.5.12|2020.3|
252-
|0.106.0|2.5.12|2020.3|
253-
|0.107.2|2.5.12|2020.3|
254-
|0.108.0|2.5.12|2020.3|
255-
|0.109.0|2.5.12|2020.3|
256-
|0.110.0|2.5.12|2020.3|
257-
|0.111.0|2.5.12|2020.3|
258-
|0.112.0|2.5.12|2020.3|
246+
|0.100.0|2.5.13|2020.3|
247+
|0.101.0|2.5.13|2020.3|
248+
|0.102.0|2.5.13|2020.3|
249+
|0.103.2|2.5.13|2020.3|
250+
|0.104.2|2.5.13|2020.3|
251+
|0.105.0|2.5.13|2020.3|
252+
|0.106.0|2.5.13|2020.3|
253+
|0.107.2|2.5.13|2020.3|
254+
|0.108.0|2.5.13|2020.3|
255+
|0.109.0|2.5.13|2020.3|
256+
|0.110.0|2.5.13|2020.3|
257+
|0.111.0|2.5.13|2020.3|
258+
|0.112.0|2.5.13|2020.3|
259259

260260
Write the following in `<Project> /Packages/package.json`.
261261

@@ -285,7 +285,7 @@ https://github.com/izayoijiichan/VGO/wiki/How-to-use-UniVRM-and-UniVGO-together
285285
|2022.3.0f1|BRP|UniVGO + UniVRM|[Link](https://github.com/izayoijiichan/univgo2.sample.unity.project/tree/unity2022.3.brp.univrm)|
286286

287287
___
288-
Last updated: 28 July, 2023
288+
Last updated: 1 August, 2023
289289
Editor: Izayoi Jiichan
290290

291291
*Copyright (C) 2020 Izayoi Jiichan. All Rights Reserved.*

UniVgo2/Runtime/Converters/Textures/MetallicRoughnessMapConverter.cs

-126
This file was deleted.

UniVgo2/Runtime/Converters/Textures/NormalMapConverter.cs

+44-10
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,56 @@
66
namespace UniVgo2.Converters
77
{
88
using NewtonVgo;
9-
using System;
109
using UnityEngine;
1110

1211
/// <summary>
1312
/// Normal Map Converter
1413
/// </summary>
15-
public class NormalMapConverter : TextureConverter
14+
public class NormalMapConverter : TextureConverterBase
1615
{
16+
#region Fields
17+
18+
/// <summary>Normal Map Encoder</summary>
19+
private Shader? _Encoder;
20+
21+
/// <summary>Normal Map Decoder</summary>
22+
private Shader? _Decoder;
23+
24+
/// <summary>Normal Map Exporter</summary>
25+
/// <remarks>VRMShader 0.84.0 or higher</remarks>
26+
private Shader? _Exporter;
27+
28+
#endregion
29+
30+
#region Properties
31+
32+
/// <summary>Normal Map Encoder</summary>
33+
private Shader? Encoder => _Encoder ??= Shader.Find("UniGLTF/NormalMapEncoder");
34+
35+
/// <summary>Normal Map Decoder</summary>
36+
private Shader? Decoder => _Decoder ??= Shader.Find("UniGLTF/NormalMapDecoder");
37+
38+
/// <summary>Normal Map Exporter</summary>
39+
/// <remarks>VRMShader 0.84.0 or higher</remarks>
40+
private Shader? Exporter => _Exporter ??= Shader.Find("Hidden/UniGLTF/NormalMapExporter");
41+
42+
#endregion
43+
44+
#region Public Methods
45+
1746
/// <summary>
1847
/// Get import texture.
1948
/// </summary>
2049
/// <param name="source">The source texture.</param>
2150
/// <returns></returns>
2251
public Texture2D GetImportTexture(in Texture2D source)
2352
{
24-
Shader? encoder = Shader.Find("UniGLTF/NormalMapEncoder");
25-
26-
if (encoder == null)
53+
if (Encoder == null)
2754
{
2855
ThrowHelper.ThrowFileNotFoundException("UniGLTF/NormalMapEncoder.shader");
2956
}
3057

31-
Material converter = new Material(encoder);
58+
var converter = new Material(Encoder);
3259

3360
Texture2D copyTexture = CopyTexture2d(source, VgoColorSpaceType.Linear, converter);
3461

@@ -51,14 +78,19 @@ public Texture2D GetImportTexture(in Texture2D source)
5178
/// <returns></returns>
5279
public Texture2D GetExportTexture(in Texture2D source)
5380
{
54-
Shader? decoder = Shader.Find("UniGLTF/NormalMapDecoder");
81+
Shader? exporter = Exporter;
5582

56-
if (decoder == null)
83+
if (exporter == null)
5784
{
58-
ThrowHelper.ThrowFileNotFoundException("UniGLTF/NormalMapDecoder.shader");
85+
if (Decoder == null)
86+
{
87+
ThrowHelper.ThrowFileNotFoundException("UniGLTF/NormalMapDecoder.shader");
88+
}
89+
90+
exporter = Decoder;
5991
}
6092

61-
Material converter = new Material(decoder);
93+
var converter = new Material(exporter);
6294

6395
Texture2D copyTexture = CopyTexture2d(source, VgoColorSpaceType.Linear, converter);
6496

@@ -73,5 +105,7 @@ public Texture2D GetExportTexture(in Texture2D source)
73105

74106
return copyTexture;
75107
}
108+
109+
#endregion
76110
}
77111
}

0 commit comments

Comments
 (0)