A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by korzen303, Apr 15, 2016.
Why main ulex component significally load CPU, on empty scene?
Good Flex integration I was looking for that a long time...
But game window goes black when I activate Virtual Reality Support with Oculus Utilities, does anybody know what's happening ?
is there any update to Nvidia uflex1.1?
First: Nice Asset, love Playing around with the Demo Scenes.
Im Currently on Unity 5.6.0f3, Asset Fresh Imported from the Store a few Hour ago.
Now my Problem:
When i try to open Tools->uFlex, nothing happens. (Got an Error first, because uFlex-Window wantet to get Random Values for Colors, and this is not allowed (anymore?), so i set some Static Values for now.)
But even after Correcting this Error, the uFlex Window will simply not show up (no Error Message or Warning),
the "uFlex Utility" Window works without any problems.
Any Idea what could be wrong?
Thanks & Best Regards!
@real4ct Checked VR multiple times in both OpenVR and Oculus VR and worked fine (except SSF in single pass rendering)
@pan-master It is in the making, except working on non-NVidia hardware using DirectCompute not much has changed.
@DJLICE Seems like a problem with windows layout. uFlex window is probably displayed outside your screen. Click Layout in Unity's top right corner and Revert to Factory Settings. Let me know if that worked
@korzen303 Well damn me it worked, should have thought of that myself tho...
Thank you !
@korzen303 Working fine on Oculus VR I confirm I'd like to have other documentation than NVIDIA C++ official doc, maybe include SSF Pro in the package, even if it's worth the price anyway. Perfect and considerable feat already ! Thank you !
Is anyone having some wierd flickering with this asset and htc vive in unity 5.6??
I notice Unity 5.6 hard-crashes on all related PhysX scenes if PhysX is not explicitly turned on in NVidia settings. Opening NVidia Control Panel, Selecting "Set PhysX Configuration" > [Your GPU] .. solves the problem. Curiously, on a new computer, the default is "CPU". LoL. What a world.
The uFlex editor window does not work. I'm using Unity 5.6f3.
Tried debugging the FlexWindow script, couldn't seem to really get anywhere.
seemed to be something with setting the color variable during serialization. Also changed the init code a bit, not sure which change made it work.
public static FlexWindow FlexEditorWindow;
public static Rect WindowRect = new Rect(150, 150, 400, 400);
public static void ShowWindows()
FlexSolver solver = FindObjectOfType<FlexSolver>();
if(solver == null)
Debug.Log("No FlexSolver in scene. Creating a default one (Assets/uFlex/Prefabs/Flex.prefab)");
GameObject prefab = AssetDatabase.LoadAssetAtPath<GameObject>("Assets/uFlex/Prefabs/Flex.prefab");
GameObject flex = GameObject.Instantiate(prefab);
flex.name = "Flex";
FlexEditorWindow = (FlexWindow)GetWindow(typeof(FlexWindow));
FlexEditorWindow.titleContent.text = "uFlex";
FlexEditorWindow.position = WindowRect;
Also, the scaling is a real issue. It's as if the plugin was designed around the idea everything being done at hugely upscaled sizes. All but one of the scenes use wildly overscaled particles that are impractical for the majority of uses of the plugin and the uFlex menu doesn't have any control for adjusting the particles scale at creation, then afterwards the created system cannot change its grid size. When I tried creating a 5x5x5 at 0.1 spacing and then change the particle rendered size to 0.1 then the simulation seems to break down and incorrectly spew particles in random directions.
It would be a good idea to look into better scaling control and assume that users are using standard unit/scene scale instead of these massively overscaled systems. As is, a value of 1 (for a single particle) is like half a meter (for a single particle) which is a real struggle to understand and work with.
Is it possible to have multiple fluids with different settings in the same scene?
Like water and sand?
At the moment Flex supports both fluids and granular materials in one scene, but not different fluids properties. So yes, you can have water and sand in one scene, but not water and, for example, some sticky goo.
hi, I'm creating rigidbody uflex object with the window of the editor. I'm creating a chair, a ball, and lots of different items but, when I click on "Draw Debug" from Flex Particles script, I'm seeing that it shows an "sphere" collider which doesn't match the mesh at all. Even if the mesh is an sphere, the collider uflex creates is 10 times bigger. Is there any fast fix? or is it going to be fixed in the next update?
I am having issues with uFlex recently. I have been crashing everytime I attempt to enter play mode or enable a flex component. The .dmp log shows this:
Previously it was working in our project on 5.6. We have reimported the asset to see if that was the issue, and it did not help. Do you have any ideas as to what would cause this?
Hi, i'm having the same problem of LaneFox,
The uFlex editor window does not work. I'm using Unity 5.6f3.
Has Someone already solve this problem??
thank you in advance
does not work means that it doesn't appear? I solved it with: window -> layout -> reset factory
Thank you, it was a script problem;
Do you know how to create the features of the water balloon seen in the example, but with a different shape?
I have some problem because i don't know how to change the initial shape of the fuild, in the example is already spheric!
Hi there, i have purchased this fine asset, fantastic work!
I have a few questions i'd like to get more info on.
- I wanted to know how can this apply to an animated skeleton mesh, any examples?
- How do you constraint certain vertices of the mesh, how was the dragon constrained to the ground?
- Can i move the constrained start and end points of the rope?
is it possible to define points in the world which attract the objects? - Somehow like planets.
Or in another way: Is it possible to change the velocity per "particle"? I can only imagine that this would have a huge impact on the performance due to the fetch to the cpu.
@sashahush @Ignwua you can't constraint the mesh vertices but the underlying particles. Just set their mass to 0 and then you can modify their position, velocity and so on in class deriving from FlexProcessor. See ParticleDragger for example. The same with rope, just set the mass of one end to 0.
For animated skeleton there is no inbuilt solution yet but have a look at this thread https://forum.unity3d.com/threads/u...578.1887704403.1494240231-74662868.1470140857
I'm using Unity 5.6f3.
Having the issue of the Flex Window not showing up, i've tried resetting the layout as suggested above but i still get this error:
UnityException: get_value is not allowed to be called from a ScriptableObject constructor (or instance field initializer), call it in OnEnable instead. Called from ScriptableObject 'FlexWindow'.
See "Script Serialization" page in the Unity Manual for further details.
uFlex.FlexWindow..ctor () (at Assets/uFlex/Editor/FlexWindow.cs:74)
UnityEditor.EditorWindow:GetWindow(Boolean, String, Boolean)
uFlex.FlexWindow:ShowWindows() (at Assets/uFlex/Editor/FlexWindow.cs:929)
Hi, 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).
Color color = new Color(UnityEngine.Random.value, UnityEngine.Random.value, UnityEngine.Random.value, 1.0f);
Color color = Color.gray;
Perfect thank you Korzen! Works like a charm now
Thanks very much Korzen for the reply.
"Just set their mass to 0 and then you can modify their position" - How do i do this exactly? Do i select the particles and create a new script which sets the mass to zero? or do i select them and change their mass in some property panel?
I use uFlex to do a cloth simulation, a catwalk girl with tight dress.
the motion is good and fit when the character is static, but the cloth will penetrate into the body collider.
this can be fixed by decreasing the FixTimestep from 0.01 to 0.003
my question is , is there any method that i can get a result without penetration
i can provide the scenes if needed
@sashahush I think the best way would be to write a small script which works along some bounding volume (box, sphere etc) and locks all the particles which it contains. You can take it further and use unity raycasts against mesh to make some sort of paint brush for locking particles.
@stsword Yep, that is just the why Flex works. I am afraid that you would need either some custom continuous collision detection or smaller timesteps and/or larger particle-mesh collision margins. But you can drop me this scene. I will have a look.
@korzen303, thanks for your kindly reply
more question about the FlexParticles Script, just curious where the particle position stored?
the particle data still exist even i delete the mesh of the cloth
OK, so positions are store per object in FlexParticles. Next, they are gathered from all FlexParticles and assembled in global arrays in FlexContainer. These arrays are then copied to GPU, after simulation copied back to FlexContainer and from there propagated to individual FlexParticles.
That is why the best way to modify this is to derive from FlexProcessor
// Override to modify the data after the flex game objects were updated but before the data from them was copied to the container arrays
// In other words, use this for working with flex game objects.
public virtual void PreContainerUpdate(FlexSolver solver, FlexContainer cntr, FlexParameters parameters)
// Override to modify the data after the container was updated
// In other words, use for working directly with the container data.
public virtual void PostContainerUpdate(FlexSolver solver, FlexContainer cntr, FlexParameters parameters)
great asset. If you have the time, can you give an estimate when the new uflex version will be released?
The uFlex is feature complete in terms of wrapping Flex 1.0. Next uFlex version will focus on wrapping Flex 1.1, which doesn't really add anything new except support for non-NVidia GPUs via DirectCompute. This is a matter of nearest weeks hopefully.
Thanks for the quick answer!
Any possibility of some sort of fracture/breakage feature for Flex objects?
Had heard of some related news on this front a long while back, but that kind of fizzled out unfortunately...
when i generate cloth with polygon like this , error come out "NullReferenceException: Object reference not set to an instance of an object"
i need to do this coz i need to do some layering cloth
is there any method to fix this ?
how can use texture on soft or rigid models
The textures should be transferred to eventually created meshes. What exactly is the problem?
@QHuman Hi it is a common problem. Please reinstall NVidia drivers with Advanced/Clean Settings option enabled.
Hey @korzen303 ! We have a bunch of data being both voxelized and rendered on the GPU. Is there a way we can copy the finished particles buffer to a structured buffer on the device in our compute shader? The readout to the CPU is super expensive and ideally we would just read it off the gpu directly.
@Leanimal Hi, currently uFlex 0.55 (using Flex 1.0) is using CUDA so you would need a native plugin, which maps the DirectCompute buffers in CUDA context and allows moving the data on the GPU. I tried it and it works, although it is kinda complicated and there wasn't that much speed boost for normal applications. You can base the implementation on this https://bitbucket.org/Unity-Technologies/graphicsdemos and google for "CUDA DirectX interop".
However, Flex 1.1 is also implemented in DirectCompute so this should makes things easier as no CUDA mingling. uFlex based on Flex 1.1 should be ready in couple of weeks.
Does this address the overscale issue?
Does Anybody have shader with modifications from
29min. Maybe such shader could make flex a bit faster.
For cloths uflex is too slow on gtx1080ti
I'm having trouble getting any sort of Shader Forge shader to be lit correctly on the meshes that uFlex generates. The shaders work fine on any other object except the meshes uFlex generates. They also work fine on the models the uFlex meshes are derived from. PBL and custom lighting modes always show up black. Blinn and Phong show diffuse color but no lighting or normals. Anyone else experience this or have an idea how to fix it?
Is it possible to add somekind of scaling property to Flex that easily scales all necessary properties. Now only the small scale scene runs properly and other scenes are too slow and too big.
There seems to be leaking of some sorts included in every scene, like the water balloon. The water just teleports outside of the balloon by itself.
Can uFlex support deformation collider? i find a script that can update collider mesh each frame, this support unity dynamic on its own, but seem have no effect on uFlex
Still trying to get Shader Forge materials to work right. It seems like the generated mesh's normals or tangents are wrong. Or at least wrong enough for SF to choke on them. Removing the normal map node on an SF material fixes the lighting. Stangely, normal map's on Unity's shaders work fine.
when I use your FlexDragBase code i notice that flexutil2 class was not exist in code ,how can i found that?
@KlutoTek for softbodies uflex relies on Unity's SkinnedMeshRenderer so, as long as shaderforge supports this, things should work.
i am testing mesh skinning with Flex. some results
FPS without recorder ~= 100
Flex Fluid with SSF by Korzen
@Buquet Nice work! Would you mind sharing the tools and/or the code with the community? Many people ask about it.
I could include it in uFlex at some point
i am replace Unity skinning pipeline in native dll, for avoid multiple GPU/CPU/GPU transitions
and uses Flex 1.1.0 (but early versions is identical)
with fluids code is uFlex like, but i am edit your SSF asset for support multiple fluid instances. and i partially activate particle portions in flex.ActiveBuffer from emitter position.
i can send you edited SSF asset for longer research.
sorry for my english
@Buquet I will definitely have a deeper look at this. Are you using DirectCompute implementation of Flex 1.1. How did you handle NvBuffers mapping/unmapping. My method is rather cumbersome