• Hi Guest!

    We are extremely excited to announce the release of our first Beta1.1 and the first release of our Public AddonKit!
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. For access to the Public AddonKit you must be a Creator tier member. Once subscribed, download instructions can be found here.

    Click here for information and guides regarding the VaM2 beta. Join our Discord server for more announcements and community discussion about VaM2.
  • Hi Guest!

    VaM2 Resource Categories have now been added to the Hub! For information on posting VaM2 resources and details about VaM2 related changes to our Community Forums, please see our official announcement here.
ChronoLock

Plugins + Scripts ChronoLock

Download [1.42 MB]

Bob Nothing

Well-known member
Joined
Mar 15, 2021
Messages
365
Reactions
460
Bob Nothing submitted a new resource:

ChronoLock - Forces real time animation playback regardless of FPS

TLDR - Forces 'game time' to match real time with built in animation playback dynamically in real time regardless of FPS changes.

Ever wanted to record MoCap within VaM and have it actually record with real time instead of game time that is slowed down by FPS, especially in VR? When I make my scenes I tend to do all my audio/dialogue up front, space it all out correctly based on the length of the files, then go to record MoCap only to have to guess at how off the 'game time' will...

Read more about this resource...
 
1756918421290.png
 
@lblg Can you please try it as a scene plugin instead and confirm that works for you? Any logs you could send my way to see why it doesn't like being a session plugin?
 
@lblg Can you please try it as a scene plugin instead and confirm that works for you? Any logs you could send my way to see why it doesn't like being a session plugin?
The same. What I noticed, every time VAM starts, plugin requests permission. I click always Allow, but when restarting VAM it requests again, over and over.
 
@lblg Can you please try it as a scene plugin instead and confirm that works for you? Any logs you could send my way to see why it doesn't like being a session plugin?

!> Compile of BobNothing.chronolock.1:/Custom/Scripts/BobNothing/chronolock.cs failed. Exception: ICSharpCode.SharpZipLib.Zip.ZipException: Compressed size mismatch between central header(1812) and local header(0)
at ICSharpCode.SharpZipLib.Zip.ZipFile.TestLocalHeader (ICSharpCode.SharpZipLib.Zip.ZipEntry entry, HeaderTest tests) [0x00000] in <filename unknown>:0
at ICSharpCode.SharpZipLib.Zip.ZipFile.LocateEntry (ICSharpCode.SharpZipLib.Zip.ZipEntry entry) [0x00000] in <filename unknown>:0
at ICSharpCode.SharpZipLib.Zip.ZipFile.GetInputStream (Int64 entryIndex) [0x00000] in <filename unknown>:0
at ICSharpCode.SharpZipLib.Zip.ZipFile.GetInputStream (ICSharpCode.SharpZipLib.Zip.ZipEntry entry) [0x00000] in <filename unknown>:0
at MVR.FileManagement.VarFileEntryStream..ctor (MVR.FileManagement.VarFileEntry entry) [0x00000] in <filename unknown>:0
at MVR.FileManagement.FileManager.OpenStream (MVR.FileManagement.FileEntry fe) [0x00000] in <filename unknown>:0
at MVR.FileManagement.FileManager.ReadAllBytes (MVR.FileManagement.FileEntry fe) [0x00000] in <filename unknown>:0
at MVR.FileManagement.FileManager.ReadAllBytes (System.String path, Boolean restrictPath) [0x00000] in <filename unknown>:0
at MVRPluginManager.SyncPluginUrlInternal (.MVRPlugin mvrp, Boolean isFromConfirmDenyResponse) [0x00000] in <filename unknown>:0
 
Plugin loads correct when the .cs script gets unpacked from the .var archive and loaded manually. I guess the .var/zip compression is just somehow messed up.
I did load it as session plugin.

However in two practical tests in two scenes, it caused physics calculation-problems (breasts start glitching, then physics explosion) when the framerate fell below the fixed physic rate.
Not sure what's going on internally, but it seems as if either physics calculations are being skipped in the scenario, or they get messed up from receiving wrong elapsed time values due to a correction.
From my thinking, this should only work if the CPU is able to do physic calculations at the configured physics rate in realtime, if not everything falls apart and breaks.
Disclaimer: I'm on Linux. OS quirks may be relevant. Have not looked at the code. Don't know how the plugin actually works, just assuming things...

I have doubts this can work reliable due to how Unity Engine timing and fixed physics rate stuff. And damn I wish it would work ... having animation slowdowns just because there is a short computationally expensive segment in a scene is / was always annoying.
 
hello, I'm not sure if
the problem I'm facing is different from yours. when I enjoy the secne with the audiosource made by other authors . I find the speed of audio is faster than that of motion .
This maybe be due to the performance of my computer or the config of the VAM setting.
 
Hi everyone, thanks for the feedback! Posting a new version that fixes the 'session' plugin problem, gives you the ability to reset back to normal among other features! Posting now!
 
Bob Nothing updated ChronoLock with a new update entry:

Version 2 Updates

Fixed the issues with being added das a session plugin
Allowed it to auto-disable when a scene alters time scale (slow motion for example)
Auto-disable on scene load option (if you have it as a session plugin but encounter any issues during scene load, use this)
You can recenter the clock if things change (for example, add another person atom, etc.)
Resume after a pause
Ability to 'disable and reset', I found that removing the plugin left it's impacts still in effect, hopefully it does it...

Read the rest of this update entry...
 
Plugin loads correct when the .cs script gets unpacked from the .var archive and loaded manually. I guess the .var/zip compression is just somehow messed up.
I did load it as session plugin.

However in two practical tests in two scenes, it caused physics calculation-problems (breasts start glitching, then physics explosion) when the framerate fell below the fixed physic rate.
Not sure what's going on internally, but it seems as if either physics calculations are being skipped in the scenario, or they get messed up from receiving wrong elapsed time values due to a correction.
From my thinking, this should only work if the CPU is able to do physic calculations at the configured physics rate in realtime, if not everything falls apart and breaks.
Disclaimer: I'm on Linux. OS quirks may be relevant. Have not looked at the code. Don't know how the plugin actually works, just assuming things...

I have doubts this can work reliable due to how Unity Engine timing and fixed physics rate stuff. And damn I wish it would work ... having animation slowdowns just because there is a short computationally expensive segment in a scene is / was always annoying.
Do you mind sharing your specs? With Linux that does really complicate things. The CPU/Physics frametime are very difficult things to work around with this version of Unity (I know as I'm working on optimizing the render plugin), I might suggest lowering the physics to 45hz perhaps? I have a 9800x3D and a 5090, and I keep my physics are 60hz to match my framerate FPS for rendering for this exact reason.
 
hello, I'm not sure if
the problem I'm facing is different from yours. when I enjoy the secne with the audiosource made by other authors . I find the speed of audio is faster than that of motion .
This maybe be due to the performance of my computer or the config of the VAM setting.
The audio is faster? Are you playing the audio using built in VaM or are you talking about via plugins? For example, if your audio is being played via timeline the you will want to change the timeline plugin to use gametime instead of 'real time' and I bet that corrects the problem. The same would be true of other plugins.
 
edit: just noticed the update, everything below was with the initial release version

Ah 9800X3D, nice! That beast is hard to overwhelm.
Will pm you my details. (privacy concerns)

Tested a lower physics rate of 45 Hz with update cap of 1 too. It shifts the point where the physics break to below 45 Hz.
FPS >= 45 Hz = no problem
FPS < 45 Hz = physics glitch and break
My normal settings are in sync to the framerate with a 60 Hz physics rate, update cap 1.

I just was curious and intentionally tested all this to see if this plugin could help with animations slowdown if the CPU can't keep up.
Usually my CPU starts having physics performance problems in 3 person scenes which are loaded with sim hair and sim clothing.

I guess on a 9800X3D you'd need to have very sim-heavy CPU intensive scene with more persons to reproduce.

One thing I forget - this could be relevant:
I use a performance overlay named MangoHud. It shows me a frametime graphs and detailed performance stuff. It's very similar to the popular MSI Afterburner overlay people use on Windows.
For that I configured a framerate limit of 60 Hz. It's because I found out my frametimes where much better (perfect flat line) compared to using Vsync.

Maybe it's better to trust a Windows user with tests ;). My setup here is kinda exotic.
 
Last edited:
The audio is faster? Are you playing the audio using built in VaM or are you talking about via plugins? For example, if your audio is being played via timeline the you will want to change the timeline plugin to use gametime instead of 'real time' and I bet that corrects the problem. The same would be true of other plugins.
Noramally,I encountered the problem when the audio was played by the Sound source which controlled by the VAM system
 
I haven't actually attempted a mocap with this - but the concept seems solid. I cannot load this as a scene plugin - I get errors. However, it will load as a session plugin.
When attempting as a scene plugin I see this - and I even tried extracting the .cs file out of the VAR and loading it directly - same issue.


!> Compile of BobNothing.chronolock.2:/Custom/Scripts/BobNothing/chronolock.cs failed. Exception: ICSharpCode.SharpZipLib.Zip.ZipException: Compressed size mismatch between central header(3143) and local header(0)
at ICSharpCode.SharpZipLib.Zip.ZipFile.TestLocalHeader (ICSharpCode.SharpZipLib.Zip.ZipEntry entry, HeaderTest tests) [0x00000] in <filename unknown>:0
at ICSharpCode.SharpZipLib.Zip.ZipFile.LocateEntry (ICSharpCode.SharpZipLib.Zip.ZipEntry entry) [0x00000] in <filename unknown>:0
at ICSharpCode.SharpZipLib.Zip.ZipFile.GetInputStream (Int64 entryIndex) [0x00000] in <filename unknown>:0
at ICSharpCode.SharpZipLib.Zip.ZipFile.GetInputStream (ICSharpCode.SharpZipLib.Zip.ZipEntry entry) [0x00000] in <filename unknown>:0
at MVR.FileManagement.VarFileEntryStream..ctor (MVR.FileManagement.VarFileEntry entry) [0x00000] in <filename unknown>:0
at MVR.FileManagement.FileManager.OpenStream (MVR.FileManagement.FileEntry fe) [0x00000] in <filename unknown>:0
at MVR.FileManagement.FileManager.ReadAllBytes (MVR.FileManagement.FileEntry fe) [0x00000] in <filename unknown>:0
at MVR.FileManagement.FileManager.ReadAllBytes (System.String path, Boolean restrictPath) [0x00000] in <filename unknown>:0
at MVRPluginManager.SyncPluginUrlInternal (.MVRPlugin mvrp, Boolean isFromConfirmDenyResponse) [0x00000] in <filename unknown>:0
 
I did get it to work:
1. Extract BobNothing folder from VAR to /custom/scripts
2. Remove VAR package from VAM

Able to add as a scene plugin after this!
 
Back
Top Bottom