|
|
How to avoid saving mesh to scene file |
Posted by: imtzo - 22-09-2023, 10:16 PM - Forum: Obi Rope
- Replies (6)
|
 |
Hello,
How can I get Obi Rope to not persist the mesh within the scene? Every time I open/save my scene containing Obi Rope, the scene contains changed lines from the mesh apparently being regenerated/updated, which becomes cumbersome to discard in order to keep source control commits clean.
Thanks!
|
|
|
Rope centre control |
Posted by: Alexander34 - 21-09-2023, 05:48 PM - Forum: Obi Rope
- Replies (3)
|
 |
Hello again. In my game there is an ObiRope stretched between two players. It can be lengthened and shortened (I do this thanks to cursor). I'm having trouble taking the centre of the rope and using DOTWEEN to animate moving the centre of the rope (like a hitch) to a certain position, with the characters hanging from both sides. Let me give you an example where you use a stick to lift the rope in the middle of its length. What is the best way to realise this? I created a group of particles and attached it to an empty object with components rigitBody and ObiCollider, but when you resize the rope via cursor this group of particles may disappear and when you increase the rope the attachment.target object appears outside the unity coordinates. In any case I think it is not the best idea to use particlesGroup on a rope dynamically changing its length. Maybe someone can tell me how to realise this feature in a stable way?
I also need the other player not to be suspended and be able to adjust the length of the rope while on one side of the chasm, while the other player can swing while hanging on his half of the rope above the chasm.
|
|
|
Runtime rope deserialization issue |
Posted by: aderae - 18-09-2023, 01:48 PM - Forum: Obi Rope
- Replies (6)
|
 |
Hello,
I have a couple of player modified ropes that are generated in runtime. When the game is saved, I serialize the actor particles positions, velocities and rotations through the solver. When game is loaded, I create the same rope and load the particle data like this:
Code: solver.positions.SetVector3(i, ParticlePositions[i]);
solver.velocities.SetVector3(i, ParticleVelocities[i]);
solver.angularVelocities.SetVector3(i, ParticleAngularVelocities[i]);
However the moment game is loaded and ObiFixedUpdater started running, my data gets overriden. If I wait for example 2-3 seconds before setting these parameters the rope is already initialized and then after setting these, it works as expected.
Is there any way that I can do this without waiting 2-3 seconds? I tried hooking on OnEndStep of the rope and doing the change there and I tried forcefully stepping the ObiFixedUpdater after I create the rope but none seems to be working.
Thanks in advance!
|
|
|
Can I tuck up the character's Cloth? |
Posted by: Cat3Man - 17-09-2023, 08:20 AM - Forum: Obi Cloth
- Replies (2)
|
 |
Sorry, my English is poor. I am wondering about buying Obi Cloth. In a game I am working on, there is a scene where the patient's shirt is pulled up to his chest.
The patient may be lying on his back, on his side, or in several other positions, and I want to use Obi Cloth's real-time simulation to achieve realistic shirt lifting. The shirt does not have to be removed completely; it only has to be lifted up to the chest area.
I have watched all the tutorials and Obi Particle Dragger is the closest to what I am looking for in terms of functionality. However, I wasn't sure, so I asked the question.
|
|
|
Is it possible to call an OBIClothRenderer BakeMesh method |
Posted by: michendo - 17-09-2023, 02:09 AM - Forum: Obi Cloth
- Replies (4)
|
 |
Is it possible to call the Obi Cloth Renderer "Bake Mesh" function from code?
Reason:
I have a complex inflating cloth object that is too slow to use OBI at run time when playing the game. So instead I want to perform the inflation in development version (slowly) and bake around 60 meshes, which I can then cycle through at runtime. So the OBI calculations will not happen at run time, I will just use the baked meshes.
Q1. To achieve this, I want to be able to spawn 60 meshes from code at various periods. Is there a way to call this method from code?
Q2. Is there a way to detect that the Solver sleep threshold has been met and the solver is asleep? This is the point in time I want to generate the baked mesh, then increase the inflation to capture the next frame.
Regards,
Michendo
|
|
|
Adding Solvers to Obi Updaters at Runtime |
Posted by: scionious - 16-09-2023, 07:19 PM - Forum: Obi Cloth
- Replies (6)
|
 |
Hey there!
I have enemies (ships on the ocean) that spawn in dynamically and I'd like to add their various cloth solvers (there are about 6 solvers per enemy) to an Obi Updater component in the scene (fixed update). And I'm also concerned about frame rate stuttering when enemies load in and out of the scene (since we are also planning to use dynamic loading in the scene to save on memory and compute as the player explores an open-world map).
How would I go about getting the solvers to dynamically add themselves and remove themselves from this master obi fixed update component at runtime?
(Amazing asset by the way. I have 66 cloth solvers simulating cloth physics on some single-sided low poly sails on ships, and I'm using the proxy feature to get two-sided cloth working with proper lighting on each side) running in realtime at the moment, and it takes about 2ms of the frame.)
|
|
|
How to low the particles on skinned cloth |
Posted by: betoxproduction - 15-09-2023, 01:03 AM - Forum: Obi Cloth
- Replies (2)
|
 |
Hi. I used this tutorial (https://www.youtube.com/watch?v=usXaFr6N630) to make a shirt with skinned cloth, which works perfectly, but I need to lower the particles. How can I do that?
I tried to use the proxy setup, but it didn't work.
I tried to:
1. Using my low poly mesh with obi skinned cloth and the same mesh as a skinned cloth blueprint and using the high poly t-shirt as a render mesh with the proxy cloth; but that equal to error :
Code: IndexOutOfRangeException: Index was outside the bounds of the array.
Obi.ObiClothProxy.UpdateSkinning (Obi.ObiActor actor) (at Assets/Obi/Scripts/Cloth/Rendering/ObiClothProxy.cs:128)
Obi.ObiClothRendererBase.UpdateRenderer (Obi.ObiActor actor) (at Assets/Obi/Scripts/Cloth/Rendering/ObiClothRendererBase.cs:204)
Obi.ObiSkinnedClothRenderer.UpdateRenderer (Obi.ObiActor actor) (at Assets/Obi/Scripts/Cloth/Rendering/ObiSkinnedClothRenderer.cs:64)
Obi.ObiActor.Interpolate () (at Assets/Obi/Scripts/Common/Actors/ObiActor.cs:1221)
Obi.ObiSolver.Interpolate (System.Single stepTime, System.Single unsimulatedTime) (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1670)
Obi.ObiUpdater.Interpolate (System.Single stepDeltaTime, System.Single accumulatedTime) (at Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:132)
Obi.ObiLateFixedUpdater.Update () (at Assets/Obi/Scripts/Common/Updaters/ObiLateFixedUpdater.cs:80)
2. Using both the proxy and the high with skinned however nothing happens, in this thread, Jose explains why (http://obi.virtualmethodstudio.com/forum...ight=proxy)
3. Using the low poly version to render a mesh with obi cloth, like this tutorial (https://www.youtube.com/watch?v=IWXSJJAu0dM) but the mesh collider don't support deformations, Jose explains why in this thread (http://obi.virtualmethodstudio.com/forum...-3869.html)
also in this thread, Jose mentioned that it's possible to achieve using distance fields, I tried this way:
decomposing my character's body into independent parts and creating and distance field collider for each one, then creating my obi cloth with the low poly mesh like the tutorial, but just like the mesh collider, the distance field doesn't move with the skeleton.
4. I also tried using the softbody to generate a low particle blueprint using the high-skinned mesh, but the particles are generated randomly over the surface area and it doesn't work properly.
Also reading some random threads and not looking for errors I found this (http://obi.virtualmethodstudio.com/forum...-3843.html) where Jose claims that not only is Obi incapable of creating character clothing without skinning, but so are all the graphics engines.
Any Ideas of what can I do?
|
|
|
|