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

Add UDIM example and fix UDIM bug in MaterialXGraphEditor #2113

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
clean up
ld-kerley committed Dec 20, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 8aaec7f8c2c7d98448253a9119bd6c8fc4917412
25 changes: 0 additions & 25 deletions resources/Materials/TestSuite/stdlib/udim/multi_udim_bunny.mtlx
Original file line number Diff line number Diff line change
@@ -1,40 +1,15 @@
<?xml version="1.0"?>
<materialx version="1.38">

<image name="image_color" type="color3">
<input name="file" type="filename" value="resources/Images/udim_bunny/grid_<UDIM>.png" colorspace="srgb_texture" />
</image>

<geominfo name="G_Bunny" geom="/">
<geomprop name="udimset" type="stringarray" value="1001, 1002, 1003, 1011, 1012, 1013" />
</geominfo>

<standard_surface name="S_Bunny" type="surfaceshader">
<input name="base_color" type="color3" nodename="image_color" />
</standard_surface>

<surfacematerial name="M_Bunny" type="material">
<input name="surfaceshader" type="surfaceshader" nodename="S_Bunny" />
</surfacematerial>

</materialx>

<!--
<materialx version="1.38">
<nodegraph name="NG_Bunny">
<image name="image_color" type="color3">
<input name="file" type="filename" value="resources/Images/udim_bunny/grid_<UDIM>.png" colorspace="srgb_texture" />
</image>
<output name="out_color" type="color3" nodename="image_color" />
</nodegraph>
<geominfo name="G_Bunny" geom="/">
<geomprop name="udimset" type="stringarray" value="1001, 1002, 1003" />
</geominfo>
<standard_surface name="S_Bunny" type="surfaceshader">
<input name="base_color" type="color3" nodegraph="NG_Bunny" output="out_color" />
</standard_surface>
<surfacematerial name="M_Bunny" type="material">
<input name="surfaceshader" type="surfaceshader" nodename="S_Bunny" />
</surfacematerial>
</materialx>
-->
2 changes: 1 addition & 1 deletion source/MaterialXGraphEditor/RenderView.cpp
Original file line number Diff line number Diff line change
@@ -472,7 +472,7 @@ void RenderView::updateMaterials(mx::TypedElementPtr typedElem)
std::string udim = mat->getUdim();
if (!udim.empty())
{
if ((udimElement == elem) && udimMaterial && false)
if ((udimElement == elem) && udimMaterial)
{
// Reuse existing material for all udims
mat->copyShader(udimMaterial);