Latest Threads |
ObiCloth going through co...
Forum: Obi Cloth
Last Post: Andreia Mendes
8 hours ago
» Replies: 0
» Views: 14
|
Unstable chain attachment
Forum: Obi Rope
Last Post: quent_1982
Yesterday, 12:00 PM
» Replies: 8
» Views: 161
|
Why does setting InverseM...
Forum: Obi Fluid
Last Post: nonnamed
13-05-2025, 12:41 PM
» Replies: 8
» Views: 11,708
|
Shaking problem when coll...
Forum: Obi Softbody
Last Post: webmagic
13-05-2025, 12:11 PM
» Replies: 6
» Views: 147
|
Obi Softbody IndexOutOfRa...
Forum: Obi Softbody
Last Post: Aroosh
11-05-2025, 11:37 AM
» Replies: 2
» Views: 149
|
Rope pinned to two dynami...
Forum: Obi Rope
Last Post: Crimson1462
09-05-2025, 07:51 PM
» Replies: 2
» Views: 224
|
Unity 6 Console Spam abou...
Forum: Obi Fluid
Last Post: josemendez
09-05-2025, 08:03 AM
» Replies: 3
» Views: 1,161
|
the Obi cloth has some co...
Forum: Obi Cloth
Last Post: josemendez
09-05-2025, 08:00 AM
» Replies: 2
» Views: 129
|
Hard crash in build after...
Forum: Obi Rope
Last Post: goldfire
04-05-2025, 10:10 PM
» Replies: 2
» Views: 265
|
Particle collision with s...
Forum: Obi Softbody
Last Post: Duncano
03-05-2025, 02:07 PM
» Replies: 2
» Views: 290
|
|
|
Adding pin constraints to a rope at runtime |
Posted by: Chilly5 - 17-03-2018, 01:12 PM - Forum: Obi Rope
- Replies (10)
|
 |
Hello,
I am working on a game in Unity where I want to add pin constraints all the way down the Obi Rope at runtime. Every unit of the rope should be covered with a constraint. The idea is that I'm attaching selectable colliders that can be "grabbed" by the player and then swung on.
I copied almost exactly the code from the "adding/removing constraints" page on the website here: http://obi.virtualmethodstudio.com/tutor...aints.html
Unity didn't like a few of the casts so I modified it slightly, but it's more or less the same.
Here's my current script:
Code: [SerializeField]
private GameObject _networkedGrabPoint;
private ObiRope _obiRope;
[SerializeField]
private List<GameObject> _chainLinks = new List<GameObject>();
[SerializeField]
private List<GameObject> _ropeLinks = new List<GameObject>();
void Start()
{
_obiRope = GetComponentInChildren<ObiRope>();
_chainLinks = _obiRope.chainLinks;
for (int i = 0; i < _obiRope.positions.Length; i++)
{
GameObject _ropeLink = GameObject.Instantiate(_networkedGrabPoint, transform);
_ropeLink.transform.localPosition = _obiRope.positions[i];
_ropeLinks.Add(_ropeLink);
}
}
void Update () {
if (Input.GetKeyDown(KeyCode.R))
{
ObiPinConstraints constraints = _obiRope.GetComponent<ObiPinConstraints>();
ObiPinConstraintBatch batch = constraints.GetBatches() as ObiPinConstraintBatch;
// remove the constraints from the solver, because we cannot modify the constraints list while the solver is using it.
constraints.RemoveFromSolver(null);
ObiCollider ropeLink = _ropeLinks[0].GetComponent<ObiCollider>();
batch.AddConstraint(0, ropeLink as ObiColliderBase, Vector3.zero, 1.0f);
// add all constraints back:
constraints.AddToSolver(null);
}
}
Almost word for word copied from what was given on the website. For some reason it didn't like the line "(ObiPinConstraintBatch)constraints.Getbatches()[0]" so I modified it to "constraints.GetBatches() as ObiPinConstraintBatch".
Right now, it's giving me a "null reference exception: object reference not set to an instance of an object" error on this line: batch.AddConstraint(0, ropeLink as ObiColliderBase, Vector3.zero, 1.0f);
I don't understand why. I checked the ObiColliderBase and it seems to definitely exist so I don't know why it would give me a null reference error there.
Any help would be very appreciated!
Thank you.
|
|
|
Rope twitching at 30 fps |
Posted by: Harpoon - 17-03-2018, 11:47 AM - Forum: Obi Rope
- Replies (5)
|
 |
Perhaps I'm doing something wrong but every time the FPS is below 60 the rope starts twitching.
Below is the example.
I've added some post processing to the camera to lower the fps.
|
|
|
Tips for improving performance? |
Posted by: CageyKG - 17-03-2018, 03:05 AM - Forum: Obi Rope
- Replies (2)
|
 |
Are there any general guidlines or tips to follow in order to reduce Obi Rope’s CPU footprint? Obi currently more than halves my framerate when simulating and I’m looking to get it back down to acceptable VR speed. It seems like most of it comes from updating obi colliders (ObiSolver.FixedUpdate.UpdateColliders is around 30% of frame’s total time.) I’ve been pretty fast and loose with adding obi colliders around since a lot of the game is very up close to the ObiRope cables and I wanted them to interact well with things inside the VR space. Do I need to be more sparing with these?
The other large chunk comes from rendering with ObiSolver.LateUpdate…ObiRopeThichRenderMode.Update being another 25% of my frame’s time. Smoothing seems like the main culprit (drops to aroung 7% when changing smoothing from max 3 down to 0), but decreasing it doesn’t have pleasing results. Should I be using higher cable resolution or some other method to achieve less angular cables instead?
It’s also a huge multiplier on the physics update, increasing it by at least 2 times when the solver is enabled, sometimes more (running on a timestep of .01 with the default 6 solver iterations). Is this just part of the deal when it comes to running this solver, or does it seem like that should be reducable somehow as well?
The scene in question has around 20 cables with an average of around 15 particles each, 4 pins constraints each, hierarchical tethers, and full smoothing/rendering. The solver is set to skip skin, volume, stitch, and density, but does everything else on Sequential settings with 5 iterations. Solver reports that it’s only using 466 particles total, which seems well within a reasonable range, hence my looking elsewhere for spots to improve performance.
|
|
|
holes on clothes |
Posted by: AnriCZ - 15-03-2018, 06:46 PM - Forum: Obi Cloth
- Replies (7)
|
 |
Hi!
I saw video on the youtube https://www.youtube.com/watch?v=sc6kq1TV8Ek. I am doing everything the same, but have a problem. When I activated animation in Unity, shorts are torn.
The same problem I see in DAZ when turn animation on.
When I change poses in DAZ also appear holes on clothes, but in 1 sec everything goes to normal and clothes puts on correctly.
I spent many hours in solving of this problem, but nothing.
Daz 4.10
Unity 201.3.1f1
Genesis 8
So, i was searching for alternative way for clothing and found your asset.
Questions:
1. Does it works with Daz3d genesis 8 models and clothing?
2. Will it solve my problems with holes?
|
|
|
Oculus support |
Posted by: mikechui - 15-03-2018, 12:17 PM - Forum: Obi Fluid
- Replies (3)
|
 |
Dear sir,
May I know if the plugin will work with Oculus rift and an imported 3D model with interaction like pouring water?
Best,
Mike
|
|
|
|