Adding Dual Quaternion support to UnrealEngine4 (Images inside)

1789101113»

Comments

  • I have asked in the animation section. Didn't get a response. But that was a while back.

    On another note, I've been told that the disappearing node issue is fixed in 5.3. I'm still on 5.2 for my own project, but if it is fixed, I'm likely to move to 5.3. And deformers work better on 5.3 as well. This is a postiive trend. If I can get a bit of free time, I might start working on DQS in UE again.

  • I've created 5.3-mod and merged my pull request from ue5-main to it and fixed the conflicts. The deformers are located in ue5-content branch.

    They're in the Engine/Plugins/Animation/DeformerGraph/Content/Deformers/

    So just download those four files and copy them to your 5.3-mod branch.

    I'll try merging that in the 5.3-mod branch soon, but I haven't tried them yet if they haven't changed the format again. I haven't tested 5.3-mod yet. I only got it to compile.

  • There's a DAZ to UE 5.3 plugin already??? Trying it out now.

    Gonna see if I can get DQS and JCMs/morphs to work. I see there's an option to fake DQS JCMs. That looks like an interesting alternative.

    Wondering what rig it will use. I've converted animations to DAZ skeleton before. I might try that out again. DAZ plugin also allows exporting poses. I think I'm gonna play around with this for a while and see how far I get.

  • AlienRendersAlienRenders Posts: 790
    edited September 2023

    5.3-mod is now working. I've merged the DQS deformers. I've tried the DAZ to Unreal plugin and both DQS and JCM's (which are morphs) work fine with DG_DQSBlendSkinScale_Morph deformer. You need to set this on the skeletal mesh. For the preview, there's a default deformer and default skinning property.

    In the project settings, I need to figure out what I want to do here. Curretly, you can specify the default deformer and default recompute tangent deformer. I could add a default skinning option and just leave it at that. Then the people who want to have it always on can do so. It's also super simple to add.

    Note that after you checkout 5.3-mod and run Setup.exe, you may want to run "git checkout ." to restore the files that Setup.exe overwrites. Otherwise, you will have bugs in the deformers.

    Post edited by AlienRenders on
  • Is the new 5.3 stable enough to use compared to UE4.27 ?

  • Not sure how stable 5.3 yet. It's BY FAR the most stable of all the 5.x branches and I'm really liking it so far. I think 4.27 used the old "always on" code. 5.3-mod isn't using that anymore. It's using the deformers. You have to set the deformers on each character CDO. Thinking of adding an option in the settings for defaults.

     

  • I wanted to add a project setting for the default skinning type, but I don't think the default deformer settings are hooked up to anything. I could not get them to work and I could find no code that uses them. Has anyone had any luck with the default deformer settings in the project settings?

  • Always On DQS Deformers w/ overrides

    On 5.3-mod branch, I've added a project setting for the Default Skinning type (under Engine/Deformer Graph). Set Default Mode to Always. I added code to support the Default Deformer setting. So if you want to use DQS for everything, just set the DQS deformer you want and the Skinning type to DQS in your project settings.

    You can still change the deformers and skinning type per character. This means you can fine tune/override these settings as needed.

    If someone uses cloth, could you let me know if it works? I've never used cloth and have no idea how to set it up. Looking at the code, I don't think it would work (except maybe by specifying the deformer directly). If I had a sample project, I could fix it quickly.

    I looked at the code and it appears recompute normals in the static mesh editor was never hooked up to the deformers. So the Tangent Deformer setting won't do anything. It was never hooked up. To me, it looks like this was work in progress and the ability to use deformer graphs for recompute normals or tangents was never done. Recompute normals has always used the non-deformer code path AFAICT.

     

    The way it finds the Deformer and Skinning type is a 4 step process. The first one available is the one used.

    1. If the checkbox is on in the Deformer setting on the Blueprint's SkeletalMeshComponent, it will use that.
    2. If the Default Deformer is set on the skeletal mesh, that and the Default Skinning is used (otherwise, both are ignored) This is also used for the preview in the editor.
    3. If the Default Deformer in Project Settings/Engine/DeformerGraph/Default Mode is set to Always, use the Default Deformer and Skininng project settings.
    4. If none of the above are found, then use the built-in Linear Skinning code.

    This allows you to set defaults on a project level and have different deformers on specific characters.

     

    Where are these settings?

    The project settings are in the Edit/Project Settings menu. Then go to Engine/DeformerGraph. You can set the deformer and skinning for your entire project here. For many people, this is all you need to do.

    The per character Default Deformer and Default Skinning are on the skeletal mesh. These are used for the preview in the editor. But they are now used as defaults for the in-game instances as well.

    Finally, there is a setting that can be used per character or per instance. You create a Blueprint with a skeletal mesh component (and use your skeletal mesh). Here, you can set the Deformer and Skinning type by enabling the checkbox. If you set it in the CDO (Class Default Object), then it will be default per character. This is kind of obsolete with the per character Default Deformer setting since you'd likely want to set it there as that controls the preview deformer as well. But if you change these settings in the instance, then you can have per instance settings. Per instance settings are set by selecting the instance in the Outliner (or in the viewport) and setting these in the Details tab in the main editor. If you click the blueprint under the Type column, that's the CDO. CDO is also opening the skeletal mesh in the Content Browser.

     

    If you use this, could you let me know how you get along with this build? Let me know if it works, doesn't work, etc. Any feedback is welcome.

    Enjoy!

     

  • Thanks for making the great mod to improve the animation quality, I'd test the mod when experimenting with the new 5.3 version

  • catmastercatmaster Posts: 226
    edited September 2023

    I'm still experimenting with official 5.3 release, would play with compiling the 5.3 mod later as the visual studio also needs to be updated.
    Where are other players of the Unreal toy, it seems to be quiet for a while, I saw there were more animated visual novels coming out made with RPG Maker than actual real time simulated games made with Unreal
    UE5.4 should include this dual quaternion mod as mandatory plugin and boost its animation quality, there were lots of useless plugins included in 5.3 and they introduce new bugs and affect the performance

    Post edited by catmaster on
  • catmastercatmaster Posts: 226
    edited September 2023

    Hi, Can I get the mod link for UE4.27? Tested my project with the official UE5.3 had been 20% more slower than UE5.2 which is about 20% more slower than 4.27.
    There were lots of red errors from 5.3 due to deprecated nodes etc. and lots of unknown errors that I couldn't understand,
    I'd keep using 4.27 to complete my project.

    Post edited by catmaster on
  • Personally, I'm tied up with other concerns right now, but I'm extremely interested in this progress! I'm thinking a lot of other peeps are in the same sistuation, and interest witll grow (a lot) as people see that this works properly without gumming something else up.

    Thanks!!

  • AlienRendersAlienRenders Posts: 790
    edited September 2023

    @catmaster UE 5.2 and 5.3 is MUCH faster for me than anything in UE4. Not only that, but UE4 doesn't hold a candle to UE5 for visual quality. But it's VERY easy to make it slower. They added temporal upscaling by default and that's very slow. Also, nanite is enabled by default on everything and that's simply not game ready. So there are lots of settings to tweak to get the performance back. 

    Check your project setttings for Rendering. By default UE5 uses TSR (Temporal Super Resolution). Switch it to TAA (Temporal Anti Aliasing). To me, TAA is WAY faster and sharp mesh edges looks much better.

    Another setting to get more speed is that you really don't need Epic Global Illumination. Set it to High and you should see a rather big boost in performance. Some of the other scalability settings also have a huge impact.

    Then lighting settings are huge. I forget all the settings here. But I can ask a friend who deals with this all the time.

    For even more performance, you can use DirectX 11 (SM_5).

    Next, I'd disable Nanite and just use LOD's. This will likely be one of the biggest performance improvements you can get. Nanite is simply not game ready IMO.

    As for 4.27, I have no intention of supporting that. The later versions of UE4 were slow, unreliable, buggy and visually deficient for me. The devs were also making massive changes to the shaders in anticipation of UE5.

     

    Post edited by AlienRenders on
  • catmastercatmaster Posts: 226
    edited September 2023

    I've turned off the Lumen Global Illumination and using LODs instead of Nanite for the 5.2 version of my project. It also gets another performance boost after turning off generating distance fields when not using Lumen. To be honest the optimized 5.2 version is still 20% slower than the 4.27 version if the environment has lots of above 4k textures, and 5.2 is the fastest and the most reliable among the current UE5 versions. There are both UE4 and UE5 based games which have achieved good graphic quality, the default color tones are different and UE5 versions often have some ghosting around moving characters when the fps is low, although 5.2 has fixed this mostly from previous versions and it's been not very noticeable.

    The performance requirement is based on the average specs of current player hardware and it'd become not relevant after most players have updated their hardware, and my current laptop is very cheap which can't run Lumen smoothly. The UE4 version of my project that I'm trying to make is for the current market of budget laptops, the UE5 version with Lumen turned on looks much more realistic.

    I've noticed that early UE4 versions are much faster than 4.27 and there are some games based on early UE4 versions that have great optimization,
    for example Conan Exiles can run smoothly on 4k monitor connected to my budget laptop with RTX 3050, I've not found any other games that have the same level of optimization.

    There are too many AAA games being released this year and I guess most players with expensive gears would be busy with these high quality games, and the solo develpers would be lucky even to be able to sell thoundsands copies of their games mostly to the budget market, if the games are made with lots of effort and are interesting enough to attract them

    Post edited by catmaster on
  • I am having an problemwith the latest 5.3-mod. When i enable DQS in project setting my character is flattened and smeared across the screen in game. Any ideas what that is about?

    FukmesFutas - Unreal Editor 10_2_2023 11_00_52 AM.png
    1876 x 1126 - 1M
    Project Settings 10_2_2023 11_03_11 AM.png
    1911 x 930 - 109K
  • To add my previous post, here is some additional information. Trying to set default deformgraph in project settings for always on.

    For my setup/skelton i have the following settings:
    Project Settings:
     - Use Skin Cache
     - Use Unlimited bone influences

    DazTounreal:
     - Fix Bone rotations
     - Fix twist bones (setting this or not has no affect)

    Images provided:
    1 is the relative expected result (using daztounreal fake dual quat).
    2 is with no deformgraph (and without fake dual quat as above).
    3 is with deformgraph dual quat (setting i am using are shown in the image)

     Is this a problem with my setup or DQS?

    Screenshot 2023-10-02 142033.png
    2734 x 1837 - 5M
    Screenshot 2023-10-02 142047.png
    2736 x 1840 - 5M
    Screenshot 2023-10-02 143219.png
    2731 x 1837 - 5M
  • Project Settings:
     - Use Skin Cache
     - Use Unlimited bone influenes

    I figured it out.... Those setting are not needed. I belive they were are one time.

  • @funkinfamily UE added code to check how many bone influences are in the imported character and it will use that instead of unlimited bone influences. Unlimited Bone Influences should still work though. Skin Cache needs to be turned off I think. The easiest way to see if DQS is working is to twist the shin of a leg 180 degrees. If the knee collapses to a point like a candy wrapper, it's not working. If it retains its volume, it's working.

    @catmaster UE 5.2 is buggy. It's not stable at all. 5.3 is the only version that works properly for me. I'm not sure why you're not getting faster performance. As for 4K textures, have you configured texture streaming properly? If you don't have the video memory to store all your textures, it's gonna swap in and out constantly. UE 4 likely never used the higher resolutions at all. There are settings you can set to limit the LOD level. Beyond texture streaming, you can set up streaming virtual textures (SVT) to cut up the textures even more and UE will only load the subsections it needs. I've had VERY good results with it. If you do use it, you'll have to update your materials to use virtual texture sampling (in the sampler type). There are some drawbacks and limitations. Texture lookup is a bit more expensive and anisotropic filtering is more limited. If UE4 works for you though, that's great.

     

  • catmastercatmaster Posts: 226
    edited October 2023

    Thanks for the advice to configure the texture streaming, I tried using virtual textures but it requires texture dimensions to be a power of 2, and lots of original textures have irregular dimensions. The textures wouldn't be able to keep original quality when resized to be a power of 2. Streaming virtual texturing improved the performance when tested on my laptop which has 4GB vram.
    My project is still based on 5.2, when I tried to rebuild UE4 version of the project, there are some assets used in my project which have stopped supporting UE4,
    one of the plugin creators said he couldn't update the UE4 versions because Epic locked the UE4 versions of the plugin. It seems that once the project starts to use UE5 there is no way back, and I have to buy a new laptop with video card above 8GB vram.

    Post edited by catmaster on
  • Running into an issue I thought might be worth sharing in case anyone else is having trouble packaging and running a game with DQS and any plugins that also use the Deformer system.

    For me I am using SkinnedDecalComponent and for some reason DQS is causing that plugin to not be able to use the Deformer system as it would normally. It does work with earlier style of DQS before hooking into the deformer system.

    The solution for me will be to cherry pick the old style of DQS into a new build. Not yet tested because i am lazy but that should work. If anyone else runs into package issues. Could be the same deal.

  • Is there any links to DQS stuff? Seems like all stuff from AlienRenders was removed. Please help) 

  • emaneman Posts: 23

    Links are not dead (see post #22 on first page). If you are still interested my link should work now, you don't need an account, just click on it. I don't remember if I updated the files, if the plugin doesn't work it means I didn't...just let me know.

    https://github.com/pedroscialfa/DualQuaternionDeformer

  • AlienRendersAlienRenders Posts: 790

    Just updated 5.3-mod to be in sync with main epic branch in case anyone is interested.

  • Thanks, yes, I bet a lot of people are interested.

    But considering you synced this with the main epic branch what does it takes to have Epic include this out of the box in their public build?

  • eman said:

    Links are not dead (see post #22 on first page). If you are still interested my link should work now, you don't need an account, just click on it. I don't remember if I updated the files, if the plugin doesn't work it means I didn't...just let me know.

    https://github.com/pedroscialfa/DualQuaternionDeformer

    This is interesting. Is there any more background on it? How does it work? Is it based on AlienRender's code but packaged differently (more like the vaunted plugin)? Is this Deformer Graph a C++ coded node? What is the difference between the _Skin, _Blended assets? How do I know its not a Trojan, its jsut a packaged asset without source? :-) I've used the ML Deformer functionality from the DazToUnreal plugin with decent success but its long winded, not perfect and can be overwhelmed. My thinking was that it would take account of the collision smoothing that DAZ does - which I use a lot to cover for poke through. I'd be interested in using a DQS Deformer in Unreal and, I presume, I could set it up to apply JCMs on top? 

    Anyway, I can't see much back story on it. 

     

  • emaneman Posts: 23

    It is based on the Dual Quaternion Skinning example provided by Epic Games (in Content Examples). I just added few lines of code (HLSL) to make it usable. Definitely is not a trojan! laugh But you can scan the zip file with your antivirus...

    You can find some info about the Deformer Graph here : https://docs.unrealengine.com/5.3/en-US/deformer-graph-in-unreal-engine/

    It is fast because the bone influence is limited to 4, but you can increase it if you have a good PC. The Blended version use both Linear and Dual Quaternion Skinning blended by a vertex map (it's for correct the bulges you usually get with DQ skinning).

    There is no cloth version because I don't use clothing tool on my characters. JCMs should work, I used those on few characters.

    I tried ML Deformer, but the setup is a nightmare for me. And do that for every character is just insane!

  • AlienRendersAlienRenders Posts: 790
    edited April 15

    Neverdie Axis said:

    Thanks, yes, I bet a lot of people are interested.

    But considering you synced this with the main epic branch what does it takes to have Epic include this out of the box in their public build?

    I have a pull request, but nothing yet. I just checked and some breaking changes have been added, so I'll have to update it.

    If you have a github account, please upvote it

    https://github.com/EpicGames/UnrealEngine/pull/10230

    edit: I've fixed the pull request. I'll have to build it and test it tomorrow to make sure it still works. I'll try updating the 5.3-mod branch while I'm at it.

    Post edited by AlienRenders on
  • @AlienRenders I am curious about this branch in your repo for ue5-dqs. It builds as UE 5.5. Is that because it is synced upstream?

  • funkinfamilyfunkinfamily Posts: 8
    edited April 26

    funkinfamily said:

    @AlienRenders I am curious about this branch in your repo for ue5-dqs. It builds as UE 5.5. Is that because it is synced upstream?

     Oh nevermind. I see now that it is your pull-request :) Upvoted

    Post edited by funkinfamily on
Sign In or Register to comment.