Search - User list
Full Version: Multiple UV Sets in Alembic files exported from Maya
Root » Technical Discussion » Multiple UV Sets in Alembic files exported from Maya
MatthiasB
Hi there,

Can someone please help me figure out how to view and edit UVs from an Alembic file? I'm having the hardest time figuring this out and I'm getting nowhere. I'm quite new to Houdini so please bear with me.

Specifically I'm interested in editing the UVs from a secondary UV Set and then re-exporting the Alembic file with the new UV layout of that Set. How hard can this be, right?

I'm including two sample files - one Alembic the other FBX (both should represent the same data).
The FBX file seems to work fine, I can view both UV Sets and edit both just fine in Houdini (except that the correct name of the UV Set doesn't appear to transfer correctly - should be “uvSet” is “uv2” ..no matter).

Although it appears that the FBX file works fine, our asset pipeline is built around using Alembic files so creating special intermediate FBX files to just edit UVs is a very last and unwanted option.




Comparing both files (see screenshots) the one thing I notice, but can't seem to edit or change, is the fact that extra UV Set is “2flt” in the Alembic file but “3flt” in the FBX. That being normal or not, I gather Houdini can't display the UV's in “UV View” (or wants to register them as such) unless the data is in “3flt”, correct?

But no matter what I try - I just can't seem to change these attributes (copy, create, promote, swap, transfer, whatever) for Houdini to understand.

I've google'd around quite a bit but come across nothing that helps me solve this issue without applying a major Science Degree, what's up with that?
Is there a way to do this (edit Alembic UVs) without any fancy pants Python or VEX solutions …just using the built in nodes?

Any help much appreciated,
cheers!
martinkindl83
Second uv set needs to be called uv2 (uv3, uv4, …), plus it needs to be vector3

I created file, where im using VOP to convert from vector2 into vector3.
Image Not Found
martinkindl83
another option is wrangle over vertex


vector2 foo = getattrib(“opinput:0”, “vertex”, “uvSet”, @vtxnum, 1);

v@uv2 = foo;
MatthiasB
Hey Martin,

Thanks for that sample scene.
I didn't think of using that “Unpack” node and hadn't tried the VOP method yet …interesting.

I had already made some progress between the time you posted your first solution (took a while to find some extra time for this) and when I opened this thread. After some serious deep google-ing I found a way to convert the vector2 to vector3. I've literally no idea which method is more efficient though (for larger assets) …at least it seems to work for this simple scene. Do you have any thoughts on that?

You can see in the sample file I made (included) where I left off. I also added your sample method in there for comparison.

Now all that said …for either solution, neither of those methods seem to allow me to layout the UVs (in any set) of the Alembic file. It works fine for the FBX but uvs seem to be locked for the Alembic.

This might be the noob Houdini uv question of the century …but what are we missing here?

Regarding the UVs set name (uv2,uv3 etc.). I tried that as well the other day and it makes no difference. The second UV Set is still vector2 coming into Houdini and is just as “un-editable” as with any other name.

cheers!
martinkindl83
Hello.
first to start with. if you want to edit UVs, you have to unpack your geo. As with packed alembic, you dont have access to points or primitives. Its like GPU cache in Maya.
The two methods i posted above, should be equal in speed, but i would go with the VEX/wrangle one. Best solution is to fix export on source application if possible. As you dont want to unpack geo, if you dont have to.

Non of you branches has unpack - thus you dont see UVs and they will be significantly slower then the VOP/VEX approach.

Your branches dont work as you have “polysoups” Many sops dont work with that.

With alembic you have 3 options, you dont need attributes/move points/move primitives - you leave it as packed geo. If you need access to attributes you have to unpack. If you need to move points/primitives and have full access, you need to convert it to polygons. So in your case, best scenario is Alembic->unpack(set transfer attributes to *)->convert
MatthiasB
Yeah, I had “Unpack Alembic Delayed Primitives” set in the Alembic ‘read node’ as I didn't know of the ‘Unpack’ node.
I was certain it was enough but apparently it was the ‘Convert’ that got me - was somehow under the impression that all of that was taken care of in the unpacking.

Well… the UVs were visible in my branch (after I found a way to change the vector2 data) it was just the “laying-out” (manipulation) of the UVs that didn't work because of the missing ‘Convert’.

Anyway, thanks again Martin - This has been a massive maaaassive help.

cheers!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB