Transfer Geo Texture to a Volume of Particles?

   4491   2   2
User Avatar
Member
54 posts
Joined: Dec. 2011
Offline
Iv been testing blowing away a piece of geo like sand, I used an iso offset to scatter a bunch of points in the geo volume then emit from them to get the piece of geo made up of particles.

But when it comes to coloring them im having trouble. Im using the color map method found here

http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&p=77876&sid=d1afe2f752fdc0876c07d8494dedc45d [sidefx.com]

But since im emitting from a volume of points rather than a piece of geo i don't have a UV texture to pull color from. Iv tried using the UV's of the original model and then using an attribute transfer to get the color over but then i need to use a sop solver to get that color to stick as the particles move but im using millions of particles so it runs so slow i can't use it.

I hope this makes sense. Iv attached the file as iv been trying to make it work.

Basically id just like to know, what is the best way to get a piece of geo's texture to apply to an entire volume of particles not just the surface

any help would be appreciated, im running out of time on this

Attachments:
ParticleVolumeColor_HELP.hipnc (1.8 MB)

User Avatar
Member
339 posts
Joined: Aug. 2007
Offline
Not the simplest, but it's fast
This showcases a few principles, in the first vopsop I'm sampling an SDF and combining it's gradient and sample value to get a normal to the surface, then I use that normal with the Intersect vop to raycast against the original mesh. This finds, if it hits, gives you the closest point on the surface for each of your scattered points, returned in the form of primitive id and parametric uv coordiantes. These in turn are used with a Primitive Attribute vop, which will fetch you point or vertex attributes, such as uv. Just a note, the multiply constant that i'm using doubles the length of the cast ray, so it will extend farther than the surface you want to hit, unlike the Ray sop the Intersect's ray cast stops at a maximum distance equal to the length of the vector you feed it.
Also your Attribute transfers are a bottleneck, they are just slow-ass nodes in general and if you learn to use point clouds in vops you'll never look back.
Good luck!

Attachments:
particlevolumecolor_help_198.hipnc (1.9 MB)

Jesse Erickson
Fx Animator
WDAS
User Avatar
Member
54 posts
Joined: Dec. 2011
Offline
Amazing, thank you so much!
  • Quick Links