Posts: 6
Threads: 1
Joined: Oct 2022
Reputation:
0
30-10-2022, 08:35 PM
(This post was last modified: 30-10-2022, 08:35 PM by MarieGrasmeier.)
Hi José,
been trying out obi rope for the entire day now and facing a lot of difficulties (as seems to be normal when new to it if I understand from this forum here :-)).
One issue is: I set up a rope in a test project (actually modified the fire hose sample by removing the pump script which I do not need). Everything looked quite nice in the test project. The I turned it into a prefab and imported it to an existing project: The problem: in this project, the rope (hose) is not affected by gravity, it just stays up in the air where it is.
I am not super sure if this is even an obi rope specific question but since it is not a rigidbody I am somehow lost and do not have an idea where to look for a solution. So please apologize in case this might be super off-topic.
Many thanks and best wishes,
Marie
Posts: 6,348
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
31-10-2022, 08:04 AM
(This post was last modified: 31-10-2022, 08:22 AM by josemendez.)
(30-10-2022, 08:35 PM)MarieGrasmeier Wrote: Hi José,
been trying out obi rope for the entire day now and facing a lot of difficulties (as seems to be normal when new to it if I understand from this forum here :-)).
Hi Marie,
Obi is a rather large engine, aimed at intermediate-advanced developers. So it's not uncommon to struggle with it at first, specially if you don't have a fair bit of experience with physics simulation. Rest assured that over time you'll get the hang of it, and I'm here to help.
(30-10-2022, 08:35 PM)MarieGrasmeier Wrote: One issue is: I set up a rope in a test project (actually modified the fire hose sample by removing the pump script which I do not need). Everything looked quite nice in the test project. The I turned it into a prefab and imported it to an existing project: The problem: in this project, the rope (hose) is not affected by gravity, it just stays up in the air where it is.
I am not super sure if this is even an obi rope specific question but since it is not a rigidbody I am somehow lost and do not have an idea where to look for a solution. So please apologize in case this might be super off-topic.
Many thanks and best wishes,
Marie
In your case, chances are the solver's sleep threshold is keeping the rope asleep. The sleep threshold is a kinematic energy threshold (1/2 mv^2) so if the velocity of your rope is small, gravitational acceleration is small, the project's timestep is small, or the mass of the particles is small, the default threshold value will put them to sleep immediately.
Simply try reducing the sleep threshold, that should help. You can even set it to zero if you don't want particles to ever become asleep. See:
http://obi.virtualmethodstudio.com/manua...olver.html
kind regards,
Posts: 6
Threads: 1
Joined: Oct 2022
Reputation:
0
31-10-2022, 09:34 AM
(This post was last modified: 31-10-2022, 09:34 AM by MarieGrasmeier.)
Many thanks for your prompt reply.
Quote:Obi is a rather large engine, aimed at intermediate-advanced developers. So it's not uncommon to struggle with it at first, specially if you don't have a fair bit of experience with physics simulation. Rest assured that over time you'll get the hang of it, and I'm here to help.
Yeah, I wish I had done may PhD in physical sciences now
Quote:In your case, chances are the solver's sleep threshold is keeping the rope asleep. The sleep threshold is a kinematic energy threshold (1/2 mv^2) so if the velocity of your rope is small, gravitational acceleration is small, the project's timestep is small, or the mass of the particles is small, the default threshold value will put them to sleep immediately.
Unfortunately, it seems that it is not the sleep threshould. I made it very small and finally set it to zero to test it. No effect.
Could it be that I somehow accidentally disabled gravity for the rope?
And finally: thank you so much for this great support form and your work here. That is really amazing!
Many thanks and best wishes,
Marie
Posts: 6,348
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
31-10-2022, 09:40 AM
(This post was last modified: 31-10-2022, 09:54 AM by josemendez.)
(31-10-2022, 09:34 AM)MarieGrasmeier Wrote: Yeah, I wish I had done may PhD in physical sciences now
Knowing basic real-world physics of course helps (it's important to understand the basics like velocities, accelerations, forces, and mass) but often it's a matter of understanding how simulation works in games in general. Concepts like timestepping, vector spaces and kinematics/dynamics are paramount not just for using Obi, but for most other physics engines. You can make a basic stack of boxes in Unity or a simple rope in Obi without the need to understand these, but as soon as you start trying more complex stuff you'll hit a wall unless you're familiar with these concepts.
(31-10-2022, 09:34 AM)MarieGrasmeier Wrote: Unfortunately, it seems that it is not the sleep threshould. I made it very small and finally set it to zero to test it. No effect.
Are you sure the solver is being updated at all? That sounds like there's no updater component in the scene. If a solver is not included in an updater, it won't be simulated.
Solvers determine where a simulation takes place, Updaters determine when. Both are equally important: if either of them is absent, there will be no simulation. See: http://obi.virtualmethodstudio.com/manua...aters.html
Also taking a look at the overall engine architecture may help:
http://obi.virtualmethodstudio.com/manua...cture.html
Note: when you create a Solver component using Unity's menus, a ObiFixedUpdater component is automatically created for you if there's none in the scene yet, and the solver is included in it. If you've copied a solver from another scene, you might have forgotten to copy the updater from that scene, or to create a new one yourself in the new scene. This could explain your situation.
(31-10-2022, 09:34 AM)MarieGrasmeier Wrote: And finally: thank you so much for this great support form and your work here. That is really amazing!
You're welcome! this is my job and I give it my all
kind regards,
Posts: 6
Threads: 1
Joined: Oct 2022
Reputation:
0
(31-10-2022, 09:40 AM)josemendez Wrote: Are you sure the solver is being updated at all? That sounds like there's no updater component in the scene. If a solver is not included in an updater, it won't be simulated.
There is a fixed updater with 4 substeps. The solver is referenced in the updater.
Fixed timesteps in the project settings is 0.02.
So it seems that is not the solution to the mystery.
The simulation is running at about 60 FPS so there should be no issue with perfomance lagging, too.
For testing, I attached a sphere to the end of the rope using dynamic particle attachment.
The sprere has a rigidbody (non-kinematic), an obi rigidbody, sphere collider, and an obi sphere collider.
When playing, the sphere falls down to the floor due to gravity without affecting the rope at all.
Posts: 6,348
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(31-10-2022, 11:03 AM)MarieGrasmeier Wrote: There is a fixed updater with 4 substeps. The solver is referenced in the updater.
Fixed timesteps in the project settings is 0.02.
So it seems that is not the solution to the mystery.
The simulation is running at about 60 FPS so there should be no issue with perfomance lagging, too.
For testing, I attached a sphere to the end of the rope using dynamic particle attachment.
The sprere has a rigidbody (non-kinematic), an obi rigidbody, sphere collider, and an obi sphere collider.
When playing, the sphere falls down to the floor due to gravity without affecting the rope at all.
I'm out of ideas then. Could you share this scene with me so that I can take a look, by sending it to support(at)virtualmethodstudio.com? thanks!
Posts: 13
Threads: 4
Joined: Oct 2022
Reputation:
3
(31-10-2022, 11:03 AM)MarieGrasmeier Wrote: There is a fixed updater with 4 substeps. The solver is referenced in the updater.
Fixed timesteps in the project settings is 0.02.
So it seems that is not the solution to the mystery.
The simulation is running at about 60 FPS so there should be no issue with perfomance lagging, too.
For testing, I attached a sphere to the end of the rope using dynamic particle attachment.
The sprere has a rigidbody (non-kinematic), an obi rigidbody, sphere collider, and an obi sphere collider.
When playing, the sphere falls down to the floor due to gravity without affecting the rope at all.
Just to rule it out, is the particle attachment point attached to the correct particle group? Also a pretty new user, and had similar issues with attachments not working as expected.
Posts: 6
Threads: 1
Joined: Oct 2022
Reputation:
0
31-10-2022, 03:44 PM
(This post was last modified: 31-10-2022, 03:45 PM by MarieGrasmeier.)
(31-10-2022, 02:32 PM)MEPETAMINALS Wrote: Just to rule it out, is the particle attachment point attached to the correct particle group? Also a pretty new user, and had similar issues with attachments not working as expected. Many thanks. I think yes. It is attached to the end control point of the rope.
(31-10-2022, 11:04 AM)josemendez Wrote: I'm out of ideas then. Could you share this scene with me so that I can take a look, by sending it to support(at)virtualmethodstudio.com? thanks!
Hi José,
many thanks for your effort. Will do that.
|