MocapSwitcher

Plugins MocapSwitcher

This first version is pretty bare bones in terms of features but it should work without issues. Let me know if you find bugs, and if you have ideas on how to improve it!

So far, future improvements could include:
  • generalizing for any type of atom, given that non Person atoms can be mocapped as well
  • add functionality to import animation directly from a scene file
  • automatically offset the animation so that it begins where the person is currently standing (based on hip xz-coordinates, for example)
  • add configuration options to the plugin UI for things like importing the mocap only partially, or importing it with a time offset
  • add support for loading animations of different length to separate atoms (currently, the scene animation length comes directly from the latest loaded mocap)
  • figure out a way to apply the motion capture data to the scene directly without needing to reload it (currently, it merges the mocap to the scene's JSON representation which needs to be saved to disk and loaded again)
 
This is really handy! It's great for doing multi mocaps on different models. The great thing is you don't even have to export the whole mocap, you can always trim the scene to just the portions of the mocaps you want and then just export that portion.

Also turning off collision seems to help in keeping the models libs from getting all bound up during mocap load.
 
Last edited:
Last edited:
Whenever I try to add the plugin to an existing mocap or the default model in an empty scene I get the following. Ideas?



!> Compile of everlaster.MocapSwitcher.2:/Custom/Scripts/MeshedVR/MocapSwitcher/src/MocapSwitcher.cs failed. Errors:
!> [CS103]: The name `Log' does not exist in the current context in <Unknown> at [26, 21]
!> [CS]: Mono.CSharp.InternalErrorException: (22,30): everlaster.MocapSwitcher.Init() ---> Mono.CSharp.FatalException: The name `Log' does not exist in the current context
at Mono.CSharp.Report.Error (Int32 code, Location loc, System.String error) [0x00000] in <filename unknown>:0
at Mono.CSharp.Report.Error (Int32 code, Location loc, System.String format, System.String arg) [0x00000] in <filename unknown>:0
at Mono.CSharp.SimpleName.Error_NameDoesNotExist (Mono.CSharp.ResolveContext rc) [0x00000] in <filename unknown>:0
at Mono.CSharp.SimpleName.LookupNameExpression (Mono.CSharp.ResolveContext rc, MemberLookupRestrictions restrictions) [0x00000] in <filename unknown>:0
at Mono.CSharp.MemberAccess.LookupNameExpression (Mono.CSharp.ResolveContext rc, MemberLookupRestrictions restrictions) [0x00000] in <filename unknown>:0
at Mono.CSharp.Invocation.DoResolveInvocation (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0
at Mono.CSharp.Invocation.DoResolve (Mono.CSharp.ResolveContext rc) [0x00000] in <filename unknown>:0
at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec, ResolveFlags flags) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Mono.CSharp.Method.Emit () [0x00000] in <filename unknown>:0
at Mono.CSharp.TypeDefinition.Emit () [0x00000] in <filename unknown>:0
at Mono.CSharp.ClassOrStruct.Emit () [0x00000] in <filename unknown>:0
at Mono.CSharp.Class.Emit () [0x00000] in <filename unknown>:0
at Mono.CSharp.TypeDefinition.EmitContainer () [0x00000] in <filename unknown>:0
at Mono.CSharp.TypeContainer.EmitContainer () [0x00000] in <filename unknown>:0
at Mono.CSharp.NamespaceContainer.EmitContainer () [0x00000] in <filename unknown>:0
at Mono.CSharp.TypeContainer.EmitContainer () [0x00000] in <filename unknown>:0
at Mono.CSharp.NamespaceContainer.EmitContainer () [0x00000] in <filename unknown>:0
at Mono.CSharp.TypeContainer.EmitContainer () [0x00000] in <filename unknown>:0
at Mono.CSharp.ModuleContainer.EmitContainer () [0x00000] in <filename unknown>:0
at Mono.CSharp.AssemblyDefinition.Emit () [0x00000] in <filename unknown>:0
at DynamicCSharp.Compiler.McsDriver.Compile (System.Reflection.Emit.AssemblyBuilder& assembly, System.AppDomain domain, Boolean generateInMemory) [0x00000] in <filename unknown>:0
at DynamicCSharp.Compiler.McsCompiler.CompileFromSettings (Mono.CSharp.CompilerSettings settings, Boolean generateInMemory) [0x00000] in <filename unknown>:0 in at [0, 0]
 
Whenever I try to add the plugin to an existing mocap or the default model in an empty scene I get the following. Ideas?

Hi, try adding the MocapSwitcher.cslist, not the MocapSwitcher.cs :)

Also, thanks for the log, I see I mistakenly created the archive from the Scripts/MeshedVR directory instead of the Scripts/everlaster directory. Will be corrected in the next version.
 
Hi, try adding the MocapSwitcher.cslist, not the MocapSwitcher.cs :)

Also, thanks for the log, I see I mistakenly created the archive from the Scripts/MeshedVR directory instead of the Scripts/everlaster directory. Will be corrected in the next version.

Thanks so much! I favorited the wrong thing lol but glad my blunder could help somehow
 
How is this different to just saving a pose? If I have a mocop loaded, save the pose from the character and you save the full mocap. You just have to have some animation time in your scene to reload the mocap to any other model in any other scene.
 
How is this different to just saving a pose? If I have a mocop loaded, save the pose from the character and you save the full mocap. You just have to have some animation time in your scene to reload the mocap to any other model in any other scene.
From the description
Unlike VaM's Save Pose / Load Pose functionality, this plugin includes the scene animation settings and animation length in the saved file and correctly imports them from it, and doesn't include extra Pose related properties that aren't directly related to the mocap (see Preset Definitions).
 
everlaster updated MocapSwitcher with a new update entry:

v1.1.0: Faster mocap load and other smaller improvements

  • Scene no longer needs to reload when loading a mocap - loading is much faster and more convenient. The plugin data dir VAM\Saves\PluginData\everlaster\MocapSwitcher is no longer needed - feel free to delete.
  • When saving a mocap, playback of the animation is automatically moved to beginning (required for getting the correct starting pose in the savefile)
  • When loading a mocap, playback will no longer start automatically (unless you're playing the scene animation...

Read the rest of this update entry...
 
"Scene no longer needs to reload when loading a mocap - loading is much faster and more convenient."
Dude, that is huge! That is going to really streamilne things. Thanks for the great work!
 
"Scene no longer needs to reload when loading a mocap - loading is much faster and more convenient."
Dude, that is huge! That is going to really streamilne things. Thanks for the great work!
Glad you like it! Yeah it makes quite a difference. In retrospect, that is how v1.0 should've worked since it wasn't a difficult thing to fix. :LOL:
 
Perhaps Im using it wrong..or something.
My steps:
Goto a scene with one I like. Add plugin to person. Set time to animation start. Save.
Goto/create a scene with one person. Add plugin to person. Load mocap.

Then every time the person is either lying down, or upside down, or some sort of X/Y/Z change.
Am I doing something wrong?
 
Could you add the option that we can load new animations through for example a timeline trigger or a button? Instead of having to do it manually from the plugin tab?

When I select receiver atom and set that as my character and then receiver your plugin and then look at receiver target menu there is no way of choosing an animation file or to load an animation from there I would like that option to be there if possible it would make your plugin much better and more interactive with scenes.

The reason why I want these options is so that I can load multiple animations after each other through triggers and without having to do it manually for each animation.

Good plugin thank you for sharing would like to see this feature added and then it be a very good plugin.
 
I'm using this plugin very easily but I want to know I have 2 mocap .json files which I exported from 2 different scenes. At a time, I can only load a single file in my scene. Is it possible to import multiple mocap files and make a seamless long scene?
 
Thank you for making and sharing this. Is there a way to use it with acid buble's timeline to import mocaps into the timeline? I've tried in the hope it might work but keep getting error messages.
 
Hello, I have the same request than post

It is possible for you to add the ability of loading a mocap via a button ?
Thanks
 
I'm sure its a simple option I'm overlooking but how do you get the animation to loop? An imported animation will play once then I have to hit the reload button to play it again.
 
I'm sure its a simple option I'm overlooking but how do you get the animation to loop? An imported animation will play once then I have to hit the reload button to play it again.
yeah i have that question too
Should work if you enable loop in the Scene Animation tab.
 
everlaster updated MocapSwitcher with a new update entry:

1.2.1: Auto play support, better seek to beginning, LoadMocapWithPath trigger

  • Added a toggle to autoplay the animation from beginning when a mocap is loaded.
  • Improved seek to beginning. When a new mocap is started it is moved to beginning with exactly the same method as clicking on the Reset Playback button in the VAM toolbar.
  • LoadMocapWithPath trigger allows you to choose the path to the mocap file from any trigger menu, similar to how LoadPresetWithPath works for presets. Combined with autoplay, you can load a new mocap and play it as...

Read the rest of this update entry...
 
Back
Top Bottom