Jump to content

Difference between particles and points


Recommended Posts

Hi.

What is the difference between these two? Is particle some kind of reference to point like vertex? Is it possible to apply particle forces to geo points (and to vertices as point's refs), modifying geo?

Let's say i have a grid, and i want to apply force (or wind, fan) with noise to the points of the grid. The only way i've found is to spawn particle per grid's point, apply force to it and than attribCopy P attribute.It worked, but only because order of points and particles is the same.

And here is the second question: how can i control which particle alters which point (from particles side)? I added integer attribute pointnum to particles with rand($ID)*(npoints(path to grid sop)-1) (just to test).

And now how can i find particle for every point, where particle's pointnum attribute == $PT and copy position.

Thanks in advance.

Link to comment
Share on other sites

I'm no expert, but I think that point's are basically just data with a position attribute, i.e. X, Y, and Z values. A particle has a whole bunch of extra attrbutes. You can create a particle system from a points by using the Add SOP.

Link to comment
Share on other sites

I'm no expert, but I think that point's are basically just data with a position attribute, i.e. X, Y, and Z values. A particle has a whole bunch of extra attrbutes. You can create a particle system from a points by using the Add SOP.

Thanks. But if i add particles with Add sop how can i pull those particles in POP network to apply all that pop stuff - forces, attribs and so on?

And as for my second question in initial post - if i want to transfer attribute from particle to specific point (for example i have particles with attribute pointnum and i want to copy position of the particle to the point with $PT == pointnum) what should i do?

Do i need to iterate through points for every particle with VOP SOPs?

Link to comment
Share on other sites

Thanks. But if i add particles with Add sop how can i pull those particles in POP network to apply all that pop stuff - forces, attribs and so on?

A particle primitive in itself is just a point cloud of type particle. Using the Add SOP as a way to collect a bunch of points in to a single primitive of type particle is a pretty efficient way of applying a primitive transform or other primitive operations.

To jump start a particle simulation from an existing geometry primitive such as a particle primitive, you can use two methods.

The first is the old school method where you write the geometry out to disk and then use the POP Network SOP to reference that geometry off of disk. Unfortunately this field does not support the op:/ syntax to reference geometry from a specific SOP node.

The second method (and one I recommend) is to create a local DOP network and use a POP Object DOP feeding in to a POP Solver DOP. All you need to do is go to the POP Object DOP and reference the geometry you wish to use as the initial state. This field does use a specific SOP reference.

Both of these methods bypasses the need to use the Source POP and you just start things rolling with a Null POP in the first method and absolutely nothing in the second DOP method.

See the attached hip file.

And as for my second question in initial post - if i want to transfer attribute from particle to specific point (for example i have particles with attribute pointnum and i want to copy position of the particle to the point with $PT == pointnum) what should i do?

Do i need to iterate through points for every particle with VOP SOPs?

If all you want to do is transfer an attribute such as Position P using identical point numbers the source and target, just use a Point SOP. Wire the geometry you want to drive the position with in the first Left input and wire the geometry with the position you want to reference in to the second Right input.

In the Position parameter, replace $TX, $TY and $TZ with $TX2, $TY2 and $TZ2 for the second input's point position.

There are other SOPs that you can use in combination to achieve any kind of matching without relying on manual indexing conditional loops:

Sort SOP > to resort either source, target or both to get things to index align better.

Attribute Copy SOP

new_pop_sim_from_particle_primitive.hip

  • Like 2
Link to comment
Share on other sites

A particle primitive in itself is just a point cloud of type particle. Using the Add SOP as a way to collect a bunch of points in to a single primitive of type particle is a pretty efficient way of applying a primitive transform or other primitive operations.

To jump start a particle simulation from an existing geometry primitive such as a particle primitive, you can use two methods.

The first is the old school method where you write the geometry out to disk and then use the POP Network SOP to reference that geometry off of disk. Unfortunately this field does not support the op:/ syntax to reference geometry from a specific SOP node.

The second method (and one I recommend) is to create a local DOP network and use a POP Object DOP feeding in to a POP Solver DOP. All you need to do is go to the POP Object DOP and reference the geometry you wish to use as the initial state. This field does use a specific SOP reference.

Both of these methods bypasses the need to use the Source POP and you just start things rolling with a Null POP in the first method and absolutely nothing in the second DOP method.

See the attached hip file.

If all you want to do is transfer an attribute such as Position P using identical point numbers the source and target, just use a Point SOP. Wire the geometry you want to drive the position with in the first Left input and wire the geometry with the position you want to reference in to the second Right input.

In the Position parameter, replace $TX, $TY and $TZ with $TX2, $TY2 and $TZ2 for the second input's point position.

There are other SOPs that you can use in combination to achieve any kind of matching without relying on manual indexing conditional loops:

Sort SOP > to resort either source, target or both to get things to index align better.

Attribute Copy SOP

Thanks alot for the explanation.

1) So as i understood particle is another type of point or reference to a point (as vertex do). And we CAN'T use points of the primitives (i mean points refered by vertices) as particles. we need to convert them (Add SOP for example, it converts points to particles and we loose any primitives except particles) or to spawn from them (Source POP with impulse activation on, active only for one frame and imp. Rate == npoints(initial_primitives_SOP)

We can't use POP forces directly on points of the primitives. we have to modify particles and transfer attribs to points or primitives.

2) As for your file. I understand both ways, but can't make it to work)

The old school way: if i add force inside popnet_state_from_file after Null nothing happens - only pre-POPnetwork attribs work (i mean point__set_initial_v)

The new way: the same thing here. if i add null + force pop inside POP Solver DOP or refer to another POPnet nothing happens.

All i see are static points.

Thanks one more time and sorry for my english)

Link to comment
Share on other sites

1) So as i understood particle is another type of point or reference to a point (as vertex do). And we CAN'T use points of the primitives (i mean points refered by vertices) as particles. we need to convert them (Add SOP for example, it converts points to particles and we loose any primitives except particles) or to spawn from them (Source POP with impulse activation on, active only for one frame and imp. Rate == npoints(initial_primitives_SOP)

We can't use POP forces directly on points of the primitives. we have to modify particles and transfer attribs to points or primitives.

Yes you are correct in that to work with particles, you need to bring them in to a POP network and that means a Source POP to reference the geometry (in what manner you wish to source particles) and birth them in to the system. This is where the POP rules are added and modified.

Just use the Source POP set to Impulse Activation to $FF==1 and set the Impulse Rate to $NPT and this will bring in your point geometry as a particle system then add whatever forces are required.

2) As for your file. I understand both ways, but can't make it to work)

The old school way: if i add force inside popnet_state_from_file after Null nothing happens - only pre-POPnetwork attribs work (i mean point__set_initial_v)

The new way: the same thing here. if i add null + force pop inside POP Solver DOP or refer to another POPnet nothing happens.

All i see are static points.

You need to initialize all the POP attributes required including accel, pstate, id, all the mandatory particle attributes, something I forgot to do in the supplied file. To be fair this is way too much trouble for 99.999% of the cases, so just use the Source POP and be done with it.

Link to comment
Share on other sites

  • 5 months later...

Hey guys,

First off thanks for this thread and the files, I've learned a lot just by reading the back and forth and checking out the file.

One problem that I can't seem to figure out - when I select a field or force from the "drive particles" shelf, I'm unable to select the particle system to apply the OP to. Am i doing something wrong?

Thanks!

Matt

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...