Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

「VRM」→「Export VRM file from VRChat avatar」を選択するとエラーがでる: ArgumentException: Blend shape index out of range. #28

Closed
Roumei0624 opened this issue Dec 15, 2021 · 15 comments · Fixed by #75
Labels
bug Something isn't working VRChat→VRM

Comments

@Roumei0624
Copy link

Roumei0624 commented Dec 15, 2021

下記内容エラーが出てしまうのですが、原因わかりますでしょうか?

:::::::::::::::::::::::::::::::::::::::::::::::::::
ArgumentException: Blend shape index out of range.
Esperecyan.Unity.VRMConverterForVRChat.Utilities.VRChatUtility.DetectBlinkExpressions (System.Collections.Generic.IDictionary2[TKey,TValue] expressions, UnityEngine.GameObject instance, System.Collections.Generic.IEnumerable1[T] shapeKeyNames) (at Library/PackageCache/[email protected]/Editor/Utilities/VRChatUtility.cs:382)
Esperecyan.Unity.VRMConverterForVRChat.Utilities.VRChatUtility.DetectVRChatExpressions (UnityEngine.GameObject instance, System.Collections.Generic.IEnumerable`1[T] shapeKeyNames) (at Library/PackageCache/[email protected]/Editor/Utilities/VRChatUtility.cs:332)
Esperecyan.Unity.VRMConverterForVRChat.UI.VRChatToVRMWizard.DrawWizardGUI () (at Library/PackageCache/[email protected]/Editor/UI/VRChatToVRMWizard.cs:170)
UnityEditor.ScriptableWizard.OnGUI () (at :0)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at :0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at :0)
UnityEditor.HostView.Invoke (System.String methodName) (at :0)
UnityEditor.HostView.OldOnGUI () (at :0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

:::::::::::::::::::::::::::::::::::::::::::::::::::
GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced.
UnityEngine.GUIUtility:ProcessEvent (int,intptr)
:::::::::::::::::::::::::::::::::::::::::::::::::::

ArgumentException: Blend shape index out of range.
Esperecyan.Unity.VRMConverterForVRChat.Utilities.VRChatUtility.DetectBlinkExpressions (System.Collections.Generic.IDictionary2[TKey,TValue] expressions, UnityEngine.GameObject instance, System.Collections.Generic.IEnumerable1[T] shapeKeyNames) (at Library/PackageCache/[email protected]/Editor/Utilities/VRChatUtility.cs:382)
Esperecyan.Unity.VRMConverterForVRChat.Utilities.VRChatUtility.DetectVRChatExpressions (UnityEngine.GameObject instance, System.Collections.Generic.IEnumerable`1[T] shapeKeyNames) (at Library/PackageCache/[email protected]/Editor/Utilities/VRChatUtility.cs:332)
Esperecyan.Unity.VRMConverterForVRChat.UI.VRChatToVRMWizard.DrawWizardGUI () (at Library/PackageCache/[email protected]/Editor/UI/VRChatToVRMWizard.cs:170)
UnityEditor.ScriptableWizard.OnGUI () (at :0)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at :0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at :0)
UnityEditor.HostView.Invoke (System.String methodName) (at :0)
UnityEditor.HostView.OldOnGUI () (at :0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at :0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at :0)
UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at :0)
UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Boolean straightY, System.Single pixelsPerPoint, System.Exception& immediateException) (at :0)
Rethrow as ImmediateModeException
UnityEngine.UIElements.UIR.RenderChain.Render (UnityEngine.Rect viewport, UnityEngine.Matrix4x4 projection, UnityEngine.UIElements.PanelClearFlags clearFlags) (at :0)
UnityEngine.UIElements.UIRRepaintUpdater.DrawChain (UnityEngine.Rect viewport, UnityEngine.Matrix4x4 projection) (at :0)
UnityEngine.UIElements.UIRRepaintUpdater.Update () (at :0)
UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at :0)
UnityEngine.UIElements.Panel.UpdateForRepaint () (at :0)
UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at :0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at :0)
UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at :0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <344226e341014466b33f0c0fa34fcef5>:0)

@Roumei0624
Copy link
Author

またボタンを押してもこのような表示で何も表示されるでして…
image

@esperecyan
Copy link
Owner

ご報告有り難うございます。
こちらのエラーは、変換ダイアログを開いたときに表示される、ということでしょうか。
また、問題を再現できる3Dモデルをご提供いただくことは可能でしょうか。

@esperecyan esperecyan added question Further information is requested VRChat→VRM labels Dec 16, 2021
@Roumei0624
Copy link
Author

はい。
提供すること可能です。
個人で色々と改変しているデータですが、よろしいでしょうか?

@esperecyan
Copy link
Owner

esperecyan commented Dec 16, 2021

改変というのは、自作でない改変元となるモデルが存在するということでしょうか。

@Roumei0624
Copy link
Author

はい。そのとおりです。

@esperecyan
Copy link
Owner

こちらで公開、あるいは自分へメッセージ等で送っても権利上問題がないモデルということでしょうか。
でしたらぜひよろしくお願いいたします。

@Roumei0624
Copy link
Author

製作者に確認致します!
ちなみにデータの渡し方はどのようにすればよろしいでしょうか?

@esperecyan
Copy link
Owner

助かります。よろしくお願いいたします。
https://gigafile.nu/ などでアップロードしたURLを、ショップへの問い合わせから送っていただければと思います。
https://accounts.booth.pm/conversations/9205879/messages

@esperecyan
Copy link
Owner

同エラーが発生する3Dモデルは、QuQu様で販売されている「U」、なっふな堂様で販売されている「狐薄 -こはく-」であり、いずれも共有不可ということで承知しました。

QuQu様では無料頒布の3Dモデルがありましたので、VRMへの変換を試したところ、別のエラーが発生しました。
https://sonovr.booth.pm/items/1843582

System.ArgumentException: An item with the same key has already been added. Key: bikkuri
  at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000c1] in :0
  at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in :0
  at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement] (System.Collections.Generic.IEnumerable1[T] source, System.Func2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector, System.Collections.Generic.IEqualityComparer1[T] comparer) [0x0009d] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 &nbsp;&nbsp;at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement] (System.Collections.Generic.IEnumerable1[T] source, System.Func2[T,TResult] keySelector, System.Func\2[T,TResult] elementSelector) [0x00000] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at Esperecyan.Unity.VRMConverterForVRChat.VRChatToVRM.VRChatExpressionsReplacer.ExtractShapeKeyNames (Esperecyan.Unity.VRMConverterForVRChat.VRChatToVRM.VRChatExpressionBinding vrchatExpressionBinding) [0x00013] in ○○○○○○○○○○○○\Editor\VRChatToVRM\VRChatExpressionsReplacer.cs:32

とりあえずこちらのエラーの原因を調査したいと思います。

@Roumei0624
Copy link
Author

ご対応ありがとうございます!
何卒よろしくお願い致します!

@esperecyan esperecyan added bug Something isn't working help wanted Extra attention is needed and removed question Further information is requested labels Dec 18, 2021
@Kieaer
Copy link

Kieaer commented Apr 5, 2022

Same error. it solved?

@esperecyan
Copy link
Owner

@Kieaer Currently, I have not been able to determine how to reproduce the error.

@esperecyan
Copy link
Owner

System.ArgumentException: An item with the same key has already been added. Key: bikkuri については v38.0.2 で対処しましたが、こちらのエラーについては再現方法が無く不明です。

@esperecyan esperecyan changed the title 「VRM」→「Export VRM file from VRChat avatar」を選択するとエラーがでる。 「VRM」→「Export VRM file from VRChat avatar」を選択するとエラーがでる: ArgumentException: Blend shape index out of range. Jul 18, 2022
@primenumber
Copy link

別のアバターで再現しました
VRC Avatar DescriptorのEyelids→Blendshape States→Blinkの設定が -none- になっていると起きるようです

@esperecyan
Copy link
Owner

@primenumber ご報告有り難うございます。
たしかに再現できました

@esperecyan esperecyan removed the help wanted Extra attention is needed label Jan 16, 2023
PancakeTorto1se added a commit to PancakeTorto1se/VRMConverterForVRChat that referenced this issue Oct 3, 2024
…ェイプキーがnoneの場合に例外が発生するのを修正
esperecyan pushed a commit that referenced this issue Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working VRChat→VRM
Projects
None yet
4 participants