-
Notifications
You must be signed in to change notification settings - Fork 430
ReleaseNote v0.42
The errors in VRM output from earlier versions (UniVRM 0.41 and before) have been fixed in v0.42. However, this fix comes along with the following impact:
- The exported VRM data in v0.42 or later cannot be imported correctly in the earlier versions
When exporting VRM data using UniVRM, please check which version you use to make VRM model. If you are using UniVRM to import VRM data, please update UniVRM to the latest version as soon as you can.
In v0.41 and the earlier versions, converting UV between Unity and GLTF was incorrect.
Before
var converted_uv = new Vec2(uv.x, -uv.y); // value becomes negative
After
var converted_uv = new Vec2(uv.x, 1.0f-uv.y);
This change influences both import and export.
- The UV of imported VRM is correct.
- V will become negative when loading the correct UV of VRM with the earlier versions.
- Texture display will be distorted if texture is set to
Clamp
. The default isRepeat
.
VRM's UV in v0.41 and before | VRM's UV from v0.42 | |
---|---|---|
Importer in UniVRM-0.41 and before | 〇 (negative x negative = positive) | × (positive x negative = negative) |
Importer from UniVRM-0.42 | 〇 | 〇 |
General GLTF loader | × | 〇 |
- To developers: please update UniVRM to v0.42 as soon as possible.
- We created a judger based on the string
UniGLTF-1.16 (v0.42)
in GLTF/assets/generator
in importer to detect whether a VRM model is made by the version before 0.42. For v0.42, it can import VRM model correctly.
The method to call Mesh.RecalculateTangents was inappropriate and it was not able to generate Tangents. We have fixed this issue. It influences the use of normal map.
- Tangents can be calculated and generated from Normal and UV
- The differences of coordinate axes between GLTF and Unity can be absorbed
- File size can be decreased if Tangents is not recorded
Based on the reasons above, we decided not to export Tangents. (If any problem occurs, please let us know through https://github.com/ousttrue/UniGLTF/issues)
It seems necessary for outputting OpenGL's interleaved vbo format:
// Example of interleaved format
struct Vertex
{
public Vector3 Position;
public Vector3 Normal;
}
Vertex[] Vertices;
Since UniGLTF outputs separate arrays for each vertex attribute, ByteStride was unnecessary.
When this is not defined, data is tightly packed. When two or more accessors use the same bufferView, this field must be defined.
Also, we found that ByteStride should not output to Index.
/materials/*/alphaMode
/materials/*/doubleSided
- KHR_material_unlit
- texture sampler(repeat, clamp, mirror)
- https://github.com/ousttrue/UniGLTF/issues/12
- Handling semi-transparent texture #28
Also, when setting MToon, we tried to pass parameters as many as possible to GLTF material: KHR_material_unlit, AlphaMode, DoubleSided
.
This improvement has influences on VRM files changed to .glb format when loading with other tools.
- VRM/UniHumanoid => VRM/UniGLTF/UniHumanoid
- VRM/Scripts/DepthFirstScheduler(Former UniTask) => VRM/UniGLTF/DepthFirstScheduler
The asset for BlendShape now is independent (previously it is a sub-asset of Prefab)
The state of BlendShape before model normalization is now used as a reference. You can make BlendShape before normalization and Bake the state of BlendShape during normalization.
We fixed BVH skeleton estimation. Report errors here when it fails: https://github.com/ousttrue/UniHumanoid/issues