How To Delete One UV Attribute? [SOLVED]

   4917   8   1
User Avatar
Member
78 posts
Joined: 6月 2019
Offline
I have 3 uv attributes on a mesh uv[0] uv[1] uv[2]
I would like to delete just uv[2]and keep the other two attributes.

I cannot work out how to delete just this one attribute.

I have tried using an Attribute Delete SOP set to uv.2, uv2 and uv[2]but it keeps saying it can't find the attribute to delete.

How can I go about deleting this one uv attribute?
Edited by GlennimusPrime - 2021年1月14日 19:33:21
User Avatar
Member
78 posts
Joined: 6月 2019
Offline
By the way, what is the 3rd uv attribute for?

Why would a single vertex need more than two coordinates? I assume it only needs a u value and a v value.

What does the 3rd one even do?
User Avatar
Member
7733 posts
Joined: 9月 2011
Offline
GlennimusPrime
By the way, what is the 3rd uv attribute for?

Why would a single vertex need more than two coordinates? I assume it only needs a u value and a v value.

What does the 3rd one even do?

It's just one attribute, you can't delete a component. The attribute can be replaced with a size 2 attribute using attribute create if needed, but most uv tools in houdini expect 3 coordinates.

UV uses three coordinates for the same reason it's useful to use 4 coordinates to represent 3 dimensions. The third being 'w' which can be used to represent an imaginary axis. It allows for rotations uv coordinates on arbitrary axes to be reversible. A matrix could be used to represent the mapping from one space to another, such as for projective spaces. The third dimension stores the projective z axis.
User Avatar
Member
1 posts
Joined: 1月 2021
Offline
jsmack
GlennimusPrime
By the way, what is the 3rd uv attribute for?

Why would a single vertex need more than two coordinates? I assume it only needs a u value and a v value.

What does the 3rd one even do?

It's just one attribute, you can't delete a component. The attribute can be replaced with a size 2 attribute using attribute create if needed, but most uv tools in houdini expect 3 coordinates.

UV uses three coordinates for the same reason it's useful to use 4 coordinates to represent 3 dimensions. The third being 'w' which can be used to represent an imaginary axis. It allows for rotations uv coordinates on arbitrary axes to be reversible. A matrix could be used to represent the mapping from one space to another, such as for projective spaces. The third dimension stores the projective z axis.

I agree with you. Components can't be deleted.
User Avatar
Member
78 posts
Joined: 6月 2019
Offline
Hi thanks for the replies. This clears things up and explains a few things for me.

My original issue was importing Houdini geometry into Maya, which was messing up the UVs. I initially thought the 3rd UV channel was breaking things, but later found out Maya will only read point UV attributes, not vertex uv attributes.

Unfortunately converting uvs from vertex to point messes up the uvs on the object. They don't transfer cleanly.

Anyway, thanks for clearing up the other stuff for me.
User Avatar
Member
8513 posts
Joined: 7月 2007
Offline
GlennimusPrime
later found out Maya will only read point UV attributes, not vertex uv attributes.
I assume you are using alembic

MAya can read vertex uvs, as that's the most commonly used ones in traditional CG workflows
the problem may be that your geo has some polygons with multiple vertices attached to the same point, Maya importer doesnt like that
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
78 posts
Joined: 6月 2019
Offline
Hi Tamte, yes I was exporting from Houdini as an Alembic to bring into Maya.

I'm just testing this again now and you're correct, maya is reading the uv vertex attribute. I don't know what was going wrong for me before.

Although I no longer need to export the geo with a uv point attribute, I have also found a solution to the uvs being messed up when attribute promoting the vertex uvs to a point attribute - The problem was the vertices were still attached, so when promoting to point, they would cross over each other. The fix was to use a 'uv split seams' sop before the attribute promote.
Edited by GlennimusPrime - 2021年1月14日 23:12:19
User Avatar
Member
8513 posts
Joined: 7月 2007
Offline
I'm glad you found a solution that works for you

GlennimusPrime
The fix was to use a 'us split seams' sop before the attribute promote.
In most cases I wouldn't call this a fix as it actually splits the geo at those seams which can have undesired effects down the line if that was not the intention
If it's intended though, there is a checkbox to promote to point on split uv seams directly
Edited by tamte - 2021年1月14日 21:47:58
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
78 posts
Joined: 6月 2019
Offline
Oh that's handy! I didn't realise the uv split seams sop had the promote to point attribute right there to use.

So I see this does separate the geometry at the uv border edges. How would you go about achieving this result without separating the geometry?

I tried a fuse after uv split seams, but it seems to revert back to it's un-split state again.
Edited by GlennimusPrime - 2021年1月14日 23:29:52
  • Quick Links