Search Unity

[Released] Ultimate Replay - Complete state based replay system

Discussion in 'Assets and Asset Store' started by scottyboy805, Jun 28, 2017.

  1. FMWFiremage

    FMWFiremage

    Joined:
    Mar 19, 2015
    Posts:
    6
    Hi, thanks for the response.
    I can't see any warnings related to missing chunks, but I have just recorded a snapshot in Unity Editor of everything that is happening if this is of any help, you should notice the slight stutter at regular intervals in the play back.
    https://www.dropbox.com/s/hn0sc8nro...andalone_ _DX11_ 2019-04-25 14-16-57.mp4?dl=0
     
  2. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    489
    Thanks for taking the time to create the video. From the console messages it looks like it is using the cached chunks correctly so there may be another issue. Are the 7 warning messages related in any way? It may be that the chunk pre-fetch algorithm is not keeping up with the playback speed but I will have to do some testing on this.
     
    FMWFiremage likes this.
  3. FMWFiremage

    FMWFiremage

    Joined:
    Mar 19, 2015
    Posts:
    6
    No problem, thanks for looking into this for me.
    I forgot to set the warning to visible on the video, sorry about that. I have uploaded the warnings in the image.
     

    Attached Files:

  4. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    489
    Thanks for providing the warnings. They all look perfectly normal to me so it looks like the chunks are being loaded and cached correctly. At the moment all I can think is that the streaming thread is not scheduling far enough ahead and that playback is catching up with the file operations.
     
    FMWFiremage likes this.
  5. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    489
    Ultimate Replay version 1.1.5 has been submitted to the asset store for review and will be available for download within a couple of days. This version contains minor bug fixes mostly related to duplicate replay id's being assigned.
     
  6. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    489
    Hi again,
    I have had chance to look into this but cannot seem to reproduce it with the demo scene. Could you try testing the demo scene at 'Assets/UltimateReplay/Demo/ReplayFileTargetDemo.unity' and see if the stutters still occur. If the stuttering still occurs then it may be worth trying version 1.1.5 as above when released as this is the version we used for testing simply because we had a project setup with it.
     
  7. FMWFiremage

    FMWFiremage

    Joined:
    Mar 19, 2015
    Posts:
    6
    Hi, yes no problem, I will give it another test over the weekend and see how it goes. Thanks again for checking this out.
     
  8. FMWFiremage

    FMWFiremage

    Joined:
    Mar 19, 2015
    Posts:
    6
    Hi there,
    I checked the Demo you mentioned and I don't get a stutter at all on this with the version I am using, but what I did notice was the Record FPS was set to 48, so I tried upping the Record FPS to 48 on my testing and it got rid of the stutter which is great. The next thing I tried was putting my FPS back down to 8 and increasing it gradually, as the Record FPS increases the stutter gets less and less until you don't notice it. So I think I should be able to find a Record FPS that works without having a massive file size hopefully.
    Just one thing I was wondering on all this, could it be something as simple as the replay not interpolating properly between chunks?
    Thanks again for the help.
     
  9. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    489
    Hi again,
    That is an interesting observation. Hopefully we will be able to recreate the stutter by reducing the record rate and then we may be able to properly debug the problem. I don't think it will be an interpolation issue just because of the way the snapshot interpolation works but we will keep that in mind.
     
    FMWFiremage likes this.
  10. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    489
    Ultimate Replay version 1.1.6 has been submitted to the asset store for review. This version includes a few bug fixes mostly related to the ReplayAnimator component.
     
  11. Mairee

    Mairee

    Joined:
    Jun 27, 2018
    Posts:
    10
    Like dream league soccer has an option to share its replay on social media, can we do so like that?
     
  12. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    489
    Hi,
    There is nothing built in to support sharing of replays but Ultimate Replay can save to a replay file which you can share over the network like any other file so it is certainly possible. How you handle that sharing and downloading will be up to you though.
     
  13. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    146
    +1 for a function to share my replay onto Twitter, instagram etc. :)
     
  14. adam-goodchild-omobile

    adam-goodchild-omobile

    Joined:
    Jan 12, 2017
    Posts:
    13
    Has anyone tried this with an IK system? Would like to be able to replay something back which was recorded when IK was enabled.
     
  15. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    489
    Hi,
    Thanks for the feedback but I think this would be outside the scope of the asset as we would need to rely upon other API's to share the content which would bloat and complicate the package. The replay file is after all just a binary file so there are no internal limitations to prevent you implementing this sort of thing on your own. We may be able to create an add-on asset at some point to support these features but for the moment we want to focus on core features and bug fixes for the asset.
     
  16. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    489
    HI,
    IK objects and ragdolls can be recorded by attaching a ReplayObject component to the root object and a ReplayTransform component to each joint in the hierarchy of the object. You should then see that any IK movements or physics based joint movements are replayed properly. I would suggest trying the trial version which can be downloaded for free to see if Ultimate Replay suits your needs. You can download it here.
     
  17. adam-goodchild-omobile

    adam-goodchild-omobile

    Joined:
    Jan 12, 2017
    Posts:
    13
    Thanks, appreciate the help!
     
  18. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    167
    I've got a very specific task and I wonder if it can be achieved with UltimateReplay:
    We're building a VR training app for workers. They should do the exercise untrained, then get some lesson on how to optimise it and repeat the exercise afterwards. I want to record the two attempts and, in the end, play them back to them as "ghosts" side by side.
    My approach could be to setup two scenes, with the same Replay File Target, and load the additively with a small offset while playback. Is it possible to not overwrite the already recorded Data in the File Target?
    Another approach could be to use a two ReplayManagers, but the Singleton seems to have problems with this.
    Maybe there's another solution for this? Thanks in advance!
     
  19. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    489
    Hi,
    As you may already know, playing multiple replays simultaneously is not supported at the moment. It is not something that could be easily added either due to the way Ultimate Replay works. Your two scene approach sounds like it could work with a bit of modification to Ultimate Replay. Ultimate Replay stores a ReplayScene object in the ReplayManager script which contains all replay objects and state information for the scene. i think the easiest method would be to modify the source code so that you can have 2 or more ReplayScene instances and switch between the active replay scene from the ReplayManager. It would mean that you would likely have to switch between the replay scenes every fame in order to keep them updated correctly. Also seeking the ReplayFileTarget every frame which will likely be needed in order to playback 2 offset replays might cause havoc with the buffering system and as a result could affect playback performance but then again it may perform just fine.

    Let me know if you need any help with the details or have any more questions.
     
  20. jafioti

    jafioti

    Joined:
    May 28, 2015
    Posts:
    6
    Hi, I love the plugin so far, but I have a few questions.
    First off, I am using this in a VR app, if that makes a difference.
    1) I have a picking up system where objects are parented to the players hand so that they can move them around. Currently I put the replayObject and replayTransform on both the player's hands and every part of the object. This results in the object disappearing in the replay when I pick it up and reappearing when I put it down in a new location. Not sure if I should also be putting the replay scripts on only the top-level object or all of it's children.

    2) Since I am in VR, I would like to record the scene, but be able to use another camera to view the replay so that it can be displayed on a normal computer screen. How would I go about doing that?

    Thanks for the help!
     
  21. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    489
    Hi,
    Glad to hear you are liking our asset :)
    1. When this occurs are you able to find the object in the hierarchy and if so is it located at 0,0,0? Also you say that you have a ReplayObject attached to the hands and every part of the object. I assume you mean that the object you want to pickup has a ReplayObject script attached otherwise parenting will not work as expected during playback.
    2. You can use any camera you like to view the replay. You just need to make sure that it is active in the scene. In the demo scenes Ultimate Replay uses a different camera to view the playback and the reason it does this is so that you can use a free cam to move around during playback. To achieve this all we do is create another camera with the necessary free cam scripts attached and then when we enter playback mode we snap this additional camera to the active cameras position and rotation and then make it active for rendering.
     
  22. jafioti

    jafioti

    Joined:
    May 28, 2015
    Posts:
    6
    No, it isn't going to 0, 0, 0. In the playback it goes to a very small number fro x, y, and z, something < 1. Also the object I am picking up is made up of many children, so I only attached the replay scripts onto the top parent object.

    Here is a video:
    https://psu.app.box.com/s/rm84fch0vtgru18oke01380a37r09c4y
     
  23. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    489
    Thanks for the video.
    If the values are not 0,0,0 then I assume that the pickup object is being added as a child of the hand during playback just as it was when recording? If this is the case then the only thing I can think of that could cause this behaviour (apart from a bug) would be another script / physics component altering the position of the pickup object during playback. If you have any scripts attached to the pickup object or that reference the pickup object then I would just check that you are not altering the transform values during playback. You can use 'ReplayManager.IsReplaying' to move objects only when playback is not active.
     
  24. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    123
    Hi,

    I am looking for a solution to record the animation generated from a controller (animator motions). For example, i have animal motions that are trigered by the WASD keys. The animal can walk , run, jump etc... using the keyboard shortcut. I would like to capture the realtime animation with ultimate replay to render it to a video afterward. Basically this would provide an almost realtime animation workflow for film. I tried with the "unity recorder" but the transform data isn't being recorded, only the "in place" motions are being record. I tried the demo version of ultimate recorder but the transform is recorded without the actual motions... Do you know if this is possible? I would buy your asset immediately if it does.

    Thank you!
     
  25. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    489
    It is possible to record an animator component using a ReplayAnimator. It is included in the trial version so you can test it before purchasing. You just need to add a ReplayAnimator component to the object and add a reference the the Animator that you want to record. I should mention that the ReplayAnimator is still an experimental component so may be missing some features or contain bugs but from our testing it works for the most part. To record the objects movements you will also need a ReplayTransform component attached to the object.
     
  26. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    123
    Hi,

    Thank you for the quick reply. I tried the demo and I think the controller recording still need some work. Sometime it works but most of the time it doesn't (meaning the transform is recorded but the motions from the controller aren't) But I see great potential in this asset. I believe I am not the only one that would gain from using your asset to generate quick animation in realtime.

    One quick question: where is the animation stored once recorded? When hitting stop you lose the ability to play again so I am not sure how I can edit the animation afterward on the timeline.

    Thanks.
     
  27. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    489
    Would you be able to send us a repro project of this to info(at)trivialinteractive.co.uk so we can work out why it is not working? As for where the animation is stored: Any recorded data is serialized to a ReplayState object which is essentially a sequential byte buffer and then the actual storage method of that buffer it determined by the type of storage component you are using and the implementation details are not exposed to the user.
     
  28. jafioti

    jafioti

    Joined:
    May 28, 2015
    Posts:
    6
    Thanks for the reply,
    there is no scripts that alter the position, but here is what I believe is happening.

    So the replay transform tracks the transform position, and when I parent the pickup object to the player's hand, the local position is being set to a really small number because the object is super close to the hand. I think the replay script is seeing this as the position of the object and during playback it sets this as the position but in world space, so it ends up being really close to the origin instead of the player's hand. I believe the replay transform is not differentiating between world and local position properly.
     
  29. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    123
    Thanks again for the quick reply.

    I would love to send the project but can I get in trouble sending assets I bought to troubleshoot?

    As for the animation storage, you lost me here, I am not a programmer. ;)
    Is there a way to acces the animation I recorded with Ultimate play? I was planning to record small animation segments with Ultimate Replay and edit the animations on the timeline afterward to make a short movie.

    Thanks again.
     
  30. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    489
    That would explain the problem if you are not recording the hand position also. In the current release version of Ultimate Replay the ReplayTransform component will only record the local position of an object but we have had some requests to support both local and world positions so we have modified the ReplayTransform component to support both local and world position and you can choose which mode in the inspector. This script is finished but we are waiting on other bug fixes before we release an update but if you want I can send you the source code for the new ReplayTransform component direct so you can try it without waiting for an update.
     
  31. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    489
    Yes I understand there may be IP issues. If you are able to recreate the issues in a stripped down project or with assets that you are allowed to distribute then we would like to look into the poblem so that we can fix it.

    As for the animation storage: It is basically stored as a custom format totally independent of Unity's animation system and as such there is no built in way to convert the recorded animation to a Unity animation asset or similar nor is there anyway API's to read the recorded data. It is just not something that Ultimate Replay was designed to do and even if it could be made to work it may not give the best results as the recorded data may be truncated or compressed when serialized to get the best storage and playback performance.
     
  32. jafioti

    jafioti

    Joined:
    May 28, 2015
    Posts:
    6
    Yes can you please send me the new script.
    Thanks
     
  33. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    489
    Yes, I have attached it in a pm.
     
  34. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    123
    @scottyboy805 Thanks for your support. I think "Ultimate Replay" is a great asset backed with great support. It may not be what I need for this project now but I will definitely buy it in a near future anyway. :)
     
  35. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    489
    No problem. Yes it sounds like Ultimate Replay may not be ideal for your current project but maybe it will be useful to you in the future.
     
  36. scottyboy805

    scottyboy805

    Joined:
    Apr 10, 2013
    Posts:
    489
    Ultimate Replay version 1.1.7 has been submitted for review and should be available for download within a day or two. This version includes:

    • The ReplayTransform component can now record either local or world position which you can set via the inspector.
    • Fixed a script serialization bug where Unity would fail to serialize certain enum values.
    • Fixed a bug where some prefabs could have a ReplayIdentity assigned at edit time causing any instances of that prefab to share the same id.