Access Texture Coordinate Index via Material Instance?

I am trying to set up a material that allows me to adjust the texture coordinate index in my material instance. Is this possible? I currently have a setup that allows me to edit the uv tiling (see attached picture), but I can’t figure out how to gain parameter access to the coordinate index. This would be really useful, so any ideas would be greatly appreciated!
Thanks,
Matt

Hey Matt_Cooke -

There is no direct way to set up a parameter control of the UV Cooridnate index, but there is a workaround of sorts. You can add a StaticSwitchParameter and have one UV Index attached to True and Another Attached to False then the output connected to your Tiling Parameters above.

12762-uvcoord.jpg

Thank You

Eric Ketchum

Thanks Eric,
That works perfectly!
For anyone else wanting to set this up, the network looks like this:

I keep seeing the workaround for switching between two coordinate indexes but how about 5 or even 7? Anything over two?

335169-q.png

easy

Hi, I can prupose a solution that works for N coordinate index

You need to create a Custom node that takes as inputs the desired TexCoor[i] nodes and a Scalar Parameter that indicates the desired coordinate index to pass in the material instance. And then a simple if or switch in HLSL/GLSL code and that’s it.

I post image to explain better :

Hope this helps you :slight_smile: