USD and UVs How to make it work ?

110 views
Skip to first unread message

Sébastien Desmet

unread,
Jun 8, 2020, 11:14:49 AM6/8/20
to gaffer-dev
Hello,

I'm trying to render (with arnold) a USD asset who come from houdini but the uvs seems to be broken. (I can see them in the uv inspector.)

we get theses warnings and errors
00:00:00 10424MB WARNING |  instance:6eed1e27dc5c3b33a57755e099575f30: indexed user-data is missing uvidxs companion array -- disabling user-data 'uv'
00:00:00 10424MB WARNING |  instance:adfcf4211f19fe79d1b4e64d418fa589: indexed user-data is missing uvidxs companion array -- disabling user-data 'uv'
00:00:00 10424MB ERROR   |  [polymesh] instance:6eed1e27dc5c3b33a57755e099575f30: incorrectly defined UV coordinates, missing either uvlist or uvidxs
00:00:00 10424MB ERROR   |  [polymesh] instance:adfcf4211f19fe79d1b4e64d418fa589: incorrectly defined UV coordinates, missing either uvlist or uvidxs
00:00:00 10424MB WARNING |  instance:8d4c482c03f87b487074f16e04ea83e6: indexed user-data is missing uvidxs companion array -- disabling user-data 'uv'
00:00:00 10424MB WARNING |  instance:85db4c3b19df225e704b6d86194d62f3: indexed user-data is missing uvidxs companion array -- disabling user-data 'uv'
00:00:00 10424MB ERROR   |  [polymesh] instance:f4785455ee305be8172a9f19d35c171d: incorrectly defined UV coordinates, missing either uvlist or uvidxs
00:00:00 10424MB ERROR   |  [polymesh] instance:8d4c482c03f87b487074f16e04ea83e6: incorrectly defined UV coordinates, missing either uvlist or uvidxs
00:00:00 10424MB ERROR   |  [polymesh] instance:528ee1df2632d321f66ba794892796da: incorrectly defined UV coordinates, missing either uvlist or uvidxs
00:00:00 10424MB WARNING |  instance:d418aa45cef44603ca3745e6135244a0: indexed user-data is missing uvidxs companion array -- disabling user-data 'uv'

Is someone have an idea what can cause this problem ?

Also:

I have tried to add a texture to the kitchen usd file provided by pixar to check the difference and I can't apply texture neither... I don't even see the uvs in the uv inspector

Is there a special workflow to apply textures to an USD file ??

Thx a lot,

Seb

Don Boogert

unread,
Jun 8, 2020, 4:19:29 PM6/8/20
to gaffer-dev
Hi Seb,

I think the first problem might be related to the interpolation of the UVs are they `point` attributes in houdini or `vertex`? In gaffer you can check the interpolation using the `Primitive Inspector` (which is Gaffer's Geometry spreadsheet) 

There is another thread in the group about the USD import not converting from `st` <-> `uv` when importing & exporting from USD - I think you work around this using the `ShufflePrimitiveVariables` node.

Cheers
- Don

Sébastien Desmet

unread,
Jun 8, 2020, 5:01:32 PM6/8/20
to gaffer-dev
Thanks a lot for you reply Don,

I have tested the the shufflePrimitiveVariable on the pixar kitchen scene and I can see the uvs. 
But now I get the same error message that I have with my houdini USD file...

What should I do to fix this error :[polymesh] instance:528ee1df2632d321f66ba794892796da: incorrectly defined UV coordinates, missing either uvlist or uvidxs 


Thx,

Seb

Sébastien Desmet

unread,
Jun 10, 2020, 6:46:49 AM6/10/20
to gaffer-dev
Hello, 

I'm back, is someone can help me with this issues? it is really blocking us on our project.

Thanks a lot for your help,

Seb

Tom Cowland

unread,
Jun 10, 2020, 7:31:23 AM6/10/20
to gaffe...@googlegroups.com
Hey Seb,

Sorry you're having troubles here. We'll need to look into this and see whats going on with the shuffled UVs, they do _look_ to be properly indexed from Gaffer's perspective, so I'll need to see whats happening in the Arnold backend. It's worth noting though that USD i/o with Gaffer hasn't been used in production very much, so there may well be all sorts of issues there, not just this one.

Cheers
Tom

-- 
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gaffer-dev/56b4f5fa-9f82-422d-a535-2ce5af56a44bo%40googlegroups.com.

Tom Cowland

unread,
Jun 10, 2020, 8:33:54 AM6/10/20
to gaffe...@googlegroups.com
Just had a quick look. The issue is that we're not loading the UVs from USD with the correct interpretation.

The attached script has a workaround for now. We'll get this fixed soon though, so they just work.

Hope this helps in the short term. Sorry for the trouble,

'best
Tom


usdUVs.gfr

Bruno Pollet

unread,
Jun 10, 2020, 2:15:53 PM6/10/20
to gaffer-dev
Hi Tom, thank you for the gaffer file.

I tried it and yes, it works for the Kitchen scene. But we're still having problems with our usds coming out of Houdini. Our Houdini exports as usds (standard exports, not parameter changes) will indeed export an st value, but no __faceindex primvar.
I emailed Sidefx Support about it and got a reply that __faceindex shouldn't actually be used... Here is a copy of the text received by email :
------------------------------------------------------
From the developers:
__faceindex is not standard USD, and I'm not sure what its purpose is... If you author a __faceindex geometry attribute in SOPs we will import it into USD through the SOP Import LOP, but it will be up to your tool consuming the USD to do "the right thing" with this additional attribute (whatever that right thing may be). The kitchen scene is very old, and contains a lot of unnecessary/nonstandard data and approaches. So I'm not sure you should be looking to it as a model of how USD should be authored...

The SOP Import LOP has an option to control whether a uv geometry attribute should be renamed to st on import. USD doesn't care about the names of the attributes you use as UVs, and neither does Houdini in most cases.

The SOP Import LOP also lets you explicitly specify which primvars should be generated as "indexed" primvars (i.e. with a primvars:foo:indices attribute to map M primvars:foo values to N vertices/points/faces). So you can choose which primvars to generate as indexed, and which to leave as flat primvars.
------------------------------------------------------

Do you think there's a way to get this to work without __faceindex ?

Cheers
Bruno

Bruno Pollet

unread,
Jun 11, 2020, 2:32:22 AM6/11/20
to gaffer-dev
Here is a follow-up email from sidefx

From our developers:
It sounds like this is purely a Gaffer import issue... It's not hard to have SOPs author primvars with a specific interpolation, if gaffer only supports one interpolation (as it sounds from that gaffer-dev thread). But I can't imagine any scenario in which we would start authoring __faceindex USD attributes automatically. Again, if you can author that attribute yourself in SOPs, LOPs will happily export it to the USD, but because it's required only as a quirk of the gaffer import process, we're not going to embed it as a native part of the Houdini USD authoring process.

Tom Cowland

unread,
Jun 11, 2020, 3:35:07 AM6/11/20
to gaffe...@googlegroups.com
Hi Bruno,

Gaffer has no need __faceindex. What problems are you having without it?

Many thanks
Tom

--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.

Bruno Pollet

unread,
Jun 11, 2020, 3:45:18 AM6/11/20
to gaffer-dev
Hi Tom,
Here is a sample usd we export from Houdini.
When loaded in gaffer it comes with errors complaining about WARNING : USDScene : Unknown type texCoord2f[] on PrimVar primvars:st

When I compared to the kitchen scene I thought the __faceindex was also needed as it was the main difference between both usds.
It looks like that's not actually the case.

So, do we have to change the way st is exported ?
rubbertoy.usd

Tom Cowland

unread,
Jun 11, 2020, 4:02:10 AM6/11/20
to gaffe...@googlegroups.com
Hi Bruno,

That helps, thanks. This is unrelated to __faceindex. It looks like we need to add support for the texCoord2f data type. If there is any way you can export it as float2[], then that should work until we fix this. Sorry I don't know Houdini very well, so am not sure how you might do that...

I'll add this to the list to fix when we sort out loading directly from st.

Sorry for the rough edges here - USD hasn't been used with Gaffer in production very much before now so we haven't had time to keep up with all of the changes. Please note, there will most likely be other unsupported USD features yet to be discovered! :-)

'best
Tom


--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.

Bruno Pollet

unread,
Jun 11, 2020, 5:33:26 AM6/11/20
to gaffer-dev
Hi Tom,
Yes converting st to a 2float did the trick.
Leaving a screenshot here in case it may help others.

Annotation 2020-06-11 113036.png

Thanks for the help !
Bruno

Sébastien Desmet

unread,
Jun 11, 2020, 6:40:16 AM6/11/20
to gaffer-dev
Thanks a lot Tom for your help !! It really help us to continue working !

Seb

Tom Cowland

unread,
Jun 11, 2020, 6:56:47 AM6/11/20
to gaffe...@googlegroups.com
Any time :) glad you got working. Sorry it's not so straight forward at the moment! 

'best
Tom

-- 
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages