30-09-2018, 03:56 PM
(This post was last modified: 30-09-2018, 03:59 PM by josemendez.)
(30-09-2018, 02:00 PM)Peny22 Wrote: Hi,
I have bought Obi Rope asset. Unfortunately, I have encountered several problems and I need assistance.
1. Importing Obi Rope asset to my VR project as well as to blank project (Unity 2018.2.10f1) causes many warnings and errors. (error1.jpg errror2.jpg error3.jpg)
Should I be worried about this?
Using the asset also causes errors, like when I duplicated an Obi Rope element (error4.jpg).
2. I noticed that adding a new rope causes a massive fps drop. Having couple dozen ropes with defult lenght, thickness 0,01 ,42 particles and damping 0,94 in a scene leads to less than 20 fps. I occurred to me that ObiSolver.FixedUpdate for every rope happens in Main Thread. Does Obi Rope not make use of multiple core processors? Is everything being done using only one? Additionally, I discovered that a CPU usage is almost the same whether Obi rope is enabled or not. (Obi rope usage1.jpg, Obi rope usage2.jpg)
3. In order to make a rope the stiffest (to simulate e.g. a HDMI cable), what settings should be set on? I experimented with damping, but the results were rather disappointing.
4. Based on the documentation, as I understand, every rope should have its own component Obi Rope, Obi Solver and ObiBezier or ObiCatmullRom?
1. Restart Unity after importing ObiRope to make the .dll error go away. Unity cannot hotload native plugins (.dll, so, bundle, etc), it requires a restart.
The second error is a bug in Unity, has nothing to do with Obi. Fortunately, you can safely ignore it:
https://issuetracker.unity3d.com/issues/...or-message
2. It depends on what update mode you're using, and what your timestep is. The default is FixedUpdate, with a timestep of 0.02. This might cause FixedUpdate() to be called more than once per frame, which can result in death spiralling.
Obi is fully multithreaded (it uses a job-stealing task manager to automatically distribute the workload among cores) and uses SIMD for math operations.
3. Increase distance constraint iterations, increase the amount of substeps, or reduce the timestep. Increasing damping simply decreases the amount of kinetic energy of particles (making everything look like it is underwater, or moving trough very thick air), it has nothing to do with rope stiffness.
See:
http://obi.virtualmethodstudio.com/tutor...gence.html
http://obi.virtualmethodstudio.com/tutor...olver.html
You can also use tether constraints if some parts of your cables are fixed/pinned:
http://obi.virtualmethodstudio.com/tutor...aints.html
4. Nope. You can (and usually do) have one solver shared by many ropes, to better utilize resources. Also, you can have only one ObiBezier/ObiCatmullRom shared by many ropes. The solver is in charge of simulating the ropes and managing particles/constraints, the bezier/catmullrom curves are "blueprints" that define the shape of a rope.