Latest Threads |
Stretching verts uniforml...
Forum: Obi Softbody
Last Post: Aroosh
Yesterday, 05:32 AM
» Replies: 0
» Views: 83
|
Scripting rod forces
Forum: Obi Rope
Last Post: chenji
11-09-2025, 01:15 PM
» Replies: 25
» Views: 2,809
|
Burst error causing crash...
Forum: Obi Rope
Last Post: josemendez
10-09-2025, 07:03 AM
» Replies: 1
» Views: 201
|
Controlling speed of emit...
Forum: Obi Fluid
Last Post: josemendez
06-09-2025, 06:29 AM
» Replies: 1
» Views: 456
|
Looks nice on editor but ...
Forum: Obi Fluid
Last Post: josemendez
04-09-2025, 07:20 AM
» Replies: 3
» Views: 702
|
How to Shorten or Scale t...
Forum: Obi Rope
Last Post: josemendez
02-09-2025, 09:53 AM
» Replies: 5
» Views: 789
|
The Limitation of Using O...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 10:30 PM
» Replies: 1
» Views: 527
|
Bug Where a Straight Segm...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 08:46 PM
» Replies: 1
» Views: 500
|
Having an issue with obi ...
Forum: Obi Rope
Last Post: Ben_bionic
29-08-2025, 04:23 PM
» Replies: 4
» Views: 998
|
Non-uniform particle dist...
Forum: Obi Rope
Last Post: chenji
29-08-2025, 09:05 AM
» Replies: 4
» Views: 848
|
|
|
Compile Error: invalid subscript '_ShadowCoord' |
Posted by: Quidam - 07-03-2018, 06:50 PM - Forum: Obi Fluid
- No Replies
|
 |
I'm using Unity 2017.3.1.f1.
In searching for this error, I see it was mentioned in the Obi Rope forum in late January. I checked the suggested solution and it appears that they are as they should be:
"Obi/Resources/ObiMaterials/ParticleShader.shader, line 20 should look like this:
#pragma multi_compile_fwdbase nolightmap"
The error follows:
Shader error in 'Obi/Particles': invalid subscript '_ShadowCoord' at line 82 (on d3d11)
Compiling Vertex program with DIRECTIONAL SHADOWS_SHADOWMASK LIGHTPROBE_SH
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING
|
|
|
Scripting pinconstraints on 2 non-kinematic rigidbodies |
Posted by: ibbybn - 07-03-2018, 05:35 PM - Forum: Obi Rope
- Replies (1)
|
 |
Here's my current code to change the pinconstraints during runtime:
Code: rope.PinConstraints.RemoveFromSolver (null);
ObiDistanceConstraintBatch distConstraints = rope.DistanceConstraints.GetFirstBatch ();
ObiPinConstraintBatch pinConstraints = rope.PinConstraints.GetFirstBatch ();
pinConstraints.Clear ();
Oni.SetParticlePositions (
rope.Solver.OniSolver,
new Vector4[] { new Vector4 (SubStart.transform.position.x, SubStart.transform.position.y, SubStart.transform.position.z, 1) },
1,
distConstraints.springIndices[0]
);
pinConstraints.AddConstraint (distConstraints.springIndices[0], SubStart.GetComponent<ObiColliderBase> (), Vector3.zero, 1);
Oni.SetParticlePositions (
rope.Solver.OniSolver,
new Vector4[] { new Vector4 (contactPoint.x, contactPoint.y, contactPoint.z, 1) },
1,
distConstraints.springIndices[distConstraints.springIndices.Count - 1]
);
pinConstraints.AddConstraint (distConstraints.springIndices[distConstraints.springIndices.Count - 1], Obj.GetComponent<ObiColliderBase> (), Vector3.zero, 1);
rope.PinConstraints.AddToSolver (null);
It works fine as long as one object I attach them to is kinematic for particles but as soon as I want both objects to be non kinematic in the rigidbody and in the obirigidbody the particles don't follow the object anymore. Not sure what I'm doing wrong right now?
Btw, there was also an error when attaching from the Rigidbody about it's velocities beeing set to NaNs.
I added a float.isNan check in the ObiRigidbody to get rid of it.
Using 3.3.1 with Unity 2017.3
Just found a workaround:
Making one of the objects kinematic for particles when adding the pinconstraints then afterwards make it nonkinematic. Still a bit odd that you need to trick it like this?
EDIT:
Actually that workaround only works sometimes?
Also just found out it doesn't happen in a scene with just two spheres with the same script etc.. so still bug hunting.
EDIT2:
Ok the problem was that I used ObiColliders as pintargets which were slightly inside another ObiCollider with a coll layer which the solver takes into account.
Apparently the solver tries to solve this for a second and then stops.
|
|
|
Soft body deform issue |
Posted by: Nikowill - 06-03-2018, 12:32 AM - Forum: Obi Cloth
- Replies (1)
|
 |
Hello,
I'm trying to use the OBI to simulate the artery and aneurysm, and facing a problem that really hard to solve, hope if anyone can help me out.
What I'm trying to do is aneurysm clipping, use the clip on the aneurysm and it will deform when I clip it, the old way I'm doing it by direct moving the vertex in vertex shader, which works but not realistic enough. So I bought OBI cloth and trying to use physic to simulate this. The picture below shows how old way works.
![[Image: ?ui=2&ik=64cd0510ea&view=fimg&th=161f855...&zw&atsh=1]](https://mail.google.com/mail/u/0/?ui=2&ik=64cd0510ea&view=fimg&th=161f8555d9c6cd21&attid=0.1&disp=emb&realattid=ii_jeeta82b0_161f8552d8f14fb5&attbid=ANGjdJ_hwhgO9ZOp9Wu1y5_Jkc6SuK9gJVfcqUzOEzpvuZpbG6EUZHMciGLVJfB_rRrIKNTCk-I-vWNMShe1bkJNWZyv8Uo9jYR9n60qp5AFGHbAaQ7GM0FktykM_JA&sz=w1088-h510&ats=1520289801629&rm=161f8555d9c6cd21&zw&atsh=1)
![[Image: ?ui=2&ik=64cd0510ea&view=fimg&th=161f855...&zw&atsh=1]](https://mail.google.com/mail/u/0/?ui=2&ik=64cd0510ea&view=fimg&th=161f8555d9c6cd21&attid=0.2&disp=emb&realattid=ii_jeeta82k1_161f8552d8f14fb5&attbid=ANGjdJ_2ntH76FEmk1FV0Sf8kpSKUvk0nXxPP1jIONris_vO4nb2yXHdPtH9t1VDyibtKG3fOuVhxlGb9Cj3plTpy5-rRQAZSwEfj2DyHXKHKTZYo1zqsD-lWzHGN_g&sz=w1088-h516&ats=1520289801629&rm=161f8555d9c6cd21&zw&atsh=1)
Here is the problems I encountered:
1) when I set up a obi version soft body, its too soft I have to increase iteration and add a bunch of constrains to make it looks real, which kills the performance. I'm using a 400 vertex mesh as particle base and use a 1300 vertex mesh as proxy. Is there any solution which can find a balance between visual and performance?
2) when I add some obi collider on the clip is not working, my clip is moved by Unity physic, and I have a hierarchy of rigidbody and fixed joint on it to work with clipholder. Any idea how to set up the obi collider to work with unity physic joint and rigidbody?
3) I'm trying to use two obi colliders(move by transform) to squeeze this soft body, it works when the collider is big enough, if the collider is the same size of the clip(which is small) soft body just go through the collider when I try to clip it. Any idea how to improve the collision detection with small colliders?
4) When I trying to make the soft body more rigid and looks real when I touch it, it seems hard to deform as I expected. When I trying to make it deform realistic, I have to make it very soft, which looks too soft when I touch it. It seems have a paradox between these two situations. Any idea how to solve this?
It will be great appreciated if anyone can help me solve this out!
|
|
|
Rope 'jumps' when a particle is added or removed |
Posted by: Wilbert - 05-03-2018, 10:28 AM - Forum: Obi Rope
- Replies (3)
|
 |
I've created a system with four Obi Rope cables and a hook for a crane simulation.
When I change the length of the rope, each time a particle is added or removed the rope makes a jump.
See video:
I'm using this code to change the length of the cables:
Code: float flCableLength = rsc.rpcCablesOuter[0].GetComponent<ObiRope>().RestLength + Input.GetAxis("Hoist") * flHoistSpeed;
foreach (ObiRopeCursor rpc in rsc.rpcCablesOuter) rpc.ChangeLength(flCableLength);
How can I prevent the 'jumping' ?
|
|
|
fluid particles not falling |
Posted by: musab - 01-03-2018, 09:36 PM - Forum: Obi Fluid
- Replies (2)
|
 |
ive added an emitter and it emits particles , but the particles arent getting affecting by gravity for some reason they are just stuck where they got emitted
please help
|
|
|
|