Obi Official Forum
obi rope generating - Printable Version

+- Obi Official Forum (http://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (http://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (http://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: obi rope generating (/thread-3156.html)



obi rope generating - Hoomann - 28-10-2021

hi there..my character runs forward and each time it hits something a rope will be generated connecting from character to it and as you go forward the length should increase.
1- since level length is increasing is there going to be a decrease in performance since you may get multiple ropes and they're all getting longer?
2- when rope is generated for a moment it seems it's initial length is too much for a short distance between character and object, is there a way to shorten initial length of the rope?


RE: obi rope generating - josemendez - 28-10-2021

(28-10-2021, 11:32 AM)Hoomann Wrote: hi there..my character runs forward and each time it hits something a rope will be generated connecting from character to it and as you go forward the length should increase.
1- since level length is increasing is there going to be a decrease in performance since you may get multiple ropes and they're all getting longer?
2- when rope is generated for a moment it seems it's initial length is too much for a short distance between character and object, is there a way to shorten initial length of the rope?

1- Yes: if rope length increases and the amount of ropes increases, the cost of simulation will increase too. There's no way around this, it's a basic consequence of how spatial discretization in physics works. The same will happen in any physics engine you use, not just Obi.

You'll have to come up with ways to reduce workload, custom-tailored to your game's use case: prune away ropes that have the least impact on results, shorten ropes that have become too long, etc.

2.- The initial length (aka, rest length) of he rope is determined by the blueprint you're using. You can change the blueprint length and shape at will in the blueprint editor.

At runtime, ropes might not be able to reach their rest length (or initial length) and droop/stretch a bit too much: solver settings may be a too conservative and as a consequence, the rope will stretch. Using more distance constraint iterations will improve quality, reducing spurious stretching. The manual contains an very in-depth explanation of how the solver works, and how iterations and substeps affect the results. See: http://obi.virtualmethodstudio.com/manual/6.2/convergence.html


RE: obi rope generating - Hoomann - 28-10-2021

(28-10-2021, 11:55 AM)josemendez Wrote: 1- Yes: if rope length increases and the amount of ropes increases, the cost of simulation will increase too. There's no way around this, it's a basic consequence of how spatial discretization in physics works. The same will happen in any physics engine you use, not just Obi.

You'll have to come up with ways to reduce workload, custom-tailored to your game's use case: prune away ropes that have the least impact on results, shorten ropes that have become too long, etc.

2.- The initial length (aka, rest length) of he rope is determined by the blueprint you're using. You can change the blueprint length and shape at will in the blueprint editor.

At runtime, ropes might not be able to reach their rest length (or initial length) and droop/stretch a bit too much: solver settings may be a too conservative and as a consequence, the rope will stretch. Using more distance constraint iterations will improve quality, reducing spurious stretching. The manual contains an very in-depth explanation of how the solver works, and how iterations and substeps affect the results. See: http://obi.virtualmethodstudio.com/manual/6.2/convergence.html
1- how about when each rope reaches a specific length it starts decreasing from the other end with the speed its increasing from character. is it possible? does it do the job?


RE: obi rope generating - josemendez - 28-10-2021

(28-10-2021, 12:33 PM)Hoomann Wrote: 1- how about when each rope reaches a specific length it starts decreasing from the other end with the speed its increasing from character. is it possible? does it do the job?

Yes it's possible: just have two cursors, one adds rope while the other removes it from the other end. But whether or not it solves the problem depends a lot on the specifics of your use case. For instance, if your rope needs to be attached to the character at one end and to some fixed object at the other end, this obviously won't work: there needs to be rope between the full distance between the object and the character, you can't shorten it as it would detach.


RE: obi rope generating - Hoomann - 28-10-2021

(28-10-2021, 12:40 PM)josemendez Wrote: Yes it's possible: just have two cursors, one adds rope while the other removes it from the other end. But whether or not it solves the problem depends a lot on the specifics of your use case. For instance, if your rope needs to be attached to the character at one end and to some fixed object at the other end, this obviously won't work: there needs to be rope between the full distance between the object and the character, you can't shorten it as it would detach.
yes that's the case...it's attached to an object at both ends all the time
i guess i have to make some changes to the game itself then.
thanks anyway for your time