Search Unity

uFlex - NVidia FLEX for Unity3D - Unified Visual FX [RELEASED]

Discussion in 'Assets and Asset Store' started by korzen303, Apr 15, 2016.

  1. m-obeid

    m-obeid

    Joined:
    Aug 7, 2012
    Posts:
    9
    Hi @korzen303 ,
    I've used uFlex in a Unity project and was able to generate uFlex objects from my meshes.
    But now in a new Unity project, it generates an object with only "Flex Particles" and "Flex Shape Matching" components. No Mesh Renderer and no Particles Renderer. Note that I have the "Soft Mesh" checked when I generate the mesh.

    It also throws the 2 errors in the snapshots below.
    (Note: For organizational purposes, I placed the uFlex package in a Custom folder inside the Assets folder. Does it have to be directly in Assets or is what I did okay?)

    Any ideas what I'm missing?
    Thanks.


    Capture.JPG Capture.JPG
     
    Last edited: May 31, 2017
  2. Buquet

    Buquet

    Joined:
    Aug 13, 2015
    Posts:
    11
    using flex on same D3D11Device as Unity device, creates hopeless problems with async access to resources.
    possible hangs, BSOD etc.
    i could not use Unity buffer as Flex simulation target without crash. For this I use Map Unmap.
    anyway, map/copy/process buffers in native, is minor, In comparison with Flex.Update.
     
  3. sashahush

    sashahush

    Joined:
    Sep 5, 2012
    Posts:
    75
    Wow great work! Any way this can be released? Flex on animated skinned characters?
     
  4. Buquet

    Buquet

    Joined:
    Aug 13, 2015
    Posts:
    11
    This technique and NvFlex has a number of problems:
    1) difficulty modelling of flex material, I do not know how to write tool.
    i im use flexibility texture for weighting surface (r-weight, g-stiffness, b-limit)
    2) poor collision for flex rigid bodyes. Does not have a stable collision with fluids, cloth and between themselves.
    Particles tunneling everywhere...
    3)There is no way to fully simulate fluids and rigids on a common Solver due to a specific parameters
     
    Last edited: May 31, 2017
  5. sashahush

    sashahush

    Joined:
    Sep 5, 2012
    Posts:
    75
    Oh i see! Thanks very much for providing the current problems details.
    I can probably see flex animated meshes authored in Unity with some kind of a "paint weights" tool
    Its good to see progress though, great work!
     
  6. stsword

    stsword

    Joined:
    May 4, 2017
    Posts:
    8
    @m-obeid , i have the same problem, i found that the FlexExt.flexExtCreateTearingClothFromMesh() return 0 while i creating cloth object
     
  7. korzen303

    korzen303

    Joined:
    Oct 2, 2012
    Posts:
    172
    @m-obeid @stsw I will have a look at this . Meanwhile, please try installing Visual Studio 2013 and 2015 Redistributables. Let me know if it helped
     
  8. stsword

    stsword

    Joined:
    May 4, 2017
    Posts:
    8
    @korzen303 i have tried this and doesn't make any help
     
  9. m-obeid

    m-obeid

    Joined:
    Aug 7, 2012
    Posts:
    9
    @korzen303
    When clicking the error, it takes me to line 809 in the "FlexWindow" script.
    I've attached a snapshot.
    It would help me a lot and allow me to make use of this product if I can get this resolved.


    1.JPG

    2.JPG
     
  10. 3DRaddict

    3DRaddict

    Joined:
    Jul 25, 2016
    Posts:
    26
    How is your progress on uFlex updating to Flex 1.1? Any estimate on release date?

    I've been attempting a c# wrapper using the Flex 1.1 include file 'NvFlex.h' based on your 'FlexAPI.cs' included in your uFlex implementation (which I purchased recently). I've managed to build the wrapper with no errors, but on testing it as a plugin it is bombing out with a DllNotFoundException error for 'NvFlexReleaseD3D_x64.dll' not loading. I've spent too much time searching the Net for an answer, with no success. This DllNotFoundException seems to be fairly common problem with a variety of suggested solutions, none of which have worked in my case.

    Hence, I'm eagerly awaiting your latest update to uFlex :)
     
  11. korzen303

    korzen303

    Joined:
    Oct 2, 2012
    Posts:
    172
    I am in the process of converting uFlex to Flex 1.1. Unfortunately, NVidia has completely changed the way the CPU/GPU memory transfer is handled, which pretty much requires a full rewrite of the code base. Except support for non-NVidia GPUs via DirectCompute and some bug-fixes there are no new features added in 1.1.

    Regarding your errors the API has changed so it wont work
     
  12. m-obeid

    m-obeid

    Joined:
    Aug 7, 2012
    Posts:
    9
    Hi @korzen303 ,

    I was able to make use of uFlex for some primitive models. However, I have 2 questions:
    1. I have a few models from Maya that have a cached Blendshape (saved morph). Typically, when exported as FBX to Unity, these models will include that morphed Blendshape as a parameter under the object's "Skinned Mesh Renderer". But when using uFlex, the mesh that uFlex generates (xxxFlexMesh) doesn't contain the Blendshape parameter under "Skinned Mesh Renderer". Is there a way to ensure that the generated mesh takes all the parameters from the used mesh?
    2. Do I need to make changes to the "flex" object (that hosts Flex solver, parameters, container, etc.) if I'm using my own custom models? I'm using Flex mainly for softbodies.
    Thanks.
     
  13. YoungXi

    YoungXi

    Joined:
    Jun 5, 2013
    Posts:
    47
    Great work on this.
    But before I purchase this, I need to know if it works with skinned character & cloth simulation. I guess others might have already asked this question. But my eyes get itches when I'm trying to read all the replies.
    So please let me know if this works with multi-cloth on a skinned character.
     
    Last edited: Jun 8, 2017
  14. DangCGART

    DangCGART

    Joined:
    Apr 26, 2017
    Posts:
    1
    Hi Korzen303 !
    I can't buy asset of you ,because :



    Please check your forms of payment.
     
  15. korzen303

    korzen303

    Joined:
    Oct 2, 2012
    Posts:
    172
    @DangCGART I have nothing to do with payments, Unity handles this. Please contact them
     
  16. stsword

    stsword

    Joined:
    May 4, 2017
    Posts:
    8
    @korzen303 , for the NullReferenceException: Object reference not set to an instance of an object problem
    i would like to provide more information, hope it can help

    i am creating a cloth without tearable and inflatable

    1. the return of FlexExt.flexExtCreateClothFromMesh is 0, i think the problem appear while runnig int uniqueVerticesCount = FlexExt.flexExtCreateWeldedMeshIndices(vertices, vertexCount, uniqueVerticesIds, origToUniqueVertMapping, 0.0001f)
    2. i try to change the weld threshold with different value , 0.0001 / 0 / -1 , most problem will solve with value -1
    3. other problem will appear while using -1, spring cannot create normally , the cloth will break apart look like without seaming
    4. i create the cloth and exported in marvelous designer

    plz let me know if u need more information
     
  17. MatrixNAN

    MatrixNAN

    Joined:
    Apr 11, 2013
    Posts:
    9
    Hey Korzen,

    Is there a way to make a constant flowing fluid with this and then setup a drain collider at the other end of the simulation. These are common tools for a lot of fluid simulations so I was wondering if uFlex supported this. I wanted to make a constant flowing river but then drain it at the end so that there is not constantly increasing number of particles in the fluid simulation. All of the examples for generating the fluid volumes if based on a preset constant number of particles and once they are generated they are not destroyed and the fluid stops flowing from the of emission.

    Cheers,
    Nathaniel Nesler
     
  18. yty

    yty

    Joined:
    Aug 10, 2009
    Posts:
    68
    @korzen303

    I want to simulate the influx of water and food in the stomach, but it looks too scarce.
    The Is there a way to improve?
    I have tried interaction radius..Too much fluid will be too rough.

    I sent a test project to your mail...

    korzenio@gmail.com

    My development environment u3d5.52f1 + uflex + ssfPro
     

    Attached Files:

    • Q1.jpg
      Q1.jpg
      File size:
      198.9 KB
      Views:
      516
    Last edited: Jun 14, 2017
  19. SKNKanimation

    SKNKanimation

    Joined:
    Feb 24, 2017
    Posts:
    7
    Hey Korzen! That delicious non-Nvidia ability is what I eagerly await (I don't want to cut out AMD customers <3)! Any updates on the patch?
     
  20. herpderpzerp

    herpderpzerp

    Joined:
    Feb 17, 2015
    Posts:
    6
    hi @korzen303 any update on progress of the new uflex? your implementation of nvidias flex appears to be the only one in existence for unity hope it goes well!
     
  21. KAMI521

    KAMI521

    Joined:
    Jun 22, 2017
    Posts:
    5
    @korzen303 In the unite2016,The Uflex demo that woman has be dance with cloth,but I can not find it has been in Uflex0.55,How to it Play? The Function has been shared in github? or the theory could be share?
     
  22. jun-oishi

    jun-oishi

    Joined:
    Nov 12, 2014
    Posts:
    3
    Hi @korzen303, thank you for the great asset and i'm looking forward for the new version.
    BTW, Is there any way to absorb particles? I am doing a water pool simulation with a suction hole, which absorb water faster than ordinary hole does with gravity.
     
  23. KAMI521

    KAMI521

    Joined:
    Jun 22, 2017
    Posts:
    5
    yes Like this One I want this But I can not find it in network ,The unit2016 Project like this
     
  24. KAMI521

    KAMI521

    Joined:
    Jun 22, 2017
    Posts:
    5
    @pan-master unite2016 project like this ,It is like you project
     
  25. viser1

    viser1

    Joined:
    Jun 7, 2017
    Posts:
    1
    Hi @korzen303,

    I am trying to use a dynamic mesh and meshcollider which is updated per frame from a Kinect camera, as a terrain surface on which to have flowing water.

    Firstly, is this possible? And if so could you please provide some insight into the best way to approach this?

    Thanks for your on-going work with this asset.. cheers!
     
  26. Norsim

    Norsim

    Joined:
    Feb 23, 2015
    Posts:
    1
    Is there any chance for uFlex or SSF pro going on sale this year? I really can't afford to buy them at full price atm.
     
  27. SKNKanimation

    SKNKanimation

    Joined:
    Feb 24, 2017
    Posts:
    7
    Hey @korzen303 Is this asset still in development? Haven't heard from you in a while.
     
  28. behr00z

    behr00z

    Joined:
    Jun 7, 2016
    Posts:
    1
  29. NtooThuv

    NtooThuv

    Joined:
    Jul 26, 2017
    Posts:
    2
    Does anyone knows how can I render fluids to see them as water?
     
  30. korzen303

    korzen303

    Joined:
    Oct 2, 2012
    Posts:
    172
    @NtooThuv Please have a look at ScreenSpaceFluids examples in uFlex package
     
  31. NtooThuv

    NtooThuv

    Joined:
    Jul 26, 2017
    Posts:
    2
    Thank you I didn't see it!
     
  32. pan-master

    pan-master

    Joined:
    Nov 11, 2013
    Posts:
    122
    IS this still being developed?
     
  33. roozi90

    roozi90

    Joined:
    Jun 9, 2016
    Posts:
    3
    hey @korzen303 how to create kinematic object in Uflex ?!!
     
  34. stsword

    stsword

    Joined:
    May 4, 2017
    Posts:
    8
    how can i set the initial state of cloth, coz while i simulate the cloth to specific shape,and i want to keep the shape then restart it to simulate in other step
     
  35. avi_immersive

    avi_immersive

    Joined:
    May 23, 2017
    Posts:
    1
    Hi Guys,

    Facing one issue with uflex.
    When i make build it doesnt show any error but uflex particles don't run in build i am facing this issue even with example scenes.
     
  36. spcm009

    spcm009

    Joined:
    Aug 10, 2017
    Posts:
    1
    My uFlex wish list :
    1) I have a problem that uFlex editor tab does not appear in unity5.6 or above.
    2) Tearable softbody or cloth with some thickness expression on surfaces.
    3) Various initial fluid particle container in addition to cube shape only.

    Thanks for reading~! Please let me know when next version of uFlex will come out. :)
     
  37. korzen303

    korzen303

    Joined:
    Oct 2, 2012
    Posts:
    172
    Hi @spcm009 , there is a problem with uFlex window in Unity 5.6+.
    To fix it please double click the error log message in the console or go to line 74 in Editor/FlexWindow.cs and change the following code. Next, please reset Unity's layout (top right corner, Layout/Revert Factory Settings).

    1. Code (CSharp):
      1. Color color = new Color(UnityEngine.Random.value, UnityEngine.Random.value, UnityEngine.Random.value, 1.0f);


    to
    Code (CSharp):
    1.  
    2. Color color = Color.gray;
     
  38. spacemarine

    spacemarine

    Joined:
    Mar 28, 2013
    Posts:
    13
    I had same problem at unity 5.6 or avobe, and it solved. Thanks a lot!

    By the way, can I expect disconnectable rope at next version if uflex? :):)
     
  39. MultivariousDev01

    MultivariousDev01

    Joined:
    May 22, 2014
    Posts:
    17
    Hiya @korzen303

    Just wanted to say I love the tool! I hope--if development is still active--that things are going well.

    At this point, I'm trying to diagnose a flighty freeze issue that occurs occasionally. We use uFlex to simulate water in a virtual box filled with mountains and valleys that the user can change and adjust. We have the virtual box at about 100 x 100 meters, and we interpolate the vertices of the terrain mesh (and update colliders) slowly to allow the physics engine to displace the Flex particles over time.

    I assume that this occasional freeze is coming from the uFlex plugin, but I don't have any proof. When the issue occurs, it doesn't get a chance to output any debug information. I've done a lot of analysis and work to try and rule out the possibility that the freeze is coming from our side... It's rare and it's hard to even pin down a cause. Usually we can't even reproduce a freeze.

    We're currently running the project in Unity 5.6.1f1

    We've applied pretty much every patch-update suggested by yourself in this forum

    I've just now changed FixedUpdate in FlexSolver to LateUpdate by way of the suggestion at https://forum.unity3d.com/threads/u...visual-fx-released.397836/page-4#post-2892145
    (it seems to help slightly)

    I'm also going to look into dedicating one of our GPUs to CUDA, suggested by yourself here https://forum.unity3d.com/threads/u...visual-fx-released.397836/page-2#post-2755048

    There's one suspicious thing that we were able to notice... The Update() function of FlexSolver.cs contains this line
    Code (CSharp):
    1. Flex.SetParams(m_solverPtr, ref m_params);
    We found that this line sometimes throws a NullReferenceException. It should be noted that this exception does not SEEM to affect anything... the program continues running despite the exception. Here's what the stack shows:

    I have no idea if that has anything to do with our freeze issue, but I was curious if you happened to have any ideas, or any way to possibly help us diagnose what might be going on. Any strategies to help rule out possible issues coming from Flex would be incredibly helpful.

    Thanks for everything you've done!
     
    Last edited: Aug 24, 2017
  40. korzen303

    korzen303

    Joined:
    Oct 2, 2012
    Posts:
    172
    Hi @Multivarious01,

    can you please drop me your email address? I can't send you a message via forum for some reason.
     
  41. Mafixmafix

    Mafixmafix

    Joined:
    Aug 25, 2017
    Posts:
    1
    Hi @korzen303.
    i am new with Flex and uFlex.
    Sorry, if I ask, but I don't understand how can create a simple cube with custom particles(for example 4) without using FlexWindow wizard. i want create an empty object and change it to Flex rigid body just with component and scripts, is it possible?
     
    Last edited: Aug 25, 2017
  42. korzen303

    korzen303

    Joined:
    Oct 2, 2012
    Posts:
    172
    @Mafixmafix Hi, you need to use the FlexWizard as it sets-up for you many Flex related arrays. Unless you want to type all the data by hand in the inspector, for a simple cube it would be doable, but not for any more complex shape.
     
    Mafixmafix likes this.
  43. alexbdillon

    alexbdillon

    Joined:
    Aug 30, 2017
    Posts:
    3
    Hi - Has anyone had any success constraining Nv Flex Tearing Cloths at certain vertices (ie the corners) the way one typically can with Unity default cloths?
     
  44. chanddu

    chanddu

    Joined:
    Jun 13, 2016
    Posts:
    2
    Hi @korzen303.
    This is chanddu,Can I render different meshes in uflex?I am just giving new mesh to the cloth but the particles are aligning to the default mesh.
    With Regards,
    Chanddu.
     
  45. deets

    deets

    Joined:
    Feb 10, 2015
    Posts:
    11
    Hi, I just bought the uFlex plugin.
    When I look at the quickstart video it shows to go to "tools -> uflex" and then a window should pop open.
    When I click on "uflex" it doesn't do anything.

    Also when I start a new empty project with uflex as plugin I get the following errors (probably why I'm not getting the uflex editor window) Can you help me out? Kinda dissapointing that a just bought plugin give you errors...

    Untitled.png
     
  46. korzen303

    korzen303

    Joined:
    Oct 2, 2012
    Posts:
    172
    @deets

    Hi, there is a problem with uFlex window in Unity 5.6.
    T
    o fix it please double click the error log message in the console or go to line 74 in Editor/FlexWindow.cs and change the following code. Next, please reset Unity's layout (top right corner, Layout/Revert Factory Settings).

    Code (CSharp):
    1. Color color = new Color(UnityEngine.Random.value, UnityEngine.Random.value, UnityEngine.Random.value, 1.0f);

    to
    Code (CSharp):
    1. Color color = Color.gray;
     
  47. yoyyoffg

    yoyyoffg

    Joined:
    May 4, 2017
    Posts:
    1
    Hi @korzen303 and everyone who will read this,

    I work with a HTC Vive and I want to create a water hose with uFlex, I can interact with my controller on my water hose. Everytime I launch the simulation, fps drop from 85 to 10 and I'm forced to restart my Vive and Unity. I think it comes from the Solver when it calls my GPU (Push & pull).

    Can anyone tell me if he already had this problem in VR ? Or if I have to set specific flex parameters for my water hose ?

    Thank you in advance for your assistance.
    • GPU : GeForce GTX 1060 3GB
    • CPU : i7 6700k
    • Ram : 16gig
     
  48. Roly43

    Roly43

    Joined:
    Jul 7, 2015
    Posts:
    21
    is Devlpment stil active? cant wait for any update. Love this Plugin!

    Bought fluid pro couple months back in hope updates come:)

    Kind Regards
    Daniel
     
  49. deets

    deets

    Joined:
    Feb 10, 2015
    Posts:
    11

    This fixed it! Thanks for the quick reply!

    I do have a follow up question.
    I would like to drag the objects with my mouse, I know there is a "Flex Mouse Drag" script, but when using that the models move so slow to the mouse, I would like to make them snap faster, is that possible?

    Also, how do I make softbodies more firm? I know they are called soft bodies for a reason, but I would like them semi soft if that makes sense, like rubber instead of gum like
     
  50. KlutoTek

    KlutoTek

    Joined:
    May 24, 2017
    Posts:
    5
    Hey there! First of all, terrific plugin! I've already gotten a ton of use out of it, but now I need a solution to what I believe is a very simple problem. I'd like to write a script where I can assign a single flex particle and manipulate the force applied to that particle dynamically. Ideally, there would be a weight variable that controls how much surrounding particles move as well. I've taken a look at the mouse drag script and it makes some sense to me, but since I'm not much of a programmer, I'm still at a loss as to how to approach this. Any pointers on how to achieve this would be appreciated!