How to attract sand to an object?

Recommended Posts

Hi,

Is there a way to attract sand to the surface of another object using distance? If the sand was magnetic, the sand being drawn to the magnetic object based on distance with falloff and not very strong but non continuously moving to the object and sticking to it.

How would you go about achieving this?

Thanks

Share on other sites

in general:

calculate the closest position of the surface via xyz distance vop and get P with the prim attribute vop. subtract that P from the grains P, normalize, scale to gusto, and pipe into force or add wind vop.

Share on other sites

an here a quick and dirty hip file

attract_to_target_grain.hip

• 1

Share on other sites

Thanks a lot man, it looks good

What's the best practice in terms of moving particles? Adding to v, adding to force, setting v, setting force, or using add wind vop?

Share on other sites

add wind force is neat, as you dont need to battle force getting to big and therefore dont need any drag force. I would not add to v, let the solver calculate that for you.

Edited by sekow
• 1

Share on other sites

pop attract doesn't do what you want?

magnet_pig.hipnc

• 1

Share on other sites

add wind force is neat, as you dont need to battle force getting to big and therefore dont need any drag force. I would not add to v, let the solver calculate that for you.

Good info. I will try wind force vop.

pop attract doesn't do what you want?

I tried it but it wasn't easy to control. I basically want to crawl the sand onto the surface in a tentacle manner. So it will have individual branches of sand moving onto the surface.

I will try pop curve force next with curves shaped like tentacles.

Share on other sites

Hi guys,

I have just seen your post and I had a similar doubt on how to create a sand effect.

I am new to 3d, and so I started with Houdini a couple of months ago, I'm trying to understand it slowly. The effect I would like to achieve is this one, basically sand rising and making a shape in that curly way. I hope somebody could explain me what can be used for that as I don't find any tutorials.

Thanks!

va