tyFlow Forum
Particles floating inside a volume - Printable Version

+- tyFlow Forum (https://forum.tyflow.com)
+-- Forum: tyFlow Discussion (https://forum.tyflow.com/forum-1.html)
+--- Forum: General Discussion (https://forum.tyflow.com/forum-2.html)
+--- Thread: Particles floating inside a volume (/thread-4777.html)



Particles floating inside a volume - Fabrice - 05-04-2025

Hi, 
I'd like to make particles float inside a volume.
Like dust floating in a invisible glass
or better : like a flock of bird flying inside an invisible and constantly deforming volume.

It means particles should be "randomly" moving in the volume but without ever going out of it.

I tried creating a simple box as the volume, 
I generate 1000 particles at frame 0 in the center of the box
and then add a noise force to make it randomly move.
I then add a find target in order for particles not to leave the volume.
It works but it's quite chaotic,
particles move inside but also around the volume, 
I'd like it to move only inside it.

Any help?


RE: Particles floating inside a volume - d4rk3lf - 05-04-2025

I don't think you need find target for this kind of stuff.
Here is how I would create it:
I would create box 1, then I would create slightly smaller box 2
I would birth particles (let's say 1000 in 0 frame), and I would use position object operator, I would pick box 2, and use by volume option.
Then I would add slow operator, then noise operator.
Finally I would add collision operator and pick box 1 (so they don't go out)

Now you can start increasing noise in force operator, and frequency, and try to play with scale.
Additionally, you can try increasing strength of slow operator.


RE: Particles floating inside a volume - Fabrice - 05-05-2025

Thanks for the answer but I see 2 problems :
- a lot of particles get stuck in the corner of the cube
- because of the Phys collision they bounce against the cubes faces like some crazy balls in a box
instead of flying inside the volume's limits (without touching them)


RE: Particles floating inside a volume - d4rk3lf - 05-05-2025

Well, you didn't do it, as I described it.
-
You said you want like a dust particles in invisible box, so why do you need PhysX at all?
Secondly you added gravity to the force, and I said only to add noise strength ( play with these 3 parameters strength, frequency and scale)
Thirdly you didn't added slow operator.
You also spawned particles from the icon, and if you want to fill the volume you should make their destination via position object (volume) and slightly smaller box.

If you still want to use PhysX so particles can bounce of each other, that's fine... just don't turn the gravity in force operator, and turn off default PhysX gravity in TyFlow object (in modify panel).


RE: Particles floating inside a volume - Fabrice - 05-05-2025

Again, thanks for the follow-up d4rk3lf!

To (try to) answer to your questions :
- Adding a +1 gravity to the force : I did that to compensate the -1 gravity that PhysX shape adds automaticaly (and...I couldnt find where to turn it off in the PhysX Shape parameters).
- spawning from a smaller cube's volume : you're right it does a better result in the first frames but after a few seconds the result is the same (particles bouncing against walls or ending up stuck in corners)
- No slow operator : I try adding one but it changed almost nothing, so I didnt keep it

I agree using PhysX is maybe not the best way to achieve the effect I want. 
But it's the only way I found to contain the particles inside a volume (with PhysX collision). 

But I'm definitly open to other solutions...


RE: Particles floating inside a volume - d4rk3lf - 05-05-2025

(05-05-2025, 01:04 PM)Fabrice Wrote: - Adding a +1 gravity to the force : I did that to compensate the -1 gravity that PhysX shape adds automaticaly (and...I couldnt find where to turn it off in the PhysX Shape parameters).

When you grab TyFlow object in the scene (the same one you created when you created TyFlow), if you go to modify panel, under PhysX rollout you can see that gravity and ground collider are enabled by default. You can disable them there. 
---------------------

Is something like this that you want? 
(attachment)