Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
fluid disappear from moving bottle
#11
(29-09-2020, 01:55 PM)gontz Wrote: Thank you 
Yes, it is very stable now.

Quick question: how can I set the lifespan of the particles to infinite?

Just type 'Infinity' in the inspector field (with capital I). This is a standard Unity feature that works in all numeric inspector fields.

Or if setting it programmatically, use float.PositiveInifinity.
Reply
#12
Thank you

I didn't know that.

Is it possible to instantiate emitters in runtime and what is the right way to do that?
Reply
#13
(29-09-2020, 02:16 PM)gontz Wrote: Thank you

I didn't know that.

Is it possible to instantiate emitters in runtime and what is the right way to do that?

Yes, it's possible. See:
http://obi.virtualmethodstudio.com/tutor...ctors.html
Reply
#14
Hello again,

I'm still having problems with keeping the liquid in the bottle.
And it's not even moving. 
I tried also to generate a sdf with obi.
I tried with a convex mesh collider. 
I tried with a non convex collider made out of many little colliders.
Please, could you post an example with a bottle emptying into another bottle (not bucket)?
Thank you
Reply
#15
There's no difference between using a bottle or a bucket, just the 3D model used. Setup is identical. Swapping the bucket for a bottle in the BucketAndFaucet sample scene is all that's needed (make sure to use a mesh with a sane amount of triangles in case of using MeshCollider, as the cost of MeshColliders grows with the amount of polygons).

Could you detail the setup you have and the steps you've taken to approach this?
Reply
#16
Hello,
I have started with the faucet scene.
And I have a bottle:
[Image: pue4bIa.png]

This is my emitter:
[Image: Vm1goUQ.png]

and this is my solver
[Image: xfzDD51.png]

and this is my bottle/bucket
[Image: wKzTyhx.png]

and this is my distance field
[Image: sXMJhXl.png]
Reply
#17
Your distance field is all black, which means all of it is regarded as "outside".

It could be due to your mesh having incorrect normals, or the walls of the container being too thin and needing a smaller error tolerance when generating the DF.

If you send the bottle mesh to support(at)virtualmethodstudio.com I will be able to tell, and fix the mesh for you if necessary.
Reply
#18
I have sent you an email.

Thank you

[Image: R4rsCnQ.png]
Reply