Aaron Auty Posted September 6, 2015 Share Posted September 6, 2015 I am attempting to use an unevaluated $JOB variable to switch predefined texture sets feeding one ubershader. I have "diffMap" promoted on my shader, and a primitive string attribute "diffmap" with the value. ${JOB}/path/to/my/textures.rat (I have tried '$JOB' as well) If I remove the primitive string attibute, and manually enter "${JOB}/path/to/my/textures.rat" into the promoted "diffMap" slot, it evaluates correctly. Will I need to get into some sort of string reformatting on the promoted parameter? Difficult to share a .hip with the $JOB variable... Hope the above makes sense. Cheers, Aaron. Quote Link to comment Share on other sites More sharing options...
fathom Posted September 6, 2015 Share Posted September 6, 2015 first off, make sure your diffMap primitive value is working -- use a full path to your texture. assuming that's working, then you may need to pass an evaluated version of the path. which should be fine, i would think. $JOB evaluated at the time of assignment vs at the time of rendering shouldn't be a big difference unless you've got pre-baked geo. if that's the case, then you can separate your $JOB portion of the path out of the assignment in your geo and then pass $JOB to your shader as a separate parm and recombine in your shader. Quote Link to comment Share on other sites More sharing options...
anim Posted September 6, 2015 Share Posted September 6, 2015 I don't think the string attributes are ever being expanded at rendertime, mantra will simply use the string as the texture map and "${JOB}/path/to/my/textures.rat" is obviously not a valid path so either make sure your attribute contains expanded path to the textures, or do what Miles said and combine in the shader Quote Link to comment Share on other sites More sharing options...
Aaron Auty Posted September 9, 2015 Author Share Posted September 9, 2015 first off, make sure your diffMap primitive value is working -- use a full path to your texture. assuming that's working, then you may need to pass an evaluated version of the path. which should be fine, i would think. $JOB evaluated at the time of assignment vs at the time of rendering shouldn't be a big difference unless you've got pre-baked geo. if that's the case, then you can separate your $JOB portion of the path out of the assignment in your geo and then pass $JOB to your shader as a separate parm and recombine in your shader. Great idea! Thanks for the tip. 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.