Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Obi fluid and VR
#1
Hi,

My use case is to create a VR simulation of some laboratory procedures involving pouring of samples.

Advertising shows flasks doing just that.

Problem 1 Scale.
The scaling tutorial video shows procedure to reduce scale by scaling the solver. For me this works down to about 0.2 the scale of the faucet and bucket example. Any smaller (0.1 or below) the fluid is transparent- can't see it
I need the scale to be at the size of a sample vile in a VR scene that's based on 1 unity unit = 1 meter. That looks like its out.

Problem 2 VR Toolkit
When making the bucket (in the faucet sample scene) intractable with the VR Toolkit, as soon as I "grab" the bucket, the fluid passes through the bucket.

I'm spending too much time on this.

Any one had similar issues? Are they insurmountable with this asset?
Should I be looking for a different solution?



Many thanks
Dave
Reply
#2
(27-03-2020, 10:41 AM)davidcole100 Wrote: Problem 1 Scale.
The scaling tutorial video shows procedure to reduce scale by scaling the solver. For me this works down to about 0.2 the scale of the faucet and bucket example. Any smaller (0.1 or below) the fluid is transparent- can't see it
I need the scale to be at the size of a sample vile in a VR scene that's based on 1 unity unit = 1 meter. That looks like its out.

You need to adjust the renderer thickness cutoff threshold accordingly. Very small particles are also very thin, so once their thickness falls below the renderer's cutoff threshold they won't be rendered. Simply reduce the threshold.

https://www.youtube.com/watch?v=W0ojzG5dzjU

From the video, at around 5:15:

Quote:Note that the renderer parameters are expressed in world space, so if you change the scale of your fluid using either method, you'll need to adjust the renderer parameters accordingly.

(27-03-2020, 10:41 AM)davidcole100 Wrote: Problem 2 VR Toolkit
When making the bucket (in the faucet sample scene) intractable with the VR Toolkit, as soon as I "grab" the bucket, the fluid passes through the bucket.

This is called tunneling, and is present in all physics engines. We recorded a video specifically for this:
https://www.youtube.com/watch?v=ms0Z35GY6pk

(27-03-2020, 10:41 AM)davidcole100 Wrote: I'm spending too much time on this.

Fluid simulation is a extremely complex topic. And any toolkit you can come across, no matter how simple, will take some time to get used to (more so if you're inexperienced in realtime physics). Expect to spend quite some time learning and adjusting to it.
Reply
#3
(27-03-2020, 11:26 AM)josemendez Wrote: >>You need to adjust the renderer thickness cutoff threshold accordingly. Very small particles are also very thin, so once their thickness falls below the renderer's cutoff threshold >>they won't be rendered. Simply reduce the threshold.

OK got it working to some degree at small scales.

>>This is called tunneling, and is present in all physics engines. We recorded a video specifically for this:
>>https://www.youtube.com/watch?v=ms0Z35GY6pk

Not sure that this is a problem with tunnelling. Fluid passes straight through bucket when held stationary by VR controller. Tried changing time steps etc.
Reply
#4
- What kind of collider are you using? (mesh collider, distance field...)
- Does it work when you place the same collider in a fixed position, instead of being controlled by the VR controller?
Reply
#5
Using mesh collider. Works fine when stationary, and when moved by mouse when not in VR.

Also does not work when isKinematic is deselected on bucket rigidbody.
Reply
#6
(27-03-2020, 04:58 PM)davidcole100 Wrote: Also does not work when isKinematic is deselected on bucket rigidbody.

Non-kinematic rigidbodies paired with non-convex mesh colliders are not supported by Unity. See:
https://docs.unity3d.com/Manual/class-MeshCollider.html

Quote:GameObjects that have a Rigidbody component only support Mesh Colliders that have Convex option enabled: the physics engine can only simulate convex mesh colliders.

Note that Obi always treats mesh colliders as concave, so if you need a non-kinematic concave collider, you can enable the "convex" checkbox. Unity will treat it as a convex collider, Obi particles will treat it as concave.

(27-03-2020, 04:58 PM)davidcole100 Wrote: Using mesh collider. Works fine when stationary, and when moved by mouse when not in VR
Depending on how your VR controller is moving the container around (using forces/joints on a non-kinematic rigidbody, or setting position/orientation on a kinematic rigidbody/raw transform), so need to set this up differently.

- What approach are you using for your VR controller?
- If using a kinematic rigidbody: have you added a ObiKinematicVelocities component to enable CCD?
Reply
#7
[quote pid='6151' dateline='1585329287']
>> What approach are you using for your VR controller?

I am using the Virtual Reality toolkit, and have tried 
VRTK_ChildOfControllerGrabAttach
VRTK_CustomJointGrabAttach
VRTK_FixedJointGrabAttach
VRTK_MoveTransformGrabAttach

None of which work.


>>If using a kinematic rigidbody: have you added a ObiKinematicVelocities component to enable CCD?

Yes I have done this.
[/quote]

I have a bit more success if I make the obi Rigidbody Kinematic for particles
Reply