Particles move across the surface of the model

I’m curious about how particles move across the surface of a static model and a dynamic model. Does anyone know the source or how to implement such effects?

https://threejs.org/docs/#examples/en/math/MeshSurfaceSampler

Is one approach to emitting particles on the surface of a model, but to get them to travel along the surface is much trickier.
One approach there is to write the mesh itself into a texture that can then be accessed in the vertex shader to allow a particle to “walk” the surface of the mesh…
I have implemented this in the past, but I don’t have the code handy anymore, and I don’t know of any libraries that implement it, although I’m sure there are some.

2 Likes

This may not be what you are looking for, but could you create a texture with the particles drawn on the texture and then change the texture offset with each render? This should work if you are trying to show particles skimming an imperceptible distance above the object surface and would be very easy to implement. You might even be able to create some interesting shadow/3D effects using a second diffuse map, a normal map, a displacement map or a map that changes reflectivity.
Of course, there might be some shapes where the UV mapping could cause the particles to grow or shrink. If you create the object in Blender, you could experiment with different shapes and different UV mapping to try to eliminate that problem.

1 Like

Thank you for sharing. After some research, I found there are a few ways to do this, one is use three-mesh-bvh, the other is to use the method that lusion used to do, they used the same VDB SDF method in houdini Surface Floater by Lusion - Experiments with Google.

2 Likes

Hello, do you have some inputs about using three-mesh-bvh for this type of effects ?

I didn’t use three-bvh anymore, I used depth texture for a less precise option. Or sdf texture / volume for a high precise option. For both of these methods, you can use texture2d.
And for skinnedmesh use depth texture , and if u want high precise , u can gen sdf by use three-bvh (but it really laggy) , can export static but still too much weight.

1 Like