Obi Official Forum
Help Android Performance Issue (Due to lots of particles) - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html)
+--- Thread: Help Android Performance Issue (Due to lots of particles) (/thread-767.html)



Android Performance Issue (Due to lots of particles) - Tuna.Y - 27-11-2018

Hi,

I am working on a project for a while and it's almost done. I was making test on my Samsung Galaxy Note 8 mobile phone and FPS was dropping a bit when I use 3500 particles in the scene. It wasn't a big deal until I tested on a slower phone...

I have tested the game on an HTC One M7. FPS was dropping around 0.5 when there are 3500 particles in the screen. Which makes game almost freeze and even closing the application is getting harder.

So, my question is: Is it possible to make particles bigger?

I'm using 1x scale 3500 particles now. Is it possible to make it 10x scale with 350 particles?

That's my only obstacle before releasing my game. I would be glad if we can figure it out.

(I'm using Simple2DFluid for better performance)


RE: Android Performance Issue (Due to lots of particles) - gadgetkk - 28-11-2018

I have a similar question.

in my game i want to fill up a tank with liquid, but the particles are so small it requires a ton of particles to get any real volume. I played with the particle renderer radius scale and the emitter material fluid resolution. This allowed me to make the particles really big but then they stuck outside the walls.

So i am also curious to see if there is a sweet spot to increase the volume without increasing the number of particles (or am i doing it exactly how it is intended to be)?


RE: Android Performance Issue (Due to lots of particles) - josemendez - 28-11-2018

(28-11-2018, 01:44 AM)gadgetkk Wrote: I have a similar question.

in my game i want to fill up a tank with liquid, but the particles are so small it requires a ton of particles to get any real volume. I played with the particle renderer radius scale and the emitter material fluid resolution. This allowed me to make the particles really big but then they stuck outside the walls.

So i am also curious to see if there is a sweet spot to increase the volume without increasing the number of particles (or am i doing it exactly how it is intended to be)?

To increase the volume, you need to increase the amount of particles because each particle represents a fixed volume.

Start by setting the renderer radius scale to 1 (so that particles are drawn at their true size), and decreasing material resolution. Once you've got the desired performance for your volume, then being increasing the radius scale until any gaps between particles are filled. Then turn on the Fluid Renderer, and increase thickness cutoff until only the bulk volume of your fluid is rendered.


RE: Android Performance Issue (Due to lots of particles) - josemendez - 28-11-2018

(27-11-2018, 08:04 PM)Tuna.Y Wrote: Hi,

I am working on a project for a while and it's almost done. I was making test on my Samsung Galaxy Note 8 mobile phone and FPS was dropping a bit when I use 3500 particles in the scene. It wasn't a big deal until I tested on a slower phone...

I have tested the game on an HTC One M7. FPS was dropping around 0.5 when there are 3500 particles in the screen. Which makes game almost freeze and even closing the application is getting harder.

So, my question is: Is it possible to make particles bigger?

I'm using 1x scale 3500 particles now. Is it possible to make it 10x scale with 350 particles?

That's my only obstacle before releasing my game. I would be glad if we can figure it out.

(I'm using Simple2DFluid for better performance)

Yep, simply decrease fluid resolution. This parameter controls how many particles are used per cubic (square in 2D) meter of volume:

http://obi.virtualmethodstudio.com/tutorials/emittermaterials.html


RE: Android Performance Issue (Due to lots of particles) - Tuna.Y - 28-11-2018

(28-11-2018, 08:13 AM)josemendez Wrote: Yep, simply decrease fluid resolution. This parameter controls how many particles are used per cubic (square in 2D) meter of volume:

http://obi.virtualmethodstudio.com/tutorials/emittermaterials.html

Thank you Jose. But I have already tried that. Circle colliders for water particles are not growing in the same ratio when I increase the resolution. Because of that, particles are getting into each other.


RE: Android Performance Issue (Due to lots of particles) - josemendez - 28-11-2018

(28-11-2018, 08:36 AM)Tuna.Y Wrote: Thank you Jose. But I have already tried that. Circle colliders for water particles are not growing in the same ratio when I increase the resolution. Because of that, particles are getting into each other.

If you set the renderer radius scale to 1, particles should not get into each other at all. By increasing resolution you make them smaller, not bigger by the way.


RE: Android Performance Issue (Due to lots of particles) - Tuna.Y - 29-11-2018

(28-11-2018, 09:41 AM)josemendez Wrote: If you set the renderer radius scale to 1, particles should not get into each other at all. By increasing resolution you make them smaller, not bigger by the way.

Hi Jose,

I have tried to decrease resolution step by step and set radius scale to 1 but it makes fluids look like little balls and these particles are going through 2d edge collider when they are pressed together.

Do you have any suggestion for that?


RE: Android Performance Issue (Due to lots of particles) - josemendez - 29-11-2018

(29-11-2018, 11:23 AM)Tuna.Y Wrote: Hi Jose,

I have tried to decrease resolution step by step and set radius scale to 1 but it makes fluids look like little balls and these particles are going through 2d edge collider when they are pressed together.

Do you have any suggestion for that?

If the fluid looks too "bubbly" because its particle-based structure is made apparent, increase the solver's max anisotropy. This will allow particles to warp their shape to adapt to the fluid's surface. See:
http://obi.virtualmethodstudio.com/tutorials/obisolver.html

Quote:particles are going through 2d edge collider when they are pressed together.

This is a common issue to all realtime physics, called "tunneling". Try decreasing the tilmestep or increasing the amount of collision constraint iterations in the solver.


RE: Android Performance Issue (Due to lots of particles) - Tuna.Y - 30-11-2018

(29-11-2018, 12:16 PM)josemendez Wrote: If the fluid looks too "bubbly" because its particle-based structure is made apparent, increase the solver's max anisotropy. This will allow particles to warp their shape to adapt to the fluid's surface. See:
http://obi.virtualmethodstudio.com/tutorials/obisolver.html


This is a common issue to all realtime physics, called "tunneling". Try decreasing the tilmestep or increasing the amount of collision constraint iterations in the solver.

Thank you Jose, problems are almost solved. Last question; is it possible to change "round-bubble" water with "square" or change it's shape somehow?