Jump to content
Whatsinaname

UVs and velocity for particle meshes

Recommended Posts

When creating a mesh from a cloud of moving particles, is there a way to transport the UVs according to the particle's movement, e.g. by using velocity somehow?

Here's my situation:

I create a mesh out of particles coming from a liquid simulation. Now, I want to add displacement using an animated texture but with just having a UV top projection that might look poorly. So I need to somehow transport the UVs according to the underlying particle's velocity and get that information onto the mesh?

Any idea or hint was very much appreciated.

Thanks.

Share this post


Link to post
Share on other sites

You should store a rest attribute (rest sop) on the particles, and/or do the uv attributes before you sim. They will automatically transport along with the particle. If you have a rest attribute you can put them to p from rest, apply uvs, and then copy uv back onto the simmed particles. If you don't have a rest attribute and can't resim, then setting it up to do it post-sim is doable, but I don't think it'd be very straightforward (at least not off the top of my head), or as accurate.

Edited by Solitude

Share this post


Link to post
Share on other sites

Thanks for your answer. Actually, the liquid was simulated in Realflow and now I need the UVs working to apply a proper displacement. Getting a Rest attribute for the RF particles worked, thn in a VOPSOP I copied the Rest attribute onto the particles.

If I get it right, I need the Rest attribute for the initial frame as if I sample it for any frame, Rest is the same as particle position. In that case, it made no sense having an extra Rest attribute. How do I correctly update a UV with the rest for the subsequent frames, then? If I had an idea how to do that, I guess the hardest part was done, then.

Share this post


Link to post
Share on other sites

The rest position needs to be their original emitter position before they move, it's not the same as the simulated positions. Realflow should also support uvs on the particles, but it's been a while since I've used it, so I can't really help there much. It's the same idea though. Project the uvs on the emitter, then those uvs get carried along with the particle as it sims.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×