MTLX Image file name from attribute

   426   3   2
User Avatar
Member
65 posts
Joined: Sept. 2008
Offline
Hi, there.
I have images named img_0.png, img_1.png,...
Also, there are attribute named layer with values 0, 1, 2,...
How can I set the file name field of MTLX Image node so that the file name corresponds to layer attribute?
Edited by ifree - Oct. 9, 2025 07:44:55
User Avatar
Member
14 posts
Joined: Dec. 2017
Offline
Hi ifree,
here's a scene for this stuff
not from me

Attachments:
ts_texture_per_prim_variation_20.5.hipnc (296.0 KB)

User Avatar
Member
9302 posts
Joined: July 2007
Offline
or in 21 you can directly use string primvars to override filepath without creating additional materials, here is the updated file

Attachments:
ts_texture_per_prim_variation_21.hipnc (342.0 KB)

Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
65 posts
Joined: Sept. 2008
Offline
Thanks, Hip_freak and tamte.
  • Quick Links