Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Filling a bottle on start
#1
Hi everybody,

I'm trying to fill a bottle with liquid at the start of the application.

This is the list of problem I encounter :
  • Filling at startup : I suppose I should use the "burst" emission method but it only spawns a little amount of particles. I tried to set the speed to a higher number but it didn't change anything. I probably missed something.
  • Leaks : after a certain height, the particles start leaking from a side of the bottle (always the same) and from the bottom.
    I tried to add another object with a collider (and obi collider) to the leaking side but if it's too far, it leaks between the bottle and the object, if it's too close to the side of the bottle, the particles leak through the object.
    I also tried to increase the thickness of the Obi collider but it still leaks.
    Changing the emitter material (From blood to foamy water) improve the situation but it stillĀ leaks after a moment.
    I also noticed that the leak "pattern" changes when the starting position changes.
I attached screenshot with my bottle configuration.
The emitter is a child of the bottle.

Am I doing something wrong ?
Can I "pre-fill" the bottle ?

Thanks for your answer.
Reply
#2
(17-09-2018, 11:02 AM)DJacquemin Wrote: Hi everybody,

I'm trying to fill a bottle with liquid at the start of the application.

This is the list of problem I encounter :
  • Filling at startup : I suppose I should use the "burst" emission method but it only spawns a little amount of particles. I tried to set the speed to a higher number but it didn't change anything. I probably missed something.
  • Leaks : after a certain height, the particles start leaking from a side of the bottle (always the same) and from the bottom.
    I tried to add another object with a collider (and obi collider) to the leaking side but if it's too far, it leaks between the bottle and the object, if it's too close to the side of the bottle, the particles leak through the object.
    I also tried to increase the thickness of the Obi collider but it still leaks.
    Changing the emitter material (From blood to foamy water) improve the situation but it stillĀ leaks after a moment.
    I also noticed that the leak "pattern" changes when the starting position changes.
I attached screenshot with my bottle configuration.
The emitter is a child of the bottle.

Am I doing something wrong ?
Can I "pre-fill" the bottle ?

Thanks for your answer.

Hi there,

Regarding collision detection, you're suffering from tunneling. This is a very common problem in realtime physics. If your bottle is completely static and does not move, you might be able to prevent it by increasing the amount of solver substeps. Note that this will impact performance.

The alternative is to avoid using MeshColliders at all, as they're paper-thin boundaries. Use thicker primitive colliders, or distance fields:
http://obi.virtualmethodstudio.com/tutor...ields.html

To prefill the bottle at the start, use burst mode but give the emitter a large enough particle pool by increasing "num particles". Changing the emission speed will not affect the amount of particles emitted.

Note that if you cannot approximate the shape of the bottle with just one emitter shape, you can attach more than one emitter shape to the same emitter.
Reply