[Released] SSF Particle2Fluid Shader Util

Hello, everybody.
I am veryexcited to recommend my new plugin SSF Particle2Fluid Shader Util. It is dedicated to rendering particle data into smooth liquid surfaces.


In the process of game development, liquids or fluids have always been an important part of game performance. How to perform fluid simulation and rendering in real-time has become a common topic. During my game development career, I gradually found that the former is not important, because no one can completely judge the correctness of the fluid performance.

So if we can use black technology to make real-time effects similar to fluids, why not? We have learned that we care about high real-time performance, not high simulation accuracy. Even many times, we need some very artistic effects, such as Aquaman.

Using particles is an idea that many developers think of for the first time, and it is also very intuitive. SPH-based fluid simulation has become the mainstream real-time fluid simulation method, but if you directly use metaball to render, it is easy to get poor liquid’s appearance, such as bubble-like or jelly-like.

Then the question comes:

How to use particle data to render high-quality fluid surfaces in real-time?

To answer this question, SSF Particle2Fluid Shader Util was born! It is a Unity shader plugin which is suitable for rendering simulation systems that use particles as simulation units.

It has the following very nice properties:

  • Support Unity Builtin ParticleSystem
  • Support multiple particle sources with individual render configuration
  • Excellent real-time operation efficiency,120+FPS on my GTX960M
  • Amazing surface effect, including control over reflection\refraction\foam\smoothess and so on
  • Open data customization interface
  • Fully open source code
  • Fully customizable surface shading
  • Complete documentation and improvement guidelines
  • Many Fancy Demos

It’s worth noticing that it is developed under Unity2019.3.0f5 and supports both Unity Builtin Shader and Universal Rendering Pipeline which could be handy for users using old/latest versions of unity. Besides, most computing work is done on GPU using Compute Shader which makes it fast.

I am sorry that no demo video is provided since I put much work on testing this shader Util and writing detailed documentation.

Before dropping more demo images, two links are provided:
Asset Store | Documentation


Load From TextFile

Single ParticleSystem

multiple ParticleSystem

Currently, on each frame, particle data is transferred to the GPU. If anybody has a GPU-based particle system and manages to extend the input as guided, the framerate can be higher.

If you are attracted but not sure whether it worth buying, please take a read over documentation. All the features, step-to-step setup, API are included.

Hope you enjoy this plugin!
Best wishes.

It is a very promising tool. Do you have a free lite version?

I have received your email and i understand your passion for games or You “King of Cards” eBook:p.
Thanks for your appreciation , i would like to help you. :slight_smile:
I hope any feedback or bug reports can be reported here after you taste this plugin;).

However, as free vouchers are limited within one year. It would be less possible to distribute vouchers.

1 Like

Hello! Awesome work!

What takes so much performance on CPU though? Is it particles collision with the surface, or is it rendering of the liquid?

Would it be possible to use it with GPU particle systems like this? Ultimate GPU Particle System | Particles/Effects | Unity Asset Store

Would it be possible to transfer particles data position from GPU particle system to GPU for render, without loading CPU?

Thanks for your reply!
Yes,it’s possible to extend other sources of particles as documented in Here.

On the cpu performance problem, i checked the demo scene [Demo_SingleParticleSystem.scene]. After viewing the profiler, i found following picture which indicates our plugin is GPU-intensive instead of CPU intensive.


So the main bottleneck of CPU Performance may due to Particle System’s physics collison…

If any misunderstanding or doubt on my explanation, please reply me

I did not buy that asset, so i am not sure what’s form of datastructure of its particle data in GPU? Through its introduction, possibly it uses runtime-created shaders to transform vertices data so im not sure whether its vertice data have proper API interface?
You should have a further check.

So the problem is with rendering? You say that it’s GPU expensive but then said that bottleneck is with CPU. I don’t get it. Can you show me how GPU usage on profiling?

If it’s GPU expensive what would be the point for me to use GPU particles with it? It probably shouldn’t be that GPU expensive after all…That’s not super hard work to draw the water like that.

I mean, in the video you provided it clearly shows the CPU is loaded for 8ms. Why it doesn’t use GPU to compensate if it’s GPU intensive?

If this vertice data doesn’t have proper API interface, would it be possible for me to extend it and add it? I mean, I have all source code.

Well, you claimed that it takes a lot performance on CPU. Then i verfied and found it may related to rendering, since CPU is waiting for GPU’s result. However, it’s also worth noticing that the third highest cost is ParticleSystem, so i said the CPU performance bottleneck may related to ParticleSystem as well.

Got it. So it takes all your GPU strength on the GTX 960M? That seems quite a much. Is it well optimized? There is Nvidia Flex plugin which is terribly optimized because of physics, but the overall rendering doesn’t take much of GPU. Can you show GPU usage on profiler?

Oh, well, yeah, GTX 960M is not that strong actually. I thought it’s closer to GTX 970 which I have.

Yes, you could since you have all source code. You just have to push your data into a computebuffer as descripted in the link above,bro. Then you can manipulate your particle data on gpu, and it’s ok we will properly rendered.

What i mean is that the vertice data of that GPU particle System may not have proper API interface, our plugin do open all source codes once you buy it

No, I got that part, I mean, do you think if that GPU particle system doesn’t have a proper API interface, would it be possible to extend this GPU particle system to add it myself? Developer there is really slow and I’ll probably wait a week or more for answer, and I’m not that good in graphics programming, so asking you.

Wait, bro. All the strength? That may not since i did not try to use billions of particles on GPU,right? hhhh.
What we really done in CPU is only about particle data updating and uploading, nothing else.
So through the perspective of code, i think it’s gpu-optimized.

On the GPU profiler, wait a moment… One more question, have you buy this product? Why not show your profiler data, i can help analysis

Yeah, sorry, I didn’t understand that GTX960M is really slow.

No, I didn’t buy it yet, I’m looking into it. There is a super big chance I will buy it, it’s just I will have money a little bit later and I need to have some information about it before buying. I’m trying to understand if that really would be possible to combine this plugin with that GPU plugin I told you about, because otherwise it will be useless for me.

It says in description: “On initilization, Ultimate GPU Particle System creates all particles in form of one or multiple meshes and render textures, that store information about each particle such as position, velocity, size, rotation and other meta data. On update, this data is processed through a series of standard HLSL shaders and passed on to the material on the particle meshes”

If it’s proccessed on shaders and passed to the material, it probably could be passed to your plugin, right? Or am I missing something?

It’s possible to extend particles input by following our documentation as long as its particle data is on gpu and is in the form of Compute Buffer.
If it is using textures to store its particles, it’s also possible .But you should take a deep look into our shader’s source codes and find how to extract particle data from its textures and load into our plugins ( through shader).

That’s probably what I will end up doing, because this plugin doesn’t use Compute Buffer, it uses textures.

Well, super great then. Will buy it as soon as possible. I will just look into source of this GPU particle system, extract data from that texture and send it to your plugin shader. Thank you!

Yes, on the GPU profiler now.This is tested on my GTX960M of demo scene [Demo_SingleParticleSystem.scene]

The most cost is spend on Camera Render’s proper rendering. So that’s not our problem

On our plugin,it took 1.275ms. Emm i think its relatively low cost, right?

Yeah, very low cost. It’s weird that your CPU was waiting for GPU though if GPU is not really overloaded… Why would it wait? That 10 ms on CPU really worry me. I need to test it on my PC of course.