Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

VertExmotion [Released]

Discussion in 'Assets and Asset Store' started by kalagaan, Oct 30, 2014.

  1. YukkuriMikan

    YukkuriMikan

    Joined:
    May 17, 2017
    Posts:
    8
    Thank you, it's fixed perfectly!
     
  2. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,309
    You can export the texture in UV space from the tool ;)
    You'll have to convert it at runtime for each vertex, or you could use it in a custom shader by setting it in the shader instead of the vertex color.
    But I don't know if UMA will keep the original UVs... I think that there's a kind of optimization process for combining all the materials textures in a single one.
     
  3. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,083
    Hi, I am using vertxmotion to give some bodyparts a more realistic feel , but they are too wobbly for my liking, see sample vid:


    Can anyone give me some ideas/pointers on how to make look a bit more realistic perhaps? Open to any ideas!
     
  4. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,309
    Hi,
    you should use more sensors on smaller areas, instead of a big sensor.
    have a look to the demos, there's some samples using characters. ;)
    You can also reduce the sensor motion range using the limits (inner/outer max distances)
    YOu can also decrease the 'Motion factor' if you need a smooth reaction to the object motion.
     
    Last edited: Mar 29, 2021
    khos likes this.
  5. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    156
    Hey @kalagaan I have some issue with painting on a high poly model (>100K vertices). On higher materials / higher ranged vertices, it seems both wireframes and UV paint are broken.. So basically the first few 10K vertices work fine, but then it breaks. is there a vertex limit for the editor, maybe around 64K?
     
  6. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,309
    Hello,
    thank you for the feedback!
    It looks like this is a limitation of the Mesh collider :(
    I think that it can't use 32bit mesh, so the limit is 65535 vertices (16bits format).

    The only way to use it is to split the 100k mesh into smaller parts and add the VertExmotion component on each of them.
    You can change the index format in the fbx importer (Auto -> 16bit), it will automatically split the mesh.

    Sorry I don't have a better solution for now.
    Maybe there's a way to modify this limitation, I'll do more tests.
     
  7. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    156
    ah, got it. could you use one mesh collider per material or something like this? But in that case you probably would need to build the collider manually...
    Would it be possible to make the UV painting work in that case, or does it also rely on mesh collider?
     
  8. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,309
    OOps,
    It was a problem on my side!:oops:
    The format index was not properly set in the collider mesh :confused:
    I'll push a new version on the assetstore ;)

    Please send me an email (contact@kalagaan.com) with your invoice number and I'll send you a fix!
     
    Qleenie likes this.
  9. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    156
    great, I sent a mail!
     
  10. Wilfreed

    Wilfreed

    Joined:
    Mar 29, 2013
    Posts:
    8
    Hi @kalagaan,

    I am new to VertExmotion, and I am trying to redo with Amplify some of the shaders present in the demo folder (within a URP renderer project), to understand how it is supposed to be setup, before making my own shader.

    In particular I focused on the Dress demo scene.

    But whatever I try, the motion I get with my Amplify version is different from the one with the original demo shader.
    For info I am using Unity 2020.3.3f1, but I have the same result in Unity 2019.4.10f1

    Here is the Amplify test shader I made, inspired from the recommendations in the documentation:

    upload_2021-4-13_18-33-17.png

    And below the resulting motion I get with it (in green), compared to the original motion (in grey):


    Dress_Amplify.gif Dress_OriginalDemo.gif

    I've been experimenting for quite some time now and I run out of ideas,
    Am I missing something trivial here?

    Thanks in advance
     

    Attached Files:

  11. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,309
    Hello,

    you have to add some transformation nodes (World to object) for URP/HDRP.
    Here a sample :

     
  12. Wilfreed

    Wilfreed

    Joined:
    Mar 29, 2013
    Posts:
    8
    Works like a charm,
    Thanks a lot for the quick answer!
     
    kalagaan likes this.
  13. Wilfreed

    Wilfreed

    Joined:
    Mar 29, 2013
    Posts:
    8
    Hi @kalagaan,

    I have another question, related to edition:

    I have a personal preference to edit all the VertExmotion objects using "Panel in inspector" (because of limited screen-space in my scene view).

    But every time I open my scene and edit the same objects with the VertExmotion component on it, I have to redo that choice and to click on the button "Panel in inspector", and for every object.

    Is there a way to make that choice sticky, so I can stop repeating that step?
    Or to make that choice the default edit mode for the whole project?
     
    Last edited: Apr 27, 2021
  14. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,309
    The panel draw mode is saved per object, so it shouldn't be modified when the scene is reloaded.
    What is your version of unity?
     
  15. Wilfreed

    Wilfreed

    Joined:
    Mar 29, 2013
    Posts:
    8
    I have the same outcome in Unity 2019.4.10f1, 2020.3.3f1, and 2020.3.6f1.

    Saving the scene doesn't save that param for me in all these 3 unity versions.
     
  16. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,309
    That's weird... It works fine when I test it.
    Here how I did the test :
    - create a sphere
    - Add VertExmotion
    - Duplicate it in the scene view
    - Enable 'Panel in inspector' on one of them
    - Save the scene and reload it
    - When I select each sphere, one use the inspector and the other the scene view.

    Do you use the latest version? 1.9.8 ?
     
  17. Wilfreed

    Wilfreed

    Joined:
    Mar 29, 2013
    Posts:
    8
    Yes I use 1.9.8,

    and I have mostly the same process as in your test above,
    the only difference I see is that I made a prefab of my VertExmotion object,
    and I manipulate instances of it in my scene.
     
  18. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,309
    ok, there's a problem with registering this var in the prefab.
    You can fix it like this :
    - set the panel in inspector
    - change the brush size (for registering a modification)
    - Apply the modification of the component to the prefab

     
    Wilfreed likes this.
  19. Descend

    Descend

    Joined:
    Jul 7, 2012
    Posts:
    9
    Does vertexmotion have a discord, if not can anyone help me on this issue? I working with unity 2021.1.5f1. Thanks, for your time.

    Also I was getting these warnings with it.

    Shader warning in 'VertExmotion/HDRP/LitTessellation': implicit truncation of vector type at Assets/VertExmotion/Shaders/VertExmotion.cginc(522) (on d3d11)
    Shader warning in 'VertExmotion/HDRP/LitTessellation': implicit truncation of vector type at Assets/VertExmotion/Shaders/VertExmotion.cginc(523) (on d3d11)
    Shader warning in 'VertExmotion/HDRP/LitTessellation': 'cross': implicit truncation of vector type at Assets/VertExmotion/Shaders/VertExmotion.cginc(524) (on d3d11)
    Shader warning in 'VertExmotion/HDRP/LitTessellation': implicit truncation of vector type at Assets/VertExmotion/Shaders/VertExmotion.cginc(530) (on d3d11)
    Shader warning in 'VertExmotion/HDRP/Lit': implicit truncation of vector type at Assets/VertExmotion/Shaders/HDRP/LitDataMeshModification.hlsl(58) (on d3d11)
    Shader warning in 'VertExmotion/HDRP/Lit': implicit truncation of vector type at Assets/VertExmotion/Shaders/VertExmotion.cginc(522) (on d3d11)
    Shader warning in 'VertExmotion/HDRP/Lit': implicit truncation of vector type at Assets/VertExmotion/Shaders/VertExmotion.cginc(523) (on d3d11)
    Shader warning in 'VertExmotion/HDRP/Lit': 'cross': implicit truncation of vector type at Assets/VertExmotion/Shaders/VertExmotion.cginc(524) (on d3d11)
    Shader warning in 'VertExmotion/HDRP/Lit': implicit truncation of vector type at Assets/VertExmotion/Shaders/VertExmotion.cginc(530) (on d3d11)
     

    Attached Files:

  20. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,309
    I've tested VertExmotion with this version of unity, it works properly.
    Do you use the latest version (1.9.8)?

    If you have already downloaded VertExmotion for an older version than 2020,
    you have to remove it manually from "C:\Users\userName\AppData\Roaming\Unity\Asset Store-x.x"
    Then download it again from the package manager.
    It will install a the VertExmotion package compatible with your current Unity version.

    Note : The warnings will be fixed in the next version.
     
  21. Descend

    Descend

    Joined:
    Jul 7, 2012
    Posts:
    9
    ah could be the issue. I did download vertexmotion on a older version of unity then I updated to 2021.1.5f1. I'll try your advice and see what happens.
     
  22. Descend

    Descend

    Joined:
    Jul 7, 2012
    Posts:
    9
    what if I downloaded on 2020.3.6f1 and then I updated to 2021.1.5f1. Could that be the reason why I'm getting those errors?
     
  23. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,309
    No, if you have already downloaded a version from the package manager of Unity 2020.1 or later it should work.
    Could you try in an empty project?
     
  24. Descend

    Descend

    Joined:
    Jul 7, 2012
    Posts:
    9
    I didn't get the same errors or warnigns but I did get these warnings.

    There are inconsistent line endings in the 'Assets/VertExmotion/Demos/Droplet/DropletSpawn.cs' script. Some are Mac OS X (UNIX) and some are Windows.
    This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands.

    Assets\VertExmotion\Demos\BakeMesh\VertExmotionBakeMesh.cs(41,21): warning CS0618: 'MeshCollider.inflateMesh' is obsolete: 'MeshCollider.inflateMesh is no longer supported. The new cooking algorithm doesn't need inflation to be used.'

    ImportFBX Warnings:
    Mesh 'DrawCall_0118' has overlapping materials on two layers. Material(s) will be taken from lower layer(s).
    Mesh 'DrawCall_0121' has overlapping materials on two layers. Material(s) will be taken from lower layer(s).

    Shader warning in 'Hidden/VertExmotion_editor': use of potentially uninitialized variable (o) at line 131 (on d3d11)
    Shader warning in 'VertExmotion/ShaderForge/test1': 'UNITY_PASS_FORWARDBASE': macro redefinition. Previous definition found at :1. at line 29
    Shader warning in 'VertExmotion/ShaderForge/test1': 'UNITY_PASS_FORWARDADD': macro redefinition. Previous definition found at :1. at line 228
    Shader warning in 'VertExmotion/ShaderForge/test1': 'UNITY_PASS_SHADOWCASTER': macro redefinition. Previous definition found at :1. at line 363
     
  25. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,309
    These warnings cames from some demo scripts, you can delete the demo folder if you don't need it in your project.
    I'll fix them for a specific 2021 package.
     
  26. Descend

    Descend

    Joined:
    Jul 7, 2012
    Posts:
    9
    So I manage to get rid of the errors by rebuilding my library. It got rid of the HDRP shader add on for vertex motion, I'm using HDRP Unity 2021.1.5ft with latest update of HDRP, I have a feeling the HDRP shader you have on the add on might not be up to date. The highest one you have on the add on for HDRP is 2020.2 for HDRP 10.2.2, should I reinstall that add on?
     
  27. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,309
    Yes, you can install this addon.
    It will provide the compatible shaders 'VertExmotion/HDRP/Lit' & 'VertExmotion/HDRP/LiTessellation'
    For these shaders you have to enable the Displacement Mode in the material ( 'Vertex displacement' or 'Tessellation Displacement' ).
     
    Last edited: May 2, 2021
  28. Descend

    Descend

    Joined:
    Jul 7, 2012
    Posts:
    9
    I have everything installed now, my error is gone. I think everything is all well. I really appreciate your help, just a question does vertexmotion have a discord server?
     
  29. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,309
    No, but if you have any problems you can send me an email (contact@kalagaan.com) for support ;)
     
  30. tavovallejo

    tavovallejo

    Joined:
    Nov 22, 2014
    Posts:
    32
    hi, I plan to modify the LayeredLitTessellation shader to make it work with VertExmotion, and I was wondering if it was possible to make it work with Normal Correction as well, is this possible?

    I have a lot of logic tied to LayeredLitTessellation shader so I can't just implement ASE and even if I did, I don't know the addon very well, so I think it's easier for me to just modify the LayeredLitTessellation shader.

    I forgot to ask, can I make the displacement done by VertExmotion be applied before the HeightMap displacement?
     
    Last edited: May 2, 2021
  31. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,309
    I'll work on new update for the HDRP shaders.
    In the current version I can't make the Normal correction work, because the tangent is missing in the fonction I used for including VertExmotion. I have to modify more files to make VertExmotion work with the normal correction, so I'm still working on a way to modify the less files as possible.

    I think that I'll have to modify all the ShaderPass and modify 'VertMesh.hlsl'

    By applying VertExmotion at the begining of the function VertMesh, it should work.

    I'll probably work on this next week. ;)
     
    Last edited: May 4, 2021
    tavovallejo likes this.
  32. Descend

    Descend

    Joined:
    Jul 7, 2012
    Posts:
    9
    I got rid of the errors, but I'm still getting these random crash it seems to only happen on the scene I have vertex motion on. I'm still looking into it more. I have one model on this scene with vertex motion. I deactivated her and I didn't get any crashes. I reactivated I get this random crash. I'm still doing so more texting to verify this.
     
  33. tavovallejo

    tavovallejo

    Joined:
    Nov 22, 2014
    Posts:
    32
    So. I finally managed to implement VertExmotion with the LayeredLitTessellation shader, with Normal Correction as well.
    Unfortunately I had to copy and modify most of the files in the ShaderPass folder, so it is not scalable at all.

    What I found, is that you don't need to implement VertExmotion in the Hull function, instead, you can make these modifications in the Vert function.
    I suppose it has better performance and is best complemented by Phong Tessellation
     
    kalagaan likes this.
  34. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,309
    Does the crash log have some references to a VertExmotion class?
     
  35. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,309
    I think that modifiying all the shader pass and the main shader file is the only way to make it work with normal correction.
     
    tavovallejo likes this.
  36. tavovallejo

    tavovallejo

    Joined:
    Nov 22, 2014
    Posts:
    32
    Do you plan to implement more shapes for the sensors? A capsule-shaped sensor would be very useful to me, even if the maximum number of sensors were reduced to only 10. :)
     
  37. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,309
    It's already done :D
    you can link sensors, so it's a 'dual-sphere' capsule.






    I should update the unlinked icon for the dark theme...
    It's not visible.

    HERE a new icon
     
    Last edited: May 6, 2021
    tavovallejo likes this.
  38. mchung123

    mchung123

    Joined:
    Jul 4, 2017
    Posts:
    24
    Hey is there a way to adapt this to a shader that isn't a part of unity? I want to try this on the relation shader
     
  39. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,309
    Yes, there are some samples in the documentation.
    You can also use the nodes for Shadergraph or Amplify Shader Editor.

    If you have some problems with a shader conversion, please send me an email (contact@kalagaan.com) with your invoice number, and I'll help you ;)
     
unityunity