bug?: attribTransfer doesn't transfer uv info correctly

   7558   8   2
User Avatar
Member
268 posts
Joined: July 2005
Offline
The attribTransfer doesn't seem to transfer the UVs properly. Some are corrupted. See attached file.

fc5, 8.1.724
fc4 8.0.474
fc4 8.1.704

Attachments:
badTransfer.hipnc.gz (16.4 KB)

User Avatar
Member
4256 posts
Joined: July 2005
Offline
If your geometry has matching topology its best to use the Attribute Copy SOP or the Vertex SOP to copy the UVs from one model to the other.
if(coffees<2,round(float),float)
User Avatar
Member
268 posts
Joined: July 2005
Offline
Unfortunately the models have different topologies.
User Avatar
Member
2199 posts
Joined: July 2005
Online
The problem here is that attributetransfer is distance based and will simply transfer the uv of the nearest point, what you need is the interpolated value at the exact position of your target mesh.
I don't know if there is a current workaround, I've requested in H9 that they add to the ray sop the ability to pick up any attribute from the target surface not just normals.
Off the top of my head a quick way to improve the attributetransfer method would be to scatter points on your source mesh this will add more points with “correct” uv's you could then attributetransfer from this instead and it would give a better result because the nearest point would more likely have an accurate uv.
A better way I'm sure can be done with some espressions but I'll need to look this up, I'll post back if I can find something suitable…
The trick is finding just the right hammer for every screw
User Avatar
Member
268 posts
Joined: July 2005
Offline
Some of the uv's still get corrupted even when I point snapped my new geo to the old one. The help says that for vertex attributes they're mapped to the closest position and primitive and use barycentric interpolation. I'm only guessing that maybe either it's the wrong primitive that some get asigned or the interpolation is off.

I've had some luck with faceting the goe's to unique points, promoting the vertex uv's to point uv's and then transfering those and then promoting them down to vertex uv's again. The scatter idea sounds interesting, will try it out.
User Avatar
Member
2199 posts
Joined: July 2005
Online
AdamJ
The help says that for vertex attributes they're mapped to the closest position and primitive and use barycentric interpolation.

You've right, never noticed that in the help before. Hmmm in that case maybe it is a bug? Certainly from the help you are right it should work as you suggest.

In the case of vertex attributes, each destination vertex is first mapped to the closest position and primitive in the source geometry. The vertex attribute is then determined using a barycentric-like interpolation technique

edit:
its not working as you expect because your topology is so different, therefore the nearest point on the target doesn't necessarily have the uv coordinate you expect. So my scatter idea won't work either.

But I think it still doesn't necessarily work in situations where it should.
Look at the attached, I brickered the input then just transfered the uvs back onto it. All the new points should have the same values as the brickered version but they don't. Might be worth getting Sesi to take a look.

Attachments:
badTransfer_si.zip (8.6 KB)

The trick is finding just the right hammer for every screw
User Avatar
Member
212 posts
Joined: July 2005
Offline
I could have sworn Glenn when back fixed this very issue and improved the transfer when it was being developed…(blink it was a while ago blink)… and that it was working…I would have to try an older version. But right now it is easier to snap to the old UVs as a template
-k
User Avatar
Member
57 posts
Joined: July 2005
Offline
This is indeed a bug. Thanks for finding it! The Divide SOP produces special cases that has exposed this bug which is now fixed as of 8.1.746.
User Avatar
Member
268 posts
Joined: July 2005
Offline
great news.. thanks!
  • Quick Links