Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sample Scenes Crazy Low FPS
#1
I just got the fluid asset and am trying it out on version 2019.1.2f1 and almost every sample scene is dropping its frame rate to the single digits. This INCLUDES the 2D multiphase fluid buoyancy. I would expect the 2D stuff to not be as bad, in fact that was the reason I got the fluid pack.

That said, this cant be normal can it? All of the 3D sample scenes give me seriously low frame rates to the point that on some unity hangs for wayy too long. Am I just using too new a version of unity? What is going on?


I've had issues with the first asset I got from you guys, the obi-ropes acting all limp all the time like wet noodles and apparently there was no fix for that.. and as much as it was disappointing I sucked it up. But this time... no... if I'm stuck with another expensive and useless plugin then I'm out for good.

I don't like spending money on something I can't use. >_>


Don't know if it helps but I get this lovely list of errors/warnings on import (2018.3.5f1 was the version I copy pasta'd the log... and was also-surprise-super laggy with single digit frames on the sample scenes)
Reply
#2
(05-08-2019, 08:49 AM)MasterGeneralB Wrote: I just got the fluid asset and am trying it out on version 2019.1.2f1 and almost every sample scene is dropping its frame rate to the single digits. This INCLUDES the 2D multiphase fluid buoyancy. I would expect the 2D stuff to not be as bad, in fact that was the reason I got the fluid pack.

That said, this cant be normal can it? All of the 3D sample scenes give me seriously low frame rates to the point that on some unity hangs for wayy too long. Am I just using too new a version of unity? What is going on?

Don't know if it helps but I get this lovely list of errors/warnings on import (2018.3.5f1 was the version I copy pasta'd the log... and was also-surprise-super laggy with single digit frames on the sample scenes)

Hi,

Unity cannot hot-load native plugins, that's the reason for the DllNotFound error. Just restart Unity, as described in the FAQ/first page of the manual:
http://obi.virtualmethodstudio.com/tutorials/

(05-08-2019, 08:49 AM)MasterGeneralB Wrote: I've had issues with the first asset I got from you guys, the obi-ropes acting all limp all the time like wet noodles and apparently there was no fix for that.. and as much as it was disappointing I sucked it up. But this time... no... if I'm stuck with another expensive and useless plugin then I'm out for good.

Ropes are supposed to be easily bendable. They're ropes after all, not metal bars. You can however allow them to reach higher bending stiffness by using more constraint iterations, or using more substeps, like you can in any iterative solver. The three ropes to the left side of the screen in the "RopeShowcase"sample scene show different degrees of bending stiffness.

If you want even more rigid ropes, try using rods instead (included with ObiRope):
http://obi.virtualmethodstudio.com/tutor...ropes.html

Unlike ropes, they do support a full material frame with controllable bend/stretch/torsion.

Quote:I don't like spending money on something I can't use. >_>

You don't have to. Simply ask for a full refund, writing to support(at)virtualmethodstudio.com including your Invoice Number.

Now, a note on your general notion of our plugins: similar technology is sold for hundreds in the industry, so generally it is not regarded a expensive system for what it is. It is also very performance intensive, as thoroughly warned in the asset description, and is not suitable for beginners at all as it assumes you're comfortable with realtime physics 101: what iterations and timestep are and how they affect the result, what death spiraling (or whatever you call it) is and how to fix it, what's the difference between force and impulse, etc. There's a place and a time to use lagrangian fluid simulation, and if you do not know this before purchasing (or are willing to spend a lot of time figuring it out), chances are you'll be angry and frustrated due to unrealistic expectations. No need to bash the product, just ask for a refund and we'll gladly accept the request.
Reply
#3
I found out the hot-loading soon after some more internet digging.

It's the first time I hear of bars in obi-ropes... so I will definitely take a look into that! (I got ropes before the 4.0 release). My main disappointment was when you have a rope running over say a pulley wheel and it is attached to an object. The rope doesn't display tension, it looks like a bouncy wet noodle (a real rope would slightly stretch linearly and eventually rip/break from too much weight), it looks like it lacks strain on it. A heavy enough weight on the end of a rope should swing in a perfect arc and be unable to bounce around since the rope has enough tension on it to keep it straight all the time rather than jump and bounce around. I tried mucking about to attempt to remove ALL of the springiness in the rope but I didn't dive deep into it (it wasn't a necessary thing, so I shelved the whole rope thing).


As for the fluid system, I am fully aware. I was just expecting to have the demo scenes somewhat workable at a steady frame rate (maybe 30-45 fps) to showcase the system. I understand the limitations for accurate fluid simulations but my intention was to use it on a small scale and in 2D.

What I don't understand is if it is normal for the 2D version to cause such a low frame rate... I have no issue lowering the time-step and preventing a death spiral on something I plan on uniquely building... but (and this is legitimately not a rhetorical question) should the demo scenes really be running at such a low frame-rate without tweaks to my unity build? If the answer is a yes, I can work with that, I'm just surprised.

I need to use obi fluids for small scale fluid dynamics in my game and I will be very selective as to how many particles I use as well as disabling/destroying them off-screen etc... as long as I can do that without frame rate dropping to less than 50 fps, I think I can deal. But if all I have is a small glob of 200 particles on screen and it tanks my frames to 12fps, then I can't do anything with.
Reply
#4
(06-08-2019, 02:36 AM)MasterGeneralB Wrote: I found out the hot-loading soon after some more internet digging.

It's the first time I hear of bars in obi-ropes... so I will definitely take a look into that! (I got ropes before the 4.0 release). My main disappointment was when you have a rope running over say a pulley wheel and it is attached to an object. The rope doesn't display tension, it looks like a bouncy wet noodle (a real rope would slightly stretch linearly and eventually rip/break from too much weight), it looks like it lacks strain on it. A heavy enough weight on the end of a rope should swing in a perfect arc and be unable to bounce around since the rope has enough tension on it to keep it straight all the time rather than jump and bounce around. I tried mucking about to attempt to remove ALL of the springiness in the rope but I didn't dive deep into it (it wasn't a necessary thing, so I shelved the whole rope thing).

Well this is basic stuff, as in inherent-to-computer-simulation basic. Let me explain:

In physics, there are basically two kinds of solver: direct and iterative. Direct solvers are very slow but precise (in big O notation: O(n^3) in the number of equations). Iterative solvers can either be precise or fast (O(n x iterations)). 99% of realtime physics engines use an iterative solver, Obi is no exception.

It is near-impossible to remove all springiness in any constraint system using an iterative solver . This is a fundamental consequence of how solvers work: they repeat (iterate) a very fast calculation over all constraints, reducing the overall error a little bit each time. So they approach the ground truth solution slowly, but outputting a useable result every step of the way. The more times you iterate, the smaller the timestep is, the smaller the equation system is, or the closer to 1:1 your mass ratios are, the faster they will reach the solution. The speed at which the solver approaches the solution is called convergence speed.

When the system hasn't fully converged -because you use very few iterations, a large timestep, or large mass ratios- the error can show up as jitter, stretchiness, or things blowing up in crazy ways (ever tried a largish joint system in Unity?). Obi is unconditionally stable, which means you have a no-blowup guarantee and the error will always manifest itself as stretchiness. This alone is a huge advantage over classic solvers.

In Obi, this translates as:
- Reduce rope resolution to have a smaller equation system, and improve convergence.
- Reduce Unity's timestep (or increase the amount of solver substeps) to improve convergence.
- Use more iterations to improve convergence.
- Reduce mass ratios to improve convergence. Rule of thumb for most realtime solvers is do not exceed 1:10. (That is, at most you can hang a 10 kg weight from a 1 kg rope, or a 100 kg weight from a 10 kg rope). Excerpt from PhysX's docs:
Quote:The solver can have difficulty converging well when a light object is constrained between two heavy objects. Mass ratios of higher than 10 are best avoided in such scenarios.
https://docs.nvidia.com/gameworks/conten...oints.html

Now, for the very specific case of pulley systems, we have a specialized solution called Filo. It works by constraining the pulleys themselves directly, instead of simulating a distance and contact constraint system. As it uses far fewer constraints, it converges much faster (but has its own set of limitations):
https://assetstore.unity.com/packages/to...tor-133620

(06-08-2019, 02:36 AM)MasterGeneralB Wrote: As for the fluid system, I am fully aware. I was just expecting to have the demo scenes somewhat workable at a steady frame rate (maybe 30-45 fps) to showcase the system. I understand the limitations for accurate fluid simulations but my intention was to use it on a small scale and in 2D.

What I don't understand is if it is normal for the 2D version to cause such a low frame rate... I have no issue lowering the time-step and preventing a death spiral on something I plan on uniquely building... but (and this is legitimately not a rhetorical question) should the demo scenes really be running at such a low frame-rate without tweaks to my unity build? If the answer is a yes, I can work with that, I'm just surprised.

It depends. If your project settings are causing a death spiral, (the default max timestep is 0.33, which can cause physics to be updated sixteen times per frame) then it is possible to get 4-5 fps. All scenes are meant to run at a reasonable fps (60-200, depending on the scene), assuming 1 to 2 physics updates per frame in a moderately powerful CPU. Also, (I cannot stress this enough): make sure to profile in a standalone build, not the editor. The difference in performance is huge.

(06-08-2019, 02:36 AM)MasterGeneralB Wrote: I need to use obi fluids for small scale fluid dynamics in my game and I will be very selective as to how many particles I use as well as disabling/destroying them off-screen etc... as long as I can do that without frame rate dropping to less than 50 fps, I think I can deal. But if all I have is a small glob of 200 particles on screen and it tanks my frames to 12fps, then I can't do anything with.

There is either something very wrong in your Time settings, or your computer is just not powerful enough. Try setting your fixed timestep to 0.02 and your max fixed timestep to 0.04. Most scenes should run above 60 fps in a decent CPU. See our performance benchmarks:
http://obi.virtualmethodstudio.com/performance.html
Reply