Jump to content

UVs and velocity for particle meshes


Whatsinaname

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.

Link to comment
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
Link to comment
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.

Link to comment
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.

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