Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Other [0.4.0] DMotion - A High Level Animation Framework for DOTS

Discussion in 'Entity Component System' started by Dechichi01, Jul 29, 2022.

  1. ThynkTekStudio

    ThynkTekStudio

    Joined:
    Sep 4, 2021
    Posts:
    58
    hi, is this still being developed or is it abandoned?
     
  2. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    3,983
    He's probably waiting on me. :oops:
    Hard to say for certain though because he hasn't formally released the 0.4 feature branch.
     
    bb8_1 and Occuros like this.
  3. ThynkTekStudio

    ThynkTekStudio

    Joined:
    Sep 4, 2021
    Posts:
    58
    been checking for a while now and the 0.4 version has been like that for at least a month,

    anyway let's see what happens
     
  4. Zimaell

    Zimaell

    Joined:
    May 7, 2020
    Posts:
    338
    Good afternoon, I tried to install Dmotion.
    I use the latest build of the editor 2022.2.6f1, I installed with all the requirements Latios-Framework, everything was successful, then I installed Dmotion and got a lot of errors.

    ---------
    Assets\Samples\DMotion\0.3.4\All Samples\Common\Scripts\LatiosBootstrap.cs(11,46): error CS0246: The type or namespace name 'ICustomConversionBootstrap' could not be found (are you missing a using directive or an assembly reference?)

    Library\PackageCache\com.gamedevpro.dmotion@bf4151856b\Runtime\Authoring\AnimationStateMachineAuthoring.cs(15,66): error CS0246: The type or namespace name 'IConvertGameObjectToEntity' could not be found (are you missing a using directive or an assembly reference?)

    Library\PackageCache\com.gamedevpro.dmotion@bf4151856b\Runtime\Authoring\AnimationStateMachineAuthoring.cs(15,94): error CS0246: The type or namespace name 'IRequestBlobAssets' could not be found (are you missing a using directive or an assembly reference?)

    Library\PackageCache\com.gamedevpro.dmotion@bf4151856b\Runtime\Utils\ClipSamplerUtils.cs(152,62): error CS8377: The type 'T' must be a non-nullable value type, along with all fields at any level of nesting, in order to use it as parameter 'T' in the generic type or method 'DynamicBuffer<T>'

    ......
    total 44 similar errors
    ---------

    Tell me how to fix these errors?
     
  5. Dechichi01

    Dechichi01

    Joined:
    Jun 5, 2016
    Posts:
    39
    Hey all - quick update: v0.4 (support for Entities 1.0 with Transforms V1) will be out today. I'll add details on the future of this tool on the update message as well.

    v0.4 with support for entities 1.0 is "done". I only needed to update the documentation, and I managed to get caught up on work stuff for more than a month now.

    I'll publish v0.4 today.


    You need DMotion 0.4 for Unity 2022 and Entities 1.0. This version will come out today.
     
  6. Dechichi01

    Dechichi01

    Joined:
    Jun 5, 2016
    Posts:
    39
    Hey all!

    Apologies (again) for another massive delay on updating this package. I work in a small studio (5 people), and we're trying to make an awesome game. Sometimes this awesome game requires 150% of my time.

    This version contains the long awaited entities 1.0 support! Please keep in mind though that TransformsV2 is not supported yet, so you will need to add
    ENABLE_TRANSFORM_V1
    to your script define symbols for DMotion to work.

    Now on the future of this package:

    Many of you know that after the Transform V2 drop, @DreamingImLatios, the creator of the Kinemation, decided to implement his own transform system for his framework. Though I understand his decision, this inevitably created a lot of uncertainty for DMotion, as I personally believe compatibility with other Unity packages (i.e physics, netcode, asset store packages) is crucial, and can't give that away.

    Since them, @DreamingImLatios and I talked several times, and I will probably be helping on adding TransformV2 support to Kinemation when the time comes. I can't give an ETA for that yet, but I'll share it when I have it.

    In the mean time, DMotion will receive minor updates and bug fixes.

    To summarize, my intention is to continue developing the package, as I think Kinemation is by far the best CPU animation system available for Unity (I don't think Unity's own version will surpass it honestly), and I'd like DMotion to be an equally useful solution to the community. Given that this isn't my main work though, I can't promise delays won't happen.
     
    dwulff, Micz84, bb8_1 and 4 others like this.
  7. ThynkTekStudio

    ThynkTekStudio

    Joined:
    Sep 4, 2021
    Posts:
    58
    hi there so after installing the 0.4.0 version im having these weird culling artifatcs & also im having errors with the SmartBlobberAPI , thank you in advance for taking a look at this. upload_2023-2-26_20-6-32.png Capture.PNG
     

    Attached Files:

  8. Dechichi01

    Dechichi01

    Joined:
    Jun 5, 2016
    Posts:
    39
    Thanks for this bug report. Could you confirm the version of the entities package you're using? Currently DMotion and Latios 0.6.5 only support entities 1.0.0-pre.15 (not latest). If you're using .44, I would suggest downgrading, cleaning the Library, and trying again.

    Otherwise, if it's still doesn't work, would you be able to upload this repo to github, or send me a zip? I would be happy to take a look at it.
     
  9. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    3,983
    I can provide an answer to this one. It seems like those errors are happening in play mode. If so, then you need to go into dmotion/Runtime/Authoring/Conversion and you will find two files with "System" in the name which each have a system inside. Add [DisableAutoCreation] to them. They are being manually injected in the baking bootstrap (correct behavior), but also automatically injected into the runtime world (incorrect behavior).

    As for the culling artifacts, if you still get those without any errors in play mode, definitely send me repro steps. That is likely a Latios Framework bug.
     
  10. ThynkTekStudio

    ThynkTekStudio

    Joined:
    Sep 4, 2021
    Posts:
    58
    hi,

    entities & entities graphics version in use is 1.0.0-pre.15

    @DreamingImLatios your solution to the previous problem eliminated the previous problem with the SmartBlobber

    although these errors popped up (probably have nothing to do with the solution you provided :D) err1.PNG err2.PNG

    and as for the culling artifacts i have created a scene that shows that the artifacts appear when the subscene is closed/we're in runtime mode.
    closed.PNG

    as opposed to it being open/in authoring mode

    open.PNG


    also one more note, the performance seems to have had a bullet to the head

    this here seems to be the culprit

    job_thatdrainsperformance.PNG




    steps to reproduce this culling artifact

    1- open a D motion sample scene (preferably the blend tree 1D scene, it's what i tested & got the error from)

    Note(may or may not get some shader errors/ i got some because i use HDRP, its fixable)

    2- duplicate the character (preferably more than 500 characters inside the same subscene to also catch the performance drop)

    3- upon saving & closing the subcene you may see something like this

    closed.PNG
     
  11. ThynkTekStudio

    ThynkTekStudio

    Joined:
    Sep 4, 2021
    Posts:
    58
    i don't know how much people trust google drive links but here i go with it (just felt tired & lazy so i didn't use github sorry :D)

    here's a link to the project, its a new project created with unity 2022.2.0f1

    in case you guys needed to take a look at something i didn't mention
     
    Dechichi01 likes this.
  12. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    3,983
    Thanks @ThynkTekStudio

    I will try to reproduce the culling issue this week.

    As for the performance issue, it looks like that one job is not using Burst. I recommend when profiling to use the timeline view, as it makes these sorts of things more apparent. As for why that job isn't using Burst, I suspect it is a casualty to the Burst error with IBaker. @Dechichi01 will have to fix that.
     
    ThynkTekStudio likes this.
  13. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    3,983
    @ThynkTekStudio I just tested your project. Opened it as you shared it in the same editor version. Enabling Burst caused the Burst error, but the culling issue is not present for me. All entities show up with the closed subscene (worked right away) and also render in play mode.

    That means I have to ask two very dangerous questions. First, what OS and rending API are you using? (I'm testing with Windows in DX11.) And second, what GPU do you have? (I test with an old AMD GPU.)

    Another thing you can check in the inspector is if the ChunkPerFrameCullingMask has 0s in the middle when Lower is converted to binary. If all entities are supposed to be visible, it should be a solid string of 1s in the lower bits and a solid string of 0s in the upper bits.

    One last thing, try replacing the skinned meshes with cubes and see if those have weird culling too (with DMotion and Latios Framework still installed).
     
    Last edited: Feb 27, 2023
  14. ThynkTekStudio

    ThynkTekStudio

    Joined:
    Sep 4, 2021
    Posts:
    58
    hi, i used 2 machines with different specs to test with the same results

    machine 1

    OS : Windows 10, DX11
    GPU: RTX 3070

    Machine 2

    OS: Windows 10, DX 11
    GPU: AMD Integrated Vega

    if by zero in the middle you mean in the middle of these weird numbers (i have no idea what these are :D) invisible.PNG visible.PNG


    then yes, all the entities have a zero in the middle of that number


    anyway i'm in no hurry to fix this, ill check again with v 0.7 of the framework if the error still persists

    until then I'd prefer if you roll the 0.7 asap.

    i'll play with it some more & if i managed to fix it somehow, I'll update you.

    thanks a lot for checking with me.
     
  15. ThynkTekStudio

    ThynkTekStudio

    Joined:
    Sep 4, 2021
    Posts:
    58
    after trying your last suggestion the problem was solved ( my guess would be it had something to do with the mesh's bounds), i know it was stupid of me to immediately report this as a bug without trying a different mesh but it completely went over my head cubes.PNG
     
  16. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    3,983
    First, you need to take your scene view, and zoom out such that the full grid is visible.
    upload_2023-2-27_10-37-52.png
    Now for the selected entity, I see this:
    upload_2023-2-27_10-38-36.png
    upload_2023-2-27_10-39-31.png
    Notice how in binary, it is a string of 0s, followed by a string of 1s? That means every entity in the chunk is passing the culling test (there's 41 entities in the chunk), which is what I would expect. The reason this is so important is because I'm trying to figure out if the issue you are seeing is on the CPU side or GPU side. If you are able to recreate this experiment and get the same results, then the issue is GPU-side and I would likely need to debug with RenderDoc. However, if you do the same experiment and get different results, then there is something on CPU going wrong. Me asking you to switch to cubes was to rule out corrupted culling planes on the CPU, but besides that, I still have no idea what could be causing the issue you are seeing. It is quite puzzling, and I am surprised you are seeing it with similar hardware and OS.

    Given I have no idea what is causing this, I would be surprised if 0.7 fixed it.

    1) Kinemation uses its own bounds calculation for skinned meshes rather than the one included with the mesh, so if the issue is with bounds, it is still a Kinemation issue.
    2) The fact that I opened the exact same project and saw different results makes me believe that the issue is not with the project itself, but something with Editor Preferences, workflow in starting up the project, caches, graphics drivers, or some other shenanigans.

    I hope that helps! :)
     
    ThynkTekStudio likes this.
  17. ThynkTekStudio

    ThynkTekStudio

    Joined:
    Sep 4, 2021
    Posts:
    58
    UPDATE:



    i have fixed the issue, apparently it was a shader issue at the end, the provided shader used linearblendskinning for deformations which i guess was deprecated

    fixed.PNG

    and after i created a new shader with ComputeDeformation node instead of Dmotion's linearblendskinning node


    so i'd suggest as a bug fix to only edit the shader


    thank you
     

    Attached Files:

  18. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    3,983
    Linear Blend Skinning should still work. Kinemation has a custom code path to support it. I'm glad compute deform skinning is working for you though! Seems like it might be some weird shader graph cache issue.
     
  19. Dechichi01

    Dechichi01

    Joined:
    Jun 5, 2016
    Posts:
    39