Particle Flowfields

[video]https://vimeo.com/128060350[/video]
Particle motion calculated and stored on the GPU inside textures. Plenty of notes in text files and the GLSL scripts so you can learn how to play with it, and get a better understanding of GLSL.

github.com/vjasterix/TD-Particle-Flowfields

What is it?
This demonstrates a technique of performing particle calculations inside textures, which has significant performance benefits over cpu methods, allowing users to create several million particles really easily. Turbulence is added into the scene using vector flowfield like behaviours, as well as some curling effects which are probably more noticable

Usage
Documentation is noted throughout the tox file in little text DATs and also within the pixel shaders.

Different Geometry
You can feed in other geometry as an emitter source (plug it into finalGeo null) so long as: its vertex count is the same or less as particle count chop ( 500 verts).

More Particles
Currently the demo is rigged so you just need to increase the particle count chop to get more particles. It is the square root of the final particles produced. However I’m sure you’ll want to play with different meshes so keep ing mind: You can increase the number of particles in the current sketch by increasing the particle count chop, which is the square root of the total particles emmitted. ie set it to 500 an your particles will be 250,000. set it to 1000 and your particles will be 1,000,000 Keep in mind your finalGeo sop must have the same amount of particles as particlecount. And particles SOP’s vertices has the final amount of particles.

Different Displacement Textures
Try patching in some geometric textures to nx and nx1 for interesting effects.

Have fun
Please experiment and read through the notes so you can learn and make similar cool things. I won’t be offering support however I am available to hire for commercial projects.

1 Like

sick!

This is boss. Thanks for posting and for documenting so clearly.

holy moly

big big thank you for this, amazing what you guys are able to do with “some” lines of code!
speechless for now, but playing…
best, thank you and bring it on! :wink:)
luca

Phenomenal! That’s a very elegant setup in /Composition/particles with the 3 color-buffer render, the 3 selects to the 3 feedbacks, the shader, and the setup of the static 250,000 points in the SOP.

PS: The Noise SOP should have absTime.seconds driving its time instead of me.time.seconds, which cycles/jumps the motion every 10 seconds. The latest 088 Noise SOP now defaults to absTime.seconds, which never repeats.

Thanks for posting!

Thanks for pointing that out Greg, didn’t know you could do that!

Load this in a VR setup! I tried last night and its possibly the prettiest thing I ever saw. thx for sharing this alien technology!
Never learned so much than by tweaking this patch!
Now I 'm trying learning about glsl as we speak but particle subject cannot find that much.
Can anyone point me out some understandable cool info about how u make this from scratch?
I can imagine how things work in nodes with particles but how you guys have this kind of control over particles with simple lines of code blows my mind. thx

There is one thing I cannot figure out!
What changes life spawn of these particles, anyone got a clue?
this patch is full of cool explaination, very clear, I just cannot find that one. Which would help a lot in making it a bit more fluid for head track rather than decraesing amount of particles. thx

This is so awesome.

Thank you!!

Hi Green,

lifetime is determined by the y axis number of pixels. Each pixel in y is a frame in the particle life. You could possibly tweak that for longer / shorter lifetimes but it won’t work right out of the box :wink:

+1, very organized and coherent file structure. Nice job!

This looks great! However, I’m getting an error that the GLSL number is not supported on my GPU (Radeon Pro 460). I’m entirely new to GLSL. Where can I learn more about this and get around this error.

The shaders in this example are written in GLSL 4.00 and 4.50.
Your Radeon Pro 460 card can support GLSL 4.50, but I’m taking a wild guess that you are using a mac? MacOS only supports GLSL 3.30.

Coincidentally I converted this example to GLSL 3.30 for another mac user last week, see my post here and try that: viewtopic.php?f=27&t=9798#p37082

Thanks so much for the shared tox - it looks beautiful and it’s super fast!

Updated it so that each particle leaves a trail behind it. The trails are created by connecting the positions texture to a Texture 3D TOP and rendered in the vertex shader similarly to the current positions. It’s especially useful for VR particle systems.
3d_trail.tox (6.95 KB)

very cool

This looks amazing. I’m trying to understand what’s happening. Is there a way I can connect my mouse to adjust where the particle is moving instead of having it randomly move?

Or actually. I think I figured out how to change positions by adjusting the finalGeo SOP. But my question is how ot change the direction of the wind? Right now, it’s always pulling to the right. How would one be able to make it pull down towards the bottom instead? THanks so much!