![]() |
|
Oculus and Softbodies - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Softbody (https://obi.virtualmethodstudio.com/forum/forum-12.html) +--- Thread: Oculus and Softbodies (/thread-4622.html) |
Oculus and Softbodies - Trogdor - 18-05-2026 I am trying to develop a simulator in VR using ObiSoftbody and ObiRope. Essentially, weaving a rope through one softbody, and then through the other and pulling them together, but alas I am having issues. Also, I am very new to Unity so please bare with me. I created two softbodies cubes that are small in scale, 0.05x0.02x0.035. I added a blueprint that had the same scale which are voxels with a resolution of 36. I tried to make the voxels at the bottom have a mass of 0 and those above with a mass of 1, to keep them stuck to the surface. When I added them to the scene the squished into a puddle. To fix this, I turned off the gravity and now they deform and float before stabilising in the air. Even when I adjust the gravity I am having the same issue. Ideally, I want them to just be stationary in the scene unless an object I am holding pushes against them, in which case only the top of the softbodies should react. Thanks in advance. I you require more details about my setup, please let me know and I will do my best. RE: Oculus and Softbodies - josemendez - 19-05-2026 Hi! By the sound of it, I'd say shape matching constraints (which are the "links" between particles) are simply disabled. Go to your ObiSolver component, and under the constraints foldout make sure Shape matching constraints are enabled. It could also be that the resolution of the objects is way too high, try reducing the resolution. Let me know if this solves your problem. kind regards, RE: Oculus and Softbodies - Trogdor - 19-05-2026 Hi, I tried this and still they deform and fly off. I didn't change any of the initial settings, so shape matching is ticked. I changed the resolution of the voxels to 12, which made a difference to the rendering, but it had the same affect. I also tried Gravity Space from Self to World and adjusting the gravity, but that also seemed to have no change. I made a short snippet, if that helps, so you can see the issue. [video=youtube]http://https://youtu.be/FFnPX9_e_8I[/video] RE: Oculus and Softbodies - josemendez - 19-05-2026 Hi! I see nothing out of the ordinary in the video, it's a box sliding across the table (deforming because well, it's a softbody), then falling to the floor. What's the outcome you are after? (Yesterday, 10:24 AM)Trogdor Wrote: I tried to make the voxels at the bottom have a mass of 0 and those above with a mass of 1, to keep them stuck to the surface. Voxels don't have mass, particles do. Setting the mass of a particle to zero (either in the blueprint editor or programmatically) won't make it stick to surfaces or anything similar. An inverse mass of zero (that is, infinite mass) will make it kinematic as explained here: https://obi.virtualmethodstudio.com/manual/7.1/scriptingparticles.html Quote:An inverse mass of 0 means the particle's mass is infinite, so its position will be unaffected by dynamics (allowing you to override it manually). This is typically used when writing custom scripts to override particle positions manually, but if you don't specify a position for them to stick to that won't work either. If the sliding is the problem, use a collision material with higher friction (if you don't use any collision material, friction is set to zero so surfaces will be 100% slippery). Modifying the object's mass won't have any impact on whether it slides or not. If you don’t want the object to be able to move around the table *at all*, attach its bottom part by defining a particle group out of the particles at its bottom (this is done in the blueprint editor), then adding a ObiParticleAttachment component that attaches that group to the table. The “RubberDragon” sample scene does this to keep the bottom part of dragon pinned to the floor. (Yesterday, 10:24 AM)Trogdor Wrote: I also tried Gravity Space from Self to World and adjusting the gravity, but that also seemed to have no change. Changing the vector space that gravity is expressed in won't do a thing unless your solver has non-zero rotation: -If set to Self, gravity will be assumed to be expressed in the solver's local space, which will make it rotate along with the solver. -If set to World, gravity will be assumed to be expressed in world space, which means it won't be affected by rotating the solver. If you're unsure what vector spaces are, they're a basic concept in 3D graphics/physics (and quite necessary to understand in order to use Obi!). There's many resources online that explain them, eg: https://m-ansley.medium.com/local-space-and-world-space-in-unity-970e0bfb7694 kind regards, |