In solaris, when referencing/payloading an alembic file, the default uv set 'uv' comes in fine and is translated to primvars:st and is of typeName texCoord2f. This can be picked up by Vray or Karma. However, any other uv sets (such as utilityAnim) come through as primvars:utilityAnim:indices and primvars:utilityAnim:vals, are type float2, and are not respected by Vray or Karma.
Is there a reason that these come through that way? And is there a way to get these primvars respected as uv sets? Or convert them from float2 to texCoord2f?
Mulitple uv sets in Solaris
3788 17 1- Hamilton Meathouse
- Member
- 175 posts
- Joined: Nov. 2013
- Offline
- Hamilton Meathouse
- Member
- 175 posts
- Joined: Nov. 2013
- Offline
I can put the Alembic in sops, drop a wrangle and do this: and then SOP Import into LOPs, but that's ghetto, and not how we load assets into LOPs at our studio.
Is there a way to do this in LOPs? I can't get a SOP Modify to even import all the attrs - when I dive inside, I just get a handful of usd attrs with the usual name, path, P, N, uv, and rest:vals, usdconfigconstantattribs - no matter what info I put on the SOP Modify, the other attribs like utilityAnim do not appear.
setattribtypeinfo(0, "vertex", "utilityGen", "texturecoord");
Is there a way to do this in LOPs? I can't get a SOP Modify to even import all the attrs - when I dive inside, I just get a handful of usd attrs with the usual name, path, P, N, uv, and rest:vals, usdconfigconstantattribs - no matter what info I put on the SOP Modify, the other attribs like utilityAnim do not appear.
- tamte
- Member
- 8592 posts
- Joined: July 2007
- Offline
Hamilton MeathouseI'm not sure about Vray, but Karma and Houdini GL should be able to bind to them by name with no problem even if they are float2
However, any other uv sets (such as utilityAnim) come through as primvars:utilityAnim:indices and primvars:utilityAnim:vals, are type float2, and are not respected by Vray or Karma.
are you using MtlX Geometry Property Value to read them in?
Hamilton Meathouseyou can try doing this in Wrangle LOP pointing to your mesh primitive
Is there a way to do this in LOPs?
usd_setmetadata(0, @primpath + ".primvars:utilityAnim", "typeName", "texCoord2f[]");
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- Hamilton Meathouse
- Member
- 175 posts
- Joined: Nov. 2013
- Offline
Thanks Tomas - this does work in a Wrangle LOP and changes it to texCoord2f. However Karma doesn't respect tha new uvset.
I think it's because the primvars:utilityAnim comes in as primvars:utilityAnim:indices or primvars:utilityAnim:vals
This works to change the typeName but doesn't affect the render:
I think it's because the primvars:utilityAnim comes in as primvars:utilityAnim:indices or primvars:utilityAnim:vals
This works to change the typeName but doesn't affect the render:
usd_setmetadata(0, @primpath + ".primvars:utilityAnim:vals", "typeName", "texCoord2f[]");
- Hamilton Meathouse
- Member
- 175 posts
- Joined: Nov. 2013
- Offline
- jsmack
- Member
- 7801 posts
- Joined: Sept. 2011
- Offline
Hamilton Meathouse
Thanks Tomas - this does work in a Wrangle LOP and changes it to texCoord2f. However Karma doesn't respect tha new uvset.
I think it's because the primvars:utilityAnim comes in as primvars:utilityAnim:indices or primvars:utilityAnim:vals
This works to change the typeName but doesn't affect the render:usd_setmetadata(0, @primpath + ".primvars:utilityAnim:vals", "typeName", "texCoord2f[]");
Yeah, I noticed that the alembic plugin for USD is broken with indexed array attributes. They get named incorrectly on import as 'name:vals' and 'name:indices' arrays instead of just 'name', 'name:indices'. I've been able to work around it by lofting the values to a new attribute with the correct naming, but this is prohibitively expensive to be a proper solution.
- Hamilton Meathouse
- Member
- 175 posts
- Joined: Nov. 2013
- Offline
- jsmack
- Member
- 7801 posts
- Joined: Sept. 2011
- Offline
- jsmack
- Member
- 7801 posts
- Joined: Sept. 2011
- Offline
LOL, wow there's a lot broken here. I guess answer is, don't use alembics with USD.
I'm not seeing the 'vals' for indexed arrays in 19.5, I was having that in 18.5 and earlier versions. However, the 'indices' are still somehow invisible to karma, and the primvar doesn't work at all. I don't think the type has anything to do with it. changing the type to texCoord had no effect.
Curious, I tried an 'arbitrary' attribute rather than a texture coordinate exported in the alembic. This was even worse. Instead of the primvar coming in as an indexed array of vectors, the arbitrary tuple came in as a flat array, so the length was unusable as it didn't map to either points or vertices, and was lacking an index list. I'm guessing float3 and vector attributes can't be used from alembics at all, except for a single point color attribute and a single uv attribute.
I don't remember it being this dysfunctional before.
I'm not seeing the 'vals' for indexed arrays in 19.5, I was having that in 18.5 and earlier versions. However, the 'indices' are still somehow invisible to karma, and the primvar doesn't work at all. I don't think the type has anything to do with it. changing the type to texCoord had no effect.
Curious, I tried an 'arbitrary' attribute rather than a texture coordinate exported in the alembic. This was even worse. Instead of the primvar coming in as an indexed array of vectors, the arbitrary tuple came in as a flat array, so the length was unusable as it didn't map to either points or vertices, and was lacking an index list. I'm guessing float3 and vector attributes can't be used from alembics at all, except for a single point color attribute and a single uv attribute.
I don't remember it being this dysfunctional before.
- Hamilton Meathouse
- Member
- 175 posts
- Joined: Nov. 2013
- Offline
Hmmm balls. I'll see what shakes out with an obj.
In the meantime - is there a way to get a SOP Modify to actually pull in all the attributes? As stated above, when I dive inside I just get a handful of usd attrs with the usual name, path, P, N, uv, and rest:vals, usdconfigconstantattribs. Obviously when looking at the same thing in sops I can see all the uv attributes.
In the meantime - is there a way to get a SOP Modify to actually pull in all the attributes? As stated above, when I dive inside I just get a handful of usd attrs with the usual name, path, P, N, uv, and rest:vals, usdconfigconstantattribs. Obviously when looking at the same thing in sops I can see all the uv attributes.
- stwist
- Member
- 3 posts
- Joined: Oct. 2022
- Offline
- Hamilton Meathouse
- Member
- 175 posts
- Joined: Nov. 2013
- Offline
- mtucker
- Staff
- 4443 posts
- Joined: July 2005
- Offline
Almost everyone at SideFX is on vacation right now, and tracking this won't be a five minute activity, so further investigation will have to wait until the new year. I see a hip file in this thread, but no .abc files... If you can provide an Alembic that demonstrates your issue that will be very helpful, as well as any other hip files that show the approaches you have tried. Thanks!
If this is urgent, please submit an issue to support.
If this is urgent, please submit an issue to support.
- Hamilton Meathouse
- Member
- 175 posts
- Joined: Nov. 2013
- Offline
We are uploading a repro to the DD sidefx ftp, should be with you soon.
Scene file annotated with all possible examples using basic alembic assets and alt versions with an internal alembic asset. Outlined examples which do and don't work using the default uv attr as well as custom uv attributes, depending on whether they are referenced or SOP Imported. Have also shown how LOP-referenced alembics do not allow access to custom uv attrs in SOP Modify LOPs as well.
Scene file annotated with all possible examples using basic alembic assets and alt versions with an internal alembic asset. Outlined examples which do and don't work using the default uv attr as well as custom uv attributes, depending on whether they are referenced or SOP Imported. Have also shown how LOP-referenced alembics do not allow access to custom uv attrs in SOP Modify LOPs as well.
- Hamilton Meathouse
- Member
- 175 posts
- Joined: Nov. 2013
- Offline
- stwist
- Member
- 3 posts
- Joined: Oct. 2022
- Offline
- Serg
- Member
- 511 posts
- Joined:
- Offline
- jsmack
- Member
- 7801 posts
- Joined: Sept. 2011
- Offline
-
- Quick Links