Obi Official Forum
Help Error with more than 11 Obi Solvers in a Scene - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Help Error with more than 11 Obi Solvers in a Scene (/thread-3042.html)



Error with more than 11 Obi Solvers in a Scene - Gartenschere - 03-08-2021

I get an input velocity of NaN (see Detailed Errorwhen I have more than 11 Obi Solvers assigned to an Obi Fixed Updater in one scene.

I want to have several boats in one scene and these boats can tow other objects with ropes. That's why I have an Obi Solver for every boat. It all works up to that point, but nothing works anymore when I have more than 11 boats.

Is there a maximum of  Obi Solvers you can have in one scene and I so, what is an alternative way to implement my towing boats? 
Thanks in advance!


Detailed Error:

Quote:rigidbody.velocity assign attempt for 'BoatSimple' is not valid. Input velocity is { NaN, NaN, -735136576.000000 }.
UnityEngine.Rigidbody:set_velocity (UnityEngine.Vector3)
Obi.ObiRigidbody:UpdateVelocities (UnityEngine.Vector3,UnityEngine.Vector3) (at Assets/Obi/Scripts/Common/Collisions/ObiRigidbody.cs:62)
Obi.ObiColliderWorld:UpdateRigidbodyVelocities (System.Collections.Generic.List`1<Obi.ObiSolver>) (at Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs:428)
Obi.ObiUpdater:EndStep (single) (at Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:96)
Obi.ObiFixedUpdater:FixedUpdate () (at Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:52)


How to reproduce:
  • A Cube with BoxCollider, Rigidbody, Obi Rigidbody, and Obi solver (all components with default values)
  • Duplicate this cube 11 times to a total of 12 of these cubes in the scene
  • An Empty Gameobject with Obi Fixed Updater
  • Apply all Obi Solvers from the cubes to the Obi fixed updater



RE: Error with more than 11 Obi Solvers in a Scene - josemendez - 04-08-2021

Hi there,

Tried to reproduce using the steps provided (cubes with ObiRigidbody, ObiSolver, all added to the same FixedUpdater), but I'm unable to. Tried 11, 12, 16, 32 and 64 solvers, no NaN values emerge in either the Burst or the Oni backend. There's no reason why an updater would only accept a fixed number of solvers.

[Image: ZQD8LXQ.png]

Also tried duplicating the solvers in the sample scenes, but I can get an arbitrary number of them running without adverse effects.

Make sure you're not including solvers more than once in the updater, otherwise they will be updated multiple times. This is warned against in the manual:
http://obi.virtualmethodstudio.com/manual/6.2/updaters.html

If the issue persists, would it be possible for you to share your project to support(at)virtualmethodstudio.com so that I can take a look?

kind regards,


RE: Error with more than 11 Obi Solvers in a Scene - Gartenschere - 04-08-2021

That's really strange...
I reproduced the Error in a new empty project and now I need 16 Obi Solvers until the errors appear…

I send you an E-Mail with this project and hopefully, you can reproduce the error.
Also, I attached a Video prove of how I get the Error with the project I send you.





Thank you for your help.


RE: Error with more than 11 Obi Solvers in a Scene - josemendez - 05-08-2021

Hi,

Tried the project you sent, but I'm unable to reproduce any errors in it either. Tried in Windows 10 and MacOS Catalina.

There's a very strange thing in your video: all settings in the solver are set to zero, and some don't even have a slider knob visible in the UI. This is definitely not normal, since the default values for all parameters are set by Unity when creating a new component. Most of them should not be zero, and all of them should be visible. Depending on what values the invisible sliders have, this could be related to the NaN issue.

Is this a new, empty project where you installed Obi?


RE: Error with more than 11 Obi Solvers in a Scene - josemendez - 05-08-2021

So I tried the project in the exact same Unity version you used, 2019.4 (tried in 2020.1 before) and I can reproduce both the weird UI with missing slider knobs, zero values in all parameters and the NaN errors. No idea where these come from, since adding a new Solver component sets all the correct default values.

Updating from Obi 6.0.1 to the latest version (6.2) fixed both issues for me.

I suspect this has something to do with Unity's serialization gone rogue and replacing all values with zeros for some reason. Some of these values -specially max anisotropy- must have a minimum value of 1, since they're used as divisors and might cause NaNs internally if set to zero (division by zero results in NaN). Updating the asset could have forced Unity to replace the serialized values with the proper default ones, but this is just a guess.

Let me know if updating fixes this for you too.

kind regards,


RE: Error with more than 11 Obi Solvers in a Scene - Gartenschere - 09-08-2021

Hi,

Updating to the latest version (6.2) fixed all issues for me.

Very strange ... I got the Error and that all settings in the solver are set to zero also when I spawned a prefab in which the settings were definitely not zero, but when spawned turned to zero ...

But I could not reproduce the error with the latest Obi version 6.2. So that was an easy fix Gran sonrisa.


Thank you very much for your help and time!