Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

VertExmotion [Released]

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

  1. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    1. It works on Skinned Mesh Renderer, and it will work on any mesh that use a compatible shader.
    2. The sensor has to be attached to a bone, and it will animate the vertices in its range according to the bone motion.
    It won't interfere with your character setup :)
     
  2. moodiey

    moodiey

    Joined:
    Jan 4, 2017
    Posts:
    16
    Sounds Good. Purchased. Will dive into it now
     
  3. nadjastaedt

    nadjastaedt

    Joined:
    May 7, 2017
    Posts:
    13
    In some sci-fi movies you see two characters melting together.
    Here is a sample from The Thing 2:



    I'm trying to accomplish the same, but I can't create a single model due to my workflow / pipeline.
    I would like to use 2 independent models.
    I'm trying to "join" them without visual artifacts. Just moving them closely together wouldn't look good.

    Would VertExMotion help me to join my 2 models, or do you perhaps plan any other product that might help me?
     
  4. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    It's a really interresting FX :)

    VertExmotion could help for the vertices deformation

    You can use the same VertExmotion sensor on both meshes.
    Here I've used a negative inflate and a rotation, so it generate a kind of vortex.
    The rotation feature will be available in the next version (1.5.3).

    But you'll have to create your own surface shader that mix/blend the characters colors.
    Or maybe you could find or create a post process FX that merge the colors...

    It's a complex FX, it also require an animation behavior that merge the bones to the same position.
     
    Last edited: Nov 8, 2017
    nadjastaedt likes this.
  5. nadjastaedt

    nadjastaedt

    Joined:
    May 7, 2017
    Posts:
    13
    Thank you, I didn't realize how difficult it would be. I was thinking I could just "smear" the vertices over each other somehow. But even if this was possible, I guess I would have to use a shader that blends with an alpha value.
    For some reason I thought VertExMotion could do this.
    But thank you very much for the info!
    I still need to think about it.
     
  6. Squiwwer

    Squiwwer

    Joined:
    Nov 8, 2017
    Posts:
    3
    @kalagaan VertEx Motion is a shader, right?
    Can you tell me the difference between what you're doing (if it's a shader) and real geometry shifting?
    VertEx Motion also moves the geometry around, right?
    It doesn't only shift pixels, right?
    Is your VertEx Motion shifting the geometry temporarily, and that's why it is so fast?
     
  7. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    VertExmotion is a vertex program that can be included in a shader.
    It move the geometry when the mesh is rendered by the GPU, according to the data provided by the sensors (CPU side). So the mesh is deformed in the rendering pipeline, that's why it's fast ;)
     
    Squiwwer likes this.
  8. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    I've submited the version 1.5.3 to the asset store :)
    It should be available soon!

    It includes the rotation FX for the sensors and
    the Amplify Shader Editor compatibility :D

     
    julianr likes this.
  9. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    422
    Is it possible to sculpt something onto a rigged skinned model inside unity and get it to work with animations? Also does it reconstruct the normalmaps and show correct normals on the surface?
     
  10. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    You can paint the weight of the vertices in unity. The vertices will be affected by the sensors according to the weight.
    This is not a sculpt process. The sensors can move the vertices in its range, so it can add additionnal motion to the zone ( jiggle, deformation on axis, inflate...).
    Have a look to the video tutorial.

    The version 1.6 will include a normal correction, it should be available next week.
    VertExmotion move vertices, so the normal correction is better on high poly mesh.

    Here a demo of the normal correction with tesselation :

     
    4sascha and hopeful like this.
  11. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    422
    Oh ok. so if you paint the whole mesh to be effected and use a collider, will it bend and deform when they contact?

    I'm going over the tire demo from this : http://www.kalagaan.com/VertExmotion/Demos/TireDemo/
    and it seems you can deform the meshes while keeping their volume with colliders.
     
    Last edited: Dec 7, 2017
  12. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    The deformation are based on spheres, in the tire demo, the sensor position is under the ground and it inflates the tire according to the distance of the collision point. This is a custom effect that use the API, there's no specific code for keeping the volume. You can add different sensors with different effects on the same object.
     
  13. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    422
  14. CloudWeight

    CloudWeight

    Joined:
    Jul 16, 2014
    Posts:
    169
    Hi. I'm interested in purchasing this asset but I wanted to know if it fits my specific needs. I'm looking for a way to add tire inflation like your demo to all of my cars. However I noticed that since this is shader driven it might be kind of difficult to integrate into my workflow.

    So basically all of my wheels in-game are procedurally generated.. none of them are static meshes or prefabs, they are all generated with code at runtime, and then materials, etc are applied to the generated mesh. So I was trying to wrap my head around how I would integrate your system with this since everything is done at runtime and with your system you have to paint deformation and stuff. I don't see how it will work and so I'm kind of hesitant to buy your asset if you can only define deformation in the editor.

    I don't see how I would generate deformation based on the specific mesh at runtime.... Is my thinking correct?
     
  15. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    I think that it should be easy to include it in your workflow.
    You can paint the all mesh by setting all the vertices color of your procedural mesh to white, or use a texture mask.
    The Vertexmotion component can be added at runtime and the sensors too.
    So you can create a script that set up the wheel with custom parameters.
    If you need a specific demo, please send me a sample scene (contact@kalagaan.com)
     
  16. cgarossi

    cgarossi

    Joined:
    Jun 23, 2013
    Posts:
    68
    I bought this asset about a year ago and am only just now getting to grips with it.

    I have quite a complex character set up with about 12 different materials. They are all using VertexMotion compatiable shaders. However, when it comes to paint the weights on to the mesh, I am finding it extremely difficult to get an accurate map. I want to use the texture option to define the active areas, but, it only allows me to apply this to the whole mesh! I just want to affect the torso and the torso material. This way I could make a copy of the torso texture and turn it into a weight map, then use it to define my weights.

    Is there anyway to set up a weight map for just one of the materials (ie, the Torso)? If I use a texture to define what areas are weighted, how do I know what part of the texture to paint if there is no material UV map defined?
     
  17. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Hi,
    The paint tool is only based on the UVs of the vertices for getting the weight, I can add a 'Material ID' filter, that would help you to paint your character easier. Please, send me an email with your invoice number, and I'll send you a fix ;)
     
  18. cgarossi

    cgarossi

    Joined:
    Jun 23, 2013
    Posts:
    68
    That would be awesome. Simply being able to paint according to material would be super handy.

    I'll email you asap.
     
  19. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,252
    Hi. I was wondering if this asset can be used to simulate some limited cloth. For example, if I have a girl character with a skirts on, can I add some collisions on the legs and when walking, the skirts deform according to the collisions from the leg?

    I know this asset isn't cloth simulator, but I was still wondering about it.
     
  20. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Hi, I think that you could do this kind of simulation with some sensors attached to the leg bones. The sensors will push the vertices away. It really depends of the character's clothes, if you need a demo before buying, please send me your character with an animation (contact@kalagaan.com).
     
  21. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    I've submitted the version 1.6.1 to the assetstore, it should be available in a few days.
    This version includes the 'Material ID' filter. ;)
     
  22. Slowbud

    Slowbud

    Joined:
    Jul 19, 2015
    Posts:
    49
    Hello Kalagan, I have a character that be will touched and the mesh deforms at the contact, also there is some bouncing and wobbling, which works all fine, more or less, I am not happy with the touching deforms.
    But the best solution for touching I found in your Demos, the interaction example. So for testing I've put my character in your demo scene ... and it dosn't work. I try to use your "Vert Exmotion Interaction (srcript)" , put as Target my character in, Interaction type on "Push" but it dosn't work. I created 3D primitives and prepared them for testing, they all work. Just my character doesn't. If I push the sphere in it, nothing deforms.
    Any hints?
     
  23. Slowbud

    Slowbud

    Joined:
    Jul 19, 2015
    Posts:
    49
    Oh, as I'm arrived here ;-) Is it possible to get the latest 2017 Standard Shaders as VertEx versions. The standard Standard, the Standard (Specular setup) and the Standard (Two sided). I never touched a shader script.
     
  24. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    It could be a problem with the collider, 3D primitives have a collider by default.
    You can add add some capsule colliders to your character, or this script for generating a mesh collider for the SkinnedMeshRenderer :


    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class SkinnedMeshCollider : MonoBehaviour {
    5.  
    6.     SkinnedMeshRenderer m_smr = null;
    7.     MeshCollider m_mc;
    8.     Mesh m_mesh;
    9.  
    10.     void Awake () {
    11.         m_smr = GetComponent<SkinnedMeshRenderer>();
    12.         m_mc = gameObject.AddComponent<MeshCollider>();
    13.         m_mesh = new Mesh();
    14.     }
    15.    
    16.     void Update () {
    17.  
    18.         if (m_smr != null)
    19.         {
    20.             m_smr.BakeMesh(m_mesh);
    21.             m_mc.sharedMesh = m_mesh;
    22.         }
    23.     }
    24. }
     
  25. Slowbud

    Slowbud

    Joined:
    Jul 19, 2015
    Posts:
    49
    Kalagaan, thanks a lot for the fast reply. But I think we are on the wrong path. First, the target sphere in your example doesn't need any collider to get the effect. Second, I tried the SkinnedMeshCollider, it didn't work and is much to resource consuming (my characters are quite high poly, framerate drops from > 200 to 2 )
    What I tried is putting a VertExmotionSensor with a small inflate value on the touching object (the player VR fingers), but the result on the touched character is extreme modest.
    What I need is like the example below, with a character instead of a sphere. Would make my day so much better :)


    PS: Any chance for the modified 2017 standard shaders?
     
  26. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    The touch demo script do a Raycast, so a collider is required, if you disable the sphere collider of "SphereVM" in the demo, it won't work. :p
    Yes the SkinnedMeshCollider doesn't work for high poly meshes, so you have to add some colliders on the bones, if you want to use this technic.
    Using a Sensor on the VR finger is the good solution, you should try some different settings on the sensors (combining inflate and local offset ). If you need help, maybe you could send me a sample scene (contact@kalagaan.com), I'll have a look to it.

    I'll update the Standard & Standard (Specular setup), and add the new Standard (Roughness setup) ;)
     
  27. Slowbud

    Slowbud

    Joined:
    Jul 19, 2015
    Posts:
    49
    Ah I see, think we are talking a little at cross purposes. I mean the "Interactions" demo, not the "Touch" demo. Guess it was the wrong example above by me. In this demo no Collider on target is needed.
    Before I send you a sample scene (just putting my character in your "Interactions" Demo is a 500mb Unity Package) let's clarify some things. Maybe it solves the problem already.
    Does the "public class VertExmotionInteraction : MonoBehaviour" maybe just work with Meshes, not SkinnedMeshes? Just pushing the vertices would really be the best solution, no de-or inflating.

    The problem I have with setting the sensor to deflating, result doesn't look good, and even bader, when I push through the skin, the skin inflates at this point to a small balloon, what really looks ugly.

    I mean, if you have a good solution for me, I have no problem to upgrade to the Pro version (if I knew how? ;-) ) Oh, and the next days your Hair Designer will be bought ;-)

    PS: The Standard (two sided) shader would be great, needed for some hair. :)
     
  28. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    The VertExmotionInterraction works with Meshes & SkinnedMesh, this script is a sample of settings that you can do with the API. You should create your own script with some specific parameters for the sensors for each kind of deformation you need. In your case the 'world offset' parameter should be the best solution (eInteractionType.DIRECTION in the sample script).
    If you want a better result, you should try a tessallation shader, it will create more geometry, have a look to the touch tessellation demo. There's a sample shader, it was made with Amplify Shader Editor, and the VertExmotion nodes (you need to unpack the ASE nodes in 'VertExmotion/AddOn' when ASE has already been imported in your project).

    I won't add a 2-sided standard shader, because it require a specific lighting and it will be a pain to update for each version of Unity :(
    I really don't understand why unity doesn't add a '2 sided' checkbox to the official standard shader.
     
  29. Slowbud

    Slowbud

    Joined:
    Jul 19, 2015
    Posts:
    49
    Sorry me again ;) Thanks for the hints. I've so many foreign assets, deep crawling through all APIs just takes such an amount of time, just to find out, what I need might not work. So I better ask before.

    Works now, but just one sensor at a time. Had to remove all other connected sensors from the character, then it worked. But even scripted, I just get one sensor working at a time. All others are ignored. Hints? I guess a logical issue by me. Also, Is it possible to get more force on the sensor, so the mesh snaps back later? A Tesselation shader works fine, but results in other problems in my project.

    It's a pitty with the 2 sided standard shader .. so even more I'll need your Hair Designer ;)
     
  30. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    All the sensors should work, check the sensor list at runtime (in the VertExmotion UI) all the sensors should be added to the list in the VertExmotion component.
    If you have still an issue, send me an email with your custom code or a link to a sample scene, it would be easier than a blind debuging :p
     
    Last edited: Jan 5, 2018
  31. Crocomodo

    Crocomodo

    Joined:
    Nov 21, 2017
    Posts:
    22
    Can this work simultaneously with Amplify Shader Creator Outline node?
     
  32. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    The outline pass doesn't use the Vertex offset function, I'll ask the ASE team if they could fix it.
    You can fix it in a text editor :
    - Add the include file
    - Add the VertExmotion function

    Code (CSharp):
    1. CGPROGRAM
    2.         #pragma target 3.0
    3.         #pragma surface outlineSurf Outline nofog keepalpha noshadow noambient novertexlights nolightmap nodynlightmap nodirlightmap nometa noforwardadd vertex:outlineVertexDataFunc
    4.        
    5.         #include "Assets/VertExmotion/Shaders/VertExmotion.cginc"//ADD the VertExmotion cginc
    6.         struct Input
    7.         {
    8.             fixed filler;
    9.         };
    10.         uniform fixed4 _ASEOutlineColor;
    11.         uniform fixed _ASEOutlineWidth;
    12.         void outlineVertexDataFunc( inout appdata_full v, out Input o )
    13.         {
    14.             UNITY_INITIALIZE_OUTPUT( Input, o );
    15.             v.vertex.xyz += VertExmotionASE(v); //ADD the VertExmotion function
    16.             v.vertex.xyz += ( v.normal * _ASEOutlineWidth );
    17.         }
    18.         inline fixed4 LightingOutline( SurfaceOutput s, half3 lightDir, half atten ) { return fixed4 ( 0,0,0, s.Alpha); }
    19.         void outlineSurf( Input i, inout SurfaceOutput o ) { o.Emission = _ASEOutlineColor.rgb; o.Alpha = 1; }
    20. ENDCG
     
    Last edited: Feb 4, 2018
  33. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    I've reported the issue to the ASE team,
    they will fix it asap :)

    here a sample with the outline node :

     
  34. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    The ASE team has changed the node API, so the VertExmotion nodes are not displayed in the menu.
    It will be fixed in the next version of VertExmotion (1.6.4), if you need it before the release, please send me an email (contact@kalagaan.com) with your invoice number.

    Edit : VertExmotion 1.6.4 is available :)
     
    Last edited: Feb 5, 2018
  35. pigglet

    pigglet

    Joined:
    Aug 13, 2014
    Posts:
    40
    Hey! Just put my hands on VertexMotion but can't make it work with Alloy shaders :( I had uncomment the VertexMotion stuff in the Config.cginc as described in doc, but nothing happens. Example files work with default VertexMotion shaders but stop working with the alloy shaders.
    Where should I start my troubleshooting? Using Alloy 4.3, VM 1.6.4, Unity 2017.3.0f3
     
  36. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    You have to reimport the 'Alloy/shaders' folder, all the shaders will be compiled for the VertExmotion compatibility.:)
    I'll add this to the documentation.
    Thank you for the feedback.;)
     
  37. pigglet

    pigglet

    Joined:
    Aug 13, 2014
    Posts:
    40
    Cool, thanks a lot! It helps :):):)
     
  38. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    The version 1.6.5 has been submitted to the asset store,
    it should be available soon :)

    It includes a new demo for the 'scale and twist' FX

     
    punk and hopeful like this.
  39. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    65
    I'm still experiencing the issue with a Macbook Retina display that the mouse position when painting does not match the position of the brush in the scene view. It can be made to be workable, but is on the whole very annoying. I am using Unity 2017.3 (latest release build).

    I've tried the previously mentioned solution of changing the main unity.app setting to "Open in Low Resolution", but, well, the whole app is then in low resolution. Not cool.

    I've been doing some research and have found this:
    https://forum.unity.com/threads/editor-extension-high-dpi-retina-mouse-position.439093/

    I'm not using the pro version of this, so I obviously can't go in and edit the script myself to attempt to fix this. Any chance that we could have this looked into and potentially fixed?

    Thanks!
     
  40. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Thank you for the feedback, :)
    I've already done a fix for HairDesigner, it should also work for VertExmotion.
    Please send me an email (contact@kalagaan.com) with your invoice number and I'll send you a fix ;)
     
  41. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    VertExmotion 1.6.6 has been submited to the asset store,
    it fixes the brush position for retina display. ;)
     
  42. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    VertExmotion 1.6.7 has been submited to the asset store :)
    It optimizes the paint brush and prevents the editor to be slow when selecting a material ID on high polycount models.
     
  43. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    827
    I came here to ask the same question.

    VertExmotion works great - i have hair bouncing all over the place:)

    But the paintbrush doesnt match the position of where i click. Im on MacOS and Unity 5.6.4p1.

    Is there a fix coming for the dll version or can i send my invoice number too and get a fix for it?

    Thank you
     
  44. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    If the latest version (1.6.7) doesn't fix the problem, please send me an email (contact@kalagaan.com)
    We'll find a way to fix it ;)
     
    protopop likes this.
  45. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    827
    That fixed it:)

    Wow - what a difference. It was great before, but now i really feel the ability to fine tune the painting.

    Thanks so much
     
    kalagaan likes this.
  46. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    I've optimized the painting tool (same method as HairDesigner)
    Now it's independant from the vertice count. :)
     
    protopop likes this.
  47. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    827
    Yeah, i noticed that too. Before it was very chuggy. Now it paints smooth.

    Great work - ive been looking at VertExmotion for a long time, and i'm glad i finally picked it up:)
     
    kalagaan likes this.
  48. Sigyne

    Sigyne

    Joined:
    Sep 30, 2016
    Posts:
    2
    Hi Kalagaan. I'm interested in Vertexmotion (and Hair designer as well). I have a question though.

    How would you go if you want to apply Vertexmotion on a body, and want to make the clothing(separated mesh) follows the deformation ? Is there a plugin or approach that would goes well with Vertexmotion ? Or it is simply not possible, preformance-wise.

    Thank you
     
  49. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Hi,
    you can share the sensors between different models, :)
    the motion data will be computed once and shared to each mesh.

    You have to add the VertExmotion component to the cloth,
    then add the existing sensor to its sensor list. ;)
     
  50. Sigyne

    Sigyne

    Joined:
    Sep 30, 2016
    Posts:
    2
    Oww, just like that !
    Well, this is awesome, going to buy it in a few days.

    Thanks for the fast reply !
     
    kalagaan likes this.