Latest Threads |
can you remove particles ...
Forum: Obi Softbody
Last Post: aardworm
09-07-2025, 07:09 AM
» Replies: 0
» Views: 42
|
ObiRope Mesh Renderer
Forum: Obi Rope
Last Post: quent_1982
08-07-2025, 11:27 AM
» Replies: 4
» Views: 199
|
How to dynamically change...
Forum: Obi Rope
Last Post: quent_1982
08-07-2025, 06:34 AM
» Replies: 6
» Views: 352
|
Pipeline that bends
Forum: Obi Softbody
Last Post: josemendez
04-07-2025, 09:52 AM
» Replies: 13
» Views: 1,077
|
How to implement/sync Obi...
Forum: Obi Rope
Last Post: quent_1982
01-07-2025, 01:48 PM
» Replies: 2
» Views: 266
|
Collisions don't work con...
Forum: Obi Rope
Last Post: chenji
27-06-2025, 03:05 AM
» Replies: 3
» Views: 360
|
Force Zone apply differen...
Forum: Obi Rope
Last Post: chenji
26-06-2025, 11:41 AM
» Replies: 11
» Views: 1,012
|
Can I blend in and out of...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 04:42 PM
» Replies: 3
» Views: 329
|
Using a rigidbody/collide...
Forum: Obi Cloth
Last Post: josemendez
24-06-2025, 09:29 AM
» Replies: 1
» Views: 194
|
Solver is too performance...
Forum: Obi Rope
Last Post: quent_1982
20-06-2025, 08:09 AM
» Replies: 40
» Views: 5,012
|
|
|
Some questions about point editing. |
Posted by: urtrangar - 09-05-2020, 07:56 AM - Forum: Obi Softbody
- Replies (3)
|
 |
Hello,
i've seen manual about softbody point edition (and about performance) and could not understand some things:
1) screenshots show editing a "surface" point versions, is "volume" one is similarily editable?
2) after some of points are removed, do those no longer affect performance, or those are still have to be calculated?
3) if a mesh contains faces/vertexes inside its volume, will those faces/vertices be used for points by "surface" softbody point builder?
Also am curious if it is possible to make softbody glued to animated mesh or making an "envelope" softbody around animated mesh (jelly man with bones inside)?
So that resulting softbody would generally follow character's bones/limbs with some jiggle/deformations from hits. Which way might be best if such behaviour is possible at all with obi: surface softbody, volume softbody or balooned cloth?
|
|
|
[Offline Rendering] update Mesh Colliders |
Posted by: kouglov - 08-05-2020, 07:42 PM - Forum: Obi Fluid
- Replies (7)
|
 |
Hi, I've been using Obi Fluid since many month now, it's an awesome asset and I love it.
Recently, I started a project and I attempt to build an environment in Unity to do Offline Rendering to animate sequences.
For the scenes with fluids, I found that the Obi Fluid solution is absolutly perfect.
I've succedded in making a really simple script to bake a mesh collider that updates every frames.
Code: Mesh colliderMesh = new Mesh();
meshRenderer.BakeMesh(colliderMesh);
Mcollider.sharedMesh = null;
Mcollider.sharedMesh = colliderMesh;
![[Image: AVS9ZdR.gif]](https://i.imgur.com/AVS9ZdR.gif)
here's the result. (the model is from Rascal asset but there's absolutly no connection with the current problem)
As you can see, the Obi collider component attached to the object with the Mesh Collider does not updates the collisions with the fluid.
Is there any way I should be able to make it consider the updated mesh ?
(Keep in mind it's for an Offline solution, so computation time is not really an issue here)
thanks !
[EDIT]
I finally found a quick solution wich give this result :
https://imgur.com/a/tH66fwz
To do this, I simply modified the Obi Collider script, including an Update() function wich contained two things :
- Getting the Mesh Collider component mesh
- Setting it as the current Source Collider.
Last question : it is possible to get informations when a particle collide on a surface ?
Like to trigger an action (I would like to apply a decal to the collided object to simulate a wet surface)
|
|
|
How can I get fluid material from custom meshes (melting effect) |
Posted by: harut - 07-05-2020, 06:59 PM - Forum: Obi Fluid
- Replies (1)
|
 |
Hi, as I understand the fluid rendering works this way, you render the impostors and blur them in screen space and calculate the normals of the surface and render it,
but can I put my other objects in that pipeline and get the same fluid effect?
See the video: https://drive.google.com/open?id=1sMH2Vv...bkv8LIH_HG
I want to make a fluid from this cubes (get some melting effect). I think it should be a way to feed this cubes to the renderer instead of the impostors, the only difference seems to be the performance, but I'm not going to use a lot of cubes so it should be ok, how can I do that?
For melting effect, the easiest thing that comes to my mind is to disable the cubes and emit particles in their positions, but they will not have the shape of the cube and I can't emit them like I do with the unity's particle system, where if I wanted to convert the cubes to particles I would just loop through the cubes, set the particle sys. position to the cube's pos and call ParticleSystem.Emit(count), but the only way to control the ObiEmitter is to change the speed value. And also I can't use mesh emmiter because I need to have the ability to melt down the half of the objects and don't touch the other part.
It would be awesome to be able to feed any type of mesh to the fluid renderer, it will solve a lot of problems for the future too.
Thanks.
|
|
|
DllNotFoundException: Unable to load DLL 'libOni' |
Posted by: ObiArgi - 07-05-2020, 05:04 PM - Forum: General
- Replies (5)
|
 |
Hi
I compiled my project to a windows standalone build and when a scene has a obi physics object it crashes cuz it can't load the plugin....
in the editor everything works fine
What am i doing wrong?
i tried both mono and il2cpp builds, neither work
DllNotFoundException: Unable to load DLL 'libOni': The specified module could not be found.
|
|
|
Flag with Tear |
Posted by: ObiArgi - 07-05-2020, 03:37 PM - Forum: Obi Cloth
- Replies (2)
|
 |
Hi
I am trying to make a flag with tearable cloth however there seem to be some problems
The flag has particle group: static but the tearable has :top
if i rotate the tearable cloth obviously it falls part
Is it possible to make the Flag in the sample tearable?
Thanks!
|
|
|
Generated rope with pin constraints |
Posted by: pQuex - 07-05-2020, 01:21 PM - Forum: Obi Rope
- Replies (5)
|
 |
Hello Jose and everybody in the community,
So far I'm using the Filo for hoist simulations and am currently starting with Obi rope to simulate slings.
The features are truly impressive.
I am of course struggling with the mass ratio limitation of the iterative solver just as every other poster in this forum.
However, now I face a different problem.
I need to create slings at runtime to connect load to a hook.
I took the Grappling hook example and slightly modified it.
It casts a ray from the camera to the mouse pointer and attaches a rope between a hook (cube) and a load (cube) hit by the ray.
That part works fine. The generated rope is generated at correct position, the length is correct and it is attached to both game objects.
The problem is that the load cube must rotate around the point of attachment and it does not.
When the rope attaches to a side of the cube and gets retracted (which would normally roll the cube over) the rope starts to move like a tentacle of an octopus suffering from epileptic seizure.
I use Unity 2019.3.1f1 and Obi Rope 5.3
A rope configured in the editor behaves correctly.
The rope is generated by this script:
Code: using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Obi;
/**
* Sample component that shows how to use Obi Rope to create a grappling hook for a 2.5D game.
* 95% of the code is the grappling hook logic (user input, scene raycasting, launching, attaching the hook, etc) and parameter setup,
* to show how to use Obi completely at runtime. This might not be practical for real-world scenarios,
* but illustrates how to do it.
*
* Note that the choice of using actual rope simulation for grapple dynamics is debatable. Usually
* a simple spring works better both in terms of performance and controllability.
*
* If complex interaction is required with the scene, a purely geometry-based approach (ala Worms ninja rope) can
* be the right choice under certain circumstances.
*/
public class Sling : MonoBehaviour
{
public ObiSolver solver;
public ObiCollider hook;
public float hookExtendRetractSpeed = 2;
public Material material;
public ObiRopeSection section;
private ObiRope rope;
private ObiRopeBlueprint blueprint;
private ObiRopeExtrudedRenderer ropeRenderer;
private ObiRopeCursor cursor;
private RaycastHit hookAttachment;
private bool attached = false;
void Awake()
{
// Create both the rope and the solver:
rope = gameObject.AddComponent<ObiRope>();
ropeRenderer = gameObject.AddComponent<ObiRopeExtrudedRenderer>();
ropeRenderer.section = section;
ropeRenderer.uvScale = new Vector2(1, 5);
ropeRenderer.normalizeV = false;
ropeRenderer.uvAnchor = 0;
rope.GetComponent<MeshRenderer>().material = material;
// Setup a blueprint for the rope:
blueprint = ScriptableObject.CreateInstance<ObiRopeBlueprint>();
blueprint.resolution = 1.0f;
blueprint.thickness = 0.1f;
// Tweak rope parameters:
rope.maxBending = 0.02f;
// Add a cursor to be able to change rope length:
cursor = rope.gameObject.AddComponent<ObiRopeCursor>();
cursor.cursorMu = 0;
cursor.direction = true;
}
private void OnDestroy()
{
DestroyImmediate(blueprint);
}
/**
* Raycast against the scene to see if we can attach the hook to something.
*/
private void LaunchHook()
{
// Get the mouse position in the scene, in the same XY plane as this object:
Vector3 mouse = Input.mousePosition;
mouse.z = 100000.0f;
Vector3 mouseInScene = Camera.main.ScreenToWorldPoint(mouse);
// Get a ray from the camera to the mouse:
Ray ray = new Ray(Camera.main.transform.position, mouseInScene);
// Raycast to see what we hit:
if (Physics.Raycast(ray, out hookAttachment))
{
// We actually hit something, so attach the hook!
StartCoroutine(AttachHook());
}
}
private IEnumerator AttachHook()
{
yield return 0;
Vector3 localHit = rope.transform.InverseTransformPoint(hookAttachment.point);
// Procedurally generate the rope path (a simple straight line):
blueprint.path.Clear();
blueprint.path.AddControlPoint(hook.transform.localPosition + Vector3.down * 0.6f, Vector3.up, Vector3.down, Vector3.up, 0.1f, 0.1f, 1, 1, Color.white, "Sling hook");
blueprint.path.AddControlPoint(localHit, Vector3.up, Vector3.down, Vector3.up, 0.1f, 0.1f, 1, 1, Color.white, "Sling load");
blueprint.path.FlushEvents();
// Generate the particle representation of the rope (wait until it has finished):
yield return blueprint.Generate();
// Pin both ends of the rope (this enables two-way interaction between character and rope):
var pinConstraints = blueprint.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints<ObiPinConstraintsBatch>;
var batch = pinConstraints.batches[0];
batch.AddConstraint(0, hook, transform.localPosition + Vector3.down * 0.6f, Quaternion.identity);
//batch.AddConstraint(blueprint.activeParticleCount - 1, hookAttachment.collider.GetComponent<ObiColliderBase>(), hookAttachment.collider.transform.InverseTransformPoint(hookAttachment.point), Quaternion.identity);
batch.AddConstraint(blueprint.activeParticleCount - 1, hookAttachment.collider.GetComponent<ObiCollider>(), hookAttachment.transform.InverseTransformPoint(hookAttachment.point), Quaternion.identity);
batch.activeConstraintCount = 2;
// Set the blueprint (this adds particles/constraints to the solver and starts simulating them).
rope.ropeBlueprint = blueprint;
rope.GetComponent<MeshRenderer>().enabled = true;
}
private void DetachHook()
{
// Set the rope blueprint to null (automatically removes the previous blueprint from the solver, if any).
rope.ropeBlueprint = null;
rope.GetComponent<MeshRenderer>().enabled = false;
}
void Update()
{
if (Input.GetMouseButtonDown(0))
{
if (!rope.isLoaded)
LaunchHook();
else
DetachHook();
}
if (rope.isLoaded)
{
if (Input.GetKey(KeyCode.W))
{
cursor.ChangeLength(rope.restLength - hookExtendRetractSpeed * Time.deltaTime);
}
if (Input.GetKey(KeyCode.S))
{
cursor.ChangeLength(rope.restLength + hookExtendRetractSpeed * Time.deltaTime);
}
}
}
}
The hook cube has just a box collider and Obi collider, the load cube has also colliders and a Rigidbody component.
Rotation of the load cube is not frozen, its angular velocities are not zero, but are below 0.02 rad/s
Please let me know where I made a mistake.
|
|
|
Crashes when entering Playmode in HDRP |
Posted by: Velo2 - 07-05-2020, 12:18 AM - Forum: Obi Rope
- Replies (1)
|
 |
Hello,
I am experiencing frequent crashes to desktop when using the Obi Rope asset in HDRP currently. I have 12 rope actors in my scene. Almost every-time I enter Play Mode with my Obi Ropes active, Unity will crash to desktop. If I disable the Obi Solver gameobject (the gameobject containing the ropes as child objects) -- that is if I set them all inactive in the scene -- then the crashing stops.
I am currently using Unity 2019.3.3f1. With High Definition RP package version 7.2.1.
According to the Crash.dmp and log files:
Dump Summary
------------
Dump File: crash.dmp : [path to file on computer redacted]
Last Write Time: [time redacted]
Process Name: Unity.exe : C:\Program Files\Unity\Hub\Editor\2019.3.3f1\Editor\Unity.exe
Process Architecture: x64
Exception Code: 0xC0000005
Exception Information: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
Heap Information: Not Present
System Information
------------------
OS Version: 10.0.18363
CLR Version(s):
Modules
-------
Module Name Module Path Module Version
----------- ----------- --------------
Unity.exe C:\Program Files\Unity\Hub\Editor\2019.3.3f1\Editor\Unity.exe 2019.3.3.60078
ntdll.dll C:\Windows\System32\ntdll.dll 10.0.18362.778
kernel32.dll C:\Windows\System32\kernel32.dll 10.0.18362.778
KERNELBASE.dll C:\Windows\System32\KERNELBASE.dll 10.0.18362.778
..................
That's about all of the information I have on it right now. Please let me know if you have any suggestions or need any more information.
Overall, the asset is performing and doing what I want it too -- but the constant crashing (and having to restart Unity over and over again) is very taxing.
Thank you for any help or ideas you might have.
- Velo
|
|
|
IOS Crash after instantiate rope sometimes |
Posted by: alininavcisi - 06-05-2020, 10:36 PM - Forum: Obi Rope
- No Replies
|
 |
Hello. After I got linking error with Obi Rope 5.3 & Xcode 11.4, I have installed 11.3 and got obi rope 5.0 and it succesfully built with this.
On my game, player holds the head of rope, whenever player moves, im adding length to cursor. When player nears to an object, player puts head of rope and this rope starting to pull the object, while a new rope instantiated to player's hand.
There is no any error / crash on editor and android. But when I test on IOS, after 1 frame from instantiating a new rope, it crashes on a script called Oni Complete. And it happens sometimes, but sometimes not. When I test on IOS, the first collect never crashes, second may crash may not, third may or may not, Even I may pass 1st level sometimes, but sometimes not.
![[Image: scrMypA]](https://imgur.com/scrMypA)
https://imgur.com/scrMypA
Here is a little gameplay : https://streamable.com/fnlz39
Tested on Iphone 6
Working on Unity 2019.2.21f
Xcode 11.3
Obi Rope 5.0
The script I am instantiating new rope is : RobPlayer / method : CollectObj
I am really got stuck on this problem. I don't know what problem is exactly. I have sent source code of the project via pm. Main scene is SampleScene. You can ignore other scenes.
|
|
|
Wave effect on fluid surface |
Posted by: Guybrush - 06-05-2020, 02:08 PM - Forum: Obi Fluid
- Replies (12)
|
 |
Hi! I would need to create a wave effect on the fluid surface, is that possible? I need also to create a distortion of the image below the fluid (like the refraction but something of the whole liquid and not of the single particle)
Thank you
|
|
|
Adding attachments at runtime to a pre-existing instance of a rope in 5.X |
Posted by: eliza - 06-05-2020, 01:56 AM - Forum: Obi Rope
- Replies (2)
|
 |
I have been trying to figure out how to do this for a few hours now and I don't feel any closer than where I started.
I have a scene which is planned to have many ropes placed via the scene editor, many of them potentially sharing the same rope blueprints. Currently, my scene only has a single rope which has a static attachment to a floating cube. During runtime, I am attempting to add a pin constraint to an ObiCollider that collides with a given rope. I tried to adapt the grappling hook code into a method which is called when a rope collision event is triggered, and have verified that it is being called with the correct object references.
Code: private bool hasConstraint = false;
public void OnRopeCollision(ObiRope rope, int ropeIndex) {
if (hasConstraint) {
return;
}
hasConstraint = true;
var blueprint = rope.ropeBlueprint;
var pinConstraints = blueprint.GetConstraintsByType(Oni.ConstraintType.Pin)
as ObiConstraints<ObiPinConstraintsBatch>;
ObiPinConstraintsBatch batch = pinConstraints.GetFirstBatch();
batch.AddConstraint(ropeIndex, _obiCollider, transform.localPosition, Quaternion.identity);
batch.activeConstraintCount++;
rope.ropeBlueprint = blueprint;
_obiCollider.Phase = 1;
}
I suspect the problem has to do with the way that the blueprint is instantiated versus the grappling hook sample, but I am really at a loss on how to debug this. Also, given that in the future, many ropes would potentially share the same blueprint, my intuition tells me that even if it did work, every single rope in the scene would become pinned to the ObiCollider.
Please let me know if you need any more information! Thank you for your help.
|
|
|
|