Custom Gravity Workflow?

   1891   1   1
User Avatar
Member
76 posts
Joined: 2月 2017
Offline
Hello everyone,

I am trying to achieve a custom gravity force, an inverse radial sort to say which would allow me to attract DOP objects to the walls of an arbitrary geometry, in this case a tubish shape. Until now I could come up with this:

- Assigning to the Dop Gravity Force the Normal value of the primitives of the attractor, with a prim function, but it only takes into account the normal of the single primitive specified.

- Creating a radial gravity , negate it and make the tube a collider. The problem here is that since the force is applied in every direction, the object get attracted also where there is no geometry and therefore they don't act as if they where dropped on the ground and keep sliding and rolling.(Idea discarded because it would always push in every direction)

- Creating a SDF from the geometry and use the volume gradient to create a force that attracts stuff towards it. Here as well the objects keep rolling and seem to be attracted where there is no geometry regarless of how close to the surface i drop them. In this particular case I don't know what is not working, maybe because I am using the volume for generating the force but the surface for collisions? I think I am missing something inside the vopnet.


Could someone point me toward the solution?

Thank you for you help and sorry for the long reading

Attempts attached

Attachments:
Custom_Gravity.hip (516.8 KB)

User Avatar
Member
1 posts
Joined: 8月 2017
Offline
Hi, I think something like the VOP force you used on the SDF should work, but I'm new enough that I can't figure out how to pipe the SDF into it.

As an alternate, I'd suggest the Field Force. If you add point normals to the collision geometry, you can use the N attribute to drive the Field Force. Setup attached.

If anyone does know how to get the SDF volume into the VOP force, I'm curious, as I think that would be more controllable.

Cheers!
- E

Attachments:
Custom_Gravity_FF.hiplc (474.4 KB)

  • Quick Links