Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

texcoord Patch for Prman #38

Conversation

eric-with-a-c
Copy link

@eric-with-a-c eric-with-a-c commented Nov 21, 2023

When rendering a materialx graph that includes an image node for reading in a texture with RenderMan the texture tiling is off as can be seen in the image below:

bishop_renderman_without_patch

With the patch in this pull request the texture looks correct as seen below:
bishop_renderman_with_patch

This test was done using the bishop_geom.usd from the USD Asset Working Group as the geometry. Then

  1. Create an image node and set its type to color3
  2. Set the bishop_black_base_color.jpg from the USD Asset Working Group as the image for the image node
  3. Create a Standard Surface
  4. Connect the out of the image node to the base color of the standard surface
  5. Create a Surface Material
  6. Connect the out of the Standard Surface to thesurfaceshader input of the Surface Material
  7. Change the Renderer to Prman

Creating the same MaterialX material in Solaris does not produce the same issue as what's seen here in QuiltiX.

While there weren't any adverse effects from this patch noticed in Storm for Metal, the patch that's presented in this pull request is most likely not the proper fix. But perhaps the info provided here is sufficient to identify the proper fix.

This was tested with:

  • USD-23.11 (Compiled with RenderMan and full OSL support)
  • MaterialX 1.38.7
  • RenderMan 25.2
  • MacOS 13.6

@manuelkoester manuelkoester added question Further information is requested upstream issue Some dependency QuiltiX relies on has a bug/issue labels Nov 21, 2023
@manuelkoester
Copy link
Member

Hey Eric!

Thank you for raising this issue :) We have not been able to test either RM nor Mac, so this is awesome to see!
I don't think that this would break anything, but at least when doing some roundtrips of materialx files I think this will remove the texcoord data. So this is indeed probably not the best way to fix this, but I will try to ping someone on the RM team to see how this would be solved best or if your fix is the way to go.

I hope I will get back to this with more information soon :)

@eric-with-a-c
Copy link
Author

@manuelkoester I was actually really surprised at how easy it was to get QuiltiX up and running with Prman. Thanks for all your work!

And you are correct, round tripping MaterialX files with this change causes the original issue to show up every other time the file goes through the roundtrip. So this is most certainly not a fix 😄.

@manuelkoester
Copy link
Member

It's been sometime, but I think the solution provided by Jonathan would be best. I'll create an issue out of this PR.

https://academysoftwarefdn.slack.com/archives/C0230LWBE2X/p1706898708018699

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested upstream issue Some dependency QuiltiX relies on has a bug/issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants