Search Forums

(Advanced Search)

Latest Threads
In SolidifyOnContact exsa...
Forum: Obi Fluid
Last Post: josemendez
47 minutes ago
» Replies: 4
» Views: 104
Rope going through wall
Forum: Obi Rope
Last Post: chenji
6 hours ago
» Replies: 2
» Views: 32
Change rod section at run...
Forum: Obi Rope
Last Post: matty337s
02-08-2025, 06:07 AM
» Replies: 0
» Views: 51
Sliding along a rope
Forum: Obi Rope
Last Post: vrt0r
01-08-2025, 07:43 PM
» Replies: 0
» Views: 44
Is it possible to render ...
Forum: Obi Fluid
Last Post: asimofu_ok
01-08-2025, 10:07 AM
» Replies: 2
» Views: 103
Cloth has stretchy behavi...
Forum: Obi Cloth
Last Post: Andreia Mendes
31-07-2025, 02:38 PM
» Replies: 22
» Views: 894
Get separate particles pa...
Forum: Obi Fluid
Last Post: slimedev
29-07-2025, 06:51 PM
» Replies: 6
» Views: 3,231
Solver outside of hierarc...
Forum: General
Last Post: Jawsarn
29-07-2025, 06:19 PM
» Replies: 4
» Views: 193
Rope ignoring colliders o...
Forum: Obi Rope
Last Post: josemendez
24-07-2025, 07:03 AM
» Replies: 1
» Views: 139
Ladder made by Ropes (Rat...
Forum: Obi Rope
Last Post: josemendez
23-07-2025, 01:43 PM
» Replies: 5
» Views: 327

 
  AddTorque?
Posted by: Renman3000 - 31-07-2023, 05:24 PM - Forum: Obi Softbody - Replies (6)

If I have a softbody sphere, that I wanted to move by having it roll itself around, how would you code this?

I am currently using a rigidbody and obiRigidbody on the ball (in the example BallPool), and applying AddTorque() but there is no response. 

?

Print this item

  Take a Dent?
Posted by: Renman3000 - 31-07-2023, 04:32 PM - Forum: Obi Softbody - Replies (5)

I am creating a game where I destroy a car. In that, I hammer it over and over with various blunt force objects.

What I am wondering is, can ObiSoft, be ideal for this, in that, can it take a dent and retain it? Or, should I look at more classical Mesh Deformation?

Thanks

Print this item

  Can't bind to mesh because it says it's not readable
Posted by: manurocker95 - 31-07-2023, 01:21 PM - Forum: Obi Softbody - Replies (1)

Hey, I'm facing a weird issue. I have a 3D model with Read/Write setting enabled:

[Image: image.png]

I created a softbody blueprint, added the mesh and generated the volume particles. No issues here:

[Image: image.png]

I create a Obi SoftbodySkinner + ObiSoftbody and suddenly boom:

[Image: image.png]

As you can see, the renderer mesh is readable (first pic). When clicking on "Fix now" I get:

NullReferenceException: Object reference not set to an instance of an object

Obi.ObiSoftbodySkinnerEditor.NonReadableMeshWarning (UnityEngine.Mesh mesh) (at Assets/Obi/Editor/Softbody/ObiSoftbodySkinnerEditor.cs:83)

Like if it was not possible to read. And the softbody object is like the dragon scene one where a different object has the ObiSoftbody with the blueprint:

[Image: image.png]

Any idea? :/


I imported same model again (duplicated) and I don't have the error now, but the particles doesn't modify the mesh position (I clicked on Bind Skin)

[Image: screenshot_3.png]

Print this item

  URP Shader Error
Posted by: Yumineko - 31-07-2023, 11:31 AM - Forum: Obi Fluid - Replies (2)

(I apologize if there are any flaws or rudeness due to machine translation.)

When I create a new project with "3D(URP)" and import Obi Fluid, I get an error in the following Shader inspector.
If I build on Windows Intel 64bit environment in this state, the fluid that was normally displayed in Editor will not be rendered.

Obi/Resources/ObiMaterials/URP/FluidShaderURP

Code:
Implicit truncation of vector type
Compiling Subshader: 0, Pass: FluidShader, Fragment program with <no keywords>.
Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_ PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_ SHADOWS
Disabled keywords: FLUID_FOAM FLUID_FOAM FLUID_LIGHTING FLUID_REFLECTION FLUID_REFRACTION SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING unity_no_dxt5nm unity_no_full_standard_shader unity_no_screenspace_shadows unity_pbs_use_brdf2 unity_pbs_use_brdf3 unity_pretransform_to_display_orientation unity_unified_shader_prevention_model UNITY_VIRTUAL_TEXTURING _GLOSSYREFLECTIONS_OFF _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _RECEIVE_SHADOWS_OFF _SHADOWS_SOFT _SPECULARHIGHLIGHTS_OFF _SPECULAR_SETUP


Obi/Resources/ObiMaterials/URP/ParticleShaderURP

Code:
'BuildAuxiliaryNormalVectors': implicit truncation of vector type
Compiling Subshader: 0, Pass: 0 0, Pass: ShadowCaster, Fragment program ShadowCaster, Fragment program with SHADOWS_DEPTH
Platform defines: SHADER_API_DEPTH SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PASS_SHADOWCASTER UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords:. SHADER_API_GLES30 SHADOWS_CUBE UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS unity_pbs_use_brdf2 unity_pbs_use_brdf3 unity_pretransform_to_display_orientation unity_unified_shader_precision_model unity_virtual_texturing

Obi/Resources/ObiMaterials/URP/SimpleParticleShaderURP

Code:
'BillboardSphereNormals': implicit truncation of vector type
Compiling Subshader: 0, Pass: 0 0, Pass: ShadowCaster, Vertex ShadowCaster, Vertex program with SHADOWS_DEPTH
Platform defines: SHADER_API_DEPTH SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PASS_SHADOWCASTER UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: SHADER_API_GLES30 SHADOWS_CUBE UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_ MODEL model unity_virtual_texturing


There were no errors in the following Shader.
  • Obi/Resources/ObiMaterials/FluidThickness
  • Obi/Resources/ObiMaterials/ScreenSpaceCurvature
  • Obi/Resources/ObiMaterials/NormalReconstruction
Other concerns
  • Script Updating Consent" dialog appears when importing Obi Fluid (error did not go away no matter which option was selected).
  • When importing the packages required for Burst in Obi Renderer, a compile error occurs at line 74 of "Obi\Scripts\Common\Backends\Burst\DataStructures\NativeMultilevelGrid.cs" ( (Fixed by setting length to Length).
The version I am using is listed below.
  • Unity 2022.3.5f1
  • Universal RP 14.0.8
  • Core RP Library 14.0.8
  • Obi - Advanced fluids for Unity 6.5.4
  • Burst 1.8.7
  • Mathematics 1.2.6
  • Collections 2.1.4
  • Jobs 0.70.0-preview.7



Attached Files Thumbnail(s)
                   
Print this item

  Rope bumping
Posted by: Alexander34 - 31-07-2023, 10:37 AM - Forum: Obi Rope - Replies (2)

Hi, I wanted to achieve the visual effect of pumping liquid or air up a rope. To do this, I wrote a script -


public class RopeBump : MonoBehaviour
{

    [SerializeField]
    private ObiRopeBlueprint _obiRopeBlueprint;


    [SerializeField, Range(0.5f, 2f)]
    private float _bumpSpeed = 1;


    [SerializeField]
    private int _framesSkipAnimation;


    private bool _isBumping;


    [Button]
    private async UniTask BumpAsync(float value, bool reverse)
    {
      if (_isBumping)
          return;

      _isBumping = true;
      var thicknesses = _obiRopeBlueprint.path.thicknesses;

      int start = reverse ? thicknesses.Count - 1 : 0;
      int end = reverse ? -1 : thicknesses.Count;
      int step = reverse ? -1 : 1;

      for (int i = start; i != end; i += step)
      {
          float cachedThickness = thicknesses[i];
          float direction = cachedThickness < value ? 1f : -1f;

          while (true)
          {
            thicknesses[i] += _bumpSpeed * direction;

            if ((direction == 1f && thicknesses[i] >= value) || (direction == -1f && thicknesses[i] <= cachedThickness))
            {
                if (direction == -1f)
                  break;

                direction = -1f;
            }

            _obiRopeBlueprint.path.FlushEvents();
            await UniTask.DelayFrame(_framesSkipAnimation);
          }
      }

      for (int i = 0; i < thicknesses.Count; i++)
          thicknesses[i] = 1;

      _isBumping = false;
    }


    private void OnEnable()
    {
      for (int i = 0; i < _obiRopeBlueprint.path.thicknesses.Count; i++)
      {
          _obiRopeBlueprint.path.thicknesses[i] = 1;
          _obiRopeBlueprint.path.FlushEvents();
      }
    }


    private void OnDisable()
    {
      for (int i = 0; i < _obiRopeBlueprint.path.thicknesses.Count; i++)
      {
          _obiRopeBlueprint.path.thicknesses[i] = 1;
          _obiRopeBlueprint.path.FlushEvents();
      }
    }


https://dropmefiles.com/H4YYi
In this script I achieved the desired visual, but there were some difficulties, namely -
1 - FPS sag, most likely because of the call FlushEvents() after changing thicknesses[i].
2 - when moving the object, to which the rope is tied, and pumping the rope - the anchor point shifts.

Maybe there is some easier or more obvious way to accomplish the same thing? For example, pick up the rendering of particles and change their thickness asynchronously there?  Or something else?

Print this item

  obi shape
Posted by: Raymond - 31-07-2023, 10:14 AM - Forum: Obi Rope - Replies (4)

I am using obirope 6.4 now,
I want to change the head and tail bend angle of the rope, and keep the bend while moving.
At the beginning, I used static attachment and found that the effect was wrong. Later, when I added obicollider on the head and tail nodes and set dynamic, the effect was still wrong. Once moved, the head and tail did not keep the original bending, but random The shaking, the following is the effect picture after prohibition and movement. I want to keep the curved shape of the head and tail when it is still after moving.
This problem does not occur when I use the particlehandle component of 4.1 I hope to get a solution



Attached Files Thumbnail(s)
       
Print this item

  Rope cutting with collision
Posted by: spikebor - 31-07-2023, 09:11 AM - Forum: Obi Rope - Replies (2)

Hello, I've copied the code in another Post to implement cutting Rope with collision.
It does cut the rope, but some rope does not get cut.
Turn out when I check the debug.log, it always cut the Rope02, but when I check in Inspector, the actual Rope is colliding with the cutter is Rope.
This implies my method of specify the Rope from solver.simplices and solver.particleToActor return wrong result.
I'll attached the project, please take a look.
https://drive.google.com/file/d/12hSpnv0...sp=sharing

Please check this video for more info


Code:
        private void TryTearRope(Oni.Contact contact)
        {
            var collider= ObiColliderWorld.GetInstance().colliderHandles[contact.bodyB].owner;

            // get the particle index:
            var particleIndex = solver.simplices[contact.bodyA];

            // retrieve the actor this particle belongs to:
            var particleInActor = solver.particleToActor[particleIndex];
            var actor = particleInActor.actor;

            //collide with a cutter
            if (collider.TryGetComponent(out RopeCutter cutter))
            {   
                //check if contact with cuttable
                if (actor.TryGetComponent(out RopeCutComponent cuttable))
                {
                    var rope = cuttable.rope;
                    //pass all checks
                    Debug.Log($"cutter {cutter.name} cut the rope {rope.name} at particle {particleIndex}");
                    // check rope elements and tear the one that references this particle:
                    foreach (var elm in rope.elements)
                    {
                        if (elm.particle1 == particleIndex)
                        {
                            rope.Tear(elm);
                            rope.RebuildConstraintsFromElements();
                            break;
                        }
                    }
                }
            }
        }

Print this item

  [Solved] Burst backend warning despite having dependencies
Posted by: 7Dev.io - 29-07-2023, 06:52 PM - Forum: Obi Fluid - Replies (2)

I'm getting the Burst backend warning despite having all the dependencies installed.
Unity 2022.3.4f1 and Obi Fluid 6.5.4. The collection's package is supposed to be replacing jobs still I tried to manually add the old job package just to test and even then it still shows the warning.[Image: omtp3pZ.png]

Print this item

  Any recommendation to create softbodies in runtime?
Posted by: manurocker95 - 27-07-2023, 11:00 PM - Forum: Obi Softbody - Replies (1)

Hey! The ropes have a clear example to create them in runtime without issues and I'm wondering if it's a good workthrough for softbodies. 

Thanks in advance

Print this item

  Trouble with very small ropes
Posted by: bjornehoff - 27-07-2023, 02:13 PM - Forum: Obi Rope - Replies (1)

Hello, 

First of all think you for making a wonderful toolset with Obi Rope. 

I'm making a VR training app where the user needs to wield a tool that's connected to a cable, and the cable jack needs to be put into a slot. 
(Image something like holding an iPhone with a charging cable that you want to put into a USB slot)

When I have fairly large cables I don't have any problems, but when I make it a very small and thin cable (iphone charger) the cable doesn't attach to the tool properly, and it doesn't act good. Is there something I can do to remedy this?

Print this item