stop particle on trail collision detect

   1655   5   2
User Avatar
Member
11 posts
Joined: Aug. 2015
Offline
I have some particles that emit by impulse at frame 1.

They travel in a straight line, drawing a trail behind them.


I'm trying to figure out how I can have the particle stop if it collides with another particle or trail of any particle.


In the end it might look like a city road map. (a bit like this example here: https://openprocessing.org/sketch/1236570)

I've tried creating geometry from the trail and using that as a deforming static object in the dopnet, but that was slowing everything down to a crawl and didnt get anywhere.

Any ideas?

I've attached a file of where I've got to in case anyone would like to take a look.

Thanks for any input

Attachments:
intersecting_trails.hiplc (325.2 KB)

User Avatar
Member
53 posts
Joined: Feb. 2017
Offline
If you want to collide and respond to a collision with a collision object that contains an actual surface can use POP collision detect for this. It even allows you to set the collision behavior to stopped, which will stop them when they have their first collision. In case you want to collide with particles you might want to write a little wrangle using the nearpoint() function to find points within a certain (probably small) radius, and then set the @stopped attribute to 1 when another particle is detected. Particles do not actually collide, but setting a low threshold for the near radius can get you similar behavior akin to collisions.


POP collision detect documentation [www.sidefx.com]
Nearpoint function documentation [www.sidefx.com]
Technical VFX artist @ Housemarque / Sony Interactive Entertainment
User Avatar
Member
11 posts
Joined: Aug. 2015
Offline
I've almost got it working with a solver.

When I use xyzdist function and have just some standard geometry connected to input 2(1) I get the results Im after.

My trouble is that I need the trails generated by the particles to be what they collide with.

If I try connect the geometry generated by the trails they collide/stop straight away. hmmm
Edited by Red-Juice - Aug. 30, 2022 19:46:47

Attachments:
growing_lines.hiplc (482.8 KB)
Capture.PNG (60.1 KB)
Capture.PNG (529.7 KB)

User Avatar
Member
11 posts
Joined: Aug. 2015
Offline
I've figured it out thanks to a tutorial by Junichiro Horikawa.

Ended up using a recursive setup with a for each loop.
User Avatar
Member
11 posts
Joined: Aug. 2015
Offline
Ah that looks very interesting. Will take a look
  • Quick Links