Texture path using Mtlx Geometry Prop Value is Black & White

   Views 799   Replies 6   Subscribers 0
User Avatar
Member
54 posts
Joined: Dec. 2016
Offline
I have a google earth mesh with a texture path string attribute on the prims. In Solaris I am using a mtlxgeompropvalue to import the string attribute. I can see the textures properly but in black and white. I guess its only reading in one channel. The Mtlximage node gives and error:

"
Error
Input storage type (uniform/varying) does not match input 'file'.
"

See screenshot

How can I get it to read the full color imformation?

Attachments:
screenshot.png (3.3 MB)

User Avatar
Member
8123 posts
Joined: Sept. 2011
Online
You can't connect a varying connection to the filename input of the milx image read node, see the error message.

The working method is to create a material for each unique texture file and set the path as a constant value on each material. This can be done using a template material and a a specialize arc to reference the template for each edit. Using python with a for loop to read the value from each primitive and create an instance with the override that is applied back to the same prim is one way to achieve this.
User Avatar
Member
54 posts
Joined: Dec. 2016
Offline
Thanks jsmack.

Your solution may very well work but its a bit beyond my current capability.

I dont see why I can get one channel working but there is no way to get them all... mtlx image read node is reading all the varying textures but only reading one channel.

I have it working fine in the old ROP render workflow using <basecolor_texture> overrides in Vray. I was hoping to make it work in Solaris and Karma.

Here is how it appears in viewport with geo spreadsheet:
Edited by polimpiado - Feb. 18, 2025 21:54:56

Attachments:
mesh.png (4.3 MB)

User Avatar
Member
8123 posts
Joined: Sept. 2011
Online
polimpiado
Thanks jsmack.

Your solution may very well work but its a bit beyond my current capability.

I dont see why I can get one channel working but there is no way to get them all... mtlx image read node is reading all the varying textures but only reading one channel.

I have it working fine in the old ROP render workflow using <basecolor_texture> overrides in Vray. I was hoping to make it work in Solaris and Karma.

Here is how it appears in viewport with geo spreadsheet:
Image Not Found

hmm, odd. maybe it works for Karma CPU? A single channel coming in would indicate the image node is set to 'float' instead of 'color'. Try changing the signature on the node.
User Avatar
Member
54 posts
Joined: Dec. 2016
Offline
The signature on the node gets greyed out when the geometry property value is connected. I was hoping there was some node that could interpret the texture path sting, to know its an image file...

You are correct also that it works only in Karma CPU.

I have managed to get it working with a more manual approach, similar to what you proposed which is just making a material per texture. Its not automated or procedural though.
User Avatar
Member
54 posts
Joined: Dec. 2016
Offline
It is actually working with Vray using a very simple mtlxImage with a <tex_path> string attribute. Oddly the same MaterialX material fails in Karma.

In the example there are two textures on alternating prims.


Attachments:
vray.png (2.1 MB)
karma_CPU.png (1.5 MB)

User Avatar
Member
54 posts
Joined: Dec. 2016
Offline
With the help of Peter Arcara, here is a solution with the current version of MaterialX (workflow will improve in the next one)

Attachments:
materialX_network.png (1.0 MB)

  • Quick Links