Jump to content

Particle flow on surface?


Recommended Posts

So you have your points flowing over your surface right? (Either creeping on colliding/sliding over the surface?)

You could project your points onto your surface with the ray sop (don't transform points, just extract the normal) which will get you a vector. You can normalize that vector, perhaps flip it if necessary and use it as an up vector.

Generally the direction your points are travelling will be the facing direction, so you can use a normalized velocity vector for N. Filter/clamp it so your N vector does not go to zero and does not flip to fast (if you are not dealing with too many points CHOPS can help filtering those interpolations).

Feed the resulting points with "up" and "N" in a copy sop and it should be fine.

Link to comment
Share on other sites

I'm currently working with instances.

One thing i don't understand.

When you create instance node there is option for aligning instances(velocity and upvector)

Then i using primuv() fumction to get normals on surface , and create upvector node to insert normal values , but in the end i get some random rotation.

In maya this is giving me rusult that i'm exprexting.

Maybe i don't understand something crucial here.

Link to comment
Share on other sites

1) try not to use pcimport, it is dependant on points which means your accuracy will be dependant on the amount of points that can be sampled from your surface. If accuracy is not that important and you have enough points then this will probably be the fastest method. (In case you have never done this, search for "pointclouds" and "pcimport", this is also in vops). Turn on multithreading for lots of speed.

2) if you have a lot of points, try and use vops instead of expressions. You can use the intersect vop together with the primitive attribute and primitive normal vops. They perform similarly to what the primuv expression would give you, only much faster. They also provide similar functionality to the ray sop.

Link to comment
Share on other sites

forgot to mention that for this You have to scatter enough points onto the surface You want to test

1) try not to use pcimport, it is dependant on points which means your accuracy will be dependant on the amount of points that can be sampled from your surface. If accuracy is not that important and you have enough points then this will probably be the fastest method. (In case you have never done this, search for "pointclouds" and "pcimport", this is also in vops). Turn on multithreading for lots of speed.

Link to comment
Share on other sites

Ok.

I have following setup for now.

Creep for sticking.

Ray for computing normals.

Then in vop sop i compute transform matrix and then extraxt rotation with extract transform.

Problem that i'm having right now is that particle velocities don't update with creep node , that is velocity is constant and reflects velocity at particle creation.

This was my problem in first place with instances , and random rotation , that i dod't understand(that was because i was using location for particles)

Any idea how to solve this?

Edited by breeder
Link to comment
Share on other sites

if the point numbers are static, you can post compute your velocity with a trail sop.

If it they are not static, then you will have to match points by ID (you can do that with the point sop or with python), and manually calculate/assign the velocity. Search for match by ID. Generally that technique involves comparing the position of the new points against the previous points, creating extra points for the new born points. You can also filter out the points that have died.

Link to comment
Share on other sites

Here's a quick file.

If you don't like the creep behaviour in pops, you can always recreate the creep behaviour in sops with a sopsolver. Takes a little more setup work, but can be really fast if your vops knowledge is good (all multithreaded).

Something is wrong with file.I got some fatal error etc.

Btw what i'm trying to do , i done in maya with python script.It was really messy , with dead particle filtering , etc , and it was very slow , so i hope houdini got some "simpler" solution.

Link to comment
Share on other sites

Thank for file.

Problem is i want to control particle position along uv of surface.

So problem arises when creep is used in particle network and then velocity is "blocked".

I think Peter's solution should work in that case. Or with a vopsop and a timshift.

Link to comment
Share on other sites

Ooh, here is one more idea about the Curse Of Changing Pointcounts -stolen from the SideEffects board.

I haven't tried it but perhaps you could group the particles that are to creep on the surface (don't delete any) and then use a sort sop to order by $ID. Then the trail sop.

Perhaps do some node acrobatics to avoid overwriting the old v (previously used as direction normal somewhere in the node chain). Or just use the new v.

Edited by Macha
Link to comment
Share on other sites

I can't open file that pclaes posted.

Is this only my problem?

Hey, which houdini build are you on?

I just opened it at work and that is houdini 11.0.581. It works fine here. (I don't remember by heart which build I'm on at home, but I think it's the same.)

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