breeder Posted March 9, 2011 Share Posted March 9, 2011 Hi I'm trying to make particle flow on surface , and to be aligned with surface but can't get it to work. First part about flow it is ok , but can't get them to orient to surface. Quote Link to comment Share on other sites More sharing options...
pclaes Posted March 9, 2011 Share Posted March 9, 2011 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. Quote Link to comment Share on other sites More sharing options...
sanostol Posted March 9, 2011 Share Posted March 9, 2011 what about using pcimport to get the closest surface normal? Quote Link to comment Share on other sites More sharing options...
breeder Posted March 9, 2011 Author Share Posted March 9, 2011 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. Quote Link to comment Share on other sites More sharing options...
pclaes Posted March 9, 2011 Share Posted March 9, 2011 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. Quote Link to comment Share on other sites More sharing options...
sanostol Posted March 9, 2011 Share Posted March 9, 2011 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. Quote Link to comment Share on other sites More sharing options...
breeder Posted March 9, 2011 Author Share Posted March 9, 2011 (edited) 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 March 9, 2011 by breeder Quote Link to comment Share on other sites More sharing options...
pclaes Posted March 9, 2011 Share Posted March 9, 2011 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. Quote Link to comment Share on other sites More sharing options...
pclaes Posted March 9, 2011 Share Posted March 9, 2011 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). creep_orient_01.hip Quote Link to comment Share on other sites More sharing options...
breeder Posted March 10, 2011 Author Share Posted March 10, 2011 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. Quote Link to comment Share on other sites More sharing options...
Macha Posted March 10, 2011 Share Posted March 10, 2011 I'm only following this with a single sleepy eye, but does this help in any way? follow.hip Quote Link to comment Share on other sites More sharing options...
breeder Posted March 10, 2011 Author Share Posted March 10, 2011 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". Quote Link to comment Share on other sites More sharing options...
Macha Posted March 10, 2011 Share Posted March 10, 2011 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. Quote Link to comment Share on other sites More sharing options...
Macha Posted March 10, 2011 Share Posted March 10, 2011 (edited) 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 March 11, 2011 by Macha Quote Link to comment Share on other sites More sharing options...
breeder Posted March 11, 2011 Author Share Posted March 11, 2011 (edited) I can't open file that pclaes posted. Is this only my problem? Edited March 11, 2011 by breeder Quote Link to comment Share on other sites More sharing options...
pclaes Posted March 11, 2011 Share Posted March 11, 2011 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.) Quote Link to comment Share on other sites More sharing options...
breeder Posted March 12, 2011 Author Share Posted March 12, 2011 (edited) Yeah problem was houdini built. I figure it out. I used manually calculated velocity in particle vop. Normal with ray , and it is ok. Thanks again for the help , i leaned some "tricks" from your files. I'm quite new to houdini , so alot things to figure out. particleSurfaceGoal.hip Edited March 12, 2011 by breeder Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.