Jump to content

Help Aligning Grass with Vellum Grains Simulation


Masoud

Recommended Posts

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

Grain Grass_01.hip

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

ParticlesOrientation-ezgif.com-video-to-gif-converter.gif

Edited by Masoud
Link to comment
Share on other sites

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?

 

 

Particles Orientation.gif

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