Search Unity

VertExmotion [Released]

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

  1. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    952
    Hi, so 'VertExmotion_editor' does exist and rebuilt it. No luck. Tried it in a new scene, no luck.

    Created a new project, 2019.2.1f1.
    It has Shader Graph 6.9.0.

    Here are the steps I took with the new scene:
    Installed latest VertExmotion.
    Imported 'VertExmotion_ShaderGraph_5_13'
    Opened the Shader Graph 'VertExmotion_HDRP_Metallic'
    I get the following error:

    screenshot.png

    The 'VertExmotion_HDRP_Metallic' preview is pink, and when I add it my a capsule mesh the mesh vanishes.

    Tried the same things with 2019.3 as above, shader is not pink, but when I assign VertexMotion to a mesh, I get this result:



    Thoughts?

    UPDATE: I opened my original scene and it looks like if I shut off the lighting in the Scene View using the light-bulb icon on that Scene View window, it works correctly. When I enable lighting it had some transparency issues, both within the Scene View and in the Game windows.
     

    Attached Files:

    Last edited: Sep 10, 2019
  2. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    You could replace the suggraph in the shader.
    - open the shader with ShaderGraph
    - open the subshader (double click)
    - copy the nodes
    - in the shader graph, delete VertExmotion_SubGraph
    - paste the nodes and connect the output to the 'Position' input of the PBR Master node
    - Save the shader

    It should look like that :
     
  3. rmorph

    rmorph

    Joined:
    Apr 3, 2012
    Posts:
    76
    I wonder if you could give me a bit of advice?

    I'm currently building my game character around a really great figure called Ariana.
    https://assetstore.unity.com/packages/3d/characters/humanoids/ariana-character-118803

    The author developed in Unreal engine and it is already set up ith bones/animations and for morphs for speech etc.

    I'm looking for an easy way to offer character facial customizations: Mainly facial features etc.. basically sliders that a player could use in a simple character setup screen to make small adjustments to cheeks ears eyes etc..

    From reading around I understand I basically have two option: Shader manipulation (Vertexmotion for example) or morphs (Polymorph). Either way, you have a product for it - which is great :)

    Since I'm just a beginner I would just like advice on what you think would be the best way to do this. Or if it's even practical. I think it seems like a small task - but am I mistaken? character customization tools don't exactly seem to be a very common asset to find so maybe I'm not seeing a complexity issue?.

    Also I purchased your spacesuit character and am very happy with it: I'm trying to merge it with Ariana to give her a spacesuit and so far it looks pretty good.


    Thanks for great products!
     
    Last edited: Sep 11, 2019
  4. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    You can use the unity API in a custom script to control the blendShapes of your character (Ariana), or you could control and mix them with BlendShape preset tool ;)

    I don't think that you'll be able to mix the Ariana character with the space suit :(
    the skelettons of each characters won't be the same and the animations won't work properly.

    Edit : OOps, it looks like the Ariana character use a face rig, there's bones instead of blendshapes... so BlendShapes preset tool won't work with it... :confused:
    You should contact the author for more information about the face rig.
     
    Last edited: Sep 11, 2019
  5. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,010
    If you haven't yet, perhaps you should take a look at UMA? It seems in line with what you are looking for.
     
  6. rmorph

    rmorph

    Joined:
    Apr 3, 2012
    Posts:
    76
    Thanks Kalagaan - once I sized up the spacesuit char the bones were pretty close so Im gonna have a go and hopefully it wont look too wierd :)

    Thanks hopeful - I've been checking out UMA but the model import part seems a bit beyond my skill level. I will check out if its possible to find someone to do it for me for a reasonable price :D
     
  7. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,010
    Importing can be tricky, but once you get the settings right - just once - you're good to go. It's best to do something small and really pay attention to the importing. After that, you should be golden.
     
  8. Alessandro-Previti

    Alessandro-Previti

    Joined:
    Nov 1, 2014
    Posts:
    30
    Hello fellow vertex motion users!
    I have a strategy question on how to approach something:
    I have a character that will sit on a sofa or a bed.
    The bed should bend under the character, but this is less trivial than it sounds.

    STRATEGY 1

    I tried adding a grid of sensors and vertexmotion colliders to the bed, this works on paper but it leaves a lot of dead zones between vertexmotion colliders, making it look softer in some spots, harder in others.
    upload_2019-9-18_11-53-30.jpeg

    I tried adding intermediate colliders, but it looked like they were fighting with the other colliders, making the mesh jump-deform as soon as another collider was triggered.

    I tried with small vertexmotion colliders, but as soon as the sphere collider would cross their center, they reset...

    STRATEGY 2

    I tried adding to the bed a vertexmotion sensor with an inflate setting or a Y displacement setting, I then attached to the character's pelvis bone, this works for deformation very close to the body, but not to flex the bed generally:
    Untitled 10.jpg
    as soon as I enlarge the sensor to grab more vertexes, to bend the bed more smoothly, the sensor triggers the deform too early.

    Did anyone have a similar issue and how did you solve it?
    Thank you!
     
  9. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    I think that you have to use thre strategy 2 with a custom script.
    You should change the sensor range (or the 'distance power' parameter) according to the distance between the pelvis and the top of the bed.
    Have a look to the 'tire demo', the deformation is made with a lerp between 2 structures of parameters ('Tire ok' & 'Tire Flat'). in this demo I use a raycast to check the ground position, but in your case you could check if the pelvis is contained in the bounding box of the bed, and you could check the Y axis offet between the top of the bed and the pelvis position.

    I hope that it will help you ;)
    If you still have issues you can send me an email.
     
  10. Alessandro-Previti

    Alessandro-Previti

    Joined:
    Nov 1, 2014
    Posts:
    30
    Awesome! I am passing this to the programmer! You are surprisingly active, and very kind! Thank you again!
     
    kalagaan likes this.
  11. wechat_os_Qy03RRHZWAp5FCBQ_i0Ywojbc

    wechat_os_Qy03RRHZWAp5FCBQ_i0Ywojbc

    Joined:
    Aug 29, 2019
    Posts:
    1
    I just purchased this asset and I am wondering how to simulate softbody physics. I watched your demos and all the collision are made by animation rather than real physics simulation. I have a haptic device which can simulate touch, I am wondering can I feel different thing when I touch your softbody slightly or hardly.
     
  12. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    952
    @kalagaan

    Hi. I'm using Universal Rendering Pipeline. Do you have any shaders that will work for that? I also tried creating my own after installing VertExmotion_ShaderGraph_5_13, and it offsets the mesh.

    screenshot.jpg

    Thanks.
     
  13. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    2,103
    Hi, just recently purchased the asset, got a problem though. It seems that paint mode do not work for some reason.
    Fill all / clear all works just fine.

    I've tried both standard meshes and default ones without any luck.
    Also debuged editor a bit, seems like ray (when doing RaycastAll in painting) do not hit the mesh collider for some reason. No idea why though. Collider is set to the default layer and positioned properly. And from the draw ray's gizmos rays seems to be intersecting the collider.

    This is on 2019.2.4f1 & v1.8.5.
    debug.gif
     
  14. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    2,103
    Just tested forcing convex on the mesh via editor, and the raycast hits just fine (triangles aren't found ofc).
    I guess something is wrong with the non-convex mesh collider casting.

    Edit: I've also tried enabling Queries hit backfaces and still doesn't work.
     
  15. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    VertExmotion is not a physics base system, it mimics the physics with some custom script.
    There's some samples for physics interactions in the package.
    Have a look to "VertExmotion/Demos/interactions/Touch".
     
  16. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    I didn't try URP yet, in HDRP you have to substract the camera position to the world vertex position to get it work, but not in LWRP, so maybe you'll have to add this offset in URP.
    I'll do somes tests ;)
     
    adamz likes this.
  17. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    I did somes tests with 2019.2.4f1 and it's working fine :confused:
    Keep in mind that the paint tool works on vertices, only the vertices inside the circle will be painted.
    Could you try to install VertExmotion in an empty project? maybe there's something wrong with the Physics settings.

    EDIT : I found what's going on :p, the cube imported for the jellycube demo doesn't works properly... It was imported into a prefab with an older version of unity, and the mesh data have changed. If you use a standard cube it will work as expected ;)
     
    Last edited: Sep 26, 2019
  18. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    2,103
    Hmmmmmm this is really weird. It works just fine in a newly created project, but doesn't in an older one.
    Repro steps are the same. Any ideas what could be causing this?

    Edit: I'll try re-importing the project / deleting library, maybe this will help.
     
  19. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    2,103
    Okay so re-importing didn't helped, as well as anything I've tried.

    The only thing that works is to delete prefab / material and remake everything from scratch. (Which very frustrating)

    Also, lack of the Ctrl+Z functionality on the most of the fields make any change really frustrating.
    Please consider adding one, or at least go through the fields (sensors / colliders etc) and test if they work. (They do not) (Use Undo.RegisterFullObjectHierarchyUndo when changing sensors transforms etc instead of RecordObject, as that will fail to register transform changes)

    Also, please expose the envelope radius as a field. Yes it is changed constantly due to imprecision / handles, but it can be just be rounded to 4 digits and that will avoid constant modification issue. Copying radius would be much more nicer that way.
     
    Last edited: Sep 27, 2019
  20. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    Thank you for the feedback, I'll update the editor script ;)
     
    xVergilx likes this.
  21. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    952
    Hi, any updates on this? Thanks.
     
  22. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    It works with URP like LWRP :)
    You have to remove the camera offset from the HDRP sample.

    Here a sample :



    I'll add a specific sample package for UDRP in the next version ;)
     
    adamz likes this.
  23. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    Last edited: Oct 2, 2019
    hopeful likes this.
  24. mishanany

    mishanany

    Joined:
    Feb 25, 2014
    Posts:
    4
  25. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    hopeful likes this.
  26. mishanany

    mishanany

    Joined:
    Feb 25, 2014
    Posts:
    4
    Thanks.
    Do I have to use VM colliders for this ?

    The way I have it setup at the moment:
    Painted Model with Sensor attached to a VIVE controller. Under sensor FX I have local displacement for XYZ at 0.03.
    It seems to work but not without weird artifacts. One of them is to push vertices inside the model the VIVE attached sensor has to be pointing directly into the model on it's Z axis. Otherwise the displacement is all over the place.

    How would you set it up ?
     
  27. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    Could you send me a video of the problem? (contact@kalagaan.com)
    It would be easier for me to understand the issue ;)
    Maybe you need a custom script, I could help you to achieve it.
     
  28. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    I'm working on a new demo for the VertExmotion package.
    It's a fish animated only with some sensors and a custom script.

     
    hopeful and gurayg like this.
  29. pcg

    pcg

    Joined:
    Nov 7, 2010
    Posts:
    220
    Hi, how would I go about adding a hit force to an object?

    EG I have a character running around and he can walk in to the object which is setup with a sensor & collider, and the object will wobble. I now want him to be able to hit the object and a similar (more violent) wobble to occur.
    I would prefer to do this via script rather than add another moving collider.

    Thanks.
     
  30. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    You could generate a sensor on a collision callback (ex : OnCollisionEnter).

    Code (CSharp):
    1. GameObject go = new GameObject("Sensor_tmp");
    2.             go.transform.position = pos;
    3.             VertExmotionSensor s = go.AddComponent<VertExmotionSensor>();
    4.             m_target.m_VertExmotionSensors.Add(s);
    Then you can access to the sensors parameters (VertexmotionSensor.m_params) for creating your specific wobble FX.
    You can remove the sensor from the list when the FX is done.
    You should use a pool of sensors if you need to combine multiple interactions, instead of creating/destroying sensors.

    I'll add a specific demo for this kind of behaviour ;)
     
  31. pcg

    pcg

    Joined:
    Nov 7, 2010
    Posts:
    220
    The object is a plant and it already has a sensor & collider attached. I get a nice wobble effect when a player brushes past it and was hoping for some kind of one shot call to add an impact at a certain point - some kind of fire and forget method call.
    Is that available on the sensor? I can see squash & stretch etc.
    Also do you have any detailed API docs? I purchased the dll version a couple of days ago and the only doc I have contains a lot of detail on shaders (which is great) but not much detail on functionality and API calls.

    BTW congrats on a great tool, its helped bring certain areas of my game to life :)
     
    kalagaan likes this.
  32. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    No, there's no built-in way to create a one shot wobble, so you have to create one in a custom script.
    You can modify all the sensors parameters by script.
    Here the API :
    http://www.kalagaan.com/VertExmotio..._vert_exmotion_sensor_base_1_1_parameter.html

    I'm working on a new version, and I'll add a section about the API in the documentation.
    The new version will include 2 more demos with custom scripts samples. ;)
     
    pcg likes this.
  33. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    This demo will be available in the next package

     
    hopeful likes this.
  34. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    51
    Hello, @kalagaan. I'm having a bit of a problem with colliders.

    I have a Genesis 8 character that I want to rig. Breast. thighs, everything. I also have very long hair that I also want to animate with it. Skirts, etc.

    Everything seems to work fine as far as deformations go, but I want to keep the hair from clipping through the body, the skirt through the legs, etc.

    I tried with colliders and collider zones... nothing seems to work.

    How would I go about setting up proper colliders?
     
  35. Slowbud

    Slowbud

    Joined:
    Jul 19, 2015
    Posts:
    68
    @kalagaan Hi, I just updated to the latest version, now I got a problem with the VertExmotion/Standard (Specular setup) shader. As soon as I add a Specular Map I get a shader error reportet and all following map slots disappear, just Albedo and Specular is there. Sliders disappear too.
     
  36. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    Hello,
    you could try to use the axis limits of the sensors to prevent the vertex to move in a specific direction,
    If you still have issues, please send me a sample scene or screenshots of your settings (contact@kalagaan.com).
     
  37. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    There's an update of the standard shader in the Addon folder.
    It should fix the issue for unity 2018.2 and later.
     
  38. Slowbud

    Slowbud

    Joined:
    Jul 19, 2015
    Posts:
    68
    OK, VertEx was working fine in 2018.2.9f1, then I created a new scene in 2019.2.5f1 and it didn't work. So I updated VertEx with the result the mentioned problem on Standard shader and now unpacked the VertExmotion_2018.2_standard_shaders from the Addon folder and still the same problem. Maybe this error message might help? :

    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.MaterialEditor.GetPropertyRect (UnityEditor.MaterialProperty prop, System.String label, System.Boolean ignoreDrawer) (at C:/buildslave/unity/build/Editor/Mono/Inspector/MaterialEditor.cs:1114)
    UnityEditor.MaterialEditor.GetPropertyRect (UnityEditor.MaterialProperty prop, UnityEngine.GUIContent label, System.Boolean ignoreDrawer) (at C:/buildslave/unity/build/Editor/Mono/Inspector/MaterialEditor.cs:1106)
    UnityEditor.MaterialEditor.ShaderProperty (UnityEditor.MaterialProperty prop, UnityEngine.GUIContent label, System.Int32 labelIndent) (at C:/buildslave/unity/build/Editor/Mono/Inspector/MaterialEditor.cs:1187)
    UnityEditor.StandardShaderGUI.DoSpecularMetallicArea () (at C:/buildslave/unity/build/Editor/Mono/Inspector/StandardShaderGUI.cs:324)
    UnityEditor.StandardShaderGUI.ShaderPropertiesGUI (UnityEngine.Material material) (at C:/buildslave/unity/build/Editor/Mono/Inspector/StandardShaderGUI.cs:158)
    UnityEditor.StandardShaderGUI.OnGUI (UnityEditor.MaterialEditor materialEditor, UnityEditor.MaterialProperty[] props) (at C:/buildslave/unity/build/Editor/Mono/Inspector/StandardShaderGUI.cs:142)
    UnityEditor.MaterialEditor.PropertiesGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/MaterialEditor.cs:1726)
    UnityEditor.MaterialEditor.OnInspectorGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/MaterialEditor.cs:475)
    UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:501)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  39. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    51
    You mean the 3 axis constraints? Yes, I've playing with this. It helps a lot to make the whole thing look much better.

    Still, I have VertexMotion on the breasts and on the hair. While both of them have their sensors configured, the hair still clip through the breasts (probably due to the whole motion thing). I was wonering what type of collider I should use to stop the hair from passing through the body.
     
  40. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    That's weird,
    I've tested with unity 2019.2.5f1 and there's no error :confused:
    And all the demos work as expected, (with standard and standard specular).
    Maybe there's something wrong with the shader update...
    Could you try to reimport the 'VertExmotion/Shaders' folder ?
     
  41. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    The long hair could be very difficult to animate with VertExmotion, you should try to use a bone system for the overall animation. VertExmotion sensors could be attached to the bone as an additionnal animation.
    The collision system is not designed for this kind of interaction, so the only way to do it could be a custom script using some raycasts for detecting the body according to the sensor's position. I'll think about it ;)
     
  42. Slowbud

    Slowbud

    Joined:
    Jul 19, 2015
    Posts:
    68
    I reimportet already before.
    But when I put a Specular or Metallic map in the Standard Shader of your character demo, the shader crashes too.
    But there seems another problem on my side, when I use the Vertex Em Standard shader without metallic map, what works on your demo, wobbling still doesn't work here.
     
  43. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    Ok, this is a weird bug!
    I've probably missed a change in the built-in shader for this version...
    I'll fix it asap ;)

    Edit : I found the bug, thank you for the feedback, a patch will be available soon.
     
    Last edited: Nov 21, 2019
  44. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    Here the patch for Unity 2019 standard shaders. ;)
    You have to install the 2018.2 standard shaders package first.

    I've submitted a new version (1.8.6 p1) on the assetstore, it should be available soon.
    The standard shaders will be already applied if you download the new version from Unity 2019.
     
    Last edited: Nov 22, 2019
  45. Slowbud

    Slowbud

    Joined:
    Jul 19, 2015
    Posts:
    68
    Thanks, these work fine now. Just wobbling still doesn't work, but I guess problem is on my side, because your demo works. Maybe you have a hint? I have characters with many materials and I just changed to VertEx shader on the materials that need to wobble. So I checked "Don't check shader compatibility". This worked fine before in 2018.2.9f1 from where I exported the characters and imported including the VertExmotion script and Sensors now to 2019.xx-
     
  46. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    I've improved the collision system and I've added some parameters to the wobble FX.
    It should not modify the way it works, but you could try to disable 'Maximize Collision' and disable the 'Friction' (0.0).
     
    Last edited: Nov 22, 2019
  47. Slowbud

    Slowbud

    Joined:
    Jul 19, 2015
    Posts:
    68
    Ah sorry, maybe I used the wrong term, forgot that there is a collider wobble. I mean the normal wobbling of the vertices on accelleration change. Anyway, just solved it the long way, deleting VertExmotion component script and and adding it new. I can use the orig. sensors, so not too much extra work.
     
  48. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    I thought that it was about the collision zone because it's the main modification I've made in 1.8.6 :p
    I'm glad that you found a way to fix the issue, but I don't know why the original component didn't work...o_O
     
  49. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,478
    is it possible to use a gameobject transform to reposition specific vertices? like 8 gameobjects for cube.. all controlling the vertices at each corner without touching the other corners if moved?
     
  50. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,040
    You could do this with a custom script.
    You add 8 sensors at each corner, and a script on each sensor with an anchor target.

    Here a sample
    Code (CSharp):
    1.  
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5. using Kalagaan;
    6.  
    7. public class VertExmotionAnchor : MonoBehaviour {
    8.  
    9.     public Transform m_anchor;
    10.     public VertExmotionSensor m_sensor;
    11.      
    12.     void Start () {
    13.         if (m_sensor == null)
    14.             m_sensor = GetComponent<VertExmotionSensor>();
    15.     }
    16.  
    17.  
    18.     void Update () {
    19.         if (m_sensor != null && m_anchor != null)
    20.             m_sensor.m_params.translation.worldOffset = m_anchor.position - m_sensor.transform.position;
    21.     }
    22. }
    23.  



     
unityunity