|
|
Does both Obi Cloth and ObiRobe are needed to make a football net? |
Posted by: gabrimo - 12-04-2021, 03:04 PM - Forum: General
- Replies (4)
|
 |
Hello, I have some doubts regarding building a football net for my game.
The main one is presented on the title, does both plugins are necessary to build this?
Beyond that, what about performance (cause if these 2 plugins must be used together, maybe the performance overhead should be a concern here)?
And finally, how hard is to implement it for this particular use case (I'm not an expert programmer)?
My current project is just a penalty game for now, but the plan is to extend to other parts of the sport at some point. The ball is a rigidbody, using a standard sphere collider, with 0.22 scale and 0.43 of mass. The maximum speed of it is around 130 km/h for penalties. But this speed will be increased for free kicks (the most powerful shot recorded was fired at ~210km/h for instance). Additionally, I should add crowd and stadium model at some point, which means more stuff to be processed at runtime. The target platform is PC, but I would like to leave a conversion to mobile viable, if possible...
I would like to buy the/these asset(s) on this sale, Obi is expensive in my country thanks to the exchange, so I want to confirm that it will be a really useful for what I need...
It seems a very good asset by the way, I'm amazed by the results on the preview videos, congratulations!
|
|
|
Obi rod or obi rope? |
Posted by: AdrienMondot - 12-04-2021, 11:59 AM - Forum: Obi Rope
- Replies (2)
|
 |
Hello,
We are using Obi Rope & Rod objects to create worm-like creatures.
The Rods have been harder to setup, and we would be happy to have your feedback on the issues we encountered in order to choose whether we use them in our project, or just stick to Obi Ropes.
- When editing a path, the Rod seems to quickly add twists and distortions on the curves.
As you can see in the picture below, the wireframe of the rod shape suddenly rotates 180° in the middle, adding distortion to the mesh… this might be related to the varying thickness we applied to the different key points/particles ?
We do not seem to have this issue with Ropes, maybe as the particles are not oriented ?
- We cannot get the Rods to maintain their Rest shapes, in Play mode, they mostly seem to behave like Ropes (please see the attached video).
Is there any thing we could be missing in the way we build them ?
We followed the steps on your website, and made sure the “Keep Initial Shape” value is turned on in the BluePrint.
![[Image: rod-edit.png]](http://docs.am-cb.net/faune/rod-edit.png)
sample video here :
http://docs.am-cb.net/faune/Rod_shape.mov
Thanks in advance,
Best,
Adrien Mondot
|
|
|
Rope cursor jittering from strange spot |
Posted by: alehrecke - 09-04-2021, 03:41 PM - Forum: Obi Rope
- Replies (1)
|
 |
Hello,
I am trying to simulate the unrolling of a bobbin when a player moves the "bobbin" that the rope is attached to. I am planning to add more ropes to try and do a braiding simulation. I need each rope to have a cursor so that when they move around one another they wont stretch so much as to pass through one another.
I have a single rope set up and it is extruding properly in the beginning, but then begins to develop a kink at a spot that makes no sense (it could be the original length of the rope). I have played around with the cursor Mu and it seems to have no effect on this kink. Do you have any suggestions to make this more stable? Right now I am measuring the strain in the rope and if it is above 10% then I run the change length command. Overall, the rope is also quite jittery, which I would also like to try and reduce.
Here is a video of the defect.
And here is my bobbin controller script:
Code: using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Obi;
public class BobbinController : MonoBehaviour
{
public ObiRope rope;
public float speed = 1f;
Vector3 velocity;
Rigidbody rigidBody;
ObiRopeCursor cursor;
RuntimeRopeGenerator ropeGen;
//ObiSolver solver = FindObjectOfType<ObiSolver>();
float ropeLength;
// Start is called before the first frame update
void Start()
{
rigidBody = GetComponent<Rigidbody>();
cursor = rope.GetComponent<ObiRopeCursor>();
ropeLength = rope.restLength;
}
// Update is called once per frame
void Update()
{
Vector3 input = new Vector3(Input.GetAxisRaw("Horizontal"), 0, Input.GetAxisRaw("Vertical"));
Vector3 direction = input.normalized;
velocity = direction * speed;
float currentLength = rope.CalculateLength();
float restLength = rope.restLength;
float strain = currentLength/restLength;
if (strain > 1.1)
{
cursor.ChangeLength(rope.restLength + speed * Time.deltaTime);
}
else if (strain < 1)
{
cursor.ChangeLength(rope.restLength - speed * Time.deltaTime);
}
}
private void FixedUpdate()
{
rigidBody.position += velocity * Time.deltaTime;
}
Any help would be greatly appreciated.
|
|
|
Set Cloth Properties with script |
Posted by: orestissar - 08-04-2021, 02:33 PM - Forum: Obi Cloth
- Replies (9)
|
 |
Hello,
Im currently trying to create and assign a skinned cloth blueprint to some cloth parts i have in my scene.
I have succesfully managed to do this but im having some issues setting the cloth properties values with the script (skin backstop, backstopradius, radius).
Code: blueprint.inputMesh = mesh;
ObiSkinnedCloth obsc = childobject.AddComponent<ObiSkinnedCloth>() as ObiSkinnedCloth;
obsc.skinnedClothBlueprint = blueprint;
ObiSkinnedClothRenderer obscr = childobject.AddComponent<ObiSkinnedClothRenderer>() as ObiSkinnedClothRenderer;
The above code does what i explained before, but i need couple code lines to add the values i want for each property.
I found this relevant topic: http://obi.virtualmethodstudio.com/forum...-2405.html
but i cant make it work.
So, how do i manage that?
thanks beforehand!
|
|
|
Disable Softbody SOlver at Runtime |
Posted by: fluidman84 - 07-04-2021, 03:57 PM - Forum: Obi Softbody
- Replies (4)
|
 |
I have a skinned mesh character that uses both the Obi Softbody skinner component and then applies clothing utilizing the Obi Cloth simulation.
When both are applied at the same time, the individual solutions bounce off each other and create noise.
Is there a way that I can eliminate the interaction between these 2 simulations, or simply turn off the Softbody skinner when Obi cloth is on?
|
|
|
Why does setting InverseMass to zero on a single particle freeze all particles? |
Posted by: pushmatrix - 07-04-2021, 12:58 AM - Forum: Obi Fluid
- Replies (8)
|
 |
Hi there,
I'm trying to completely freeze some particles while making others still simulate. I adapted the script from (http://obi.virtualmethodstudio.com/tutor...icles.html) to target certain particles and stop them completely by setting their inverse mass to zero.
But what I'm finding is that any particles that come into contact with ones with inverse mass to zero come to a complete stop as well.
This even happens if I only set the invMass to zero on a single particle:
Code: actor.solver.invMasses[0] = 0;
I'm guessing if a particle touches a particle with infinite mass, something bugs out and causes everything to stop?
Here's a gif of one emitter shooting a stream onto currently frozen particles. As soon as the stream touches those frozen ones, they all freeze. Hmm. I would have expected the red stream to just collide ontop.
https://gfycat.com/tarttartcockatoo
Thanks for any insight!
|
|
|
Get position of particle at end of rope |
Posted by: cfinger - 07-04-2021, 12:41 AM - Forum: Obi Rope
- Replies (3)
|
 |
Hello,
I would like to find the position of the particle at one end of a rope, no matter how much it has been resized at runtime.
I have a rope with two control points and two particle attachments. The top attachment is static and the bottom is dynamic. I'm looking to reset an object to the end of the rope (on the dynamic attachment), and to do this I want to either move the rope to the object, or the object to the rope. They are both within close proximity of each other.
I tried to get the solver index of that particle using the rope's blueprint:
Code: int solverIndex = defaultRopeBlueprint.groups[1].particleIndices[0];
Vector3 worldPos = rope.GetParticlePosition(solverIndex);
This seemed to work, but if I change the length of the rope at runtime, I get a position that doesn't make sense.
I also tried the solution from this thread, which needed a bit of updating. I'm not sure if I'm doing this correctly. I am getting a solver index of 0 for both the first and last particle.
Code: ObiConstraintsBatch batch = (ObiConstraintsBatch)rope.GetConstraintsByType(Oni.ConstraintType.Distance).GetBatch(0);
int lastParticle = batch.particleIndices[(batch.constraintCount - 1) * 2 + 1];
int firstParticle = batch.particleIndices[0];
Vector3 worldPos = rope.GetParticlePosition(firstParticle);
//or
Vector3 worldPos = rope.GetParticlePosition(lastParticle);
Thank you!
|
|
|
|