Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

VertExmotion [Released]

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

  1. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    350
    Hi @kalagaan Thanks for the prompt reply. Very much appreciated.

    So yes, I'm using a skinnedMesh already. I've now added capsule colliders for the upperLegs, which makes sense. But I don't get why I need to add more sensors. I looked at the dress demo previously but it didn't make much sense. I've found the docs quite abstract and I don't fully understand, from what I've read, why there's a whole array of sensors on that dress. I thoughtI would just have to paint the verts (I'm actually importing a texture for that) and then enable collision:

    I'll shoot you a repo! (Maybe you might turn it into one of your videos :) I expect this is not something that unusual as a requirement)
     
    kalagaan likes this.
  2. jitterhorse

    jitterhorse

    Joined:
    Sep 11, 2016
    Posts:
    2
    Is this still working? I am trying to add a collider via script. How do i do that?
    Thank you so much in advance!

    jitterhorse
     
  3. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    Here a script for creating collider and collision zones.
    You have to add this component to a sensor.


    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using Kalagaan;
    5.  
    6. public class AddColliderToSensor : MonoBehaviour {
    7.  
    8.  
    9.     VertExmotionSensor m_sensor;
    10.  
    11.     // Use this for initialization
    12.     void Start () {
    13.  
    14.         m_sensor = GetComponent<VertExmotionSensor>();
    15.         GameObject go = new GameObject("VMCollider");
    16.         go.transform.parent = m_sensor.transform;
    17.         go.transform.localScale = Vector3.one;
    18.         go.transform.localPosition = Vector3.zero;
    19.         go.transform.localRotation = Quaternion.identity;
    20.         VertExmotionColliderBase collider = go.AddComponent<VertExmotionCollider>();
    21.  
    22.         //Create a collision zone that will check other unity colliders
    23.         VertExmotionCollider.CollisionZone cz = new VertExmotionColliderBase.CollisionZone();
    24.         cz.positionOffset = Vector3.zero;//position offset from the collider transform
    25.         cz.radius = 1f;//radius of the collision zone
    26.         collider.m_collisionZones.Add(cz);
    27.  
    28.     }  
    29.    
    30. }
    31.  
    32.  
     
  4. drlh1976

    drlh1976

    Joined:
    Oct 6, 2017
    Posts:
    17
    Dear kalagaan,VertExmotion is a very wonderful plugin for Unity.
    For me, to create a realistic character with dynamic hair and animations, I switch to Unreal, which has solutions such as TressFX, or build-in hairs, and animation plugins such as Allright Animation Rig. This is very important.
    So, does VertExmotion support Unreal engine, or will have plans to support Unreal?
    Thank you and waiting for your reply.
    Best regard!
     
  5. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    Sorry, I don't use Unreal engine. :(
    So no plan to support UE for now, maybe later if I have some time to learn it.
     
  6. HDriver

    HDriver

    Joined:
    Feb 17, 2019
    Posts:
    2
    Hi
    I am working on project using Unity 2018.3 and HDRP. I've updated VertexMotion and I saw the HDRP Shaders are only compatible with v2019.2.++. I tried importing the package and it throws me just one error and a few warnings:

    "Shader error in 'VertExmotion/HDRP/Lit': invalid subscript 'tangentToWorld' at Assets/VertExmotion/Shaders/HDRP/LitData.hlsl(58) (on d3d11)"

    I would like to ask you if you know how to fix that or if you have a package for Unity 2018.3

    Thank you

    PS.
    1. I have to use this unity version, because the assets I work with are only compatible with this
    2. I do not own Amplify Shader
    3. I do not have any knowledge of "shader-scripting"
     
  7. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    You could try to use shadergraph for creating a compatible shader,
    the package includes a compatible version for shader graph 3.

    If you still have issues, please send me an email (contact@kalagaan.com) with your invoice number.
    I'll have a look to your specific version ;)
     
  8. naelstrof

    naelstrof

    Joined:
    Sep 12, 2017
    Posts:
    12
    @kalagaan I've been using the pro version of your product and I've been loving it!
    I've had to make some modifications to my liking: Disable buggy collisions with Mesh colliders, fixed a bug where collisions had a divide by zero, switched the jiggle physics to work off of acceleration rather than velocity, and upgraded the HDRP Lit shader to be 7.3.1 compatible.

    Now I kinda want to open-source my game, your asset appears to be licensed under the Asset Store EULA: https://unity3d.com/de/legal/as_terms

    Which under section 3.5 says I need your permission to include your asset in my open-sourced product-- I think, but since I've made modifications to how it works I can't really tell people to go buy it...

    Is there something I can do to make it possible for people to build the game without purchasing your asset? For example I can compile down everything to a DLL, add some form of DRM, or something like that.

    If you'd like to add me on discord I'd love to chat about it: naelstrof#7705
     
  9. CoyoteFringe

    CoyoteFringe

    Joined:
    May 8, 2019
    Posts:
    19
    Out of curiosity, are there any plans to implement something like Boing Kit's propagation feature?
     
  10. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    I'm thinking about a way to extend the system with external forces, so a propagation system could be done. ;)
    I don't know yet when it will be available.
     
    Last edited: May 2, 2020
    CoyoteFringe likes this.
  11. CoyoteFringe

    CoyoteFringe

    Joined:
    May 8, 2019
    Posts:
    19
    You are amaaaaaaaaaaazing!! Thank you!! Very exciting! But in a patient way!! ;-)
     
  12. huxley

    huxley

    Joined:
    Apr 27, 2009
    Posts:
    329
    kalagaan, I've created a modified version of the PreIntegratedSkinShader with VertExmotion, as outlined in your documentation. Everything is working brilliantly when I have PC as the export platform, but when I switch to webGL, the modified shader is no longer supporting VertExmotion attributes. I saw that you had released a working demo on webGL, and was wondering if there is a limitation to my PreIntegratedSkinShader mod that prevents it from working in web. Any clues as to what additions to my mod might be needed to support webGL exports? Thanks for the great tool.
     
  13. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    You could try tor replace your shader with the standard shader for testing if it's about the shader or something else.
    If you have a problem with the shader, please send me an email (contact@kalagaan.com), I'll help you to fix it. ;)
     
  14. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    1,023
    @kalagaan

    Happy Memorial Day. I'm trying to get your asset working with the default render (3D) and Amplify Shader Editor. I believe I followed your docs, but tessellation does not work, my mesh is white with an error "Undeclared identifier 'VertExmotionASE'. If I remove tessellation and only connect VertExmotion node to the Local Vertex Offset Input I also get a white mesh. I'm running Unity 2019.3.14f1 and Amplify Shader Editor 1.8.1r1. Thoughts?

    Amplify-Tessellation.jpg Thanks.
     
  15. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178

    Hello, it looks like you forgot to include the VertExmotion include file ;)

    In the Additional Directives, you have to include the VertExmotion file
    "Assets/VertExmotion/Shaders/VertExmotion.cginc"
    Drag & drop it into the slot :)

     
  16. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    1,023
    That did it, thanks!

    Another question... I'm trying to understand how your 'Collider Settings' work. So after your paint the vertices strength, add a sensor, and then expand the Collider Settings, you have to resize the VertExmotion collider radius to fit the shape of the mesh, correct? So when an outside collider interacts with your collider, it deforms the mesh. Is that how it works?

    Is there a way to have an outside collider react per vertex? So if my capsule collider hits only 1 vertex, it pushes in that one vertex, so every vertex is independent. So more like a real soft body simulation. Basically I do not want to use your collider, just vertexes on my mesh. I hope that makes sense.
     
  17. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    The collider add an offset to the sensor, so every vertice in the sensor area will move.
    Per vertex modification would be slower, and it's not how VertExmotion works.

    You could create a script for adding a temporary sensor at the hit point when the mesh is collided, have a look at the droplet demo.
     
  18. unwshd_elend

    unwshd_elend

    Joined:
    Mar 21, 2019
    Posts:
    14
  19. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    Maybe it could help, you could shrink some parts of the model using the sensors.
    You could scale or add a custom offsets on different parts of the mesh.

    I think that you should duplicate the 'food' mesh and apply the plastic shader on it, and use the same plastic shader on a plane. The plastic shader should use a triplanar mapping or a simple projection, so the transition between the 2 meshes should be perfect.
    You can use VertExmotion to deform the plane too, you can share some sensors between meshes for a seamless deformation.
    I hope that it will help you to achieve the FX ;)
     
  20. unwshd_elend

    unwshd_elend

    Joined:
    Mar 21, 2019
    Posts:
    14

    Thanks sir !
    that was actually a good idea but I dont know how triplanar mapping can help
    so what I guess is that with alot of sensors I can achieve what I want :) one final thing that assuming I need 50 sensors on a plane , how would be the performance on mobile ?
     
  21. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    In the latest version of VertExmotion, you can bake the deformations into a mesh.
    So it's possible to update the MeshCollider at runtime :)

     
    CoyoteFringe likes this.
  22. CoyoteFringe

    CoyoteFringe

    Joined:
    May 8, 2019
    Posts:
    19
    Okay - that is so COOOOOOL!! You're an updating machine.
     
    kalagaan likes this.
  23. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    I'll push this demo to the assetstore soon ;)
    The bake mesh function is already available in the current version, have a look to the 'BakeMesh' demo scene.
    I've just updated the MeshCollider with the new mesh, and it works fine :p

    It also works with skinned mesh.
     
  24. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    oops, sorry I missed your message :confused:

    I assumed that you have a mesh for the food and a plane for the plastic.

    The idea was to project the texture in the shader with the default vertex position (without the VertExmotion deformation), and you'll get the plastic pattern like in your sample image.
    So if you share the sensor's for the food mesh and the plane, you shoud get a nice effect, the projected texture will be deformed by the new position of the vertices (modified by VertExmotion).



    I don't think that you'll need 50 sensors :p you can add 20 sensors on the same mesh.
    You should use a few sensors, you can overlap the sensors' effects.

    It works well on mobiles, there's only a limitation on old mobile (using shader model 2) only 4 sensors will be applied.
     
  25. summerian

    summerian

    Joined:
    Jul 6, 2014
    Posts:
    134
    I'm using Universal Rendering Pipeline and all shaders are pink. How can I fix that?
     
  26. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    The demos are done for the built-in render pipeline. You have to intall the addon for the URP compatibility : "Assets/VertExmotion/Addon/".
     
  27. summerian

    summerian

    Joined:
    Jul 6, 2014
    Posts:
    134
    Thanks for a quick respone!

    When I use VertexMotion on the unity capsule it works great. But when I try it on an object exported from Blender I can't seem to paint. Also the UV Paint Tool displays a super tiny mesh preview.

    I've exported the object as dfx. Are there any other things I should be aware of when exporting the object from Blender?

    Here's a video of what's happening.
    https://drive.google.com/file/d/1WNHEvoiDN5bj90uyuy-GbGPmN_SO-s3C/view?usp=sharing

    Thanks!
     
  28. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    Could you send me your file? (contact@kalagaan.com)
    It would be easier to check what's going on ;)

    What is the export format? fbx or dxf ?
     
    Last edited: Jun 27, 2020
  29. CoyoteFringe

    CoyoteFringe

    Joined:
    May 8, 2019
    Posts:
    19
    So hey! I see there's a 60% sale on Pro right now. Do Lite owners get a stackable discount for upgrading?

    Asking for a friend... ;)
     
  30. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    Oops!
    I forgot to change the upgrade price :confused:
    Done ;)
     
    CoyoteFringe likes this.
  31. CoyoteFringe

    CoyoteFringe

    Joined:
    May 8, 2019
    Posts:
    19
    You ROCK!! Thank you!!
     
  32. Kyrieru

    Kyrieru

    Joined:
    Mar 2, 2015
    Posts:
    31
    I'm a little confused about how I would convert HDRP/lit to be compatible. Is it possible?
     
  33. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    Have a look to the addon folder, there's a package with a compatible version ;)
     
    Kyrieru likes this.
  34. TwanZiango

    TwanZiango

    Joined:
    Jul 10, 2019
    Posts:
    1
    Hello!

    I am trying to get this package to work with Unity's LWRP. Because of other packages, the devs have set the unity version at 2019.2.x
    So we don't have access to HDRP nor URP.

    When I look through the documentation, it only says "How to use the HDRP/Lit shader". But nothing in particular about LWRP.

    When I check the addon packages, I can see that there are HDRP and URP shaders, but nothing for LWRP.

    Could you please guide me towards getting it to work with the LWRP materials or get a LWRP material working with this library?
    If there is already an addon for this problem available, which one should I be using?

    Current situation:
    When choosing LWRP/Lit material, it is not compatible with the VertExMotion component. When selecting a VertExMotion material, it is completely magenta.

    Not sure if relevant, but adding for completeness:
    - Macbook Pro with Catalina
    - Unity v 2019.2
    - LWRP 6.9.2
    - Working for mobile (both Android and iOS)

    Thank you very much!
     
    Last edited: Jul 17, 2020
  35. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    Only the latest version of URP is supported, I'll send you an older version
     
  36. Kyrieru

    Kyrieru

    Joined:
    Mar 2, 2015
    Posts:
    31
    Oh, cool! Thanks.
     
  37. Kyrieru

    Kyrieru

    Joined:
    Mar 2, 2015
    Posts:
    31
    HDRP/lit from the addons doesnt seem to work for some reason.
    I could only see standard shaders work.
     
  38. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    What is your version of unity?
    And the HDRP version?
     
  39. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    The standard shader should not work with HDRP. :confused:
     
  40. Kyrieru

    Kyrieru

    Joined:
    Mar 2, 2015
    Posts:
    31
    What version should they both be?
    Also, when referring to the standard shaders I meant they worked in non HDRP.
     
  41. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    It works with the latest official unity version (not alpha or beta) 2019.2 -> 2019.4
    There's differents addons according to the HDRP package 7.1.5, 7.1.6, 7.3.1.

    You have to set the 'displacement mode' to 'Vertex displacement' in the material settings.
     
  42. Kyrieru

    Kyrieru

    Joined:
    Mar 2, 2015
    Posts:
    31
    Ah, turns out it DOES work in 2020 and..whichever hdrp version I'm using.
    In the HDRP material, vert was not an option but I set it to tessellation and it works.

    Does this work with animation?

    Edit: Never mind, just needed to set the bone parent.
     
    Last edited: Jul 20, 2020
    kalagaan likes this.
  43. Kyrieru

    Kyrieru

    Joined:
    Mar 2, 2015
    Posts:
    31
  44. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    If you're using the basic version of VertExmotion with Unity 2020, the UI could be broken, because the DLL need a specific build.
    The pro version should work, I'll do some tests with the latest beta.
     
  45. Kyrieru

    Kyrieru

    Joined:
    Mar 2, 2015
    Posts:
    31
    Yeah, I'm using pro.
    I had place a few of that script in some objects, working fine. Then after a few, it started doing that, and no further ones would work, while the previous ones remained working. Even if I copied a working object as a prefab and added it, it would not create a working one. Sometimes the component menu appears, but partially transparent and overlapped, and the Vert panel is never visible, while the unity gizmo disappears.

    On a side note, why is the interaction script in the demos folder? Shouldn't it be in the folder with the other main scripts?
     
  46. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    That's weird :confused:
    I'm on vacation, but I'll try to check that asap with unity 2020. ;)

    note : With the new UI system of Unity, you have to enable the 'Gizmos' button in the sceneview for enabling the editor UI of the component.

    The interaction script is a sample, I don't want to include it in the core system folder.
     
  47. jmckeeota

    jmckeeota

    Joined:
    Jul 21, 2020
    Posts:
    2
    I think I may be experiencing a similar issue. Using URP with assets imported from Character Creator 3. (Fbx) I imported the add-in and made sure to change all of my shaders to the vertexmotion version of sample lit. (There are 6 materials.) Clicking on “paint” changes all of the shaders to “hidden/VertExmotion_editor” and my model turns pink. I can’t seem to paint on it.

    Am I missing a step here?

    edit: Unity 2019.3.15f1
     
    Last edited: Jul 21, 2020
  48. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    I've tested with your version of unity and the paint mode works.

    Maybe something goes wrong while the shader compilation process.:confused:
    Could you try to reimport the editor shader :
    - Select "VertExmotion/Shaders/VertExmotion_editor"
    - Right-click -> Reimport

    Does it works with a simple sphere?
     
  49. jmckeeota

    jmckeeota

    Joined:
    Jul 21, 2020
    Posts:
    2
    It appears to work perfectly with a simple sphere. I tried reimporting the editor shader
    Thank you for your response!

    It does work with a simple sphere. I reimported the editor shader and tried it again, but no luck. I'm not sure what's going on or what I'm doing wrong. Forgive me, I'm relatively new to shaders in particular.

    vertexmotion_issue_1.PNG vertexmotion_issue_2.PNG vertexmotion_issue_3.PNG
     
  50. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,178
    This is not the 'magenta' of a shader error :)
    I think that this is the normal tint of the paint mode when the weight is set to the max value :p
    If you change the gradient factor to 1, the mesh should be full red.

    If you can't paint on the model, maybe there's another error with the model itself.
    Could you send me the fbx? (contact@kalagaan.com)
     
unityunity