Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
ca8c5e6
Update samples to can load VRMs on mobile devices
yutopp Jun 23, 2022
f4c46fb
Can add multiple names (but can find keys only when the name is unique)
yutopp Jun 23, 2022
5277e41
Support exporting non-skinned meshs for VRM
yutopp Jun 23, 2022
1515a97
Do not check that scales are uniform
yutopp Jun 23, 2022
b8e8a7c
Suppress glTF warnings
yutopp Jun 23, 2022
841ce7d
Update README
yutopp Jul 23, 2022
cab0e09
Update .gitignore
yutopp Jul 23, 2022
9b0a27e
Use bone name directly
yutopp Jul 30, 2022
a9b0a7d
Add KHR_materials_emissive_strength data structure
yutopp Aug 7, 2022
b458f2f
Support exporting KHR_materials_emissive_strength
yutopp Aug 7, 2022
2628dba
Support importing KHR_materials_emissive_strength
yutopp Aug 7, 2022
e2cbfde
Add a sample EmissiveStrengthTest. Update sample scene to render HDR …
yutopp Aug 7, 2022
3729add
Remove an unused files
yutopp Aug 7, 2022
1a8bbbf
Refactor
yutopp Aug 7, 2022
f75ec25
Add SamplerExporter
faidra Aug 21, 2022
6a69873
add SamplerExporter into ExporterContext
faidra Aug 21, 2022
24f96ed
export sampler
faidra Aug 21, 2022
d879359
add SamplerApplier
faidra Aug 21, 2022
ca9ba74
add SamplerApplier into ImporterContext
faidra Aug 21, 2022
8454d8b
use SamplerApplier
faidra Aug 21, 2022
0ba9fcf
Merge pull request #29 from faidra/support_sampler
yutopp Aug 23, 2022
6d20689
Update package-lock to apply diff that generated under unity 2019.4
yutopp Aug 23, 2022
7918160
make IndexedResourceDict able to use IEqualityComparer
faidra Oct 5, 2022
f61331e
same mesh with different materials is exported as different gltfMesh
faidra Oct 5, 2022
c3c06f8
add comment to avoid exporting duplicated data
faidra Oct 5, 2022
3376837
add comment to avoid duplicated mesh import
faidra Oct 5, 2022
b3d4f9e
Merge pull request #31 from faidra/export-mesh-with-other-materials-a…
yutopp Oct 9, 2022
d37c203
split interface
paldynojosh Nov 1, 2022
5e04d49
move material export bridge func
paldynojosh Nov 1, 2022
fa26066
Merge pull request #33 from paldynojosh/paldynojosh/refactor_exporter…
yutopp Nov 7, 2022
92faa46
Fix that build errors happened on Unity 2019
yutopp Nov 14, 2022
facd448
Update VJson to v0.9.12
yutopp Nov 14, 2022
8d3ab1a
Improve README and comments in examples. Modify some parameters in ex…
yutopp Mar 25, 2023
b13f75b
Fix README
yutopp Mar 25, 2023
41b3398
Improve README
yutopp Mar 26, 2023
0c593f1
Add VRoid sample model and set it as default model in example
yutopp Mar 26, 2023
a36b729
Cache key when loading textures which requires conveting
yutopp Mar 26, 2023
c3285c8
Add BlendShapeUnifier for VRM.Unity
yutopp Apr 6, 2023
5e045c3
Unify blendshapes when exporting VRM. Fix some issues
yutopp Apr 6, 2023
94f81d0
Add secondary node if not exists when importing VRM
yutopp Apr 7, 2023
bfb5c63
Resolve #34. Fix typo
yutopp Apr 8, 2023
4c743e9
Add easy-way to set parents for nodes when importing glTF
yutopp Apr 8, 2023
f3d42ec
Merge remote-tracking branch 'origin/master' into support_animation
faidra May 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 28 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
# This .gitignore file should be placed at the root of your Unity project directory
#
# https://raw.githubusercontent.com/github/gitignore/master/Unity.gitignore
# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore
#
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Bb]uild/
[Bb]uilds/
[Ll]ogs/
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Uu]ser[Ss]ettings/

# Never ignore Asset meta data
![Aa]ssets/**/*.meta
# MemoryCaptures can get excessive in size.
# They also could contain extremely sensitive data
/[Mm]emoryCaptures/

# Recordings can get excessive in size
/[Rr]ecordings/

# Uncomment this line if you wish to ignore the asset store tools plugin
# [Aa]ssets/AssetStoreTools*
# /[Aa]ssets/AssetStoreTools*

# Autogenerated Jetbrains Rider plugin
/[Aa]ssets/Plugins/Editor/JetBrains*

# Visual Studio cache directory
.vs/
Expand Down Expand Up @@ -48,11 +57,20 @@ sysinfo.txt

# Builds
*.apk
*.aab
*.unitypackage
*.app

# Crashlytics generated file
crashlytics-build.properties

# Packed Addressables
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*

# Temporary auto-generated Android Assets
/[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/*

#
#
#
Expand Down
8 changes: 8 additions & 0 deletions Assets/StreamingAssets/SampleModels/EmissiveStrengthTest.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions Assets/StreamingAssets/SampleModels/EmissiveStrengthTest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Emissive Strength Test

## Screenshots

### Plain Rendering (Test Passes)

![plain screenshot](screenshot/screenshot_large_plain.jpg)

### Render with Optional Bloom Effect Enabled

![screenshot with bloom](screenshot/screenshot_large_bloom.jpg)

These screenshots were rendered in BabylonJS with the default IBL strength dialed
down to help the glow stand out. The second screenshot has an optional "Bloom" effect
applied using the BabylonJS Default Rendering Pipeline.

## Description

This model tests if the `KHR_materials_emissive_strength` extension is available in a
given implementation. If it is not, the cubes will all emit the same shade of
light blue. For implementations that support this extension, the cubes will be
progressively brighter to the right.

## Cube Colors

The basic emissive color of all the cubes is `[0.1, 0.5, 0.9]` in the glTF file, which
is expected to undergo the usual linear-to-sRGB transfer before being shown to the viewer.
The cube on the far left has no emissive strength extension (`1x`), and each subsequent
cube doubles the strength (`2x`, `4x`, `8x`, and `16x`).

With a simple output mapping, the cube on the far right may appear as
plain white, due to all of its color components being clamped to the 1.0 upper limit.
If "bloom" effects are enabled, some cubes may appear to glow. In a path-tracing
engine, all of these cubes may emit light, but the ones on the right should
emit substantially more light.

## Test Failure

If a given implementation does not support `KHR_materials_emissive_strength`, the
boxes will all appear to emit the same color. For example:

![test fail screenshot](screenshot/test_fail.jpg)

## License Information

Copyright 2022 Analytical Graphics, Inc.
CC-BY 4.0 https://creativecommons.org/licenses/by/4.0/
Model and textures by Ed Mackey.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions Assets/VGltfExamples/Common/Scripts/StreamReaderFactory.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
using System.IO;
using UnityEngine;
# if !UNITY_EDITOR && UNITY_ANDROID
using System;
using UnityEngine.Networking;
# endif

namespace VGltfExamples.Common
{
public static class StreamReaderFactory
{
# if !UNITY_EDITOR && UNITY_ANDROID
public static Stream Create(string path)
{
var basePath = "jar:file://" + Application.dataPath + "!/assets/";
var url = basePath + path;
using (var req = UnityWebRequest.Get(url))
{
req.SendWebRequest();

while (!req.isDone && !req.isNetworkError && !req.isHttpError) { }
if (req.isNetworkError || req.isHttpError) {
throw new Exception($"Failed to load: url = {url}, error = {req.error}");
}

return new MemoryStream(req.downloadHandler.data);
}
}
# elif !UNITY_EDITOR && UNITY_IOS
public static Stream Create(string path)
{
var basePath = Path.Combine(Application.dataPath, "Raw");
return File.OpenRead(Path.Combine(basePath, path));
}
# else
public static Stream Create(string path)
{
var basePath = Path.Combine(Application.dataPath, "StreamingAssets");
return File.OpenRead(Path.Combine(basePath, path));
}
# endif
}
}
11 changes: 11 additions & 0 deletions Assets/VGltfExamples/Common/Scripts/StreamReaderFactory.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Assets/VGltfExamples/Common/Scripts/TimeSlicer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@

namespace VGltfExamples.Common
{
// TimeSlicer is a utility class to slice the loading process of glTF.
// If loading takes more than {limitMillisecPerFrame} ms to process on the main thread during {maxFrameCount} frames,
// interrupt the loading and wait for the next frame to avoid continuing to block the main thread.
public sealed class TimeSlicer : VGltf.Unity.ITimeSlicer
{
readonly int limitMillisecPerFrame = 16;
readonly int maxFrameCount = 120; // 120フレーム以内に読まれれば良い
readonly int maxFrameCount = 120;

readonly System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
int elapsedFrame = 0;
Expand Down
Loading