Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

VertExmotion [Released]

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

  1. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    905
    Great; will the UV tool also respect the intensity setting ? right now I can only paint or delete with 100% intensity in the UV tool. And is there an ETA for the version?
     
  2. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Yes, I've improved the accuracy and the UI.
    I'll push a version to the assetstore monday, so it will be available in a few days ;)
     
    Qleenie likes this.
  3. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    905
    Tried the new version, unfortunaltely it does not work any better. The UV tool does not work at all on most meshes, and I still have issues in painting certain vertices in the normal paint view....
    These are mostly complex meshes, which sometimes have multiple layers of vertices (e.g. hair).
     
  4. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    If you try with the zombie model from the samples, the tool works well.
    Could you send me a sample mesh? (contact@kalagaan.com)
    If the UV overlaps, it could be better to import the weights from a texture instead of using the UV tool.
    You can import the weight in the import/export section.

    If you have created your own character, you could also paint the weights in the vertex color using your 3D software, and enable 'use mesh reference' in the VertExmotion settings.
     
  5. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,215
    @kalagaan
    Hey. So I'm working on a VR game in which the player can grab a balloon. Is there a way to use inflate to show the fingers depressing into the balloon? If so, what do you recommend to make that happen. Thanks!
     
  6. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    You could attach some linked sensors to the fingers, and use the inflate parameter on each sensor.
    The ballon must have enougth vertices for a nice deformation.
    You'll probably have to create a custom script to prevent the sensors for entering too much in the baloon
     
    Last edited: Aug 23, 2021
    DigitalAdam likes this.
  7. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,215
    @kalagaan Hey, so I'm trying to create my own HDRP Subsurface Scattering material with Amplify. Here is where I'm at with it, but it doesn't seem to be working. Do you have any thoughts? Thanks!

    Shader.jpg
     
  8. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Could you send me a sample scene with your shader? (contact@kalagaan.com)
    I could check it ;)
     
  9. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,215
    Email sent. Thanks!
     
  10. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,215
    @kalagaan Hey, did you manage to figure out my Amplify shader problem with my example scene that I sent?
     
  11. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Demo done, check your email ;)
     
  12. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,215
    I'll check it out, thanks!
     
  13. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    320
    Hello,

    Is there a way for me to 'paint' the vertices from copying the vertices mapped to a skinned mesh bone?
    Any API or functions that I can call to paint the vertices via script?

    I have tons of characters with the same armature, and I don't feel like painting every single one of them.
     
  14. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    The weights are stored in the vertex color of the mesh, each rgb channel is a layer for the sensors.

    There's different ways to change the weights instead of using the tool :

    1) You can paint the vertex weight in the vertex color channels using a 3D software like blender.
    in that case, you have to enable 'Use mesh reference' in the VertExmotion settings.

    2) You can feed the 'm_vertexColors' list in the VertExmotion component by using an editor script.

    3) You can change the 'm_vertexColors' list at runtime and call the function 'ApplyMotionData'

    So it could be possible to change the bone weight into a vertex color.
     
  15. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    905
    Hey, VertExmotion suddenly stoppped working, without any bigger changes to my project (no updates of Unity or VertExmotion, which is latest 1.9.9.
    The painting only works in 2D, if I switch to 3D, I get the following long error message, and one time my PC freezed completely:

    Edit: Nevermind, this is an Unity bug. It was due to having two inspector tabs open. The cloth tool of Unity also bugs out in that case.
     
    Last edited: Sep 11, 2021
    kalagaan and hopeful like this.
  16. huxley

    huxley

    Joined:
    Apr 27, 2009
    Posts:
    334
    Im getting this error and it's preventing me from painting vert weights on mesh. Is there a way to reset the vert array to get back on track?

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. Kalagaan.VertExmotionSensorEditor.DrawSensorHandle (Kalagaan.VertExmotionSensorBase sensor, System.Boolean AllInfo) (at Assets/VertExmotion/Core/Editor/VertExmotionSensorEditor.cs:527)
    3. Kalagaan.VertExmotionEditor.OnSceneGUI () (at Assets/VertExmotion/Core/Editor/VertexMotionEditor.cs:432)
    4. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    5. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    6. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    7. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    8. UnityEditor.SceneView.CallOnSceneGUI () (at <0b8db76a688c4d18a15dd7dfe092a035>:0)
    9. UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at <0b8db76a688c4d18a15dd7dfe092a035>:0)
    10. UnityEditor.SceneView.OnGUI () (at <0b8db76a688c4d18a15dd7dfe092a035>:0)
    11. UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <0b8db76a688c4d18a15dd7dfe092a035>:0)
    12. UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <0b8db76a688c4d18a15dd7dfe092a035>:0)
    13. UnityEditor.DockArea.OldOnGUI () (at <0b8db76a688c4d18a15dd7dfe092a035>:0)
    14. UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    15. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
    16.  
     
  17. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    It looks like an old bug...
    What is your version of VertExmotion?
     
    Last edited: Sep 23, 2021
  18. huxley

    huxley

    Joined:
    Apr 27, 2009
    Posts:
    334
    I'm currently using version 1.9.9. I've re-download from the app store to ensure that everything is up-to-date. My utilization integrated the PreIntergratedSkinShaderV2.0, but it has worked in the past without any issues. After updating the VertEXMotion package I receive the following errors:


    NullReferenceException: Object reference not set to an instance of an object
    Kalagaan.VertExmotionEditor.DrawCursor (UnityEngine.Vector3 mp, UnityEngine.Camera svCam) (at <e6f8e27154e446488f01abf84d849da8>:0)
    Kalagaan.VertExmotionEditor.OnSceneGUI () (at <e6f8e27154e446488f01abf84d849da8>:0)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    UnityEditor.SceneView.CallOnSceneGUI () (at <0b8db76a688c4d18a15dd7dfe092a035>:0)
    UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at <0b8db76a688c4d18a15dd7dfe092a035>:0)
    UnityEditor.SceneView.OnGUI () (at <0b8db76a688c4d18a15dd7dfe092a035>:0)
    UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <0b8db76a688c4d18a15dd7dfe092a035>:0)
    UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <0b8db76a688c4d18a15dd7dfe092a035>:0)
    UnityEditor.DockArea.OldOnGUI () (at <0b8db76a688c4d18a15dd7dfe092a035>:0)
    UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.EventDispatcher.OpenGate () (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <0dab12d45c2a4edc933579280843bdeb>:0)
    UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <6ddf8eac3856492ab1b8cf42618915cc>:0)


    Under shaders the PreIntegratedSkinShaderV2.0_StandardVM has failed to compile and states :

    Couldn't open include file 'Assets/VertExmotion/Shaders/VertExmotion.cginc'.
    Compiling Fragment program with POINT_COOKIE SHADOWS_CUBE SHADOWS_SOFT
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR UNITY_PASS_FORWARDADD
    Disabled keywords: FOG_LINEAR FOG_EXP FOG_EXP2 POINT DIRECTIONAL SPOT DIRECTIONAL_COOKIE SHADOWS_SHADOWMASK LIGHTMAP_SHADOW_MIXING SHADOWS_DEPTH SHADOWS_SCREEN UNITY_NO_DXT5nm UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30


    but this error persists even if I use the Standard VertEXMotion shader. Are there any other cached components that I can try clearing for a fresh install?
     
    Last edited: Sep 23, 2021
  19. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    That's strange...
    The errors are not the same...
    Do you use the basic or the pro version?
    Does the file 'VertExmotion.cginc' is in the folder 'VertExmotion/Shaders/' ?

    If you have upgraded an old project (2018) to a new version, you can try to remove the package from your project, and from the assetstore cache :
    "C:\Users\userName\AppData\Roaming\Unity\Asset Store-x.x"
    And download the package again from the assetstore.

    If you still have issues,
    please send me a sample scene or a way to reproduce that bug. (contact@kalagaan.com)
     
    Last edited: Sep 23, 2021
  20. Dave_LeDev

    Dave_LeDev

    Joined:
    Apr 14, 2015
    Posts:
    33
    I've not yet purchased to find out-- does this asset only support external collisions or can it also handle internal?

    Example use cases:
    • A creature trying to get out of a closed, deformable container
    • Bubble Boy
    • Realistic skin deformation caused by internals
     
  21. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    The physics system doesn't work with internal collision, so you'll have to create a custom script, or create a specific physic object for your needs.
    Anyway, you can create a sensor inside the mesh volume and push the vertices out.
    There's some samples in the package, like a bubble deformation.
    Here a sample for deforming a muscle :
    - Add a sensor inside the arm
    - Create a custom script for driving the inflate parameter according to the arm/forearm angle.
     
    Dave_LeDev likes this.
  22. huxley

    huxley

    Joined:
    Apr 27, 2009
    Posts:
    334
    I'm using VertexMotion Basic version. The error only occurs when I'm in edit paint mode.

    Yes, VertExmotion.cginc is located in path Assets>VertExmotion>Shaders

    I've cleared asset store cache file and reinstalled with same result. If I create a clean scene and setup VertExmotion everything is fine, so there is something in my savefile to break VertExmotion editor.

    Using Unity 2020.3.11f1.
     
  23. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    This is strange....
    I'm currently working on a game using 2020.3.11, VertExmotion works fine.
    Could you send me a package (scene or prefab) with this bug? (contact@kalagaan.com)
     
  24. minad2017

    minad2017

    Joined:
    Dec 1, 2016
    Posts:
    50
    I have a character that I prefabricated by attaching a VertExmotion component to a skinning mesh renderer.
    When I instantiate that character, it works correctly most of the time.
    However, irregularly, VertExmotion may stop working.
    If I open this prefab, select the VertExmotion component, open the paint page, set the paint again, and save the prefab, it will work.
    However, no matter how many times I set it up, this problem occurs again and again.
    This problem occurs at a high rate when I restart the Unity Editor.
    Is there a solution?

    Unity 2020.3.10f
    VertExmotionPro V1.9.9
     
  25. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    That's weird :confused:
    the paint data are serialized into the component, so it should always work.
    Maybe there's something wrong with this version of Unity.

    You could try to save the project after the paint modification (Menu->File->Save Project)
    Sometime unity doen't save some assets properly, and the modifications are not applied when Unity restart.

    I'll do some tests with 2020.3.10f
     
  26. Henry_Sun

    Henry_Sun

    Joined:
    Jun 1, 2019
    Posts:
    24
    It sounds like a joke but I have to ask: Will you make a Unreal Engine version VertExmotion ?
    I really enjoy your works and I am working on a UE4 project recently and I wish I could have a real time vertex animation feature but sadly UE doesn't get it and no one did in the market.
    If you won't, I would probably code it myself.
     
  27. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    I've started to learn UE4, and I've already created my account on the store ^^
    Now I'm trying to convert VertExmotion, but it's not as simple as I thought.
    And I need to improve my knowledge about UE.
     
    Last edited: Jan 18, 2022
  28. Henry_Sun

    Henry_Sun

    Joined:
    Jun 1, 2019
    Posts:
    24
    That's a good news. I'm expecting that day.
     
  29. shma_unity

    shma_unity

    Joined:
    Jun 13, 2018
    Posts:
    118
    Hello,
    I'm getting the same error as Huxley (same stack trace with NullPointer in Kalagaan.VertExmotionEditor.DrawCursor).
    I'm using Unity 2021.1.11f1 with HDRP shader graph (using the provided vertex shader node). I remember it working fine before on the same version.
    The error appears only when entering edit mode. I can still paint within the paint too, but that is of course not optimal.


    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. Kalagaan.VertExmotionEditor.DrawCursor (UnityEngine.Vector3 mp, UnityEngine.Camera svCam) (at <e6f8e27154e446488f01abf84d849da8>:0)
    3. Kalagaan.VertExmotionEditor.OnSceneGUI () (at <e6f8e27154e446488f01abf84d849da8>:0)

    Edit: I managed to fix the nullpointer by clicking on "Panel in scene view". After that I can click it again and Panel in inspector works as well.
     
  30. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    Thank you for the feedback!
    I'll check that ;)

    EDIT : fixed! I'll push a new version to the assetstore asap
    EDIT 2 : Available on the assetstore 1.9.10
     
    Last edited: Feb 10, 2022
    shma_unity likes this.
  31. EricVenn

    EricVenn

    Joined:
    Nov 10, 2016
    Posts:
    23
    Hi,

    My goal is to find a way to 'emboss' a target mesh with a source mesh.
    I've tried to modify the interactive 'push' demo, to work with an arbitrary mesh (not a sphere) without success.
    I've tried to keep the deformation (no spring or damping effect) with that original scene, without success. It always go back to initial sphere.
    We are using Vertexmotion 19.10.
    Do you think it's possible ?
    Thanks.
     
  32. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    If you want to modify a mesh with the shape of another mesh, it won't work out of the box with VertExmotion.
    The sensors move the vertices in their range, so it's a spherical deformation ( capsule if you use link 2 sensors).

    The only way to create some kind of mask is to change the vertex color of the target mesh.
    So maybe you could create a custom script for changing the vertice colors by using a texture of the shape.

    If you want to keep the deformation of the sensors, you can use the API and add an offset to each sensor,
    the offset will be applied to all the vertices in their area.
    Or you can use the bakeMesh function (have a look to the demo), it will bake the vertex modification into a new mesh.

    If you have issues, please send me an email (contact@kalagaan.com) with more info about the effect you want to achieve or with some sample meshes, I'll have a look ;)
     
  33. EricVenn

    EricVenn

    Joined:
    Nov 10, 2016
    Posts:
    23
    It's about simulating wires around a softbody mesh. A capsule deformation would work.

    Here are details about the project. A high res cube (about 10 K polygons) that must be crossed by wires. The jelly must not go back, as the wires stay in place after penetrating.
    Like that.
    upload_2022-3-10_6-47-43.jpeg
    Do you think it's possible ?
    If yes, do I need the 'Pro' version ?
    Thanks !
     
  34. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    You can add 2 linked sensors and use the inflate parameter.
    You don't need the pro version, the features are the same than the basic version.

    Here a sample with 3 linked sensors :


     
    Last edited: Mar 10, 2022
  35. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,215
    @kalagaan Hey, so I'm running Unity 2021.2.15f1 with URP 12.1.5 and your latest VertExmotion. I have a character mesh with two materials, one for the head and one for the body. Both tessellated materials I've created with Amplify Shader Editor.

    When I select my mesh and add the script, the mesh turns blue. When I paint and add sensors, it stays blue and it's hard to paint. Then when I hit Play, the mesh is gray. Any thoughts?
     

    Attached Files:

  36. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,215
    @kalagaan Also, how do you remove the script correctly? if I "remove component" of your script my mesh still stays gray.
     
  37. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    When you use the relative position in the shader settings, you have to convert the node from world to objects.

     
  38. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    You must set the world position, the world tangent and the world normal for the VertExmotion node input,
    you used the object space nodes ( position, normal and tangent ) in your shader.

    The Relative mode requires an input in object space, and the Absolute mode require a world space input.
    The VertExmotion node output is world space, so you have to add the transform nodes if the Vertex potion is set to 'Relative'.
     
  39. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,215
    That did not fix my issue. I'll create a new sh
    Thanks for this. I created a simple shader and it appears to be working. For some reason something in my original shader that I tried to convert is having issues. I appreciate your help!
     
    kalagaan likes this.
  40. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,215
    @kalagaan Actually Im still having issues. The paint mode has some issues, and my mesh has a weird normal/lighting issue too.
     

    Attached Files:

  41. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    I'll check that ;)
    Did you enable the normal correction in the VertExmotion component?
     
  42. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,215
    Those sliders (correction and smooth) don't seem to do anything.
     
  43. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    The correction only works at runtime when a sensor modify the mesh.
    You could try to disconnect the VertExmotion node in the shader to check if the lighting is modified by VertExmotion (it should not)
    I'll check the painting shader.
     
  44. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,215
    If I remove the nodes and the .cginc, the models lighting goes back to normal.
     
  45. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    You used the wrong transform node in the shader, you have to use "world to object", not "object to world" ;)
     
  46. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,215
    Ah, that fixed my rendering issue. Thanks so much! It did not however, fix the painting issue though.
     
  47. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    I'll fix the paint shader in the version ;)
     
    DigitalAdam likes this.
  48. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    VertExmotion 1.10.0 is now available!
    It includes the new vertex buffer mode.

    This mode use the vertex buffer instead of the shader vertex function,
    so you don't need to convert the shaders anymore :D
    It's also compatible with all the render pipelines.

    This mode can be selected in the info tab of the VertExmotion panel,
    and you can still use the shader mode if you want.

    The vertex buffer mode is available for Unity 2021.2 or later.
     
    Last edited: Mar 24, 2022
    ekakiya and DigitalAdam like this.
  49. gigacaria

    gigacaria

    Joined:
    Apr 9, 2022
    Posts:
    7
    I'm using this asset in a game for android.
    And it works fine on most androids.
    However, I received reports from multiple Game player that the shader was not displayed correctly in "galaxy note 10 pulus".
    I'm using the "VertExmotion / UniversalRenderPipeline / Lit" shader, but it seems that only the mesh to which this shader is applied is hidden.
    I tried to find out myself, but it was difficult for me to solve it.
    Please help me if you have any idea.

    unity ver 2020.3.10f1 URP
    VertExmotion Pro Version 1.9.9
     
  50. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,503
    I'll do some test by my side.
    If you can update your project to 2021.2 and upgrade to VertExmotion 10.0.0
    You could try to use the lit shader from unity and switch VertExmotion to the vertex buffer mode.