Transfering colour from UV textured mesh to verts

   2431   4   1
User Avatar
Member
100 posts
Joined: 8月 2014
Offline
So I feel like this should not be too difficult.

But so far I have not had much luck with what I have found.

I have an organic UV'd mesh with a texture imported, I want to transfer the colours from the UV texture to some scattered points on the mesh.

Seems to work fine on a grid.

I think part of my issue is how to point to something beyond the “default.pic” image with the tex expression.

On of the biggest issues seems to be getting the colour from UV space to object space, so the colour us aligned to where it should live on the mesh.

Any help?
User Avatar
Member
8845 posts
Joined: 7月 2007
Offline
if you are scattering using Scatter SOP, you can inherit uvs from original mesh (Output Attributes tab)

then just use Attribute From Map SOP to get color from texture, which will use uv attrib for lookup
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
100 posts
Joined: 8月 2014
Offline
Awesome, thank you!

Any tips for doing it in H13? I tried an attrib transfer of UV to the scatter points, then a promote UV from vertex to points, and then an attrib from Map. But no dice so far.

I'm guessing I might need to keep the uv's a vertex attribute based on the H14 process.

Probably need to just play more.
User Avatar
Member
8845 posts
Joined: 7月 2007
Offline
for H13:

point uv's are not the problem as scatter automatically transfers them to points
so let's assume you have object with vertex uv's

1. append Facet SOP, check Unique Points (to simply make points independent, simply one point per vertex, therefore you would be able to promote uv's without them being averaged or simply messed up)
2. append Attribute Promote SOP and promote uv from vertex to point
3. append your Scatter SOP, since uv's are now point attrib, scattered points will have correct uv's and AttribFromMap SOP will work
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
100 posts
Joined: 8月 2014
Offline
Worked like a charm, thank you again.
  • Quick Links