Jump to content


Drag POP Maths


  • Please log in to reply
11 replies to this topic

#1 jkunz07

jkunz07

    Initiate

  • Members
  • PipPip
  • 117 posts
  • Joined: 22-June 11
  • Location:Los Angeles, CA
  • Name:John Kunz

Posted 09 July 2012 - 09:07 PM

Does anyone know the math being done behind the Drag POP ?

The docs state that the drag is proportional to the speed of each particle, so would a VOPPOP equivalent be something like multiplying the current velocity by 0.95 or some fraction of 1 depending on amount of drag?
MrKunz.com
Blog | Demo Reel | Resume

#2 rafaelfs

rafaelfs

    Initiate

  • Members
  • PipPip
  • 136 posts
  • Joined: 16-September 10
  • Location:Toronto
  • Name:Rafael Santos

Posted 10 July 2012 - 08:19 AM

 jkunz07, on 09 July 2012 - 09:07 PM, said:

Does anyone know the math being done behind the Drag POP ?

The docs state that the drag is proportional to the speed of each particle, so would a VOPPOP equivalent be something like multiplying the current velocity by 0.95 or some fraction of 1 depending on amount of drag?

I believe it is really just a multiplier. I've asked this question before and got no responses, but one way to verify would be creating two identical particle systems and use a drag pop on the first and a vop pop on the second.

Cheers

PS: on a second thought, I do believe the drag pop takes mass into consideration...  :huh:

Edited by rafaelfs, 10 July 2012 - 08:21 AM.

Toronto - ON
My Houdini playground

#3 vectorblur

vectorblur

    Illusionist

  • Members
  • PipPipPip
  • 255 posts
  • Joined: 05-November 10
  • Location:India
  • Name:Gaurav Mathur

Posted 10 July 2012 - 09:44 AM

I dont know how drag pop really works but intuitively it should be dependent on both the speed of the object and the square of its speed.

drag = −1*normalize(v)*( C1 *|v| + C2 * |v|^2)

Drag with C2 value will grow faster as the speed gets higher.
At least thats what seems to be  with air drag that keeps things from accelerating to infinity. At slow speeds there is little drag from the air, but for 2x of the speed the drag will be 4x as it increases.

just a thought.

Edited by vectorblur, 10 July 2012 - 09:59 AM.

Eh *munch munch* what sop, doc?

#4 magneto

magneto

    Grand Master

  • Members
  • PipPipPipPipPip
  • 1,287 posts
  • Joined: 04-October 11
  • Location:Canada
  • Name:Ryan K

Posted 10 July 2012 - 03:18 PM

 rafaelfs, on 10 July 2012 - 08:19 AM, said:

I believe it is really just a multiplier. I've asked this question before and got no responses, but one way to verify would be creating two identical particle systems and use a drag pop on the first and a vop pop on the second.

Cheers

PS: on a second thought, I do believe the drag pop takes mass into consideration...  :huh:

Thanks, this is a cool trick when replicating POPs in VOPs.

#5 jkunz07

jkunz07

    Initiate

  • Members
  • PipPip
  • 117 posts
  • Joined: 22-June 11
  • Location:Los Angeles, CA
  • Name:John Kunz

Posted 10 July 2012 - 06:11 PM

 magneto, on 10 July 2012 - 03:18 PM, said:

Thanks, this is a cool trick when replicating POPs in VOPs.

Yeah, that's what I was after.  Here's a file with some useful particle operations implemented in vopsops and a solver sop:

Attached File  solversop_particlevops_v001.hip   420.87K   60 downloads


Lemme know if anyone finds any of the vopsops particularly useful or if anyone has any feedback.
MrKunz.com
Blog | Demo Reel | Resume

#6 magneto

magneto

    Grand Master

  • Members
  • PipPipPipPipPip
  • 1,287 posts
  • Joined: 04-October 11
  • Location:Canada
  • Name:Ryan K

Posted 10 July 2012 - 06:19 PM

Thanks John, that looks great. Would be good to have all the POPs implemented this way for everyone to see :)

#7 jkunz07

jkunz07

    Initiate

  • Members
  • PipPip
  • 117 posts
  • Joined: 22-June 11
  • Location:Los Angeles, CA
  • Name:John Kunz

Posted 10 July 2012 - 08:46 PM

 magneto, on 10 July 2012 - 06:19 PM, said:

Thanks John, that looks great. Would be good to have all the POPs implemented this way for everyone to see :)

No problem, some of that file is direct ports of stuff from the Cinder flocking tutorial  which explains some of the math/concepts behind flocking systems very well in my mind.
MrKunz.com
Blog | Demo Reel | Resume

#8 magneto

magneto

    Grand Master

  • Members
  • PipPipPipPipPip
  • 1,287 posts
  • Joined: 04-October 11
  • Location:Canada
  • Name:Ryan K

Posted 11 July 2012 - 08:27 AM

Thanks John for sharing that link. Looks like a good resource.

Basic POPs should be easy to implement in VOPs, but I am wondering if anyone has ever implemented interparticle collisions in VOPs? That would be pretty sweet :)

#9 jkunz07

jkunz07

    Initiate

  • Members
  • PipPip
  • 117 posts
  • Joined: 22-June 11
  • Location:Los Angeles, CA
  • Name:John Kunz

Posted 12 July 2012 - 06:17 PM

 magneto, on 11 July 2012 - 08:27 AM, said:

Thanks John for sharing that link. Looks like a good resource.

Basic POPs should be easy to implement in VOPs, but I am wondering if anyone has ever implemented interparticle collisions in VOPs? That would be pretty sweet :)

A type of repulsion or avoidance behavior shouldn't be that hard to implement in vops, should be as straightforward as point cloud filter nearby particles and adjusting accelerations of particles within a certain radius of each other.  I'll let you know if I have any success with it.
MrKunz.com
Blog | Demo Reel | Resume

#10 magneto

magneto

    Grand Master

  • Members
  • PipPipPipPipPip
  • 1,287 posts
  • Joined: 04-October 11
  • Location:Canada
  • Name:Ryan K

Posted 13 July 2012 - 04:49 AM

Thanks John, that would be awesome. I need to dive into point clouds myself too :)

#11 jkunz07

jkunz07

    Initiate

  • Members
  • PipPip
  • 117 posts
  • Joined: 22-June 11
  • Location:Los Angeles, CA
  • Name:John Kunz

Posted 13 July 2012 - 03:13 PM

 magneto, on 13 July 2012 - 04:49 AM, said:

Thanks John, that would be awesome. I need to dive into point clouds myself too :)

Here's a quick implementation
Attached File  solversop_particlevops_avoidance_v001.hip   585.43K   45 downloads

If any particles get too close to each other (within the search radius of the vopsop parameter) they push away from each other.
MrKunz.com
Blog | Demo Reel | Resume

#12 magneto

magneto

    Grand Master

  • Members
  • PipPipPipPipPip
  • 1,287 posts
  • Joined: 04-October 11
  • Location:Canada
  • Name:Ryan K

Posted 15 July 2012 - 02:55 PM

Thanks John, looks very good. I will have to carefully examine it :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users