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
    schmosef and hopeful like this.
  2. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Last edited: May 17, 2016
    punk, schmosef and hopeful like this.
  3. mkgm

    mkgm

    Joined:
    Apr 10, 2015
    Posts:
    134
    @kalagaan, awesome!!!
    Please, I have some questions:

    1) will this new feature work with fast wheels/tires?
    2) What about performance. How many cars with deformation tires can be set without affecting the performance?

    Thanks in advance and sorry my ugly english :p
     
  4. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Thank you :)
    This is not really a new feature, I did a new demo script which set up motion sensor on a wheel.
    It use VertExmotion shader, so it won't impact CPU ( less than 0.01ms for this sample ) :)
    The script is really easy to customize for your own project. :)
     
  5. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    I've added a flat/inflated slider :)

     
    chelnok likes this.
  6. pan-master

    pan-master

    Joined:
    Nov 11, 2013
    Posts:
    118
    Does it work with daz human characters? I mean these characters have like a few materials on them 1 mesh a few materials ,and i think that the meshes are opened(eyes areas)
     
  7. Cristineltr

    Cristineltr

    Joined:
    May 15, 2016
    Posts:
    8

    How hard will it be to implement a tire like that into something like Edy Vehicle Physics?
     
  8. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    It works with any kind of geometry and with multi materials, look at the video tutorial :

    - Add VertExmotion component
    - Paint softbody parts with the tool
    - Add motion sensor and set up parameters
    :)
     
    Last edited: Jun 2, 2016
  9. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    I don't have Edy Vehicle Physics package, but the tire demo code is really simple :
    - It scale down the collider radius if the tire is not inflated.
    - It raycast the ground to set up sensor position and radius for the mesh deformation.
    - Deformation is computed between 2 tire setup : m_tireOk and m_tireFlat.

    So you can easily change the source code for any kind of collider. :)


    Here the source:

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using Kalagaan;
    4. using UnityEngine.UI;
    5.  
    6. public class TireDeformation : MonoBehaviour {
    7.  
    8.     public VertExmotionSensor m_sensor;
    9.     public Vector3 m_offset;
    10.     public CapsuleCollider m_wheelCollider;
    11.  
    12.     [System.Serializable]
    13.     public class DeformationData
    14.     {
    15.         public float m_sensorRadius = 1.2f;
    16.         public float m_colliderRadius = .85f;
    17.         public float m_sensorDeformation = .3f;
    18.         public float m_sensorInflate = .08f;
    19.     }
    20.  
    21.     public DeformationData m_tireOk = new DeformationData();
    22.     public DeformationData m_tireFlat = new DeformationData();
    23.  
    24.     public float m_tireInflated = .5f;
    25.  
    26.     // Use this for initialization
    27.     void Start () {
    28.  
    29.         m_sensor.transform.parent = null;
    30.     }
    31.  
    32.     // Update is called once per frame
    33.     void Update () {
    34.  
    35. //setup collider radius
    36.         m_wheelCollider.radius = Mathf.Lerp( m_tireFlat.m_colliderRadius, m_tireOk.m_colliderRadius, m_tireInflated);
    37.         m_sensor.m_params.inflate = Mathf.Lerp(m_tireFlat.m_sensorInflate, m_tireOk.m_sensorInflate, m_tireInflated);
    38.  
    39.         //raycast on the ground to setup deformation
    40. RaycastHit[] hitInfo = Physics.RaycastAll(transform.position, Vector3.down, 10f);
    41.      
    42.  
    43.         for(int i=0; i<hitInfo.Length; ++i)
    44.         {
    45.             if (hitInfo.collider != m_wheelCollider)//avoid self collision
    46.             {
    47.                 m_sensor.transform.position = hitInfo.point + m_offset;
    48.                 m_sensor.m_params.translation.worldOffset.y = Mathf.Lerp(m_tireFlat.m_sensorDeformation, m_tireOk.m_sensorDeformation, m_tireInflated);
    49.  
    50.                 float f = (1f - (Vector3.Distance(m_wheelCollider.transform.position, hitInfo.point) - Mathf.Lerp(m_tireFlat.m_colliderRadius, m_tireOk.m_colliderRadius, m_tireInflated)) / m_offset.magnitude);
    51.                 m_sensor.m_envelopRadius = Mathf.Lerp(m_tireFlat.m_sensorRadius, m_tireOk.m_sensorRadius, m_tireInflated) * f;
    52.              
    53.             }
    54.  
    55.  
    56.         }
    57.  
    58.     }
    59.  
    60.     public void Inflate( Slider sld )
    61.     {
    62.         m_tireInflated = sld.value;
    63.  
    64.     }
    65.  
    66. }
     
    julianr likes this.
  10. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    julianr, punk and schmosef like this.
  11. pan-master

    pan-master

    Joined:
    Nov 11, 2013
    Posts:
    118
    when i try to paint the mesh either it does not paint at all or paints in the wrong places... I have multiple materials, all are set to be Vertax Emotion Standard. Its strange but it looks I can paint on invisible representation of much larger second mesh. I see a main mesh which i would like to paint and I see some kind of second larger mesh made of vertaxes

     
    Last edited: Jun 12, 2016
  12. pan-master

    pan-master

    Joined:
    Nov 11, 2013
    Posts:
    118
    OK i solved it I had my mesh scaled to 1.7, when i changed it to 1 it works
     
    hopeful likes this.
  13. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Hi, what is your version of VertExmotion?
    1.4.1 should fix this issue.
     
  14. pan-master

    pan-master

    Joined:
    Nov 11, 2013
    Posts:
    118
    1.3.1 but I downloaded it like 3 days ago from unity
     
  15. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    The latest version on the assetstore is 1.4.3, it require unity 5.3.2 or 5.4
     
  16. pan-master

    pan-master

    Joined:
    Nov 11, 2013
    Posts:
    118
    well I dont know why but I am downloading version 1.31 from unity asset store all the time. I removed package from my temp directory to download it once agian from unity asset store but the same happens. versions 1.31 is being download
     
  17. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    796
    Are you downloading through the asset store website or the store built into the Unity Editor?

    If you're downloading through the Editor, make sure you are logged into the store with the account that you bought the asset with.

    If you aren't logged into the store you'll only be able to use assets that were previously downloaded and you won't be offered to pull down updates.
     
  18. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    I've checked the vesion on the assetStore, it's ok 1.4.3 :p
    I think you're right, it should be a problem with the account.
     
  19. pan-master

    pan-master

    Joined:
    Nov 11, 2013
    Posts:
    118
    I am loged in with correct account I checked dubble time
    upload_2016-6-15_4-6-48.png

    btw any plans for phong smoth tessalation?
     

    Attached Files:

  20. pan-master

    pan-master

    Joined:
    Nov 11, 2013
    Posts:
    118
  21. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    796
    @kalagaan,
    I can confirm that the version I see on the asset store is 1.4.3.

    Here's a screenshot from the browser version of the asset store:
    BrowserAssetStore.png

    And Here are two screenshots or the asset store built into the Unity Editor:
    UnityAssetStore1.png
    UnityAssetStore2.png

    @pan.master,
    If you are not seeing this version of VertExmotion in your browser or the Unity Editor, I would try logging out then log back in.

    And if that does not help, you should contact Unity support.

    What version of Unity are you using by the way?

    My screenshots were taken with Unity 5.3.5p3.

    I can't be sure but, since VertExmotion 1.4.3 was uploaded with Unity 5.3.2, if you are using an older version, you might not be able to download the latest update in the Editor.
     
  22. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Send me an email ( contact@kalagaan.com ) with the shader you need to convert ;)
    I'll update a version for unity 5.2 on the assetstore.
     
  23. pan-master

    pan-master

    Joined:
    Nov 11, 2013
    Posts:
    118
    its 5.4 version of unity
     
  24. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Very very strange...
    VertExmotion 1.3.1 cannot work on unity 5.4, because shader API has changed...
    Only 1.4.3 can work if you've downloaded it with unity 5.4
     
  25. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    796
    ¯\_(ツ)_/¯

    @pan.master: you should contact someone on the Unity Asset Store team or email Unity Support.
     
  26. pan-master

    pan-master

    Joined:
    Nov 11, 2013
    Posts:
    118
    well it works
    upload_2016-6-15_23-52-56.png
     
  27. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    ok, I get it! :p
    the readme file is for compatibility between 1.2 and 1.3, this is not the release notes.
    I'll delete it in the next release :)
    You can check the VertExmotion version on the component in the inspector.
     
  28. HR0THVITNIR

    HR0THVITNIR

    Joined:
    Nov 21, 2013
    Posts:
    24
    Hey Kalagaan, I sent you a shader a long time ago you said you'd try and help me with - haven't heard back. Anyway, just the thread to see if there was any mention. The shader I sent you had tessellation and phong smoothing (among other things). Should I send you a newer version?
     
  29. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    When did you send your shader?
    I always try to answer quickly to emails, maybe I didn't saw it...
    Send it again ;)
     
  30. HR0THVITNIR

    HR0THVITNIR

    Joined:
    Nov 21, 2013
    Posts:
    24
    Sorry my mistake - I found the emails (Nov 2015). Probably I was too busy to try it out right away and forgot about it. I guess after everything in my project is updated to 5.4 I'll contact you about it again.
     
  31. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Ok ;)
    Shader API has changed for 5.4, so you'll have to download again VertExmotion from the assetstore, with unity editor 5.4.
     
  32. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Here the new presentation video :D
     
    schmosef likes this.
  33. jdods13

    jdods13

    Joined:
    Mar 18, 2014
    Posts:
    10
    Is there a limit to the texture sizes that vertexmotion can work with? I upped my texture sizes to 4096 using unity 5.4.0 and I seem to be crashing every time I try to save my scene. This just started happening after I updated to the latest stable version of Unity. I was able to use vertex motion flawlessly in Unity 5.3 and had my character looking great with secondary motion but alas I am now crashing unity whenever I add the component.

    Another issue that I seem to have run into (Without saving my scene) is that sometimes when I hit play, the areas on the mesh that I have painted to accept sensor params loose their painting and I have to redo it. So to work around this for now I have just used the Paint all option and defined the areas that I want to move with multiple sensors and guide joints. So I set up where I want the sensors to go on my model within Maya and reset the sensor position within Unity to snap them to their locations. Anyway i'm not sure if this is a bug or something I'm doing wrong.

    My only guess is that my textures need to be smaller in size? idk... any clarification on this will help. Thank you for such an amazing and easy to use tool!
     
    Last edited: Sep 1, 2016
  34. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Hi, VertExmotion don't use textures, paint maps are used to store data into vertex color.
    If you have upgraded your project from unity 5.3 to 5.4, VertExmotion won't work, because unity shader API has changed.
    You have to download VertExmotion package again from the assetstore with unity 5.4.
    All files will be updated :)

    Edit : you can save paint data into a template, this will avoid the lose of paint informations.
    You can also paint vertices with Maya : white for softbody -> black for static
     
    Last edited: Sep 1, 2016
  35. jdods13

    jdods13

    Joined:
    Mar 18, 2014
    Posts:
    10
    Wow ok thank you so much. I believe that this is a preferred method for me to paint in maya first as it is very fast and I am familiar with this. I was able to get my scene to save without crashing with only 4 sensors :-/ this is after expected frustration and testing. :) Thank you for your help. I did in fact create a new project and import the vertexMotion asset separately into the project created in Unity 5.4. So I'm limited to 4 sensors on my character which is plenty to be honest. I simply wanted to see how far I could push the tool. Is this correct? Or should I seek to resolve the 4 sensor limit issue i'm having?

    NM that last bit... seems that if I try to save the same scene it crashes so confused... I was able to save successfully the fist time but now I attempted to save a second time and bam! crash... :( any advice? again this was not happening with 5.3
     
    Last edited: Sep 2, 2016
  36. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Very very strange!
    I need more infos :
    - Any messages in the console?
    - version of unity? 5.4.0f3 ?
    - PC or MAC ?
    You should not be limited to 4 sensors on a computer, this limit is applied on mobiles only.
    Could you send me a sample at contact@kalagaan.com ?
    I'll help you ;)
     
  37. jdods13

    jdods13

    Joined:
    Mar 18, 2014
    Posts:
    10
    Ok. I have gone through and done some tests myself.
    I am using Unity 5.4.0f3
    on a PC
    No console messages warning of any errors.

    Console reads:
    SENSORS
    SENSORS
    UnityEngine.Debug:Log(Object)
    Kalagaan.VertExmotionEditor:InitializeEditorInstance()
    Kalagaan.VertExmotionEditor:OnEnable()
    UnityEditor.SerializedObject:ApplyModifiedProperties()
    Kalagaan.VertExmotionEditor:ReplaceBaseClass(MonoBehaviour)
    Kalagaan.VertExmotionEditor:DrawSensorsList(VertExmotionBase)
    Kalagaan.VertExmotionEditor:DrawSensors(VertExmotionBase)
    Kalagaan.VertExmotionEditor:DrawMenu(VertExmotionBase, Event)
    Kalagaan.VertExmotionEditor:OnSceneGUI()
    UnityEditor.DockArea:OnGUI()



    I completely reinstalled Unity after removing all traces of it from my PC. Then I started a brand new project. I added the VertexMotion component to my character and setup my sensors. Then I saved and nervously waited... the save was successful but took noticeably longer to save after I added the VertexMotion Component. To test, I restarted Unity and re-loaded the scene. The scene loaded successfully. My save times had increased significantly when I have the VertexMotion Component on my character. I'm going to say that re-installing unity resolved the issue but will let you know if I run into this issue again. Currently sitting and waiting for my scene to finish saving after adding 2 more Sensors.

    Thank you!
     
    Last edited: Sep 4, 2016
  38. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Thank you for your feedback :)

    I did some tests on PC and MAC, all work as expected, no crash.
    Your unity version was maybe corrupted...
    I always change the folder when I install a new version of Unity, so I have all versions available on my computer for testing.

    You should not wait more for saving the scene when there's a VertExmotion script.:confused:
    Could you send me a test scene?
     
  39. jdods13

    jdods13

    Joined:
    Mar 18, 2014
    Posts:
    10
    This is brutal. I would send you a test scene but I am unable to save any scenes with VertexMotion on my main character model. The scene seems to save successfully ONLY ONCE but after that any consecutive save attempts completely freeze Unity. When I check the task manager, I can see that Unity is working but after returning to my computer two hours later it is still frozen. My only solution is to end the task and start a new scene... I cannot for the life of me figure out why this is happening. I have the latest drivers from Nvidia, the latest version of unity. I reinstalled Unity completely on a new drive. I saved the scene the first time then attempted to save the scene again with a different name and that STILL caused Unity to hard lock. When I loaded my character.fbx into the scene view I noticed that all of the materials were marked Hidden/VertExmotion_editor. I had to manually switch all of them back to VertExmotion/ Standard, not sure if that has anything to do with what is happening. I'm completely confused on this... This must have something to do with version 5.4.0f3 of Unity as I was able to use Vertex motion without issue in Unity 5.3. I don't really know how to be more helpful but I wish that I could use this product to its fullest.
     
  40. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Wow! :eek:
    Send me your scene without VertExmotion, I'll do the integration.
    We will find a solution! ;)
     
    punk likes this.
  41. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
  42. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    853
    Vertex Motion looks great. Does it integrate with Alloy shaders? I need this to work with a Alloys Tessellation skin. Or if you have an alternative tesselated shader with subsurface scattering that works, please let me know!
     
    Last edited: Sep 29, 2016
  43. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    VertExmotion is easy to integrate in other shaders, there's a section in the documentation, and the package include a conversion of more than 40 unity built'in shaders, including the standard shader.
    I didn't do it for Alloys, but if you have issue, you can send me an email and I'll help you ;)
     
  44. 0roboros

    0roboros

    Joined:
    May 10, 2016
    Posts:
    16
    Hey, i read the doc but im unable to make vertexmotion work with double sided shaders. Do u know if this is possible?
     
  45. borkbork

    borkbork

    Joined:
    Jul 5, 2014
    Posts:
    16
    Hi, looks great - would it work for 2d? For example, 2d hair or feathers? Also, will it accept forces such as turbulence to create "blowing in the wind" type of animations for said hair or feathers?
     
  46. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,052
    I've got to admit, this asset is one of the best purchases I've made. Looking forward to using this in my project and also the Hair Designer. Keep up the good work!!
     
    Last edited: Oct 29, 2016
    Squiwwer likes this.
  47. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    65
    Hi,

    I purchased VertexMotion from the Asset store today and am running into a strange issue. Whenever I try to paint vertices, there is a disconnect between where my mouse pointer is and where the brush circle is. You can see it in the screen I am attaching. I'm using Unity 5.4.1 on a Macbook Pro, if that matters.

    Any ideas?
     

    Attached Files:

  48. chelnok

    chelnok

    Joined:
    Jul 2, 2012
    Posts:
    672
    @alanmthomas I have had the same problem, but not with Vertexmotion. Not sure if it OSX problem (i got iMac), but solution for me is restart Unity / computer (can't remember as this has not happened for awhile). When this happens for me, everything is offsetted like 10cm, even the rightclick menu at hierarchy / project window.
     
  49. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    65
    @chelnok I tried the Unity restart, but not the whole computer. I'll give that a go and see if I have any luck. Thanks!

    -- No luck with the restart of everything, computer included.
     
    Last edited: Oct 30, 2016
  50. chelnok

    chelnok

    Joined:
    Jul 2, 2012
    Posts:
    672
    I just tested latest Vertexmotion in Unity 5.4.2f1 (osx 10.9.5) and everything works here. I tested SimpleMesh and Characters demo scenes.