wyy Posted July 24, 2023 Share Posted July 24, 2023 (edited) So I have point attribute named - frame. And I have multiple files named "code (1).png", "code (2).png", "code (3).png".... To pass attribute to material network I use RSUserDataColor node, but I'm not sure how to pass that value to the texture string, pls help me. hip_file.zip Edited July 24, 2023 by wyy Quote Link to comment Share on other sites More sharing options...
DLCool Posted August 15, 2023 Share Posted August 15, 2023 Hello there. I hope this topic is still actual. I made some tests with your scene. First of all I renamed your textures. There is not a good style having whitespaces in file names. Then I added zero padding to numbers: Next. If you want to use animation texture in RS shader you should get it via COP network. It appears that RS doesn't like expressions in a texture name: Make It like this: It works. But every element has the same texture frame1 frame2 Unfortunately Maxon has not made ability to connect anything to the filename channel of the RS texture sampler. So we can not use geometry attribute in there. (or I did not find how to) But I found this. We can use shader switcher if there are not so many textures to switch. I added primitive attribute "texturenum" and gave it values according to the piece number and and the frame number: Then I promoted this attribute to vertices as RS gets user data from vertices. And the modified the shader: Now it works like a charm. But It convenient only for relatively small amount of textures. frame1 frame2 If we want to rule every texture thru the attribute we can make appropriate shader parameters and override them in Material node As in previous example I added "texturenum" primitive attribute and created variable TEXTURENUM. I'll use it to override texture name: And voilàRSTexturesByAttribute.7z Quote Link to comment Share on other sites More sharing options...
Atom Posted August 15, 2023 Share Posted August 15, 2023 You could try the trick of placing your entire material into a subnet. Then go up one level and create a file parm on the subnet. Browse to your file sequence, and then create a relative reference to the file name field on the Texture Sampler node. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.