Can MaterialX file store uv data of mesh for assigning uv when rendering?

Can MaterialX file store uv data of mesh for assigning uv when rendering?

Anonymous
Not applicable
625 Views
4 Replies
Message 1 of 5

Can MaterialX file store uv data of mesh for assigning uv when rendering?

Anonymous
Not applicable

I tried to export mesh's uv data into a mtlx, but it doesn't work. Then I tried to add some code in a mltx, posted below, for assigning uv data manually, unluckily it still doesn't work. Is something wrong here, or Does Arnold's materialX operator not supoort this feature yet?


<geominfo name="gi5" geom="/group1/pCube1/pCubeShape1" >
<geomprop name="uvlist" value="1.375,0, 1.625,0, 1.375,0.25, 1.625,0.25, 1.375,0.5, 1.625,0.5, 1.375,0.75, 1.625,0.75, 1.375,1, 1.625,1, 1.875,0, 1.875,0.25, 1.125,0, 1.125,0.25" type="vector2array" />
</geominfo>

0 Likes
626 Views
4 Replies
Replies (4)
Message 2 of 5

madsd
Advisor
Advisor

Why not just write some osl code you inject into the .mtlx file to maintain and do whatever you want with the UV there?

0 Likes
Message 3 of 5

Anonymous
Not applicable

Thank you for this enlightening clue. Where can I find some examples about the skill of osl embedded in mtlx, please?

0 Likes
Message 4 of 5

madsd
Advisor
Advisor

In your DCC, export a shader chain from a plane or a sphere.
Make sure you use a closure and just hook any kind of osl map to the diffuse slot first.

The export will print the osl code into the .mtlx file and you can read out of that how you need to build it up.

0 Likes
Message 5 of 5

madsd
Advisor
Advisor

Opened a case like mentioned above.

5043-ccc.png

0 Likes