Categories: DiscussionValheim

Need help getting my VRM to work with ValheimVRM

I've been trying to convert a model to VRM for the past week with little success. The only thing I haven't managed to do is make the model appear in-game. I have a strong feeling that I'm close to finishing on this project, but I just can't get over this last hump. If anyone has experience in this, I'd be happy to hop into a call to figure this out.

technical stuff:

I'll give some details on what I've done so far. Up to this point, I've tried exporting the prefab to VRM format without any success and this error message in the BepInEx console after launching the game:

[Error  : Unity Log] System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object
  at UniGLTF.StringExtensions.FastStartsWith (System.String a, System.String b) [0x00000] in <b37ddb6297eb4fdbb4c6ca2b3835e277>:0
  at VRM.VRMImporterContext.LoadBlendShapeBind (VRM.glTF_VRM_BlendShapeGroup group, System.Collections.Generic.Dictionary`2[TKey,TValue] transformMeshTable) [0x00036] in <786e6ced9cf744a18319d0f99fd0fe9c>:0
  at VRM.VRMImporterContext.LoadBlendShapeMaster () [0x0009f] in <786e6ced9cf744a18319d0f99fd0fe9c>:0
  at VRM.VRMImporterContext+<OnLoadModel>d__6.MoveNext () [0x001c6] in <786e6ced9cf744a18319d0f99fd0fe9c>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at UniGLTF.ImporterContext+<LoadAsync>d__23.MoveNext () [0x00580] in <b37ddb6297eb4fdbb4c6ca2b3835e277>:0
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
  at UniGLTF.ImporterContextExtensions.Load (UniGLTF.ImporterContext self) [0x00051] in <b37ddb6297eb4fdbb4c6ca2b3835e277>:0
  at ValheimVRM.Patch_Player_Awake.ImportVRM (System.String path, System.Single scale) [0x00014] in <67c64018401b4f6c93871f6cffebaa5e>:0
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object
  at UniGLTF.StringExtensions.FastStartsWith (System.String a, System.String b) [0x00000] in <b37ddb6297eb4fdbb4c6ca2b3835e277>:0
  at VRM.VRMImporterContext.LoadBlendShapeBind (VRM.glTF_VRM_BlendShapeGroup group, System.Collections.Generic.Dictionary`2[TKey,TValue] transformMeshTable) [0x00036] in <786e6ced9cf744a18319d0f99fd0fe9c>:0
  at VRM.VRMImporterContext.LoadBlendShapeMaster () [0x0009f] in <786e6ced9cf744a18319d0f99fd0fe9c>:0
  at VRM.VRMImporterContext+<OnLoadModel>d__6.MoveNext () [0x001c6] in <786e6ced9cf744a18319d0f99fd0fe9c>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at UniGLTF.ImporterContext+<LoadAsync>d__23.MoveNext () [0x00580] in <b37ddb6297eb4fdbb4c6ca2b3835e277>:0
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object
  at UniGLTF.StringExtensions.FastStartsWith (System.String a, System.String b) [0x00000] in <b37ddb6297eb4fdbb4c6ca2b3835e277>:0
  at VRM.VRMImporterContext.LoadBlendShapeBind (VRM.glTF_VRM_BlendShapeGroup group, System.Collections.Generic.Dictionary`2[TKey,TValue] transformMeshTable) [0x00036] in <786e6ced9cf744a18319d0f99fd0fe9c>:0
  at VRM.VRMImporterContext.LoadBlendShapeMaster () [0x0009f] in <786e6ced9cf744a18319d0f99fd0fe9c>:0
  at VRM.VRMImporterContext+<OnLoadModel>d__6.MoveNext () [0x001c6] in <786e6ced9cf744a18319d0f99fd0fe9c>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at UniGLTF.ImporterContext+<LoadAsync>d__23.MoveNext () [0x00580] in <b37ddb6297eb4fdbb4c6ca2b3835e277>:0 <---
<---

[Info   : Unity Log] UnityResourceDestroyer.OnDestroy

I tested another VRM and it works so I know it's not the ValheimVRM install that's the issue. After some contemplating, I tried exporting the body from the fbx model as a VRM to which the model, after launching, would appear invisible. This is at least a little progress, but I'm pretty sure I need to export the prefab, not the fbx. So I'm pretty much lost at this point and I'm not sure why it's not working. If someone wants to help, then I'll go into more detail and show you what I'm working on. In the meantime, here are some screenshots if that helps. FYI Shrek is not the VRM I'm trying to get to work, I downloaded that to make sure the install directory works.

Gamer

Recent Posts

Ledx have been so hard for me this wipe

Not being able to craft them sucks. Especially when everyone I talk to about it…

11 months ago

My interesting and unfortunate Gwent life

First I'd like to say I absolutely love this game it's quality. Basically I first…

11 months ago

Teacher Tuesday 12/Dec/2023 – ask your questions here!

Welcome to Teacher Tuesday, a thread where anyone can ask any type of question without…

11 months ago

This games balance is confusing

I’m kind of new/returning to gwent I played beta and obviously it’s a lot lot…

11 months ago

Summary of 10 Days of Draws from Chaffee’s Bundles

Level 1 Bag (Free with Atmosphere Level 2) 6 small consumable (First Aid, Repair, Fire…

11 months ago

Why is my crew at 135%?

Here's my crew - T34-85M - for the life of me I cant figure out…

11 months ago