Masoud Posted May 27 Share Posted May 27 Hi everyone, I'm trying to copy some grass onto the top of my Vellum grains simulation. However, the grass blades aren't aligning with the direction of the grains — they always point straight up instead of following the grains' orientation. Does anyone know how I can make the grass follow the grains' axis properly? Thanks in advance for your help! Grain Grass_01.hip Quote Link to comment Share on other sites More sharing options...
Librarian Posted May 27 Share Posted May 27 Check rolling debris file in qLib Master files (workFlow) . You need orient Att.. @Masoud Quote Link to comment Share on other sites More sharing options...
Masoud Posted May 27 Author Share Posted May 27 Hi Tesan, I've downloaded and installed qLib, but I haven’t been able to find any clear documentation or guidance on how to use it. Is there a simpler way to achieve this effect, or could you point me toward any resources that might help? Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Librarian Posted May 28 Share Posted May 28 I just used last vex after simulation that you have in That file . For more advance Trick and Study if you search Grains orientation you gonna find some Studies on that Topic and Vex Codes. @Masoud Quote Link to comment Share on other sites More sharing options...
Masoud Posted May 28 Author Share Posted May 28 (edited) I opened the "rolling_debris.hip" file and confirmed that the POP Solver already aligns particle orientation to the surface correctly, without requiring any additional code. What I actually need is the same behavior for Vellum Grains, but it seems that Vellum doesn't orient the particles properly by default. I searched for "Grains Orientation" but couldn’t find any helpful tips. Since the Vellum solver doesn’t compute orientation by default, I manually applied an initial orient attribute before the solver. This stabilized the orientation, but now I need it to align properly with the animation. Edited May 28 by Masoud Quote Link to comment Share on other sites More sharing options...
Masoud Posted May 28 Author Share Posted May 28 I added the "up" and "orient" attributes before sim, and included these lines of code after it. The alignment has a little improved, but it's still not exactly what I need: vector axis = v@v * v@up; float angle = @Time * $PI; vector4 spin = quaternion(angle, axis); @orient = qmultiply(@orient, spin); The issue is that the grain's orientation resets to its initial state after they reach to the rest (zero velocity). Any ideas to improve it? Quote Link to comment Share on other sites More sharing options...
Masoud Posted May 28 Author Share Posted May 28 (edited) @Librarian Could you share the codes, please? Edited May 28 by Masoud Quote Link to comment Share on other sites More sharing options...
Librarian Posted May 29 Share Posted May 29 I just copied All from that file(rolling_debris )@Masoud without to take consider all attributes that have no Impact on your Setup. Just search "Grains Rotation" , you have some Vex solution and some Heavy Study on That Topic. Quote Link to comment Share on other sites More sharing options...
Masoud Posted May 29 Author Share Posted May 29 Here’s my scene using the same network, but it doesn’t work: Grain Grass_10.hip Quote Link to comment Share on other sites More sharing options...
hannes603 Posted June 2 Share Posted June 2 Grain Grass_11.hip untitled.mp4 maybe you can just turn the grain to geo and use the normals for orient the grass? Quote Link to comment Share on other sites More sharing options...
Masoud Posted June 6 Author Share Posted June 6 @hannes603 @Librarian Converting the grains to a surface and extracting normals from it is a solid approach, but I’m specifically trying to achieve this effect using VEX code, as Tesan suggested. The issue is that when I implement his solution, it doesn’t produce the same results in my scene as it does in his.! 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.