Jump to content

basic particle-particle collision behaviour? (preferably with VEX)


bhaveshpandey

Recommended Posts

Hi I was wondering if there's any way to get the getneighbours() function to work with scattered point data instead of connected point data?

i just want to get a list of neighbours for any arbitrary points.. :blink:

i'm just trying to get a very basic collision detection and response behavior with only VEX..is there any way to get it right with point clouds?

say if I have points A,B and C. A is at the origin, with B being closest to it and C being the farthest.

If I call the pcimport function and query the position of A for any other points, it will give back only the position data of B.

But it doesnot tell us if its B.(Since we knew B is closest, we conclude its B )

In such a case which would be the best way to get a basic collision(I mean particle-particle) setup working?

thanks :)

edit: I could actually store ptnum data as a float attrib and query it..in the meantime i'm open to a better/efficient option :)

Edited by bhaveshpandey
Link to comment
Share on other sites

Hi Marc, yes i did a test with vopsops first..i wanted to know whether it could be possible to influence the points near a particular point..??

for instance if we consider the scenario above of 3 points A,B,C would I be able to influence B explicitly/directly if its near A using point clouds or would i have to do some sort of accumulation of position vectors of the neighbours?

Link to comment
Share on other sites

getneighbours() won't work with scattered points simply because "neighbour" in vex means: sharing polygon's edge. You can import point number from a queried point in a cloud though with special "point.number" attribute. So this can be solved.

i just want to get a list of neighbours for any arbitrary points...

This IS a perfect job for a point cloud. You can either iterate points one by one within a query or integrate values with pcfilter in one call.

Generally I'm not sure if pure vex is enough to accomplish your goal. I would recommend to look at SPH microsolvers in DOPs. Many from a quantities computed by those are usable in POPs (like density, elastic forces etc). Apparently SPH also computes a neighbours' array for a sph particle, though I'm not sure an user can read it, as it's not an attribute.

Link to comment
Share on other sites

Thanks Symek! I'll look into the SPH fluid solvers..I guess i would go with pcfilter in that case just so computation time is low.. :)

I have been working on this for few days now and its driving me mad..either my particle system tries to not to move or just explodes..also the sim time increases with pcimport..

Link to comment
Share on other sites

either my particle system tries to not to move or just explodes..also the sim time increases with pcimport..

Particle system! Hm! I've had quite a few problems with point clouds in pops. I'm not sure they work well together. Try it in sops, if you can.

There's also another dops node for neighbors, gasparticleneighbourupdate, but as Symek says I don't think you can get at the neighbour list.

Another idea, not sure if it works, but a few days ago I posted an idea that Nature gave me; to do volume based collisions in pops. Perhaps it is possible to convert particles into volumes. I know you can in sops, and dops. Not sure the dops context will allow you to access it from a popsolver, but maybe you can. Sounds a bit complicated but it may just be possible, and fast.

Edited by Macha
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...