RadeonProRenderUSD icon indicating copy to clipboard operation
RadeonProRenderUSD copied to clipboard

Allow materialX to read texture coordinates that are not named "st"

Open trebconnell opened this issue 2 years ago • 4 comments

PURPOSE

See description.

EFFECT OF CHANGE

If the mesh doesn't have a primvar named "st" then it will find the next primvar with the texture coordinate roll.

TECHNICAL STEPS

See 'Effect of Change'

NOTES FOR REVIEWERS

The primary downside to this approach is if the mesh has multiple texcoords it will pick just the first one, which may not be what the materialX needs. But since hdRPR currently doesn't support multiple texcoords I think this is acceptable.

trebconnell avatar Sep 21 '22 21:09 trebconnell

RPR actually supports 2 texture coordinates FYI. I'm not sure hdRPR does anything to populate the second one though.

bsavery avatar Sep 22 '22 01:09 bsavery

Ah cool. I'll tweak this to load the first two then.

I'm getting test errors in the CI, but I can't access the Travis to see what they are. Are these expected failures? I wouldn't expect this change to break anything.

trebconnell avatar Sep 22 '22 01:09 trebconnell

Enabling second uv is a bit more involved as the rprApi wrapper doesn't currently support it. Shouldn't be too hard to route through, but will be larger than this PR

trebconnell avatar Sep 22 '22 01:09 trebconnell

Enabling second uv is a bit more involved as the rprApi wrapper doesn't currently support it. Shouldn't be too hard to route through, but will be larger than this PR

Ok, I wasn't sure if the rprAPI supported the second or yet.

Let me see about the CI failures.

bsavery avatar Sep 22 '22 14:09 bsavery