splegare Posted May 8, 2017 Share Posted May 8, 2017 Hi everyone, I'm trying to do a school of fish with a particle system that would follow a curve. Basically I'm emitting some particles and they move along a curve with a popcurveforce. By default the particles orientation seem to go along with the curve but since I'm trying to do a school of fish, I would like my particles Z orientation to always be 0 so the fishes don't swim on the back. So far I've tried with this expression in a popwrangle : p@orient.z = 0; The thing is it seems to zero out the orientation of x and y as well.. And I still want the x and y to go along with the curve. I'v tried with a popattract instead of a popcurveforce and I'm still not able to constraint the Z orient.. Maybe it has to do with something else than the @orient attribute since I don't see it in my geometry spreadsheet..? There's something I don't get! (Needless to say that I'm new in Houdini :P) Thanks a lot! test_fish_school.hiplc 1 Quote Link to comment Share on other sites More sharing options...
splegare Posted May 12, 2017 Author Share Posted May 12, 2017 (edited) If it can help anyone, I finally ended up switching strategy. Instead of using a popcurveforce, I went back to my first thought of animating a sphere along a spline and use it as a goal object in a popattract. In order to fix my issue with the z orientation, I kind of overrode the particles orientation with the lookat() function so each particle is now aiming at their goal without disturbing their local z-axis.. Here is what I've put in my popwrangle: matrix3 m = lookat(v@force, {0,0,0}); p@orient = quaternion(m); I have attached a quicktime if you want to have a look. Cheers! fish_school_v01.mp4 Edited May 13, 2017 by splegare 1 Quote Link to comment Share on other sites More sharing options...
Atom Posted May 13, 2017 Share Posted May 13, 2017 Looks nice, thanks for the solution. I took a look at your file and could not figure it out. Quote Link to comment Share on other sites More sharing options...
xc278260759 Posted March 30, 2018 Share Posted March 30, 2018 Very good plan。 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.